summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-03-11 23:47:10 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2023-03-11 23:47:11 -0800
commit3efe4639eca9b0bd5b3a2332c17595597bfd7f29 (patch)
tree1c75c9a7a51b5f85637df1826b832d3cc51a5e1c /test/ruby
parent9c220bf5e14821093b2f8dc8d7c7d5619b424f11 (diff)
RJIT: Handle Mod 10 for CMP r/m64, r64
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/rjit/test_assembler.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/rjit/test_assembler.rb b/test/ruby/rjit/test_assembler.rb
index a1f8e9dc2a..57c84cfd50 100644
--- a/test/ruby/rjit/test_assembler.rb
+++ b/test/ruby/rjit/test_assembler.rb
@@ -118,6 +118,7 @@ module RubyVM::RJIT
asm.cmp(:rax, 8) # CMP r/m64, imm8 (Mod 11: reg)
asm.cmp(:rax, 0x100) # CMP r/m64, imm32 (Mod 11: reg)
asm.cmp([:rax, 8], :rbx) # CMP r/m64, r64 (Mod 01: [reg]+disp8)
+ asm.cmp([:rax, -0x100], :rbx) # CMP r/m64, r64 (Mod 10: [reg]+disp32)
asm.cmp(:rax, :rbx) # CMP r/m64, r64 (Mod 11: reg)
assert_compile(asm, <<~EOS)
0x0: cmp byte ptr [rax + 8], 8
@@ -127,7 +128,8 @@ module RubyVM::RJIT
0x18: cmp rax, 8
0x1c: cmp rax, 0x100
0x23: cmp qword ptr [rax + 8], rbx
- 0x27: cmp rax, rbx
+ 0x27: cmp qword ptr [rax - 0x100], rbx
+ 0x2e: cmp rax, rbx
EOS
end