X86: Fix encoding for TEST64rr.
authorDaniel Dunbar <daniel@zuster.org>
Fri, 19 Mar 2010 01:15:03 +0000 (01:15 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 19 Mar 2010 01:15:03 +0000 (01:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98919 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86Instr64bit.td
test/MC/AsmParser/X86/x86_64-new-encoder.s

index 079d7a28d8d56f489a15794b2cde75cc0c1ffcbc..81fc0671c4e51f6da409345d2d7b2f7aec8c2d43 100644 (file)
@@ -1225,7 +1225,7 @@ let Defs = [EFLAGS] in {
 def TEST64i32 : RIi32<0xa9, RawFrm, (outs), (ins i32imm:$src),
                       "test{q}\t{$src, %rax|%rax, $src}", []>;
 let isCommutable = 1 in
-def TEST64rr : RI<0x85, MRMDestReg, (outs), (ins GR64:$src1, GR64:$src2),
+def TEST64rr : RI<0x85, MRMSrcReg, (outs), (ins GR64:$src1, GR64:$src2),
                   "test{q}\t{$src2, $src1|$src1, $src2}",
                   [(set EFLAGS, (X86cmp (and GR64:$src1, GR64:$src2), 0))]>;
 def TEST64rm : RI<0x85, MRMSrcMem, (outs), (ins GR64:$src1, i64mem:$src2),
index 3e12cf8ba9cb862afaa60c4b7ddb9e0649f2e0fd..d8282ab9fb4153d34d284f17728266662e22e43e 100644 (file)
@@ -44,3 +44,7 @@ movq _foo@GOTPCREL(%rip), %r14
 // CHECK: movq (%r13,%rax,8), %r13
 // CHECK:  encoding: [0x4d,0x8b,0x6c,0xc5,0x00]
 movq 0x00(%r13,%rax,8),%r13
+
+// CHECK: testq        %rax, %rbx
+// CHECK:  encoding: [0x48,0x85,0xd8]
+testq %rax, %rbx