diff options
Diffstat (limited to 'target-ppc/op_helper.c')
-rw-r--r-- | target-ppc/op_helper.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index 6ea3ba3dae..fd36423854 100644 --- a/target-ppc/op_helper.c +++ b/target-ppc/op_helper.c @@ -237,6 +237,24 @@ target_ulong helper_popcntb_64 (target_ulong val) /*****************************************************************************/ /* Floating point operations helpers */ +uint64_t helper_float32_to_float64(uint32_t arg) +{ + CPU_FloatU f; + CPU_DoubleU d; + f.l = arg; + d.d = float32_to_float64(f.f, &env->fp_status); + return d.ll; +} + +uint32_t helper_float64_to_float32(uint64_t arg) +{ + CPU_FloatU f; + CPU_DoubleU d; + d.ll = arg; + f.f = float64_to_float32(d.d, &env->fp_status); + return f.l; +} + static always_inline int fpisneg (float64 d) { CPU_DoubleU u; |