aboutsummaryrefslogtreecommitdiff
path: root/target-i386/op_helper.c
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2011-04-20 13:04:23 +0200
committerAurelien Jarno <aurelien@aurel32.net>2011-04-25 11:18:33 +0200
commit13822781d4732f847555a2f60560c71c531c9f98 (patch)
tree6a1e31c181e31d49e940f9ba0f1b3410c7fec58b /target-i386/op_helper.c
parentc9ad19c57b4e35dda507ec636443069048a4ad72 (diff)
downloadqemu-13822781d4732f847555a2f60560c71c531c9f98.zip
qemu-13822781d4732f847555a2f60560c71c531c9f98.tar.gz
qemu-13822781d4732f847555a2f60560c71c531c9f98.tar.bz2
target-i386: fix helper_fdiv() wrt softfloat
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
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 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)