[llvm] cab20f6 - [AArch64] Add missing "flagm" feature to the .arch_extension directive.

Mark Murray via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 20 03:58:01 PST 2021


Author: Mark Murray
Date: 2021-01-20T11:57:39Z
New Revision: cab20f61057760e3f9d7e12a9b25f3934ebd1ea4

URL: https://github.com/llvm/llvm-project/commit/cab20f61057760e3f9d7e12a9b25f3934ebd1ea4
DIFF: https://github.com/llvm/llvm-project/commit/cab20f61057760e3f9d7e12a9b25f3934ebd1ea4.diff

LOG: [AArch64] Add missing "flagm" feature to the .arch_extension directive.

Depends on D94970

Differential Revision: https://reviews.llvm.org/D94971

Added: 
    llvm/test/MC/AArch64/armv8.4a-flagm.s

Modified: 
    llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
    llvm/test/MC/AArch64/directive-arch_extension-negative.s
    llvm/test/MC/AArch64/directive-arch_extension.s

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
index bcc5630b3ccd..2df9a8050e66 100644
--- a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+++ b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
@@ -2916,6 +2916,7 @@ static const struct Extension {
     {"ls64", {AArch64::FeatureLS64}},
     {"xs", {AArch64::FeatureXS}},
     {"pauth", {AArch64::FeaturePAuth}},
+    {"flagm", {AArch64::FeatureFlagM}},
     // FIXME: Unsupported extensions
     {"pan", {}},
     {"lor", {}},

diff  --git a/llvm/test/MC/AArch64/armv8.4a-flagm.s b/llvm/test/MC/AArch64/armv8.4a-flagm.s
new file mode 100644
index 000000000000..2ed43b6cc874
--- /dev/null
+++ b/llvm/test/MC/AArch64/armv8.4a-flagm.s
@@ -0,0 +1,6 @@
+// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+flagm   < %s | FileCheck %s
+
+cfinv
+
+// CHECK: .text
+cfinv // encoding: [0x1f,0x40,0x00,0xd5]

diff  --git a/llvm/test/MC/AArch64/directive-arch_extension-negative.s b/llvm/test/MC/AArch64/directive-arch_extension-negative.s
index 29920d442a8a..797a303e3043 100644
--- a/llvm/test/MC/AArch64/directive-arch_extension-negative.s
+++ b/llvm/test/MC/AArch64/directive-arch_extension-negative.s
@@ -1,5 +1,5 @@
 // RUN: not llvm-mc -triple aarch64 \
-// RUN: -mattr=+crc,+sm4,+sha3,+sha2,+aes,+fp,+neon,+ras,+lse,+predres,+ccdp,+mte,+tlb-rmi,+pan-rwv,+ccpp,+rcpc,+ls64 \
+// RUN: -mattr=+crc,+sm4,+sha3,+sha2,+aes,+fp,+neon,+ras,+lse,+predres,+ccdp,+mte,+tlb-rmi,+pan-rwv,+ccpp,+rcpc,+ls64,+flagm \
 // RUN: -filetype asm -o - %s 2>&1 | FileCheck %s
 
 .arch_extension axp64
@@ -124,3 +124,10 @@ ld64b x0, [x13]
 ld64b x0, [x13]
 // CHECK: [[@LINE-1]]:1: error: instruction requires: ls64
 // CHECK-NEXT: ld64b x0, [x13]
+
+cfinv
+// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: flagm
+.arch_extension noflagm
+cfinv
+// CHECK: [[@LINE-1]]:1: error: instruction requires: flagm
+// CHECK-NEXT: cfinv

diff  --git a/llvm/test/MC/AArch64/directive-arch_extension.s b/llvm/test/MC/AArch64/directive-arch_extension.s
index 7041f613c4c8..8cf2acd509b1 100644
--- a/llvm/test/MC/AArch64/directive-arch_extension.s
+++ b/llvm/test/MC/AArch64/directive-arch_extension.s
@@ -75,3 +75,7 @@ ld64b x0, [x13]
 .arch_extension pauth
 paciasp
 // CHECK: paciasp
+
+.arch_extension flagm
+cfinv
+// CHECK: cfinv


        


More information about the llvm-commits mailing list