summaryrefslogtreecommitdiffstats
path: root/target-i386/helper.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-06-19 22:43:38 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-06-19 22:43:38 +0000
commita891c7a1947995eae84345719a197b6da14f96cc (patch)
tree5e164b59a83981748cb4a00159d563ace1475417 /target-i386/helper.c
parentb2a8e5922426a9b8080f63b757bf302797f83fcc (diff)
downloadhqemu-a891c7a1947995eae84345719a197b6da14f96cc.zip
hqemu-a891c7a1947995eae84345719a197b6da14f96cc.tar.gz
fxam fix (Julian Seward)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1997 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386/helper.c')
-rw-r--r--target-i386/helper.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c
index 29185ce..379cfd5 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -2950,9 +2950,14 @@ void helper_fxam_ST0(void)
if (SIGND(temp))
env->fpus |= 0x200; /* C1 <-- 1 */
+ /* XXX: test fptags too */
expdif = EXPD(temp);
if (expdif == MAXEXPD) {
+#ifdef USE_X86LDOUBLE
+ if (MANTD(temp) == 0x8000000000000000ULL)
+#else
if (MANTD(temp) == 0)
+#endif
env->fpus |= 0x500 /*Infinity*/;
else
env->fpus |= 0x100 /*NaN*/;
OpenPOWER on IntegriCloud