RJIT: Convert opt_case_dispatch keys with #to_value

comptime_key is a Ruby object and the value is not valid in machine code.

This PR also implements `CMP r/m64, imm32 (Mod 01: [reg]+disp8)` that is
now needed for running mail.gem benchmark.
This commit is contained in:
Takashi Kokubun 2023-12-21 17:45:43 -08:00
parent 0c05551f58
commit 9a3c49ee5d
3 changed files with 20 additions and 7 deletions

View file

@ -2099,7 +2099,7 @@ module RubyVM::RJIT
end
# Check if the key is the same value
asm.cmp(key_opnd, comptime_key)
asm.cmp(key_opnd, to_value(comptime_key))
side_exit = side_exit(jit, starting_context)
jit_chain_guard(:jne, jit, starting_context, asm, side_exit)