summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBharata B Rao2017-01-06 07:14:46 +0100
committerDavid Gibson2017-01-31 00:10:14 +0100
commit5dc22bf58184a8da41e5d346570665fc99c0ca5f (patch)
tree489b546581d10ed5392ae1710a88b7ec4d2d6d3e
parenttarget-ppc: Use float64 arg in helper_compute_fprf() (diff)
downloadqemu-5dc22bf58184a8da41e5d346570665fc99c0ca5f.tar.gz
qemu-5dc22bf58184a8da41e5d346570665fc99c0ca5f.tar.xz
qemu-5dc22bf58184a8da41e5d346570665fc99c0ca5f.zip
target-ppc: Replace isden by float64_is_zero_or_denormal
Replace isden() by float64_is_zero_or_denormal() so that code in helper_compute_fprf() can be reused to work with float128 argument. Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r--target/ppc/fpu_helper.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c
index 4da991abfa..5a7aa75561 100644
--- a/target/ppc/fpu_helper.c
+++ b/target/ppc/fpu_helper.c
@@ -47,15 +47,6 @@ uint32_t helper_float64_to_float32(CPUPPCState *env, uint64_t arg)
return f.l;
}
-static inline int isden(float64 d)
-{
- CPU_DoubleU u;
-
- u.d = d;
-
- return ((u.ll >> 52) & 0x7FF) == 0;
-}
-
static inline int ppc_float32_get_unbiased_exp(float32 f)
{
return ((f >> 23) & 0xFF) - 127;
@@ -96,7 +87,7 @@ void helper_compute_fprf(CPUPPCState *env, float64 arg)
fprf = 0x02;
}
} else {
- if (isden(arg)) {
+ if (float64_is_zero_or_denormal(arg)) {
/* Denormalized numbers */
fprf = 0x10;
} else {