diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-03-13 19:19:16 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-03-13 19:19:16 +0000 |
commit | 0ca9d3807c8c429f7b21ffcac7f7acdd4d9659b0 (patch) | |
tree | c02e1af408f30d5564f048239336c75d62a67997 /target-ppc/op_helper_mem.h | |
parent | 6b59fc74b5b811664e4621e65b64e39c501249be (diff) |
Use float32/64 instead of float/double
The patch below uses the float32 and float64 types instead of the float
and double types in the PPC code. This doesn't change anything when
using softfloat-native as the types are the same, but that helps
compiling the PPC target with softfloat.
It also defines a new union CPU_FloatU in addition to CPU_DoubleU, and
use them instead of identical unions that are defined in numerous
places.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4047 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/op_helper_mem.h')
-rw-r--r-- | target-ppc/op_helper_mem.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/target-ppc/op_helper_mem.h b/target-ppc/op_helper_mem.h index 1d7b991cac..c8ef7ce242 100644 --- a/target-ppc/op_helper_mem.h +++ b/target-ppc/op_helper_mem.h @@ -316,15 +316,12 @@ void glue(do_POWER2_lfq, MEMSUFFIX) (void) FT1 = glue(ldfq, MEMSUFFIX)((uint32_t)(T0 + 4)); } -static always_inline double glue(ldfqr, MEMSUFFIX) (target_ulong EA) +static always_inline float64 glue(ldfqr, MEMSUFFIX) (target_ulong EA) { - union { - double d; - uint64_t u; - } u; + CPU_DoubleU u; u.d = glue(ldfq, MEMSUFFIX)(EA); - u.u = bswap64(u.u); + u.ll = bswap64(u.ll); return u.d; } @@ -341,15 +338,12 @@ void glue(do_POWER2_stfq, MEMSUFFIX) (void) glue(stfq, MEMSUFFIX)((uint32_t)(T0 + 4), FT1); } -static always_inline void glue(stfqr, MEMSUFFIX) (target_ulong EA, double d) +static always_inline void glue(stfqr, MEMSUFFIX) (target_ulong EA, float64 d) { - union { - double d; - uint64_t u; - } u; + CPU_DoubleU u; u.d = d; - u.u = bswap64(u.u); + u.ll = bswap64(u.ll); glue(stfq, MEMSUFFIX)(EA, u.d); } |