aboutsummaryrefslogtreecommitdiff
path: root/target-ppc
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-15 17:14:05 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-15 17:14:05 +0000
commit3b27fc36e3b4e249d42b816fe13a0522729e5464 (patch)
treef906464ede556a2ffe17bfc246c5606e61ac7a4e /target-ppc
parente0147e41385d1ec2961d1300a135cb2c859b04bc (diff)
target-ppc: correctly propagate NaN in division
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6048 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc')
-rw-r--r--target-ppc/op_helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c
index 2ba1e2bd98..20b124a63b 100644
--- a/target-ppc/op_helper.c
+++ b/target-ppc/op_helper.c
@@ -1135,7 +1135,7 @@ uint64_t helper_fdiv (uint64_t arg1, uint64_t arg2)
} else if (unlikely(isinfinity(farg1.d) && isinfinity(farg2.d))) {
/* Division of infinity by infinity */
farg1.ll = fload_invalid_op_excp(POWERPC_EXCP_FP_VXIDI);
- } else if (unlikely(iszero(farg2.d))) {
+ } else if (unlikely(!float64_is_nan(farg1.d) && iszero(farg2.d))) {
if (iszero(farg1.d)) {
/* Division of zero by zero */
farg1.ll = fload_invalid_op_excp(POWERPC_EXCP_FP_VXZDZ);