summaryrefslogtreecommitdiff
path: root/lib/ruby_vm/mjit/exit_compiler.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ruby_vm/mjit/exit_compiler.rb')
-rw-r--r--lib/ruby_vm/mjit/exit_compiler.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/ruby_vm/mjit/exit_compiler.rb b/lib/ruby_vm/mjit/exit_compiler.rb
index 4577f65e20..7e1c605d25 100644
--- a/lib/ruby_vm/mjit/exit_compiler.rb
+++ b/lib/ruby_vm/mjit/exit_compiler.rb
@@ -32,10 +32,10 @@ module RubyVM::MJIT
incr_insn_exit(jit.pc)
# Fix pc/sp offsets for the interpreter
- save_pc_and_sp(jit, ctx, asm)
+ save_pc_and_sp(jit, ctx.dup, asm) # dup to avoid sp_offset update
# Restore callee-saved registers
- asm.comment('exit to interpreter')
+ asm.comment("exit to interpreter on #{pc_to_insn(jit.pc).name}")
asm.pop(SP)
asm.pop(EC)
asm.pop(CFP)
@@ -65,6 +65,10 @@ module RubyVM::MJIT
private
+ def pc_to_insn(pc)
+ Compiler.decode_insn(C.VALUE.new(pc).*)
+ end
+
# @param pc [Integer]
def incr_insn_exit(pc)
if C.mjit_opts.stats