diff options
author | Takashi Kokubun <[email protected]> | 2023-04-02 15:26:46 -0700 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2023-04-02 15:27:40 -0700 |
commit | 6002b12611c3cee921fc8aef76b55db4b2d0fbcd (patch) | |
tree | d1dc5f8749239a5c35ef42eacbb812e3f8eb40f1 /rjit.c | |
parent | 4fc336127e54dde8a744acdb5157c17e7ae857d3 (diff) |
RJIT: Support entry with different PCs
Diffstat (limited to 'rjit.c')
-rw-r--r-- | rjit.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -361,6 +361,26 @@ rb_rjit_compile(const rb_iseq_t *iseq) } void * +rb_rjit_entry_stub_hit(VALUE branch_stub) +{ + VALUE result; + + RB_VM_LOCK_ENTER(); + rb_vm_barrier(); + + rb_control_frame_t *cfp = GET_EC()->cfp; + + WITH_RJIT_ISOLATED({ + VALUE cfp_ptr = rb_funcall(rb_cRJITCfpPtr, rb_intern("new"), 1, SIZET2NUM((size_t)cfp)); + result = rb_funcall(rb_RJITCompiler, rb_intern("entry_stub_hit"), 2, branch_stub, cfp_ptr); + }); + + RB_VM_LOCK_LEAVE(); + + return (void *)NUM2SIZET(result); +} + +void * rb_rjit_branch_stub_hit(VALUE branch_stub, int sp_offset, int target0_p) { VALUE result; |