Commit 3b27fc36 authored by aurel32's avatar aurel32

target-ppc: correctly propagate NaN in division

Signed-off-by: default avatarAurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6048 c046a42c-6fe2-441c-8c8c-71466251a162
parent e0147e41
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment