Re: [Qemu-devel] [PATCH 4/4] target-arm: always set endian bits in big-endian mode

2013-03-06 Thread Fabien Chouteau
On 03/06/2013 12:08 AM, Peter Maydell wrote: On 5 March 2013 23:07, Fabien Chouteau chout...@adacore.com wrote: On 03/05/2013 01:33 PM, Peter Maydell wrote: IE + BE8 (data) looks very very similar to BE32 from the point of view of code on the CPU; it is code that expects a BE32 kind of view of

Re: [Qemu-devel] [PATCH 4/4] target-arm: always set endian bits in big-endian mode

2013-03-05 Thread Fabien Chouteau
On 03/04/2013 02:24 PM, Paul Brook wrote: On 03/01/2013 09:58 PM, Paul Brook wrote: +#ifdef TARGET_WORDS_BIGENDIAN +if (arm_feature(env, ARM_FEATURE_V6) +|| arm_feature(env, ARM_FEATURE_V7)) { +/* IE and EE bits stay set for big-endian */ +env-cp15.c1_sys |= (1

Re: [Qemu-devel] [PATCH 4/4] target-arm: always set endian bits in big-endian mode

2013-03-05 Thread Peter Maydell
On 5 March 2013 18:56, Fabien Chouteau chout...@adacore.com wrote: On 03/04/2013 02:24 PM, Paul Brook wrote: On 03/01/2013 09:58 PM, Paul Brook wrote: +#ifdef TARGET_WORDS_BIGENDIAN +if (arm_feature(env, ARM_FEATURE_V6) +|| arm_feature(env, ARM_FEATURE_V7)) { +/* IE and

Re: [Qemu-devel] [PATCH 4/4] target-arm: always set endian bits in big-endian mode

2013-03-05 Thread Fabien Chouteau
On 03/05/2013 01:33 PM, Peter Maydell wrote: On 5 March 2013 18:56, Fabien Chouteau chout...@adacore.com wrote: On 03/04/2013 02:24 PM, Paul Brook wrote: On 03/01/2013 09:58 PM, Paul Brook wrote: This is wrong for all the CPUs QEMU crrently supports. SCTLR.IE is defined to be zero. Again

Re: [Qemu-devel] [PATCH 4/4] target-arm: always set endian bits in big-endian mode

2013-03-05 Thread Peter Maydell
On 5 March 2013 23:07, Fabien Chouteau chout...@adacore.com wrote: On 03/05/2013 01:33 PM, Peter Maydell wrote: To correctly emulate a bigendian v6/v7 non-R profile core you would need to arrange for the bswap_code flag to be set (which then causes us to re-byte-swap code accesses to undo the

Re: [Qemu-devel] [PATCH 4/4] target-arm: always set endian bits in big-endian mode

2013-03-04 Thread Fabien Chouteau
On 03/01/2013 09:58 PM, Paul Brook wrote: +#ifdef TARGET_WORDS_BIGENDIAN +if (arm_feature(env, ARM_FEATURE_V6) +|| arm_feature(env, ARM_FEATURE_V7)) { +/* IE and EE bits stay set for big-endian */ +env-cp15.c1_sys |= (1 31) | (1 25); +} +#endif This is

Re: [Qemu-devel] [PATCH 4/4] target-arm: always set endian bits in big-endian mode

2013-03-04 Thread Paul Brook
On 03/01/2013 09:58 PM, Paul Brook wrote: +#ifdef TARGET_WORDS_BIGENDIAN +if (arm_feature(env, ARM_FEATURE_V6) +|| arm_feature(env, ARM_FEATURE_V7)) { +/* IE and EE bits stay set for big-endian */ +env-cp15.c1_sys |= (1 31) | (1 25); +} +#endif

[Qemu-devel] [PATCH 4/4] target-arm: always set endian bits in big-endian mode

2013-03-01 Thread Fabien Chouteau
CPSR.E, SCTLR.EE and SCTLR.IE Signed-off-by: Fabien Chouteau chout...@adacore.com --- target-arm/cpu.c| 11 +++ target-arm/helper.c | 18 ++ 2 files changed, 29 insertions(+) diff --git a/target-arm/cpu.c b/target-arm/cpu.c index 5dfcb74..354843e 100644 ---

Re: [Qemu-devel] [PATCH 4/4] target-arm: always set endian bits in big-endian mode

2013-03-01 Thread Paul Brook
+#ifdef TARGET_WORDS_BIGENDIAN +if (arm_feature(env, ARM_FEATURE_V6) +|| arm_feature(env, ARM_FEATURE_V7)) { +/* IE and EE bits stay set for big-endian */ +env-cp15.c1_sys |= (1 31) | (1 25); +} +#endif This is wrong for all the CPUs QEMU crrently