diff options
Diffstat (limited to 'lib/ruby_vm')
-rw-r--r-- | lib/ruby_vm/mjit/exit_compiler.rb | 9 | ||||
-rw-r--r-- | lib/ruby_vm/mjit/insn_compiler.rb | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/ruby_vm/mjit/exit_compiler.rb b/lib/ruby_vm/mjit/exit_compiler.rb index 7e1c605d25..d92f8a1588 100644 --- a/lib/ruby_vm/mjit/exit_compiler.rb +++ b/lib/ruby_vm/mjit/exit_compiler.rb @@ -10,7 +10,7 @@ module RubyVM::MJIT # @param asm [RubyVM::MJIT::Assembler] def compile_entry_exit(pc, asm, cause:) # Increment per-insn exit counter - incr_insn_exit(pc) + incr_insn_exit(pc, asm) # TODO: Saving pc and sp may be needed later @@ -29,7 +29,7 @@ module RubyVM::MJIT # @param asm [RubyVM::MJIT::Assembler] def compile_side_exit(jit, ctx, asm) # Increment per-insn exit counter - incr_insn_exit(jit.pc) + incr_insn_exit(jit.pc, asm) # Fix pc/sp offsets for the interpreter save_pc_and_sp(jit, ctx.dup, asm) # dup to avoid sp_offset update @@ -70,9 +70,10 @@ module RubyVM::MJIT end # @param pc [Integer] - def incr_insn_exit(pc) + # @param asm [RubyVM::MJIT::Assembler] + def incr_insn_exit(pc, asm) if C.mjit_opts.stats - insn = decode_insn(C.VALUE.new(pc).*) + insn = Compiler.decode_insn(C.VALUE.new(pc).*) asm.comment("increment insn exit: #{insn.name}") asm.mov(:rax, (C.mjit_insn_exits + insn.bin).to_i) asm.add([:rax], 1) # TODO: lock diff --git a/lib/ruby_vm/mjit/insn_compiler.rb b/lib/ruby_vm/mjit/insn_compiler.rb index 2950536e8e..c17167a4ac 100644 --- a/lib/ruby_vm/mjit/insn_compiler.rb +++ b/lib/ruby_vm/mjit/insn_compiler.rb @@ -280,11 +280,11 @@ module RubyVM::MJIT recv_index = ctx.stack_size - 2 obj_index = ctx.stack_size - 1 - asm.comment('guard recv is fixnum'); + asm.comment('guard recv is fixnum') # TODO: skip this with type information asm.test([SP, C.VALUE.size * recv_index], C.RUBY_FIXNUM_FLAG) asm.je(side_exit(jit, ctx)) - asm.comment('guard obj is fixnum'); + asm.comment('guard obj is fixnum') # TODO: skip this with type information asm.test([SP, C.VALUE.size * obj_index], C.RUBY_FIXNUM_FLAG) asm.je(side_exit(jit, ctx)) |