Skip to content

Commit

Permalink
[ARM64_DYNAREC] Fix a regression, as 90 opcode is not always NOP depe…
Browse files Browse the repository at this point in the history
…nding on REX (should help #2064)
  • Loading branch information
ptitSeb committed Nov 24, 2024
1 parent 93fa532 commit 73b17d4
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions src/dynarec/arm64/dynarec_arm64_00.c
Original file line number Diff line number Diff line change
Expand Up @@ -1416,25 +1416,27 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
}
break;
case 0x90:
if (rep == 2) {
INST_NAME("PAUSE");
WFE;
} else {
INST_NAME("NOP");
}
break;
case 0x91:
case 0x92:
case 0x93:
case 0x94:
case 0x95:
case 0x96:
case 0x97:
INST_NAME("XCHG EAX, Reg");
gd = xRAX + (opcode & 0x07) + (rex.b << 3);
MOVxw_REG(x2, xRAX);
MOVxw_REG(xRAX, gd);
MOVxw_REG(gd, x2);
gd = xRAX+(opcode&0x07)+(rex.b<<3);
if(gd==xRAX) {
if (rep == 2) {
INST_NAME("PAUSE");
WFE;
} else {
INST_NAME("NOP");
}
} else {
INST_NAME("XCHG EAX, Reg");
MOVxw_REG(x2, xRAX);
MOVxw_REG(xRAX, gd);
MOVxw_REG(gd, x2);
}
break;

case 0x98:
Expand Down

0 comments on commit 73b17d4

Please sign in to comment.