summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2025-09-25 17:05:51 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2025-09-25 17:14:06 -0700
commitcc1fd6490c920520436ff3bf0d9cf6b180b8a544 (patch)
tree73c0b364d63f128a67719f600ad961fb754be726
parent61a0de1b652f8e1c79ef762ecf41bdea3f799d25 (diff)
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.
-rw-r--r--zjit/src/backend/lir.rs9
-rw-r--r--zjit/src/hir.rs1
2 files changed, 3 insertions, 7 deletions
diff --git a/zjit/src/backend/lir.rs b/zjit/src/backend/lir.rs
index e931e14e8f..21adc42cd1 100644
--- a/zjit/src/backend/lir.rs
+++ b/zjit/src/backend/lir.rs
@@ -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));
diff --git a/zjit/src/hir.rs b/zjit/src/hir.rs
index 63749f0991..598bcb00c4 100644
--- a/zjit/src/hir.rs
+++ b/zjit/src/hir.rs
@@ -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);