Skip to content

Commit

Permalink
[INTERPRETER] Slightly better way to handle 3E/F2/F3 prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed Dec 8, 2023
1 parent 9803591 commit 7fe38de
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/emu/x86run.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand Down

0 comments on commit 7fe38de

Please sign in to comment.