From 42cbe1b3976cbe2512b3959d1b57ca0b93148ece Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 8 Apr 2021 19:28:39 +0200 Subject: Added 64 F2 0F 11 and 64 39 opcodes --- src/emu/x64run64.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 5 deletions(-) (limited to 'src') 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; -- cgit 1.4.1