diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-04-08 19:28:39 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-04-08 19:28:39 +0200 |
| commit | 42cbe1b3976cbe2512b3959d1b57ca0b93148ece (patch) | |
| tree | cde8cc068c51583470e488d3a2083abc61200337 /src | |
| parent | 42fe124a0ec1dbb3ba919b050ddea2aabbdb8d17 (diff) | |
| download | box64-42cbe1b3976cbe2512b3959d1b57ca0b93148ece.tar.gz box64-42cbe1b3976cbe2512b3959d1b57ca0b93148ece.zip | |
Added 64 F2 0F 11 and 64 39 opcodes
Diffstat (limited to 'src')
| -rw-r--r-- | src/emu/x64run64.c | 51 |
1 files changed, 46 insertions, 5 deletions
diff --git a/src/emu/x64run64.c b/src/emu/x64run64.c index 7cbe7010..676d6204 100644 --- a/src/emu/x64run64.c +++ b/src/emu/x64run64.c @@ -34,6 +34,7 @@ int Run64(x64emu_t *emu, rex_t rex) uint64_t tmp64u; reg64_t *oped, *opgd; sse_regs_t *opex, *opgx; + int rep; uintptr_t tlsdata = GetFSBaseEmu(emu); opcode = F8; @@ -43,6 +44,11 @@ int Run64(x64emu_t *emu, rex_t rex) rex.rex = opcode; opcode = F8; } + rep = 0; + while((opcode==0xF2) || (opcode==0xF3)) { + rep = opcode-0xF1; + opcode = F8; + } switch(opcode) { #define GO(B, OP) \ @@ -102,12 +108,31 @@ int Run64(x64emu_t *emu, rex_t rex) opcode = F8; switch(opcode) { + case 0x11: /* MOVSD Ex, Gx */ + switch(rep) { + case 1: + nextop = F8; + GETEX_OFFS(0, tlsdata); + GETGX; + EX->q[0] = GX->q[0]; + break; + default: + return 1; + } + break; + case 0x29: /* MOVAPS Ex,Gx */ - nextop = F8; - GETEX_OFFS(0, tlsdata); - GETGX; - EX->q[0] = GX->q[0]; - EX->q[1] = GX->q[1]; + switch(rep) { + case 0: + nextop = F8; + GETEX_OFFS(0, tlsdata); + GETGX; + EX->q[0] = GX->q[0]; + EX->q[1] = GX->q[1]; + break; + default: + return 1; + } break; default: @@ -115,6 +140,22 @@ int Run64(x64emu_t *emu, rex_t rex) } break; + case 0x38: + nextop = F8; + GETEB_OFFS(0, tlsdata); + GETGB; + cmp8(emu, EB->byte[0], GB); + break; + case 0x39: + nextop = F8; + GETED_OFFS(0, tlsdata); + GETGD; + if(rex.w) + cmp64(emu, ED->q[0], GD->q[0]); + else + cmp32(emu, ED->dword[0], GD->dword[0]); + break; + case 0x66: opcode = F8; |