[llvm] r233686 - Fix the operand encoding in the test instruction.
Rafael Espindola
rafael.espindola at gmail.com
Tue Mar 31 05:31:55 PDT 2015
Author: rafael
Date: Tue Mar 31 07:31:55 2015
New Revision: 233686
URL: http://llvm.org/viewvc/llvm-project?rev=233686&view=rev
Log:
Fix the operand encoding in the test instruction.
Fixes pr22995.
Modified:
llvm/trunk/lib/Target/X86/X86InstrArithmetic.td
llvm/trunk/test/MC/Disassembler/X86/x86-16.txt
llvm/trunk/test/MC/X86/x86-16.s
llvm/trunk/test/MC/X86/x86-32.s
llvm/trunk/test/MC/X86/x86-64.s
Modified: llvm/trunk/lib/Target/X86/X86InstrArithmetic.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrArithmetic.td?rev=233686&r1=233685&r2=233686&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrArithmetic.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrArithmetic.td Tue Mar 31 07:31:55 2015
@@ -1216,10 +1216,10 @@ def X86testpat : PatFrag<(ops node:$lhs,
let isCompare = 1 in {
let Defs = [EFLAGS] in {
let isCommutable = 1 in {
- def TEST8rr : BinOpRR_F<0x84, "test", Xi8 , X86testpat, MRMSrcReg>;
- def TEST16rr : BinOpRR_F<0x84, "test", Xi16, X86testpat, MRMSrcReg>;
- def TEST32rr : BinOpRR_F<0x84, "test", Xi32, X86testpat, MRMSrcReg>;
- def TEST64rr : BinOpRR_F<0x84, "test", Xi64, X86testpat, MRMSrcReg>;
+ def TEST8rr : BinOpRR_F<0x84, "test", Xi8 , X86testpat>;
+ def TEST16rr : BinOpRR_F<0x84, "test", Xi16, X86testpat>;
+ def TEST32rr : BinOpRR_F<0x84, "test", Xi32, X86testpat>;
+ def TEST64rr : BinOpRR_F<0x84, "test", Xi64, X86testpat>;
} // isCommutable
def TEST8rm : BinOpRM_F<0x84, "test", Xi8 , X86testpat>;
Modified: llvm/trunk/test/MC/Disassembler/X86/x86-16.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/X86/x86-16.txt?rev=233686&r1=233685&r2=233686&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/X86/x86-16.txt (original)
+++ llvm/trunk/test/MC/Disassembler/X86/x86-16.txt Tue Mar 31 07:31:55 2015
@@ -30,7 +30,7 @@
# CHECK: movl %eax, -16(%ebp)
0x67 0x66 0x89 0x45 0xf0
-# CHECK: testb %bl, %cl
+# CHECK: testb %cl, %bl
0x84 0xcb
# CHECK: cmpl %eax, %ebx
Modified: llvm/trunk/test/MC/X86/x86-16.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/x86-16.s?rev=233686&r1=233685&r2=233686&view=diff
==============================================================================
--- llvm/trunk/test/MC/X86/x86-16.s (original)
+++ llvm/trunk/test/MC/X86/x86-16.s Tue Mar 31 07:31:55 2015
@@ -30,7 +30,7 @@
// CHECK: movl %eax, -16(%ebp) # encoding: [0x67,0x66,0x89,0x45,0xf0]
movl %eax, -16(%ebp)
-// CHECK: testb %bl, %cl # encoding: [0x84,0xcb]
+// CHECK: testb %bl, %cl # encoding: [0x84,0xd9]
testb %bl, %cl
// CHECK: cmpl %eax, %ebx # encoding: [0x66,0x39,0xc3]
Modified: llvm/trunk/test/MC/X86/x86-32.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/x86-32.s?rev=233686&r1=233685&r2=233686&view=diff
==============================================================================
--- llvm/trunk/test/MC/X86/x86-32.s (original)
+++ llvm/trunk/test/MC/X86/x86-32.s Tue Mar 31 07:31:55 2015
@@ -79,7 +79,7 @@
// CHECK: movl %eax, -16(%ebp) # encoding: [0x89,0x45,0xf0]
movl %eax, -16(%ebp)
-// CHECK: testb %bl, %cl # encoding: [0x84,0xcb]
+// CHECK: testb %bl, %cl # encoding: [0x84,0xd9]
testb %bl, %cl
// CHECK: cmpl %eax, %ebx # encoding: [0x39,0xc3]
Modified: llvm/trunk/test/MC/X86/x86-64.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/x86-64.s?rev=233686&r1=233685&r2=233686&view=diff
==============================================================================
--- llvm/trunk/test/MC/X86/x86-64.s (original)
+++ llvm/trunk/test/MC/X86/x86-64.s Tue Mar 31 07:31:55 2015
@@ -613,7 +613,7 @@ movq _foo at GOTPCREL(%rip), %r14
movq 0x00(%r13,%rax,8),%r13
// CHECK: testq %rax, %rbx
-// CHECK: encoding: [0x48,0x85,0xd8]
+// CHECK: encoding: [0x48,0x85,0xc3]
testq %rax, %rbx
// CHECK: cmpq %rbx, %r14
More information about the llvm-commits
mailing list