]> Git Repo - qemu.git/commitdiff
powerpc: use float64 for frsqrte
authorTristan Gingold <[email protected]>
Tue, 3 Jun 2014 09:14:20 +0000 (11:14 +0200)
committerAlexander Graf <[email protected]>
Mon, 16 Jun 2014 11:24:46 +0000 (13:24 +0200)
Remove the code that reduce the result to float32 as the frsqrte
instruction is defined to return a double-precision estimate of
the reciprocal square root.

Although reducing the fractional part is harmless (as the estimation
must have at least 12 bits of precision according to the old PEM),
reducing the exponent range is not correct.

Signed-off-by: Tristan Gingold <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
target-ppc/fpu_helper.c

index cd8f015bd733aad6a43431b3810fe1bb5310a28c..da93d1215af8610b5b46749f452f8aa4df1521b1 100644 (file)
@@ -977,7 +977,6 @@ uint64_t helper_fres(CPUPPCState *env, uint64_t arg)
 uint64_t helper_frsqrte(CPUPPCState *env, uint64_t arg)
 {
     CPU_DoubleU farg;
-    float32 f32;
 
     farg.ll = arg;
 
@@ -991,8 +990,6 @@ uint64_t helper_frsqrte(CPUPPCState *env, uint64_t arg)
         }
         farg.d = float64_sqrt(farg.d, &env->fp_status);
         farg.d = float64_div(float64_one, farg.d, &env->fp_status);
-        f32 = float64_to_float32(farg.d, &env->fp_status);
-        farg.d = float32_to_float64(f32, &env->fp_status);
     }
     return farg.ll;
 }
This page took 0.024935 seconds and 4 git commands to generate.