From 06961d3db5e85e04f417c3c10a5537d8261e76a9 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Tue, 5 Dec 2023 21:22:13 +0100 Subject: [INTERPRETER] Refactored 0F A4/A5 opcodes for better readability --- src/emu/x64run0f.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'src') 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 { -- cgit 1.4.1