summaryrefslogtreecommitdiff
path: root/target-i386
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
commit788e733664aab69e65bf5d5d228767cf4371f3ab (patch)
tree4b461c9e4a58bc7bdf2072197cd190097119980f /target-i386
parentbe1c17c7fdc16d9cb88f4092f23a494b942b68d7 (diff)
target-i386: fix helper_fbld_ST0() wrt softfloat
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/op_helper.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c
index dce28fa05..943d217e6 100644
--- a/target-i386/op_helper.c
+++ b/target-i386/op_helper.c
@@ -3920,9 +3920,10 @@ void helper_fbld_ST0(target_ulong ptr)
v = ldub(ptr + i);
val = (val * 100) + ((v >> 4) * 10) + (v & 0xf);
}
- tmp = val;
- if (ldub(ptr + 9) & 0x80)
- tmp = -tmp;
+ tmp = int64_to_floatx(val, &env->fp_status);
+ if (ldub(ptr + 9) & 0x80) {
+ floatx_chs(tmp);
+ }
fpush();
ST0 = tmp;
}