From 7fe38de5f63ac45f72603220e523df4d14ec4ac3 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Fri, 8 Dec 2023 12:13:49 +0100 Subject: [PATCH] [INTERPRETER] Slightly better way to handle 3E/F2/F3 prefixes --- src/emu/x86run.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/emu/x86run.c b/src/emu/x86run.c index a248a1f23..e4527dc5f 100755 --- a/src/emu/x86run.c +++ b/src/emu/x86run.c @@ -93,12 +93,14 @@ int Run(x86emu_t *emu, int step) opcode = F8; rep = 0; - while((opcode==0xF2) || (opcode==0xF3)) { - rep = opcode-0xF1; + while((opcode==0xF2) || (opcode==0xF3) || (opcode==0x3E)) { + switch (opcode) { + case 0xF2: rep = 1; break; + case 0xF3: rep = 2; break; + case 0x3E: /* ignored*/ break; + } opcode = F8; } - while((opcode==0x3E)) //Branch Taken Hint ignored - opcode = F8; switch(opcode) {