summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-04-04 00:30:49 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2023-04-04 00:30:57 -0700
commit2c560b976ed86730dfa305266fcc69033f6790cc (patch)
treebf77fbdb323e2c56df66dc31f2b63ec7cd251b88
parentf3acaf312c2a0069acd279edc0ceafcc34ddfdc3 (diff)
RJIT: Fix arguments to SPECIAL_CONST_P
-rw-r--r--lib/ruby_vm/rjit/insn_compiler.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ruby_vm/rjit/insn_compiler.rb b/lib/ruby_vm/rjit/insn_compiler.rb
index a7c3fc7d0a..e3d3c36836 100644
--- a/lib/ruby_vm/rjit/insn_compiler.rb
+++ b/lib/ruby_vm/rjit/insn_compiler.rb
@@ -1283,7 +1283,7 @@ module RubyVM::RJIT
asm.cmovnz(:rax, :rcx)
# Push the return value onto the stack
- out_type = if C::SPECIAL_CONST_P(pushval)
+ out_type = if C::SPECIAL_CONST_P(C.to_ruby(pushval))
Type::UnknownImm
else
Type::Unknown
@@ -1337,7 +1337,7 @@ module RubyVM::RJIT
asm.cmovnz(:rax, :rcx)
# Push the return value onto the stack
- out_type = C::SPECIAL_CONST_P(pushval) ? Type::UnknownImm : Type::Unknown
+ out_type = C::SPECIAL_CONST_P(C.to_ruby(pushval)) ? Type::UnknownImm : Type::Unknown
stack_ret = ctx.stack_push(out_type)
asm.mov(stack_ret, :rax)