From 13822781d4732f847555a2f60560c71c531c9f98 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Wed, 20 Apr 2011 13:04:23 +0200 Subject: target-i386: fix helper_fdiv() wrt softfloat Reviewed-by: Peter Maydell Signed-off-by: Aurelien Jarno --- target-i386/op_helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'target-i386/op_helper.c') diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c index 4850c63..bd24d8c 100644 --- a/target-i386/op_helper.c +++ b/target-i386/op_helper.c @@ -3440,9 +3440,10 @@ static void fpu_set_exception(int mask) static inline CPU86_LDouble helper_fdiv(CPU86_LDouble a, CPU86_LDouble b) { - if (b == 0.0) + if (floatx_is_zero(b)) { fpu_set_exception(FPUS_ZE); - return a / b; + } + return floatx_div(a, b, &env->fp_status); } static void fpu_raise_exception(void) -- cgit v1.1