Skip to content

Commit dad1868

Browse files
committed
[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
1 parent 3ae9f5d commit dad1868

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2844,6 +2844,7 @@ static const struct Extension {
28442844
{"tlb-rmi", {AArch64::FeatureTLB_RMI}},
28452845
{"pan-rwv", {AArch64::FeaturePAN_RWV}},
28462846
{"ccpp", {AArch64::FeatureCCPP}},
2847+
{"rcpc", {AArch64::FeatureRCPC}},
28472848
{"sve", {AArch64::FeatureSVE}},
28482849
{"sve2", {AArch64::FeatureSVE2}},
28492850
{"sve2-aes", {AArch64::FeatureSVE2AES}},

llvm/test/MC/AArch64/directive-arch_extension-negative.s

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,8 @@ at s1e1wp, x2
7878
dc cvap, x7
7979
// CHECK: error: DC CVAP requires ccpp
8080
// CHECK-NEXT: dc cvap, x7
81+
82+
.arch_extension norcpc
83+
ldapr x0, [x1]
84+
// CHECK: error: instruction requires: rcpc
85+
// CHECK-NEXT: ldapr x0, [x1]

llvm/test/MC/AArch64/directive-arch_extension.s

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,7 @@ at s1e1wp, x2
5959
.arch_extension ccpp
6060
dc cvap, x7
6161
// CHECK: dc cvap, x7
62+
63+
.arch_extension rcpc
64+
ldapr x0, [x1]
65+
// CHECK: ldapr x0, [x1]

0 commit comments

Comments
 (0)