[PATCH] D105566: [AArch64][SME] Support .arch and .arch_extension assembler directives

Cullen Rhodes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 7 11:09:37 PDT 2021


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

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D105566

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


Index: llvm/test/MC/AArch64/SME/directives.s
===================================================================
--- /dev/null
+++ llvm/test/MC/AArch64/SME/directives.s
@@ -0,0 +1,12 @@
+// RUN: llvm-mc -triple=aarch64 < %s | FileCheck %s
+
+.arch_extension sme
+
+smstart
+// CHECK: smstart
+
+.arch_extension nosme
+
+.arch armv8-a+sme
+smstart
+// CHECK: smstart
Index: llvm/test/MC/AArch64/SME/directives-negative.s
===================================================================
--- /dev/null
+++ llvm/test/MC/AArch64/SME/directives-negative.s
@@ -0,0 +1,14 @@
+// RUN: not llvm-mc -triple=aarch64 < %s
+
+.arch_extension sme
+.arch_extension nosme
+
+smstart
+// CHECK: error: instruction requires: sme
+// CHECK-NEXT: smstart
+
+.arch armv8-a+sme
+.arch armv8-a+nosme
+smstart
+// CHECK: error: instruction requires: sme
+// CHECK-NEXT: smstart
Index: llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
===================================================================
--- llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+++ llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
@@ -3299,6 +3299,7 @@
     {"pauth", {AArch64::FeaturePAuth}},
     {"flagm", {AArch64::FeatureFlagM}},
     {"rme", {AArch64::FeatureRME}},
+    {"sme", {AArch64::FeatureSME}},
     // FIXME: Unsupported extensions
     {"lor", {}},
     {"rdma", {}},


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105566.357005.patch
Type: text/x-patch
Size: 1357 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210707/608d97ba/attachment.bin>


More information about the llvm-commits mailing list