Hack more to support BE32

This commit is contained in:
mio 2022-10-21 11:29:57 +02:00
parent c30a712058
commit 6162708bb2
No known key found for this signature in database
GPG Key ID: DFF27E34A47CB873
2 changed files with 3 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}