diff options
| author | Haichen Wu <www.wxmqq@gmail.com> | 2024-07-06 14:12:16 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-06 08:12:16 +0200 |
| commit | b4828477794a8e69a96f0ca7991ad0e619d1b2a3 (patch) | |
| tree | 0b9b2abade6a712ca5571b0b0f5a30cc3aa30459 /src | |
| parent | 8c5752de23ac421025032e405ca3168191ae7a33 (diff) | |
| download | box64-b4828477794a8e69a96f0ca7991ad0e619d1b2a3.tar.gz box64-b4828477794a8e69a96f0ca7991ad0e619d1b2a3.zip | |
[INTERPRETER] Added 64 66 8D opcode (#1648)
Diffstat (limited to 'src')
| -rw-r--r-- | src/emu/x64run66.c | 6 | ||||
| -rw-r--r-- | src/emu/x64run6664.c | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/emu/x64run66.c b/src/emu/x64run66.c index 17199c71..89aec17c 100644 --- a/src/emu/x64run66.c +++ b/src/emu/x64run66.c @@ -399,12 +399,12 @@ uintptr_t Run66(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr) break; case 0x8D: /* LEA Gw,M */ nextop = F8; - GETGD; + GETGW; tmp64u = GETEA(0); if(rex.w) - GD->q[0] = tmp64u; + GW->q[0] = tmp64u; else - GD->word[0] = (uint16_t)tmp64u; + GW->word[0] = (uint16_t)tmp64u; break; case 0x8E: /* MOV Seg,Ew */ nextop = F8; diff --git a/src/emu/x64run6664.c b/src/emu/x64run6664.c index a76f2bc7..299f7f7d 100644 --- a/src/emu/x64run6664.c +++ b/src/emu/x64run6664.c @@ -32,6 +32,7 @@ uintptr_t Run6664(x64emu_t *emu, rex_t rex, int seg, uintptr_t addr) uint8_t nextop; uint16_t tmp16u; int16_t tmp16s; + uint64_t tmp64u; reg64_t *oped, *opgd; sse_regs_t *opex, *opgx; #ifdef TEST_INTERPRETER @@ -160,6 +161,15 @@ uintptr_t Run6664(x64emu_t *emu, rex_t rex, int seg, uintptr_t addr) else GW->word[0] = EW->word[0]; break; + case 0x8D: /* LEA Gw,M */ + nextop = F8; + GETGW; + tmp64u = GETEA(0); + if(rex.w) + GW->q[0] = tmp64u; + else + GW->word[0] = (uint16_t)tmp64u; + break; case 0xC7: /* MOV FS:Ew,Iw */ nextop = F8; GETEW_OFFS(2, tlsdata); |