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 @@ -3211,6 +3211,9 @@ {"pauth", {AArch64::FeaturePAuth}}, {"flagm", {AArch64::FeatureFlagM}}, {"rme", {AArch64::FeatureRME}}, + {"sme", {AArch64::FeatureSME}}, + {"sme-f64", {AArch64::FeatureSMEF64}}, + {"sme-i64", {AArch64::FeatureSMEI64}}, // 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,37 @@ +// RUN: not llvm-mc -triple aarch64 -o - %s 2>&1 | FileCheck %s + +.arch_extension sme +.arch_extension nosme +smstart +// CHECK: error: instruction requires: sme +// CHECK-NEXT: smstart + +.arch_extension sme-f64 +.arch_extension nosme-f64 +fmopa za0.d, p0/m, p0/m, z0.d, z0.d +// CHECK: error: instruction requires: sme-f64 +// CHECK-NEXT: fmopa za0.d, p0/m, p0/m, z0.d, z0.d + +.arch_extension sme-i64 +.arch_extension nosme-i64 +addha za0.d, p0/m, p0/m, z0.d +// CHECK: error: instruction requires: sme-i64 +// CHECK-NEXT: addha za0.d, p0/m, p0/m, z0.d + +.arch armv8-a+sme +.arch armv8-a+nosme +smstart +// CHECK: error: instruction requires: sme +// CHECK-NEXT: smstart + +.arch armv8-a+sme-f64 +.arch armv8-a+nosme-f64 +fmopa za0.d, p0/m, p0/m, z0.d, z0.d +// CHECK: error: instruction requires: sme-f64 +// CHECK-NEXT: fmopa za0.d, p0/m, p0/m, z0.d, z0.d + +.arch armv8-a+sme-i64 +.arch armv8-a+nosme-i64 +addha za0.d, p0/m, p0/m, z0.d +// CHECK: error: instruction requires: sme-i64 +// CHECK-NEXT: addha za0.d, p0/m, p0/m, z0.d 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,35 @@ +// RUN: llvm-mc -triple aarch64 -o - %s 2>&1 | FileCheck %s + +.arch_extension sme +smstart +// CHECK: smstart + +.arch_extension nosme + +.arch_extension sme-f64 +fmopa za0.d, p0/m, p0/m, z0.d, z0.d +// CHECK: fmopa za0.d, p0/m, p0/m, z0.d, z0.d + +.arch_extension nosme-f64 + +.arch_extension sme-i64 +addha za0.d, p0/m, p0/m, z0.d +// CHECK: addha za0.d, p0/m, p0/m, z0.d + +.arch_extension nosme-i64 + +.arch armv8-a+sme +smstart +// CHECK: smstart + +.arch armv8-a+nosme + +.arch armv8-a+sme-f64 +fmopa za0.d, p0/m, p0/m, z0.d, z0.d +// CHECK: fmopa za0.d, p0/m, p0/m, z0.d, z0.d + +.arch armv8-a+nosme-f64 + +.arch armv8-a+sme-i64 +addha za0.d, p0/m, p0/m, z0.d +// CHECK: addha za0.d, p0/m, p0/m, z0.d