From 32251d6f422732a6bfc1d7de97ddb0eafd6ae7d9 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 7 Aug 2019 06:17:58 +0000 Subject: [PATCH] [X86] Allow any 8-bit immediate to be used with bt/btc/btr/bts memory aliases. We have aliases that disambiguate memory forms of bt/btc/btr/bts without suffixes to the 32-bit form. These aliases should have been updated when the instructions were updated in r356413. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368127 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86InstrInfo.td | 8 ++++---- test/MC/X86/x86-32-coverage.s | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td index 06514b33d41..7b765a1d30f 100644 --- a/lib/Target/X86/X86InstrInfo.td +++ b/lib/Target/X86/X86InstrInfo.td @@ -3219,13 +3219,13 @@ def : InstAlias<"aam", (AAM8i8 10)>, Requires<[Not64BitMode]>; // Disambiguate the mem/imm form of bt-without-a-suffix as btl. // Likewise for btc/btr/bts. def : InstAlias<"bt\t{$imm, $mem|$mem, $imm}", - (BT32mi8 i32mem:$mem, i32i8imm:$imm), 0, "att">; + (BT32mi8 i32mem:$mem, i32u8imm:$imm), 0, "att">; def : InstAlias<"btc\t{$imm, $mem|$mem, $imm}", - (BTC32mi8 i32mem:$mem, i32i8imm:$imm), 0, "att">; + (BTC32mi8 i32mem:$mem, i32u8imm:$imm), 0, "att">; def : InstAlias<"btr\t{$imm, $mem|$mem, $imm}", - (BTR32mi8 i32mem:$mem, i32i8imm:$imm), 0, "att">; + (BTR32mi8 i32mem:$mem, i32u8imm:$imm), 0, "att">; def : InstAlias<"bts\t{$imm, $mem|$mem, $imm}", - (BTS32mi8 i32mem:$mem, i32i8imm:$imm), 0, "att">; + (BTS32mi8 i32mem:$mem, i32u8imm:$imm), 0, "att">; // clr aliases. def : InstAlias<"clr{b}\t$reg", (XOR8rr GR8 :$reg, GR8 :$reg), 0>; diff --git a/test/MC/X86/x86-32-coverage.s b/test/MC/X86/x86-32-coverage.s index dbff21471a2..1403c7cbfc3 100644 --- a/test/MC/X86/x86-32-coverage.s +++ b/test/MC/X86/x86-32-coverage.s @@ -10576,15 +10576,19 @@ blendvps %xmm0, (%eax), %xmm1 // CHECK: btcw $4, (%eax) // CHECK: btcl $4, (%eax) bt $4, (%eax) +bt $255, (%eax) btw $4, (%eax) btl $4, (%eax) bts $4, (%eax) +bts $255, (%eax) btsw $4, (%eax) btsl $4, (%eax) btr $4, (%eax) +btr $255, (%eax) btrw $4, (%eax) btrl $4, (%eax) btc $4, (%eax) +btc $255, (%eax) btcw $4, (%eax) btcl $4, (%eax) -- 2.40.0