aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-02-11 10:02:39 +0000
committerKeir Fraser <keir.fraser@citrix.com>2008-02-11 10:02:39 +0000
commit3988274ce74895aca83ebbf1c492fa94e8fc9797 (patch)
tree534899dd22f27d8f14b9296a3ffb29ad4a4e6085 /tools
parentb108e290094d61a8fc3fdd5d131cc3a523ad1eb2 (diff)
downloadxen-3988274ce74895aca83ebbf1c492fa94e8fc9797.tar.gz
xen-3988274ce74895aca83ebbf1c492fa94e8fc9797.tar.bz2
xen-3988274ce74895aca83ebbf1c492fa94e8fc9797.zip
ioemu: fix compilation without softfloat
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/ioemu/cpu-all.h10
-rw-r--r--tools/ioemu/target-i386-dm/cpu.h4
2 files changed, 14 insertions, 0 deletions
diff --git a/tools/ioemu/cpu-all.h b/tools/ioemu/cpu-all.h
index 2f125b785d..9cc854ed7c 100644
--- a/tools/ioemu/cpu-all.h
+++ b/tools/ioemu/cpu-all.h
@@ -116,6 +116,7 @@ static inline void tswap64s(uint64_t *s)
#define bswaptls(s) bswap64s(s)
#endif
+#ifdef CONFIG_SOFTFLOAT
/* NOTE: arm FPA is horrible as double 32 bit words are stored in big
endian ! */
typedef union {
@@ -134,6 +135,7 @@ typedef union {
#endif
uint64_t ll;
} CPU_DoubleU;
+#endif
/* CPU memory access without any memory or io remapping */
@@ -267,6 +269,7 @@ static inline void stq_le_p(void *ptr, uint64_t v)
stl_le_p(p + 4, v >> 32);
}
+#ifdef CONFIG_SOFTFLOAT
/* float access */
static inline float32 ldfl_le_p(void *ptr)
@@ -304,6 +307,7 @@ static inline void stfq_le_p(void *ptr, float64 v)
stl_le_p(ptr, u.l.lower);
stl_le_p(ptr + 4, u.l.upper);
}
+#endif
#else
@@ -342,6 +346,7 @@ static inline void stq_le_p(void *ptr, uint64_t v)
*(uint64_t *)ptr = v;
}
+#ifdef CONFIG_SOFTFLOAT
/* float access */
static inline float32 ldfl_le_p(void *ptr)
@@ -364,6 +369,7 @@ static inline void stfq_le_p(void *ptr, float64 v)
*(float64 *)ptr = v;
}
#endif
+#endif
#if !defined(WORDS_BIGENDIAN) || defined(WORDS_ALIGNED)
@@ -456,6 +462,7 @@ static inline void stq_be_p(void *ptr, uint64_t v)
stl_be_p(ptr + 4, v);
}
+#ifdef CONFIG_SOFTFLOAT
/* float access */
static inline float32 ldfl_be_p(void *ptr)
@@ -493,6 +500,7 @@ static inline void stfq_be_p(void *ptr, float64 v)
stl_be_p(ptr, u.l.upper);
stl_be_p(ptr + 4, u.l.lower);
}
+#endif
#else
@@ -531,6 +539,7 @@ static inline void stq_be_p(void *ptr, uint64_t v)
*(uint64_t *)ptr = v;
}
+#ifdef CONFIG_SOFTFLOAT
/* float access */
static inline float32 ldfl_be_p(void *ptr)
@@ -552,6 +561,7 @@ static inline void stfq_be_p(void *ptr, float64 v)
{
*(float64 *)ptr = v;
}
+#endif
#endif
diff --git a/tools/ioemu/target-i386-dm/cpu.h b/tools/ioemu/target-i386-dm/cpu.h
index 017b8c021b..6071a8529e 100644
--- a/tools/ioemu/target-i386-dm/cpu.h
+++ b/tools/ioemu/target-i386-dm/cpu.h
@@ -37,17 +37,21 @@
#include "cpu-defs.h"
+#ifdef CONFIG_SOFTFLOAT
#include "softfloat.h"
+#endif
#if defined(__i386__) && !defined(CONFIG_SOFTMMU)
#define USE_CODE_COPY
#endif
+#ifdef CONFIG_SOFTFLOAT
#ifdef USE_X86LDOUBLE
typedef floatx80 CPU86_LDouble;
#else
typedef float64 CPU86_LDouble;
#endif
+#endif
/* Empty for now */
typedef struct CPUX86State {