From 5cd8176478bfba8b321a25e2ac849af7f2f93c82 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Fri, 1 Apr 2022 10:45:53 +0200 Subject: More coverage for test17, and added NaN handling to 66 0F 7C opcode --- src/emu/x64run660f.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src') diff --git a/src/emu/x64run660f.c b/src/emu/x64run660f.c index ada264d0..c8613dda 100644 --- a/src/emu/x64run660f.c +++ b/src/emu/x64run660f.c @@ -1244,11 +1244,25 @@ int Run660F(x64emu_t *emu, rex_t rex) nextop = F8; GETEX(0); GETGX; + #ifndef NOALIGN + is_nan = isnan(GX->d[0]) || isnan(GX->d[1]); + #endif GX->d[0] += GX->d[1]; + #ifndef NOALIGN + if(!is_nan && isnan(GX->d[0])) + GX->d[0] = -NAN; + #endif if(EX==GX) { GX->d[1] = GX->d[0]; } else { + #ifndef NOALIGN + is_nan = isnan(EX->d[0]) || isnan(EX->d[1]); + #endif GX->d[1] = EX->d[0] + EX->d[1]; + #ifndef NOALIGN + if(!is_nan && isnan(GX->d[1])) + GX->d[1] = -NAN; + #endif } break; -- cgit 1.4.1