ruby/lib/mjit/insn_compiler.rb
2023-03-05 22:11:20 -08:00

19 lines
378 B
Ruby

module RubyVM::MJIT
class InsnCompiler
def putnil(_asm)
# TODO
KeepCompiling
end
def leave(asm)
# pop the current frame (ec->cfp++)
asm.add(:rsi, C.rb_control_frame_t.size)
asm.mov([:rdi, C.rb_execution_context_t.offsetof(:cfp)], :rsi)
# return a value
asm.mov(:rax, 1001)
asm.ret
EndBlock
end
end
end