diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-07-30 09:04:21 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-07-30 09:04:21 +0200 |
| commit | 6207b3fa386467fb4533136d4bd716d2bae3d4fd (patch) | |
| tree | 9786893fc01f6f3205f22be494ae40d7471adced /src/emu | |
| parent | 35d210318977bd8a02d2405bca4647a3f3cccc05 (diff) | |
| download | box64-6207b3fa386467fb4533136d4bd716d2bae3d4fd.tar.gz box64-6207b3fa386467fb4533136d4bd716d2bae3d4fd.zip | |
Added 64 66 89 and changed 64 66 0F D6 opcodes ([DYNAREC] too) (for #77)
Diffstat (limited to 'src/emu')
| -rw-r--r-- | src/emu/x64run64.c | 29 | ||||
| -rw-r--r-- | src/emu/x64run6664.c | 28 |
2 files changed, 29 insertions, 28 deletions
diff --git a/src/emu/x64run64.c b/src/emu/x64run64.c index c7cbbc4b..9897efdd 100644 --- a/src/emu/x64run64.c +++ b/src/emu/x64run64.c @@ -231,34 +231,7 @@ int Run64(x64emu_t *emu, rex_t rex, int seg) case 0x66: - opcode = F8; - - while(opcode>=0x40 && opcode<=0x4F) { - rex.rex = opcode; - opcode = F8; - } - switch(opcode) { - case 0x0F: - opcode = F8; - switch(opcode) { - case 0xD6: /* MOVQ Ex,Gx */ - nextop = F8; - GETEX_OFFS(0, tlsdata); - GETGX; - EX->q[0] = GX->q[0]; - if(MODREG) - EX->q[1] = 0; - break; - - default: - return 1; - } - break; - - default: - return 1; - } - break; + return Run6664(emu, rex); case 0x80: /* GRP Eb,Ib */ nextop = F8; diff --git a/src/emu/x64run6664.c b/src/emu/x64run6664.c index c61938be..14c59677 100644 --- a/src/emu/x64run6664.c +++ b/src/emu/x64run6664.c @@ -27,6 +27,7 @@ int Run6664(x64emu_t *emu, rex_t rex) uint8_t opcode; uint8_t nextop; reg64_t *oped, *opgd; + sse_regs_t *opex, *opgx; uintptr_t tlsdata = GetFSBaseEmu(emu); opcode = F8; @@ -39,6 +40,33 @@ int Run6664(x64emu_t *emu, rex_t rex) switch(opcode) { + case 0x0F: + opcode = F8; + switch(opcode) { + case 0xD6: /* MOVQ Ex,Gx */ + nextop = F8; + GETEX_OFFS(0, tlsdata); + GETGX; + EX->q[0] = GX->q[0]; + if(MODREG) + EX->q[1] = 0; + break; + + default: + return 1; + } + break; + + case 0x89: /* MOV Ew,Gw */ + nextop = F8; + GETEW_OFFS(0, tlsdata); + GETGW; + if(rex.w) + EW->q[0] = GW->q[0]; + else + EW->word[0] = GW->word[0]; + break; + case 0x8B: /* MOV Gd,Ed */ nextop = F8; GETEW_OFFS(0, tlsdata); |