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
commitfec05e429943a2486ebe4c65da7b46a90f2dcfb2 (patch)
treed28a05071c59ee66d0ffe4568c3039d4e4fec374 /target-i386/op_helper.c
parent13822781d4732f847555a2f60560c71c531c9f98 (diff)
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.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c
index bd24d8c442..589a68bc71 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)