diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-03-13 18:50:23 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-03-13 18:50:23 +0000 |
commit | 53cd6637924a83481038b2266c59dc1e1ff7bb11 (patch) | |
tree | 93b78827af1a3c40325c7bbd406b74c49975e903 /cpu-all.h | |
parent | 7a0e1f41ceeb658791a1456ffc7f8f9edca7da19 (diff) |
soft float support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1337 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'cpu-all.h')
-rw-r--r-- | cpu-all.h | 42 |
1 files changed, 21 insertions, 21 deletions
@@ -119,7 +119,7 @@ static inline void tswap64s(uint64_t *s) /* NOTE: arm FPA is horrible as double 32 bit words are stored in big endian ! */ typedef union { - double d; + float64 d; #if defined(WORDS_BIGENDIAN) || (defined(__arm__) && !defined(__VFP_FP__)) struct { uint32_t upper; @@ -268,27 +268,27 @@ static inline void stq_p(void *ptr, uint64_t v) /* float access */ -static inline float ldfl_p(void *ptr) +static inline float32 ldfl_p(void *ptr) { union { - float f; + float32 f; uint32_t i; } u; u.i = ldl_p(ptr); return u.f; } -static inline void stfl_p(void *ptr, float v) +static inline void stfl_p(void *ptr, float32 v) { union { - float f; + float32 f; uint32_t i; } u; u.f = v; stl_p(ptr, u.i); } -static inline double ldfq_p(void *ptr) +static inline float64 ldfq_p(void *ptr) { CPU_DoubleU u; u.l.lower = ldl_p(ptr); @@ -296,7 +296,7 @@ static inline double ldfq_p(void *ptr) return u.d; } -static inline void stfq_p(void *ptr, double v) +static inline void stfq_p(void *ptr, float64 v) { CPU_DoubleU u; u.d = v; @@ -397,27 +397,27 @@ static inline void stq_p(void *ptr, uint64_t v) /* float access */ -static inline float ldfl_p(void *ptr) +static inline float32 ldfl_p(void *ptr) { union { - float f; + float32 f; uint32_t i; } u; u.i = ldl_p(ptr); return u.f; } -static inline void stfl_p(void *ptr, float v) +static inline void stfl_p(void *ptr, float32 v) { union { - float f; + float32 f; uint32_t i; } u; u.f = v; stl_p(ptr, u.i); } -static inline double ldfq_p(void *ptr) +static inline float64 ldfq_p(void *ptr) { CPU_DoubleU u; u.l.upper = ldl_p(ptr); @@ -425,7 +425,7 @@ static inline double ldfq_p(void *ptr) return u.d; } -static inline void stfq_p(void *ptr, double v) +static inline void stfq_p(void *ptr, float64 v) { CPU_DoubleU u; u.d = v; @@ -472,24 +472,24 @@ static inline void stq_p(void *ptr, uint64_t v) /* float access */ -static inline float ldfl_p(void *ptr) +static inline float32 ldfl_p(void *ptr) { - return *(float *)ptr; + return *(float32 *)ptr; } -static inline double ldfq_p(void *ptr) +static inline float64 ldfq_p(void *ptr) { - return *(double *)ptr; + return *(float64 *)ptr; } -static inline void stfl_p(void *ptr, float v) +static inline void stfl_p(void *ptr, float32 v) { - *(float *)ptr = v; + *(float32 *)ptr = v; } -static inline void stfq_p(void *ptr, double v) +static inline void stfq_p(void *ptr, float64 v) { - *(double *)ptr = v; + *(float64 *)ptr = v; } #endif |