X86: Fix misencode of RI64mi8. This fixes OpenSSL / x86_64-apple-darwin10 / clang...
authorDaniel Dunbar <daniel@zuster.org>
Wed, 25 Aug 2010 21:11:02 +0000 (21:11 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 25 Aug 2010 21:11:02 +0000 (21:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112089 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 76e093b3d9cd638f5b2a7b9c5b41a823cfb5734c..c731ecd8874532ee3c3926cfc07ca8a68b6ca25a 100644 (file)
@@ -1325,14 +1325,13 @@ def BT64mr : RI<0xA3, MRMDestMem, (outs), (ins i64mem:$src1, GR64:$src2),
                 []
                 >, TB;
 
-def BT64ri8 : Ii8<0xBA, MRM4r, (outs), (ins GR64:$src1, i64i8imm:$src2),
+def BT64ri8 : RIi8<0xBA, MRM4r, (outs), (ins GR64:$src1, i64i8imm:$src2),
                 "bt{q}\t{$src2, $src1|$src1, $src2}",
-                [(set EFLAGS, (X86bt GR64:$src1, i64immSExt8:$src2))]>, TB,
-               REX_W;
+                [(set EFLAGS, (X86bt GR64:$src1, i64immSExt8:$src2))]>, TB;
 // Note that these instructions don't need FastBTMem because that
 // only applies when the other operand is in a register. When it's
 // an immediate, bt is still fast.
-def BT64mi8 : Ii8<0xBA, MRM4m, (outs), (ins i64mem:$src1, i64i8imm:$src2),
+def BT64mi8 : RIi8<0xBA, MRM4m, (outs), (ins i64mem:$src1, i64i8imm:$src2),
                 "bt{q}\t{$src2, $src1|$src1, $src2}",
                 [(set EFLAGS, (X86bt (loadi64 addr:$src1),
                                      i64immSExt8:$src2))]>, TB;
index b94f19bebf1f476b215dbef7dcb4ff9d83c6d4fb..9f94d8404f42c73b420fafa0463e6c3df0df77b2 100644 (file)
@@ -153,3 +153,7 @@ btq $0x01,%rdx
 // CHECK: jmpq *8(%rax)
 // CHECK:   encoding: [0xff,0x60,0x08]
        jmp     *8(%rax)
+
+// CHECK: btq $61, -216(%rbp)
+// CHECK:   encoding: [0x48,0x0f,0xba,0xa5,0x28,0xff,0xff,0xff,0x3d]
+       btq     $61, -216(%rbp)