Fix the operand for branchunless

This commit is contained in:
Takashi Kokubun 2023-02-08 17:37:25 -08:00
parent 98a3b40d55
commit 6bc8e4a279

View file

@ -342,8 +342,8 @@ module RubyVM::MJIT
# TODO: skip check for known truthy # TODO: skip check for known truthy
# This `test` sets ZF only for Qnil and Qfalse, which let jz jump. # This `test` sets ZF only for Qnil and Qfalse, which let jz jump.
asm.test([SP, C.VALUE.size * (ctx.stack_size - 1)], ~Qnil) val = ctx.stack_pop
ctx.stack_pop(1) asm.test(val, ~Qnil)
# Set stubs # Set stubs
branch_stub = BranchStub.new( branch_stub = BranchStub.new(