From 824a9076eaf8d109bc79f53e51b7d7a045f42552 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 19 Feb 2011 21:06:36 +0000 Subject: [PATCH] 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 --- lib/Target/X86/X86InstrInfo.td | 3 +++ test/MC/X86/x86-64.s | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td index 221aa2fdc33..87dc4bece74 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 b1fc9accfd1..c8b6414d59a 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 -- 2.34.1