mirror of https://gitee.com/openkylin/qemu.git
linux-user: arm: set CPSR.E/SCTLR.E0E correctly for BE mode
If doing big-endian linux-user mode, set both the CPSR.E and SCTLR.E0E bits. This sets big-endian mode for data accesses. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
b2e62d9a7b
commit
9c5a746038
|
@ -4453,7 +4453,8 @@ int main(int argc, char **argv, char **envp)
|
||||||
/* Enable BE8. */
|
/* Enable BE8. */
|
||||||
if (EF_ARM_EABI_VERSION(info->elf_flags) >= EF_ARM_EABI_VER4
|
if (EF_ARM_EABI_VERSION(info->elf_flags) >= EF_ARM_EABI_VER4
|
||||||
&& (info->elf_flags & EF_ARM_BE8)) {
|
&& (info->elf_flags & EF_ARM_BE8)) {
|
||||||
/* nothing for now, CPSR.E not emulated yet */
|
env->uncached_cpsr |= CPSR_E;
|
||||||
|
env->cp15.sctlr_el[1] |= SCTLR_E0E;
|
||||||
} else {
|
} else {
|
||||||
env->cp15.sctlr_el[1] |= SCTLR_B;
|
env->cp15.sctlr_el[1] |= SCTLR_B;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue