summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2021-09-14 11:11:03 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:41 -0400
commita71590e6814a488a7bfc7e86a59f6782c8a5d276 (patch)
treec7580ffd235e4047ad9fbf1925279253eda70e44
parent1f6641681b216d0de5f89c817ee451a0153fa1d4 (diff)
Don't store cfp->pc when doing iseq calls
We set it before calling routines and when we are exiting.
-rw-r--r--yjit_codegen.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/yjit_codegen.c b/yjit_codegen.c
index c4c6011b44..782593a123 100644
--- a/yjit_codegen.c
+++ b/yjit_codegen.c
@@ -3286,9 +3286,6 @@ gen_send_iseq(jitstate_t *jit, ctx_t *ctx, const struct rb_callinfo *ci, const r
return YJIT_CANT_COMPILE;
}
- // The starting pc of the callee frame
- const VALUE *start_pc = &iseq->body->iseq_encoded[start_pc_offset];
-
// Number of locals that are not parameters
const int num_locals = iseq->body->local_table_size - num_params;
@@ -3405,8 +3402,11 @@ gen_send_iseq(jitstate_t *jit, ctx_t *ctx, const struct rb_callinfo *ci, const r
mov(cb, member_opnd(REG_CFP, rb_control_frame_t, self), REG0);
jit_mov_gc_ptr(jit, cb, REG0, (VALUE)iseq);
mov(cb, member_opnd(REG_CFP, rb_control_frame_t, iseq), REG0);
- mov(cb, REG0, const_ptr_opnd(start_pc));
- mov(cb, member_opnd(REG_CFP, rb_control_frame_t, pc), REG0);
+
+ // No need to set cfp->pc since the callee sets it whenever calling into routines
+ // that could look at it through jit_save_pc().
+ // mov(cb, REG0, const_ptr_opnd(start_pc));
+ // mov(cb, member_opnd(REG_CFP, rb_control_frame_t, pc), REG0);
// Stub so we can return to JITted code
blockid_t return_block = { jit->iseq, jit_next_insn_idx(jit) };