Patchwork [098/111] m68k: use exp2l() to compute exp2_FP0()

login
register
mail settings
Submitter Bryce Lanham
Date Aug. 17, 2011, 8:53 p.m.
Message ID <1313614410-29359-9-git-send-email-blanham@gmail.com>
Download mbox | patch
Permalink /patch/110452/
State New
Headers show

Comments

Bryce Lanham - Aug. 17, 2011, 8:53 p.m.
From: Laurent Vivier <laurent@vivier.eu>

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 target-m68k/helper.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

Patch

diff --git a/target-m68k/helper.c b/target-m68k/helper.c
index d4364f7..979c8e5 100644
--- a/target-m68k/helper.c
+++ b/target-m68k/helper.c
@@ -1456,17 +1456,17 @@  void HELPER(exp_FP0)(CPUState *env)
 
 void HELPER(exp2_FP0)(CPUState *env)
 {
-    float32 res;
     floatx80 f;
+    long double res;
 
     f = FP0_to_floatx80(env);
+
     DBG_FPUH("exp2_FP0 %Lg", floatx80_to_ldouble(f));
 
-    res = float32_exp2(floatx80_to_float32(f, &env->fp_status),
-                       &env->fp_status);
-    DBG_FPU(" = %f\n", FLOAT(res));
+    res = exp2l(floatx80_to_ldouble(f));
 
-    floatx80_to_FP0(env, float32_to_floatx80(res, &env->fp_status));
+    DBG_FPU(" = %Lg\n", res);
+    floatx80_to_FP0(env, ldouble_to_floatx80(res));
 }
 
 void HELPER(exp10_FP0)(CPUState *env)