Arm host float endian fix
The newer arm VFP floating point units store double values with natural word-ordering, unlike the old FPA unit which always used big-endian.
Patch below updates host conditionals to reflect this.
Paul
Index: cpu-all.h
===================================================================
RCS file: /cvsroot/qemu/qemu/cpu-all.h,v
retrieving revision 1.39
cpu-all.h 6 Feb 2005 00:57:27 -0000 renamed from cpu-all.h 28 Jan 2005 22:37:22 -0000 1.39 +3 -2
@@ -114,10 +114,11 @@ static inline void tswap64s(uint64_t *s) #define tswapls(s) tswap64s((uint64_t *)(s)) #endif -/* NOTE: arm is horrible as double 32 bit words are stored in big endian ! */ +/* NOTE: arm FPA is horrible as double 32 bit words are stored in big endian! + */ typedef union { double d; -#if !defined(WORDS_BIGENDIAN) && !defined(__arm__) +#if !defined(WORDS_BIGENDIAN) && !defined(__arm__) && !defined (__VFP_FP__) struct { uint32_t lower; uint32_t upper;
Quoted 2 lines · Paul Brook
The newer arm VFP floating point units store double values with natural word-ordering, unlike the old FPA unit which always used big-endian.
While we're on the subject, something similar to the patch in this email is also still needed for proper floating point emulation if the host and (ARM) target are not both little-endian.
http://lists.gnu.org/archive/html/qemu-devel/2004-12/msg00339.html
--L