diff --git a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp --- a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp +++ b/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", {}}, diff --git a/llvm/test/MC/AArch64/SME/directives-negative.s b/llvm/test/MC/AArch64/SME/directives-negative.s new file mode 100644 --- /dev/null +++ b/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 diff --git a/llvm/test/MC/AArch64/SME/directives.s b/llvm/test/MC/AArch64/SME/directives.s new file mode 100644 --- /dev/null +++ b/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