summaryrefslogtreecommitdiff
path: root/lib/ruby_vm/mjit/exit_compiler.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2023-01-04 00:12:16 -0800
committerTakashi Kokubun <[email protected]>2023-03-05 22:11:20 -0800
commit1f69ba1d8413abe20e95f74761ba267f0e35c649 (patch)
tree5565b8f3eedbb1502360d27b5b15a5e2bffad413 /lib/ruby_vm/mjit/exit_compiler.rb
parentee80b2be20ae8a5102ac478f2b0fc0cf8786eaa3 (diff)
Use the actual sp_offset
Diffstat (limited to 'lib/ruby_vm/mjit/exit_compiler.rb')
-rw-r--r--lib/ruby_vm/mjit/exit_compiler.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ruby_vm/mjit/exit_compiler.rb b/lib/ruby_vm/mjit/exit_compiler.rb
index d92f8a1588..a1eca9fe23 100644
--- a/lib/ruby_vm/mjit/exit_compiler.rb
+++ b/lib/ruby_vm/mjit/exit_compiler.rb
@@ -45,9 +45,10 @@ module RubyVM::MJIT
end
# @param jit [RubyVM::MJIT::JITState]
+ # @param ctx [RubyVM::MJIT::Context]
# @param asm [RubyVM::MJIT::Assembler]
# @param stub [RubyVM::MJIT::BlockStub]
- def compile_jump_stub(jit, asm, stub)
+ def compile_jump_stub(jit, ctx, asm, stub)
case stub
when BlockStub
asm.comment("block stub hit: #{stub.iseq.body.location.label}@#{C.rb_iseq_path(stub.iseq)}:#{stub.iseq.body.location.first_lineno}")
@@ -57,6 +58,7 @@ module RubyVM::MJIT
# Call rb_mjit_stub_hit
asm.mov(:rdi, to_value(stub))
+ asm.mov(:esi, ctx.sp_offset)
asm.call(C.rb_mjit_stub_hit)
# Jump to the address returned by rb_mjit_stub_hit