Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INTERPRETER] Added 64 66 8D opcode and fix 66 8D opcode #1648

Merged
merged 1 commit into from
Jul 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/emu/x64run66.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 10 additions & 0 deletions src/emu/x64run6664.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down