We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c42d9a6 commit d2b3c6eCopy full SHA for d2b3c6e
zjit/src/backend/lir.rs
@@ -1751,7 +1751,9 @@ impl Assembler
1751
self.expand_branch_insn(insn, &mut insns);
1752
}
1753
1754
- // If the last instruction of the block is a ret, add a pad patch point after it
+ // If the last instruction of the block is a ret, add a pad patch point after it.
1755
+ // Otherwise, because a jump may be longer than a ret, a PatchPoint right before
1756
+ // a ret may overwrite the next block.
1757
if let Some(last_insn) = block.insns.last() {
1758
if matches!(last_insn, Insn::CRet(_)) {
1759
insns.push(Insn::PadPatchPoint);
0 commit comments