diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-07-11 21:58:59 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-07-11 21:58:59 +0200 |
| commit | 486aa58b157c74d2d0623eecd08489fb520a5510 (patch) | |
| tree | d29df0c25cd23d0dc68a006ae374a7ed93c69f74 | |
| parent | 8711693698417c2e53b47a7190026dbcf2e2f7e7 (diff) | |
| download | box64-486aa58b157c74d2d0623eecd08489fb520a5510.tar.gz box64-486aa58b157c74d2d0623eecd08489fb520a5510.zip | |
Added 66 0F 3A 0A opcode (for #33)
| -rw-r--r-- | src/emu/x64run660f.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/emu/x64run660f.c b/src/emu/x64run660f.c index c4fabf44..5eee4f56 100644 --- a/src/emu/x64run660f.c +++ b/src/emu/x64run660f.c @@ -373,6 +373,30 @@ int Run660F(x64emu_t *emu, rex_t rex) case 0x3A: // these are some SSE3 & SSE4.x opcodes opcode = F8; switch(opcode) { + case 0x0A: // ROUNDSS Gx, Ex, u8 + nextop = F8; + GETEX(1); + GETGX; + tmp8u = F8; // ignoring bit 3 interupt thingy + if(tmp8u&4) + tmp8u = (emu->mxcsr>>13)&3; + else + tmp8u &= 3; + switch(tmp8u) { + case ROUND_Nearest: + GX->f[0] = floor(EX->f[0]+0.5); + break; + case ROUND_Down: + GX->f[0] = floor(EX->f[0]); + break; + case ROUND_Up: + GX->f[0] = ceil(EX->f[0]); + break; + case ROUND_Chop: + GX->f[0] = EX->f[0]; + break; + } + break; case 0x0B: // ROUNDSD Gx, Ex, u8 nextop = F8; GETEX(1); |