[llvm] 6732c43 - [llvm][AArch64] Accept armv8.8 "hbc" and "mops" in .arch_extension directive
David Spickett via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 20 01:16:17 PST 2022
Author: David Spickett
Date: 2022-01-20T09:16:08Z
New Revision: 6732c4389786bf12e5adc2c9fba19fef2fe93c86
URL: https://github.com/llvm/llvm-project/commit/6732c4389786bf12e5adc2c9fba19fef2fe93c86
DIFF: https://github.com/llvm/llvm-project/commit/6732c4389786bf12e5adc2c9fba19fef2fe93c86.diff
LOG: [llvm][AArch64] Accept armv8.8 "hbc" and "mops" in .arch_extension directive
Reviewed By: lenary
Differential Revision: https://reviews.llvm.org/D117693
Added:
Modified:
llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
llvm/test/MC/AArch64/directive-arch_extension-negative.s
llvm/test/MC/AArch64/directive-arch_extension.s
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
index 888d73ba06e9..2928b6c29916 100644
--- a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+++ b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
@@ -3284,6 +3284,8 @@ static const struct Extension {
{"sme", {AArch64::FeatureSME}},
{"sme-f64", {AArch64::FeatureSMEF64}},
{"sme-i64", {AArch64::FeatureSMEI64}},
+ {"hbc", {AArch64::FeatureHBC}},
+ {"mops", {AArch64::FeatureMOPS}},
// FIXME: Unsupported extensions
{"lor", {}},
{"rdma", {}},
diff --git a/llvm/test/MC/AArch64/directive-arch_extension-negative.s b/llvm/test/MC/AArch64/directive-arch_extension-negative.s
index 797a303e3043..16f3bb859815 100644
--- a/llvm/test/MC/AArch64/directive-arch_extension-negative.s
+++ b/llvm/test/MC/AArch64/directive-arch_extension-negative.s
@@ -1,5 +1,5 @@
// RUN: not llvm-mc -triple aarch64 \
-// RUN: -mattr=+crc,+sm4,+sha3,+sha2,+aes,+fp,+neon,+ras,+lse,+predres,+ccdp,+mte,+tlb-rmi,+pan-rwv,+ccpp,+rcpc,+ls64,+flagm \
+// RUN: -mattr=+crc,+sm4,+sha3,+sha2,+aes,+fp,+neon,+ras,+lse,+predres,+ccdp,+mte,+tlb-rmi,+pan-rwv,+ccpp,+rcpc,+ls64,+flagm,+hbc,+mops \
// RUN: -filetype asm -o - %s 2>&1 | FileCheck %s
.arch_extension axp64
@@ -131,3 +131,18 @@ cfinv
cfinv
// CHECK: [[@LINE-1]]:1: error: instruction requires: flagm
// CHECK-NEXT: cfinv
+
+lbl:
+bc.eq lbl
+// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: hbc
+.arch_extension nohbc
+bc.eq lbl
+// CHECK: [[@LINE-1]]:1: error: instruction requires: hbc
+// CHECK-NEXT: bc.eq lbl
+
+cpyfp [x0]!, [x1]!, x2!
+// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: mops
+.arch_extension nomops
+cpyfp [x0]!, [x1]!, x2!
+// CHECK: [[@LINE-1]]:1: error: instruction requires: mops
+// CHECK-NEXT: cpyfp [x0]!, [x1]!, x2!
diff --git a/llvm/test/MC/AArch64/directive-arch_extension.s b/llvm/test/MC/AArch64/directive-arch_extension.s
index 064c89ace652..9274e80047a8 100644
--- a/llvm/test/MC/AArch64/directive-arch_extension.s
+++ b/llvm/test/MC/AArch64/directive-arch_extension.s
@@ -83,3 +83,12 @@ paciasp
.arch_extension flagm
cfinv
// CHECK: cfinv
+
+.arch_extension hbc
+lbl:
+ bc.eq lbl
+// CHECK: bc.eq lbl
+
+.arch_extension mops
+cpyfp [x0]!, [x1]!, x2!
+// CHECK: cpyfp [x0]!, [x1]!, x2!
More information about the llvm-commits
mailing list