[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH v1 02/17] linux-user: arm: set CPSR.E/SCTLR.E0E correc
From: |
Peter Crosthwaite |
Subject: |
[Qemu-arm] [PATCH v1 02/17] linux-user: arm: set CPSR.E/SCTLR.E0E correctly for BE mode |
Date: |
Sun, 17 Jan 2016 23:12:29 -0800 |
From: Peter Crosthwaite <address@hidden>
If doing big-endian linux-user mode, set both the CPSR.E and SCTLR.E0E
bits. This sets big-endian mode for data accesses in AA32 and AA64
resp.
Signed-off-by: Peter Crosthwaite <address@hidden>
---
linux-user/main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/linux-user/main.c b/linux-user/main.c
index ee12035..4f8ea9c 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -4454,6 +4454,10 @@ int main(int argc, char **argv, char **envp)
for(i = 0; i < 16; i++) {
env->regs[i] = regs->uregs[i];
}
+#ifdef TARGET_WORDS_BIGENDIAN
+ env->uncached_cpsr |= CPSR_E;
+ env->cp15.sctlr_el[1] |= SCTLR_E0E;
+#endif
/* Enable BE8. */
if (EF_ARM_EABI_VERSION(info->elf_flags) >= EF_ARM_EABI_VER4
&& (info->elf_flags & EF_ARM_BE8)) {
--
1.9.1
- [Qemu-arm] [PATCH v1 00/17] ARM big-endian and setend support, Peter Crosthwaite, 2016/01/18
- [Qemu-arm] [PATCH v1 01/17] linux-user: arm: fix coding style for some linux-user signal functions, Peter Crosthwaite, 2016/01/18
- [Qemu-arm] [PATCH v1 03/17] linux-user: arm: handle CPSR.E correctly in strex emulation, Peter Crosthwaite, 2016/01/18
- [Qemu-arm] [PATCH v1 02/17] linux-user: arm: set CPSR.E/SCTLR.E0E correctly for BE mode,
Peter Crosthwaite <=
- [Qemu-arm] [PATCH v1 04/17] target-arm: implement SCTLR.EE, Peter Crosthwaite, 2016/01/18
- [Qemu-arm] [PATCH v1 06/17] target-arm: introduce disas flag for endianness, Peter Crosthwaite, 2016/01/18
- [Qemu-arm] [PATCH v1 09/17] target-arm: introduce tbflag for endianness, Peter Crosthwaite, 2016/01/18
- [Qemu-arm] [PATCH v1 07/17] target-arm: a64: Add endianness support, Peter Crosthwaite, 2016/01/18
- [Qemu-arm] [PATCH v1 05/17] target-arm: pass DisasContext to gen_aa32_ld*/st*, Peter Crosthwaite, 2016/01/18