diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-12-05 21:22:13 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-12-05 21:22:13 +0100 |
| commit | 06961d3db5e85e04f417c3c10a5537d8261e76a9 (patch) | |
| tree | f397f49e9855ca0b9e9b8db7af3821353a4bf97c /src | |
| parent | bdf2922f5d5e4f98731833dc727048a32b514902 (diff) | |
| download | box64-06961d3db5e85e04f417c3c10a5537d8261e76a9.tar.gz box64-06961d3db5e85e04f417c3c10a5537d8261e76a9.zip | |
[INTERPRETER] Refactored 0F A4/A5 opcodes for better readability
Diffstat (limited to 'src')
| -rw-r--r-- | src/emu/x64run0f.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/emu/x64run0f.c b/src/emu/x64run0f.c index 739e35b1..3470c443 100644 --- a/src/emu/x64run0f.c +++ b/src/emu/x64run0f.c @@ -914,14 +914,24 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step) } break; case 0xA4: /* SHLD Ed,Gd,Ib */ + nextop = F8; + GETED(1); + GETGD; + tmp8u = F8; + if(rex.w) + ED->q[0] = shld64(emu, ED->q[0], GD->q[0], tmp8u); + else { + if(MODREG) + ED->q[0] = shld32(emu, ED->dword[0], GD->dword[0], tmp8u); + else + ED->dword[0] = shld32(emu, ED->dword[0], GD->dword[0], tmp8u); + } + break; case 0xA5: /* SHLD Ed,Gd,CL */ nextop = F8; - GETED((nextop==0xA4)?1:0); + GETED(0); GETGD; - if(opcode==0xA4) - tmp8u = F8; - else - tmp8u = R_CL; + tmp8u = R_CL; if(rex.w) ED->q[0] = shld64(emu, ED->q[0], GD->q[0], tmp8u); else { |