ARM FPU endianness fix
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 7 Feb 2005 12:35:16 +0000 (12:35 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 7 Feb 2005 12:35:16 +0000 (12:35 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1265 c046a42c-6fe2-441c-8c8c-71466251a162

cpu-all.h

index 1361cf1..8643079 100644 (file)
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -114,18 +114,19 @@ 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;
+        uint32_t lower;
     } l;
 #else
     struct {
-        uint32_t upper;
         uint32_t lower;
+        uint32_t upper;
     } l;
 #endif
     uint64_t ll;