diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-03-09 18:32:32 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-03-09 18:32:32 +0100 |
| commit | a4e53b929ba595ee4f280bdb3dcd74a0be894212 (patch) | |
| tree | 637e11165b0e0566f67147d8d5e053d7e9013c78 /src | |
| parent | 18534d56e20d149e6746fb0c9ae52c8d818343f8 (diff) | |
| download | box64-a4e53b929ba595ee4f280bdb3dcd74a0be894212.tar.gz box64-a4e53b929ba595ee4f280bdb3dcd74a0be894212.zip | |
Added some more SSE opcodes
Diffstat (limited to 'src')
| -rw-r--r-- | src/emu/x64runf20f.c | 26 | ||||
| -rw-r--r-- | src/emu/x64runf30f.c | 19 |
2 files changed, 45 insertions, 0 deletions
diff --git a/src/emu/x64runf20f.c b/src/emu/x64runf20f.c index 10ab06c3..a45a23d9 100644 --- a/src/emu/x64runf20f.c +++ b/src/emu/x64runf20f.c @@ -86,13 +86,39 @@ int RunF20F(x64emu_t *emu, rex_t rex) GETGX; GX->d[0] *= EX->d[0]; break; + case 0x5A: /* CVTSD2SS Gx, Ex */ + nextop = F8; + GETEX(0); + GETGX; + GX->f[0] = EX->d[0]; + break; + case 0x5C: /* SUBSD Gx, Ex */ + nextop = F8; + GETEX(0); + GETGX; + GX->d[0] -= EX->d[0]; + break; + case 0x5D: /* MINSD Gx, Ex */ + nextop = F8; + GETEX(0); + GETGX; + if (isnan(GX->d[0]) || isnan(EX->d[0]) || isless(EX->d[0], GX->d[0])) + GX->d[0] = EX->d[0]; + break; case 0x5E: /* DIVSD Gx, Ex */ nextop = F8; GETEX(0); GETGX; GX->d[0] /= EX->d[0]; break; + case 0x5F: /* MAXSD Gx, Ex */ + nextop = F8; + GETEX(0); + GETGX; + if (isnan(GX->d[0]) || isnan(EX->d[0]) || isgreater(EX->d[0], GX->d[0])) + GX->d[0] = EX->d[0]; + break; default: return 1; diff --git a/src/emu/x64runf30f.c b/src/emu/x64runf30f.c index fa90b459..30d5c804 100644 --- a/src/emu/x64runf30f.c +++ b/src/emu/x64runf30f.c @@ -79,6 +79,25 @@ int RunF30F(x64emu_t *emu, rex_t rex) } break; + case 0x51: /* SQRTSS Gx, Ex */ + nextop = F8; + GETEX(0); + GETGX; + GX->f[0] = sqrtf(EX->f[0]); + break; + case 0x52: /* RSQRTSS Gx, Ex */ + nextop = F8; + GETEX(0); + GETGX; + GX->f[0] = 1.0f/sqrtf(EX->f[0]); + break; + case 0x53: /* RCPSS Gx, Ex */ + nextop = F8; + GETEX(0); + GETGX; + GX->f[0] = 1.0f/EX->f[0]; + break; + case 0x58: /* ADDSS Gx, Ex */ nextop = F8; GETEX(0); |