[PATCH] D92574: [AArch64] Add support for brbe, ls64, spe-eef and wfxt to .arch_extension

Lucas Prates via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 3 06:36:27 PST 2020


pratlucas created this revision.
Herald added subscribers: llvm-commits, danielkiss, hiraditya, kristof.beyls.
Herald added a project: LLVM.
pratlucas requested review of this revision.

This adds support for the 'brbe', 'ls64', 'spe-eef' and 'wfxt' AArch64
subtarget features to the `.arch_extension` asm directive. It also
includes the 'xs' feature in the directive's tests.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D92574

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


Index: llvm/test/MC/AArch64/directive-arch_extension.s
===================================================================
--- llvm/test/MC/AArch64/directive-arch_extension.s
+++ llvm/test/MC/AArch64/directive-arch_extension.s
@@ -67,3 +67,23 @@
 .arch_extension rcpc
 ldapr x0, [x1]
 // CHECK: ldapr x0, [x1]
+
+.arch_extension brbe
+msr BRBCR_EL1, x0
+// CHECK: msr BRBCR_EL1, x0
+
+.arch_extension ls64
+ld64b x0, [x13]
+// CHECK: ld64b x0, [x13]
+
+.arch_extension spe-eef
+msr PMSNEVFR_EL1, x0
+// CHECK: msr PMSNEVFR_EL1, x0
+
+.arch_extension wfxt
+wfet x17
+// CHECK: wfet x17
+
+.arch_extension xs
+dsb oshnxs
+// CHECK: dsb oshnxs
Index: llvm/test/MC/AArch64/directive-arch_extension-negative.s
===================================================================
--- llvm/test/MC/AArch64/directive-arch_extension-negative.s
+++ llvm/test/MC/AArch64/directive-arch_extension-negative.s
@@ -83,3 +83,28 @@
 ldapr x0, [x1]
 // CHECK: error: instruction requires: rcpc
 // CHECK-NEXT: ldapr x0, [x1]
+
+.arch_extension nobrbe
+msr BRBCR_EL1, x0
+// CHECK: error: expected writable system register
+// CHECK-NEXT: msr BRBCR_EL1, x0
+
+.arch_extension nols64
+ld64b x0, [x13]
+// CHECK: error: instruction requires: ls64
+// CHECK-NEXT: ld64b x0, [x13]
+
+.arch_extension nospe-eef
+msr PMSNEVFR_EL1, x0
+// CHECK: error: expected writable system register
+// CHECK-NEXT: msr PMSNEVFR_EL1, x0
+
+.arch_extension nowfxt
+wfet x17
+// CHECK: error: instruction requires: wfxt
+// CHECK-NEXT: wfet x17
+
+.arch_extension noxs
+dsb oshnxs
+// CHECK: error: instruction requires: xs
+// CHECK-NEXT: dsb oshnxs
Index: llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
===================================================================
--- llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+++ llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
@@ -2912,6 +2912,10 @@
     {"sve2-sm4", {AArch64::FeatureSVE2SM4}},
     {"sve2-sha3", {AArch64::FeatureSVE2SHA3}},
     {"sve2-bitperm", {AArch64::FeatureSVE2BitPerm}},
+    {"brbe", {AArch64::FeatureBRBE}},
+    {"ls64", {AArch64::FeatureLS64}},
+    {"spe-eef", {AArch64::FeatureSPE_EEF}},
+    {"wfxt", {AArch64::FeatureWFxT}},
     {"xs", {AArch64::FeatureXS}},
     // FIXME: Unsupported extensions
     {"pan", {}},


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92574.309244.patch
Type: text/x-patch
Size: 2281 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201203/cfe24841/attachment.bin>


More information about the llvm-commits mailing list