OpcodeDispatcher: Allow for direct linking of non-multiblock direct jumps

Using an add here prevents ExitFunction from taking the direct path.

Reported by chengmingtang on Discord.
This commit is contained in:
Billy Laws committed 2025-07-24 14:53:09 +01:00
1 parent 3efb2379ee
commit 9a1efacefe
1 file changed
+2 -10
@@ -939,16 +939,8 @@ void OpDispatchBuilder::JUMPOp(OpcodeArgs) {
StartNewBlock();
ExitFunction(GetRelocatedPC(Op, TargetOffset));
}
return;
}
// Fallback
{
auto RIPTargetConst = GetRelocatedPC(Op);
auto NewRIP = _Add(OpSize::i64Bit, _Constant(TargetOffset), RIPTargetConst);
// Store the new RIP
ExitFunction(NewRIP);
} else {
ExitFunction(GetRelocatedPC(Op, TargetOffset));
}
}