[llvm] dad1868 - [AArch64][AsmParser] Add rcpc support in .arch_extension

Victor Campos via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 14 02:57:47 PDT 2020


Author: Victor Campos
Date: 2020-07-14T10:57:11+01:00
New Revision: dad1868772f1e487a96c2aa66f90ce9a1b5d06ac

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

LOG: [AArch64][AsmParser] Add rcpc support in .arch_extension

AArch64 does not support enabling rcpc via .arch_extension in assembly.
GCC, on the other hand, does.

This patch adds 'rcpc' as a valid value to .arch_extension handling.

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

Added: 
    

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 860c9c20044c..0ac09c4f96f0 100644
--- a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+++ b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
@@ -2844,6 +2844,7 @@ static const struct Extension {
     {"tlb-rmi", {AArch64::FeatureTLB_RMI}},
     {"pan-rwv", {AArch64::FeaturePAN_RWV}},
     {"ccpp", {AArch64::FeatureCCPP}},
+    {"rcpc", {AArch64::FeatureRCPC}},
     {"sve", {AArch64::FeatureSVE}},
     {"sve2", {AArch64::FeatureSVE2}},
     {"sve2-aes", {AArch64::FeatureSVE2AES}},

diff  --git a/llvm/test/MC/AArch64/directive-arch_extension-negative.s b/llvm/test/MC/AArch64/directive-arch_extension-negative.s
index 61351e171b59..e516046d8edf 100644
--- a/llvm/test/MC/AArch64/directive-arch_extension-negative.s
+++ b/llvm/test/MC/AArch64/directive-arch_extension-negative.s
@@ -78,3 +78,8 @@ at s1e1wp, x2
 dc cvap, x7
 // CHECK: error: DC CVAP requires ccpp
 // CHECK-NEXT: dc cvap, x7
+
+.arch_extension norcpc
+ldapr x0, [x1]
+// CHECK: error: instruction requires: rcpc
+// CHECK-NEXT: ldapr x0, [x1]

diff  --git a/llvm/test/MC/AArch64/directive-arch_extension.s b/llvm/test/MC/AArch64/directive-arch_extension.s
index 6f1a65113462..e351526c871b 100644
--- a/llvm/test/MC/AArch64/directive-arch_extension.s
+++ b/llvm/test/MC/AArch64/directive-arch_extension.s
@@ -59,3 +59,7 @@ at s1e1wp, x2
 .arch_extension ccpp
 dc cvap, x7
 // CHECK: dc cvap, x7
+
+.arch_extension rcpc
+ldapr x0, [x1]
+// CHECK: ldapr x0, [x1]


        


More information about the llvm-commits mailing list