Commit a891c7a1947995eae84345719a197b6da14f96cc
1 parent
b2a8e592
fxam fix (Julian Seward)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1997 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
5 additions
and
0 deletions
target-i386/helper.c
... | ... | @@ -2950,9 +2950,14 @@ void helper_fxam_ST0(void) |
2950 | 2950 | if (SIGND(temp)) |
2951 | 2951 | env->fpus |= 0x200; /* C1 <-- 1 */ |
2952 | 2952 | |
2953 | + /* XXX: test fptags too */ | |
2953 | 2954 | expdif = EXPD(temp); |
2954 | 2955 | if (expdif == MAXEXPD) { |
2956 | +#ifdef USE_X86LDOUBLE | |
2957 | + if (MANTD(temp) == 0x8000000000000000ULL) | |
2958 | +#else | |
2955 | 2959 | if (MANTD(temp) == 0) |
2960 | +#endif | |
2956 | 2961 | env->fpus |= 0x500 /*Infinity*/; |
2957 | 2962 | else |
2958 | 2963 | env->fpus |= 0x100 /*NaN*/; | ... | ... |