Frontend: Only accept POP opcodes with a 0 ModRM.reg field

This commit is contained in:
Billy Laws committed 2025-04-09 23:04:11 +01:00
1 parent f064013b9a
commit a1c6378317
3 files changed
+13 -8

No files matched your search

@@ -439,6 +439,9 @@ bool Decoder::NormalOp(const FEXCore::X86Tables::X86InstInfo* Info, uint16_t Op,
FEXCore::X86Tables::ModRMDecoded ModRM;
ModRM.Hex = DecodeInst->ModRM;
if (ModRM.reg != 0b000 && (Info->Flags & FEXCore::X86Tables::InstFlags::FLAGS_SF_MOD_ZERO_REG)) {
return false;
}
if (ModRM.mod == 0b11 && (Info->Flags & FEXCore::X86Tables::InstFlags::FLAGS_SF_MOD_MEM_ONLY)) {
return false;