diff options
Diffstat (limited to 'target-ppc/op_mem.h')
-rw-r--r-- | target-ppc/op_mem.h | 133 |
1 files changed, 0 insertions, 133 deletions
diff --git a/target-ppc/op_mem.h b/target-ppc/op_mem.h index 912ff65320..5eb8205785 100644 --- a/target-ppc/op_mem.h +++ b/target-ppc/op_mem.h @@ -145,139 +145,6 @@ void OPPROTO glue(op_stsw_64, MEMSUFFIX) (void) } #endif -/*** Floating-point store ***/ -#define PPC_STF_OP(name, op) \ -void OPPROTO glue(glue(op_st, name), MEMSUFFIX) (void) \ -{ \ - glue(op, MEMSUFFIX)((uint32_t)T0, FT0); \ - RETURN(); \ -} - -#if defined(TARGET_PPC64) -#define PPC_STF_OP_64(name, op) \ -void OPPROTO glue(glue(glue(op_st, name), _64), MEMSUFFIX) (void) \ -{ \ - glue(op, MEMSUFFIX)((uint64_t)T0, FT0); \ - RETURN(); \ -} -#endif - -static always_inline void glue(stfs, MEMSUFFIX) (target_ulong EA, float64 d) -{ - glue(stfl, MEMSUFFIX)(EA, float64_to_float32(d, &env->fp_status)); -} - -static always_inline void glue(stfiw, MEMSUFFIX) (target_ulong EA, float64 d) -{ - CPU_DoubleU u; - - /* Store the low order 32 bits without any conversion */ - u.d = d; - glue(st32, MEMSUFFIX)(EA, u.l.lower); -} - -PPC_STF_OP(fd, stfq); -PPC_STF_OP(fs, stfs); -PPC_STF_OP(fiw, stfiw); -#if defined(TARGET_PPC64) -PPC_STF_OP_64(fd, stfq); -PPC_STF_OP_64(fs, stfs); -PPC_STF_OP_64(fiw, stfiw); -#endif - -static always_inline void glue(stfqr, MEMSUFFIX) (target_ulong EA, float64 d) -{ - CPU_DoubleU u; - - u.d = d; - u.ll = bswap64(u.ll); - glue(stfq, MEMSUFFIX)(EA, u.d); -} - -static always_inline void glue(stfsr, MEMSUFFIX) (target_ulong EA, float64 d) -{ - CPU_FloatU u; - - u.f = float64_to_float32(d, &env->fp_status); - u.l = bswap32(u.l); - glue(stfl, MEMSUFFIX)(EA, u.f); -} - -static always_inline void glue(stfiwr, MEMSUFFIX) (target_ulong EA, float64 d) -{ - CPU_DoubleU u; - - /* Store the low order 32 bits without any conversion */ - u.d = d; - u.l.lower = bswap32(u.l.lower); - glue(st32, MEMSUFFIX)(EA, u.l.lower); -} - -PPC_STF_OP(fd_le, stfqr); -PPC_STF_OP(fs_le, stfsr); -PPC_STF_OP(fiw_le, stfiwr); -#if defined(TARGET_PPC64) -PPC_STF_OP_64(fd_le, stfqr); -PPC_STF_OP_64(fs_le, stfsr); -PPC_STF_OP_64(fiw_le, stfiwr); -#endif - -/*** Floating-point load ***/ -#define PPC_LDF_OP(name, op) \ -void OPPROTO glue(glue(op_l, name), MEMSUFFIX) (void) \ -{ \ - FT0 = glue(op, MEMSUFFIX)((uint32_t)T0); \ - RETURN(); \ -} - -#if defined(TARGET_PPC64) -#define PPC_LDF_OP_64(name, op) \ -void OPPROTO glue(glue(glue(op_l, name), _64), MEMSUFFIX) (void) \ -{ \ - FT0 = glue(op, MEMSUFFIX)((uint64_t)T0); \ - RETURN(); \ -} -#endif - -static always_inline float64 glue(ldfs, MEMSUFFIX) (target_ulong EA) -{ - return float32_to_float64(glue(ldfl, MEMSUFFIX)(EA), &env->fp_status); -} - -PPC_LDF_OP(fd, ldfq); -PPC_LDF_OP(fs, ldfs); -#if defined(TARGET_PPC64) -PPC_LDF_OP_64(fd, ldfq); -PPC_LDF_OP_64(fs, ldfs); -#endif - -static always_inline float64 glue(ldfqr, MEMSUFFIX) (target_ulong EA) -{ - CPU_DoubleU u; - - u.d = glue(ldfq, MEMSUFFIX)(EA); - u.ll = bswap64(u.ll); - - return u.d; -} - -static always_inline float64 glue(ldfsr, MEMSUFFIX) (target_ulong EA) -{ - CPU_FloatU u; - - u.f = glue(ldfl, MEMSUFFIX)(EA); - u.l = bswap32(u.l); - - return float32_to_float64(u.f, &env->fp_status); -} - -PPC_LDF_OP(fd_le, ldfqr); -PPC_LDF_OP(fs_le, ldfsr); -#if defined(TARGET_PPC64) -PPC_LDF_OP_64(fd_le, ldfqr); -PPC_LDF_OP_64(fs_le, ldfsr); -#endif - /* Load and set reservation */ void OPPROTO glue(op_lwarx, MEMSUFFIX) (void) { |