summaryrefslogtreecommitdiff
path: root/target-i386/op_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-i386/op_helper.c')
-rw-r--r--target-i386/op_helper.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c
index 4850c63699..bd24d8c442 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)