[PATCH] D153130: [Clang][AArch64] Implement ACLE feature macro for FEAT_LRCPC3
Lucas Prates via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 7 04:33:54 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf1d7a55a4e06: [Clang][AArch64] Implement ACLE feature macro for FEAT_LRCPC3 (authored by pratlucas).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153130/new/
https://reviews.llvm.org/D153130
Files:
clang/lib/Basic/Targets/AArch64.cpp
clang/lib/Basic/Targets/AArch64.h
clang/test/Preprocessor/aarch64-target-features.c
Index: clang/test/Preprocessor/aarch64-target-features.c
===================================================================
--- clang/test/Preprocessor/aarch64-target-features.c
+++ clang/test/Preprocessor/aarch64-target-features.c
@@ -27,6 +27,7 @@
// CHECK: __ARM_FEATURE_LDREX 0xF
// CHECK: __ARM_FEATURE_NUMERIC_MAXMIN 1
// CHECK-NOT: __ARM_FEATURE_RCPC 1
+// CHECK-NOT: __ARM_FEATURE_RCPC 3
// CHECK-NOT: __ARM_FEATURE_SHA2 1
// CHECK-NOT: __ARM_FEATURE_SHA3 1
// CHECK-NOT: __ARM_FEATURE_SHA512 1
@@ -612,3 +613,6 @@
// RUN: %clang --target=aarch64 -march=armv8.2-a+rcpc -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-RCPC %s
// CHECK-RCPC: __ARM_FEATURE_RCPC 1
+
+// RUN: %clang --target=aarch64 -march=armv8.2-a+rcpc3 -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-RCPC3 %s
+// CHECK-RCPC3: __ARM_FEATURE_RCPC 3
Index: clang/lib/Basic/Targets/AArch64.h
===================================================================
--- clang/lib/Basic/Targets/AArch64.h
+++ clang/lib/Basic/Targets/AArch64.h
@@ -82,6 +82,7 @@
bool HasNoSVE = false;
bool HasFMV = true;
bool HasGCS = false;
+ bool HasRCPC3 = false;
const llvm::AArch64::ArchInfo *ArchInfo = &llvm::AArch64::ARMV8A;
Index: clang/lib/Basic/Targets/AArch64.cpp
===================================================================
--- clang/lib/Basic/Targets/AArch64.cpp
+++ clang/lib/Basic/Targets/AArch64.cpp
@@ -415,7 +415,9 @@
if (HasCRC)
Builder.defineMacro("__ARM_FEATURE_CRC32", "1");
- if (HasRCPC)
+ if (HasRCPC3)
+ Builder.defineMacro("__ARM_FEATURE_RCPC", "3");
+ else if (HasRCPC)
Builder.defineMacro("__ARM_FEATURE_RCPC", "1");
if (HasFMV)
@@ -671,6 +673,7 @@
.Case("bti", HasBTI)
.Cases("ls64", "ls64_v", "ls64_accdata", HasLS64)
.Case("wfxt", HasWFxT)
+ .Case("rcpc3", HasRCPC3)
.Default(false);
}
@@ -928,6 +931,8 @@
HasD128 = true;
if (Feature == "+gcs")
HasGCS = true;
+ if (Feature == "+rcpc3")
+ HasRCPC3 = true;
}
// Check features that are manually disabled by command line options.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153130.538081.patch
Type: text/x-patch
Size: 2100 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230707/27901929/attachment.bin>
More information about the cfe-commits
mailing list