diff --git a/qemu/target/arm/cpu.c b/qemu/target/arm/cpu.c index dce2f45b..45540fe6 100644 --- a/qemu/target/arm/cpu.c +++ b/qemu/target/arm/cpu.c @@ -2188,7 +2188,7 @@ ARMCPU *cpu_arm_init(struct uc_struct *uc) env->uncached_cpsr |= CPSR_E; } - if (uc->mode & UC_MODE_BIG_ENDIAN && !arm_feature(env, ARM_FEATURE_V7) && !arm_feature(env, ARM_FEATURE_V8)) { + if (uc->mode & UC_MODE_BIG_ENDIAN) { // Big endian code access. env->cp15.sctlr_ns |= SCTLR_B; } diff --git a/qemu/target/arm/cpu.h b/qemu/target/arm/cpu.h index bbc66eb5..f857850c 100644 --- a/qemu/target/arm/cpu.h +++ b/qemu/target/arm/cpu.h @@ -3098,7 +3098,8 @@ static inline bool arm_sctlr_b(CPUARMState *env) * let linux-user ignore the fact that it conflicts with SCTLR_B. * This lets people run BE32 binaries with "-cpu any". */ - !arm_feature(env, ARM_FEATURE_V7) && + // Unicorn: Our hack to support BE32 mode + // !arm_feature(env, ARM_FEATURE_V7) && (env->cp15.sctlr_el[1] & SCTLR_B) != 0; }