ia64/xen-unstable

changeset 17019:54bd38dab5ef

ioemu: fix compilation without softfloat
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Feb 11 10:02:39 2008 +0000 (2008-02-11)
parents df9e3ec0490a
children dbb60ed6bc22
files tools/ioemu/cpu-all.h tools/ioemu/target-i386-dm/cpu.h
line diff
     1.1 --- a/tools/ioemu/cpu-all.h	Mon Feb 11 10:01:42 2008 +0000
     1.2 +++ b/tools/ioemu/cpu-all.h	Mon Feb 11 10:02:39 2008 +0000
     1.3 @@ -116,6 +116,7 @@ static inline void tswap64s(uint64_t *s)
     1.4  #define bswaptls(s) bswap64s(s)
     1.5  #endif
     1.6  
     1.7 +#ifdef CONFIG_SOFTFLOAT
     1.8  /* NOTE: arm FPA is horrible as double 32 bit words are stored in big
     1.9     endian ! */
    1.10  typedef union {
    1.11 @@ -134,6 +135,7 @@ typedef union {
    1.12  #endif
    1.13      uint64_t ll;
    1.14  } CPU_DoubleU;
    1.15 +#endif
    1.16  
    1.17  /* CPU memory access without any memory or io remapping */
    1.18  
    1.19 @@ -267,6 +269,7 @@ static inline void stq_le_p(void *ptr, u
    1.20      stl_le_p(p + 4, v >> 32);
    1.21  }
    1.22  
    1.23 +#ifdef CONFIG_SOFTFLOAT
    1.24  /* float access */
    1.25  
    1.26  static inline float32 ldfl_le_p(void *ptr)
    1.27 @@ -304,6 +307,7 @@ static inline void stfq_le_p(void *ptr, 
    1.28      stl_le_p(ptr, u.l.lower);
    1.29      stl_le_p(ptr + 4, u.l.upper);
    1.30  }
    1.31 +#endif
    1.32  
    1.33  #else
    1.34  
    1.35 @@ -342,6 +346,7 @@ static inline void stq_le_p(void *ptr, u
    1.36      *(uint64_t *)ptr = v;
    1.37  }
    1.38  
    1.39 +#ifdef CONFIG_SOFTFLOAT
    1.40  /* float access */
    1.41  
    1.42  static inline float32 ldfl_le_p(void *ptr)
    1.43 @@ -364,6 +369,7 @@ static inline void stfq_le_p(void *ptr, 
    1.44      *(float64 *)ptr = v;
    1.45  }
    1.46  #endif
    1.47 +#endif
    1.48  
    1.49  #if !defined(WORDS_BIGENDIAN) || defined(WORDS_ALIGNED)
    1.50  
    1.51 @@ -456,6 +462,7 @@ static inline void stq_be_p(void *ptr, u
    1.52      stl_be_p(ptr + 4, v);
    1.53  }
    1.54  
    1.55 +#ifdef CONFIG_SOFTFLOAT
    1.56  /* float access */
    1.57  
    1.58  static inline float32 ldfl_be_p(void *ptr)
    1.59 @@ -493,6 +500,7 @@ static inline void stfq_be_p(void *ptr, 
    1.60      stl_be_p(ptr, u.l.upper);
    1.61      stl_be_p(ptr + 4, u.l.lower);
    1.62  }
    1.63 +#endif
    1.64  
    1.65  #else
    1.66  
    1.67 @@ -531,6 +539,7 @@ static inline void stq_be_p(void *ptr, u
    1.68      *(uint64_t *)ptr = v;
    1.69  }
    1.70  
    1.71 +#ifdef CONFIG_SOFTFLOAT
    1.72  /* float access */
    1.73  
    1.74  static inline float32 ldfl_be_p(void *ptr)
    1.75 @@ -552,6 +561,7 @@ static inline void stfq_be_p(void *ptr, 
    1.76  {
    1.77      *(float64 *)ptr = v;
    1.78  }
    1.79 +#endif
    1.80  
    1.81  #endif
    1.82  
     2.1 --- a/tools/ioemu/target-i386-dm/cpu.h	Mon Feb 11 10:01:42 2008 +0000
     2.2 +++ b/tools/ioemu/target-i386-dm/cpu.h	Mon Feb 11 10:02:39 2008 +0000
     2.3 @@ -37,17 +37,21 @@
     2.4  
     2.5  #include "cpu-defs.h"
     2.6  
     2.7 +#ifdef CONFIG_SOFTFLOAT
     2.8  #include "softfloat.h"
     2.9 +#endif
    2.10  
    2.11  #if defined(__i386__) && !defined(CONFIG_SOFTMMU)
    2.12  #define USE_CODE_COPY
    2.13  #endif
    2.14  
    2.15 +#ifdef CONFIG_SOFTFLOAT
    2.16  #ifdef USE_X86LDOUBLE
    2.17  typedef floatx80 CPU86_LDouble;
    2.18  #else
    2.19  typedef float64 CPU86_LDouble;
    2.20  #endif
    2.21 +#endif
    2.22  
    2.23  /* Empty for now */
    2.24  typedef struct CPUX86State {