Skip to content

Commit

Permalink
target/arm: Don't set INSN_ARM_BE32 for CONFIG_USER_ONLY
Browse files Browse the repository at this point in the history
This matches translator behaviour in arm_lduw_code.

Fixes: https://bugs.launchpad.net/qemu/+bug/1724485
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Oct 25, 2017
1 parent 6cd6151 commit 7bcdbf5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions target/arm/cpu.c
Expand Up @@ -477,6 +477,7 @@ static void arm_disas_set_info(CPUState *cpu, disassemble_info *info)
{
ARMCPU *ac = ARM_CPU(cpu);
CPUARMState *env = &ac->env;
bool sctlr_b;

if (is_a64(env)) {
/* We might not be compiled with the A64 disassembler
Expand All @@ -491,17 +492,21 @@ static void arm_disas_set_info(CPUState *cpu, disassemble_info *info)
} else {
info->print_insn = print_insn_arm;
}
if (bswap_code(arm_sctlr_b(env))) {

sctlr_b = arm_sctlr_b(env);
if (bswap_code(sctlr_b)) {
#ifdef TARGET_WORDS_BIGENDIAN
info->endian = BFD_ENDIAN_LITTLE;
#else
info->endian = BFD_ENDIAN_BIG;
#endif
}
info->flags &= ~INSN_ARM_BE32;
if (arm_sctlr_b(env)) {
#ifndef CONFIG_USER_ONLY
if (sctlr_b) {
info->flags |= INSN_ARM_BE32;
}
#endif
}

uint64_t arm_cpu_mp_affinity(int idx, uint8_t clustersz)
Expand Down

0 comments on commit 7bcdbf5

Please sign in to comment.