[llvm] 1efea0a - [AArch64] Support v8.9-A/v9.4-A in .arch_extension directive
Lucas Prates via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 23 07:03:07 PST 2023
Author: Lucas Prates
Date: 2023-01-23T15:03:01Z
New Revision: 1efea0ae8ed2ed256aa8950a020448a361bb9282
URL: https://github.com/llvm/llvm-project/commit/1efea0ae8ed2ed256aa8950a020448a361bb9282
DIFF: https://github.com/llvm/llvm-project/commit/1efea0ae8ed2ed256aa8950a020448a361bb9282.diff
LOG: [AArch64] Support v8.9-A/v9.4-A in .arch_extension directive
This adds support for the v8.9-A/v9.4-A architectural extensions to be
used in .arch_extension assembly directives.
Patch by Sam Elliott.
Reviewed By: lenary, tmatheson
Differential Revision: https://reviews.llvm.org/D141402
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 1ef3ada8764ca..993ce4898d05e 100644
--- a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+++ b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
@@ -3676,6 +3676,9 @@ static const struct Extension {
{"the", {AArch64::FeatureTHE}},
{"d128", {AArch64::FeatureD128}},
{"lse128", {AArch64::FeatureLSE128}},
+ {"ite", {AArch64::FeatureITE}},
+ {"cssc", {AArch64::FeatureCSSC}},
+ {"rcpc3", {AArch64::FeatureRCPC3}},
// 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 bf647be7037d5..b6686998d2ea0 100644
--- a/llvm/test/MC/AArch64/directive-arch_extension-negative.s
+++ b/llvm/test/MC/AArch64/directive-arch_extension-negative.s
@@ -1,6 +1,6 @@
// 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,+hbc,+mops \
-// RUN: -mattr=+rcpc3,+lse128,+d128,+the,+rasv2 \
+// RUN: -mattr=+rcpc3,+lse128,+d128,+the,+rasv2,+ite,+cssc,+specres2 \
// RUN: -filetype asm -o - %s 2>&1 | FileCheck %s
.arch_extension axp64
@@ -70,6 +70,13 @@ casa w5, w7, [x20]
// CHECK: [[@LINE-1]]:1: error: instruction requires: lse
// CHECK-NEXT: casa w5, w7, [x20]
+swpp x0, x2, [x3]
+// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: lse128
+.arch_extension nolse128
+swpp x0, x2, [x3]
+// CHECK: [[@LINE-1]]:1: error: instruction requires: lse128
+// CHECK-NEXT: swpp x0, x2, [x3]
+
cfp rctx, x0
// CHECK-NOT: [[@LINE-1]]:5: error: CFPRCTX requires: predres
.arch_extension nopredres
@@ -77,6 +84,13 @@ cfp rctx, x0
// CHECK: [[@LINE-1]]:5: error: CFPRCTX requires: predres
// CHECK-NEXT: cfp rctx, x0
+cosp rctx, x0
+// CHECK-NOT: [[@LINE-1]]:6: error: COSP requires: predres2
+.arch_extension nopredres2
+cosp rctx, x0
+// CHECK: [[@LINE-1]]:6: error: COSP requires: predres2
+// CHECK-NEXT: cosp rctx, x0
+
dc cvadp, x7
// CHECK-NOT: [[@LINE-1]]:4: error: DC CVADP requires: ccdp
.arch_extension noccdp
@@ -119,6 +133,13 @@ ldapr x0, [x1]
// CHECK: [[@LINE-1]]:1: error: instruction requires: rcpc
// CHECK-NEXT: ldapr x0, [x1]
+stilp w24, w0, [x16, #-8]!
+// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: rcpc3
+.arch_extension norcpc3
+stilp w24, w0, [x16, #-8]!
+// CHECK: [[@LINE-1]]:1: error: instruction requires: rcpc3
+// CHECK-NEXT: stilp w24, w0, [x16, #-8]!
+
ld64b x0, [x13]
// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: ls64
.arch_extension nols64
@@ -169,6 +190,20 @@ rcwswp x0, x1, [x2]
// CHECK: [[@LINE-1]]:1: error: instruction requires: the
// CHECK-NEXT: rcwswp x0, x1, [x2]
+trcit x0
+// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: ite
+.arch_extension noite
+trcit x0
+// CHECK: [[@LINE-1]]:1: error: instruction requires: ite
+// CHECK-NEXT: trcit x0
+
+umax x0, x1, x2
+// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: cssc
+.arch_extension nocssc
+umax x0, x1, x2
+// CHECK: [[@LINE-1]]:1: error: instruction requires: cssc
+// CHECK-NEXT: umax x0, x1, x2
+
mrs x0, ERXGSR_EL1
// CHECK-NOT: [[@LINE-1]]:9: error: expected readable system register
.arch_extension norasv2
diff --git a/llvm/test/MC/AArch64/directive-arch_extension.s b/llvm/test/MC/AArch64/directive-arch_extension.s
index 092c5784f2f4c..03ca1fe87988b 100644
--- a/llvm/test/MC/AArch64/directive-arch_extension.s
+++ b/llvm/test/MC/AArch64/directive-arch_extension.s
@@ -36,10 +36,18 @@ esb
casa w5, w7, [x20]
// CHECK: casa w5, w7, [x20]
+.arch_extension lse128
+swpp x0, x2, [x3]
+// CHECK: swpp x0, x2, [x3]
+
.arch_extension predres
cfp rctx, x0
// CHECK: cfp rctx, x0
+.arch_extension predres2
+cosp rctx, x0
+// CHECK: cosp rctx, x0
+
.arch_extension ccdp
dc cvadp, x7
// CHECK: dc cvadp, x7
@@ -72,6 +80,10 @@ dc cvap, x7
ldapr x0, [x1]
// CHECK: ldapr x0, [x1]
+.arch_extension rcpc3
+stilp w24, w0, [x16, #-8]!
+// CHECK: stilp w24, w0, [x16, #-8]!
+
.arch_extension ls64
ld64b x0, [x13]
// CHECK: ld64b x0, [x13]
@@ -108,3 +120,11 @@ rcwcasp x0, x1, x6, x7, [x4]
.arch_extension rasv2
mrs x0, ERXGSR_EL1
// CHECK: mrs x0, ERXGSR_EL1
+
+.arch_extension ite
+trcit x0
+// CHECK: trcit x0
+
+.arch_extension cssc
+umax x0, x1, x2
+// CHECK: umax x0, x1, x2
More information about the llvm-commits
mailing list