aboutsummaryrefslogtreecommitdiff
path: root/target-ppc
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2014-06-03 11:14:20 +0200
committerAlexander Graf <agraf@suse.de>2014-06-16 13:24:46 +0200
commite223bcad6e0952d0e205f42b411e96e42262eded (patch)
tree03934e37eed246e1aff743507d3554d49d85f506 /target-ppc
parent23825581d7c106db28f902d09b9a7274b3c8dede (diff)
powerpc: use float64 for frsqrte
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 <gingold@adacore.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'target-ppc')
-rw-r--r--target-ppc/fpu_helper.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/target-ppc/fpu_helper.c b/target-ppc/fpu_helper.c
index cd8f015bd7..da93d1215a 100644
--- a/target-ppc/fpu_helper.c
+++ b/target-ppc/fpu_helper.c
@@ -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;
}