diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2011-04-20 13:04:23 +0200 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2011-04-25 11:18:33 +0200 |
commit | fec05e429943a2486ebe4c65da7b46a90f2dcfb2 (patch) | |
tree | d28a05071c59ee66d0ffe4568c3039d4e4fec374 /target-i386/op_helper.c | |
parent | 13822781d4732f847555a2f60560c71c531c9f98 (diff) | |
download | qemu-fec05e429943a2486ebe4c65da7b46a90f2dcfb2.zip qemu-fec05e429943a2486ebe4c65da7b46a90f2dcfb2.tar.gz qemu-fec05e429943a2486ebe4c65da7b46a90f2dcfb2.tar.bz2 |
target-i386: fix helper_fsqrt() 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.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c index bd24d8c..589a68b 100644 --- a/target-i386/op_helper.c +++ b/target-i386/op_helper.c @@ -4152,14 +4152,11 @@ void helper_fyl2xp1(void) void helper_fsqrt(void) { - CPU86_LDouble fptemp; - - fptemp = ST0; - if (fptemp<0.0) { + if (floatx_is_neg(ST0)) { env->fpus &= (~0x4700); /* (C3,C2,C1,C0) <-- 0000 */ env->fpus |= 0x400; } - ST0 = sqrt(fptemp); + ST0 = floatx_sqrt(ST0, &env->fp_status); } void helper_fsincos(void) |