diff options
author | Takashi Kokubun <[email protected]> | 2023-01-02 22:53:14 -0800 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2023-03-05 22:11:20 -0800 |
commit | a8dec34961d7734ad975e44efa8aae361a1c4f5a (patch) | |
tree | 5849c716f37c959d9276ddb8c598fe1142a7f6fa /lib/ruby_vm/mjit/exit_compiler.rb | |
parent | 21696ad81ec40cf9cd146836dc8c945f1e485774 (diff) |
Implement initial opt_lt
Diffstat (limited to 'lib/ruby_vm/mjit/exit_compiler.rb')
-rw-r--r-- | lib/ruby_vm/mjit/exit_compiler.rb | 8 |
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 |