Commit 832ed0fa340cedb948a63abd472c7ba4bfd911c8

Authored by bellard
1 parent 78573df6

ARM FPU endianness fix


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1265 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 5 additions and 4 deletions
cpu-all.h
... ... @@ -114,18 +114,19 @@ static inline void tswap64s(uint64_t *s)
114 114 #define tswapls(s) tswap64s((uint64_t *)(s))
115 115 #endif
116 116  
117   -/* NOTE: arm is horrible as double 32 bit words are stored in big endian ! */
  117 +/* NOTE: arm FPA is horrible as double 32 bit words are stored in big
  118 + endian ! */
118 119 typedef union {
119 120 double d;
120   -#if !defined(WORDS_BIGENDIAN) && !defined(__arm__)
  121 +#if defined(WORDS_BIGENDIAN) || (defined(__arm__) && !defined(__VFP_FP__))
121 122 struct {
122   - uint32_t lower;
123 123 uint32_t upper;
  124 + uint32_t lower;
124 125 } l;
125 126 #else
126 127 struct {
127   - uint32_t upper;
128 128 uint32_t lower;
  129 + uint32_t upper;
129 130 } l;
130 131 #endif
131 132 uint64_t ll;
... ...