diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-03-31 10:42:08 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-03-31 10:42:08 +0200 |
| commit | 311e8ac3e37d3f14cba4f55c1725da896f832dae (patch) | |
| tree | 076f05adc7d70250d84139f2ddfb815d1e0209f1 /src/emu | |
| parent | 716eb97af90b21ed1085c9c6e1eb8d132d9f3f18 (diff) | |
| download | box64-311e8ac3e37d3f14cba4f55c1725da896f832dae.tar.gz box64-311e8ac3e37d3f14cba4f55c1725da896f832dae.zip | |
More cases to test17, and added -NAN generation to divpd ([DYNAREC] too)
Diffstat (limited to 'src/emu')
| -rw-r--r-- | src/emu/x64run660f.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/emu/x64run660f.c b/src/emu/x64run660f.c index 5db9994a..ada264d0 100644 --- a/src/emu/x64run660f.c +++ b/src/emu/x64run660f.c @@ -55,6 +55,9 @@ int Run660F(x64emu_t *emu, rex_t rex) uint32_t tmp32u; uint64_t tmp64u; float tmpf; + #ifndef NOALIGN + int is_nan; + #endif reg64_t *oped, *opgd; sse_regs_t *opex, *opgx, eax1, *opex2; mmx87_regs_t *opem, *opgm; @@ -912,8 +915,16 @@ int Run660F(x64emu_t *emu, rex_t rex) nextop = F8; GETEX(0); GETGX; - GX->d[0] /= EX->d[0]; - GX->d[1] /= EX->d[1]; + for (int i=0; i<2; ++i) { + #ifndef NOALIGN + is_nan = isnan(GX->d[i]) || isnan(EX->d[i]); + #endif + GX->d[i] /= EX->d[i]; + #ifndef NOALIGN + if(!is_nan && isnan(GX->d[i])) + GX->d[i] = -NAN; + #endif + } break; case 0x5F: /* MAXPD Gx, Ex */ nextop = F8; |