summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-02-19 21:06:36 +0000
committerChris Lattner <sabre@nondot.org>2011-02-19 21:06:36 +0000
commit824a9076eaf8d109bc79f53e51b7d7a045f42552 (patch)
tree96340301d112da017b700f49d82fd422567cec52
parent80e8b506b8134d63dc3cb6211cccc34be4b19d40 (diff)
downloadllvm-824a9076eaf8d109bc79f53e51b7d7a045f42552.tar.gz
llvm-824a9076eaf8d109bc79f53e51b7d7a045f42552.tar.bz2
llvm-824a9076eaf8d109bc79f53e51b7d7a045f42552.tar.xz
implement PR9264: disambiguating 'bt mem, imm' as a btl.
This is reasonable to do since all bt-mem forms do the same thing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126047 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86InstrInfo.td3
-rw-r--r--test/MC/X86/x86-64.s4
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td
index 221aa2fdc3..87dc4bece7 100644
--- a/lib/Target/X86/X86InstrInfo.td
+++ b/lib/Target/X86/X86InstrInfo.td
@@ -1403,6 +1403,9 @@ defm : IntegerCondCodeMnemonicAlias<"cmov", "q">;
def : InstAlias<"aad", (AAD8i8 10)>;
def : InstAlias<"aam", (AAM8i8 10)>;
+// Disambiguate the mem/imm form of bt-without-a-suffix as btl.
+def : InstAlias<"bt $imm, $mem", (BT32mi8 i32mem:$mem, i32i8imm:$imm)>;
+
// clr aliases.
def : InstAlias<"clrb $reg", (XOR8rr GR8 :$reg, GR8 :$reg)>;
def : InstAlias<"clrw $reg", (XOR16rr GR16:$reg, GR16:$reg)>;
diff --git a/test/MC/X86/x86-64.s b/test/MC/X86/x86-64.s
index b1fc9accfd..c8b6414d59 100644
--- a/test/MC/X86/x86-64.s
+++ b/test/MC/X86/x86-64.s
@@ -648,6 +648,10 @@ movl 0, %eax // CHECK: movl 0, %eax # encoding: [0x8b,0x04,0x25,0x00,0x00,0x00
// CHECK: encoding: [0x75,A]
jnz 0
+// PR9264
+btl $1, 0 // CHECK: btl $1, 0 # encoding: [0x0f,0xba,0x24,0x25,0x00,0x00,0x00,0x00,0x01]
+bt $1, 0 // CHECK: btl $1, 0 # encoding: [0x0f,0xba,0x24,0x25,0x00,0x00,0x00,0x00,0x01]
+
// rdar://8017515
btq $0x01,%rdx
// CHECK: btq $1, %rdx