Save PC and SP on entry exit

This commit is contained in:
Takashi Kokubun 2023-02-08 10:24:13 -08:00
parent 6be4e065eb
commit 2cd6406d67
4 changed files with 16 additions and 10 deletions

View file

@ -149,7 +149,7 @@ module RubyVM::MJIT
# @param asm [RubyVM::MJIT::Assembler]
def compile_block(asm, jit:, pc: jit.iseq.body.iseq_encoded.to_i, ctx: Context.new)
# Mark the block start address and prepare an exit code storage
jit.block = Block.new(pc:)
jit.block = Block.new(pc:, ctx: ctx.dup)
asm.block(jit.block)
# Compile each insn