ZJIT: Remove an obsoleted PC guard

A little follow-up on https://github.com/ruby/ruby/pull/14653

Now that we don't generate a PC-less side exit at the entry block, we
shouldn't need this guard that was added by https://github.com/ruby/ruby/pull/14643.
This commit is contained in:
Takashi Kokubun 2025-09-25 17:05:51 -07:00
parent 61a0de1b65
commit cc1fd6490c
2 changed files with 3 additions and 7 deletions

View File

@ -1607,12 +1607,9 @@ impl Assembler
self.store(Opnd::mem(64, SP, (-local_size_and_idx_to_ep_offset(locals.len(), idx) - 1) * SIZEOF_VALUE_I32), opnd);
}
// Avoid setting cfp->pc when exiting entry_block with optional arguments
if !pc.is_null() {
asm_comment!(self, "save cfp->pc");
self.load_into(SCRATCH_OPND, Opnd::const_ptr(pc));
self.store(Opnd::mem(64, CFP, RUBY_OFFSET_CFP_PC), SCRATCH_OPND);
}
asm_comment!(self, "save cfp->pc");
self.load_into(SCRATCH_OPND, Opnd::const_ptr(pc));
self.store(Opnd::mem(64, CFP, RUBY_OFFSET_CFP_PC), SCRATCH_OPND);
asm_comment!(self, "save cfp->sp");
self.lea_into(SCRATCH_OPND, Opnd::mem(64, SP, stack.len() as i32 * SIZEOF_VALUE_I32));

View File

@ -3323,7 +3323,6 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
// optimizing locals in that case because they're shared with other frames.
let ep_escaped = iseq_escapes_ep(iseq);
// Compile an entry_block for the interpreter
compile_entry_block(&mut fun, &jit_entry_insns);