[PATCH] D127798: [AArch64] Define __ARM_FEATURE_RCPC
Mingming Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 16 16:26:44 PDT 2022
mingmingl updated this revision to Diff 437749.
mingmingl marked an inline comment as done.
mingmingl added a comment.
change from `-target=aarch64-none-linux-gnu` to `--target=aarch64-none-linux-gnu` to resolve a compile error.
Verified no other compilation error by `ninja check-all`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127798/new/
https://reviews.llvm.org/D127798
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
@@ -26,6 +26,7 @@
// CHECK: __ARM_FEATURE_IDIV 1
// CHECK: __ARM_FEATURE_LDREX 0xF
// CHECK: __ARM_FEATURE_NUMERIC_MAXMIN 1
+// CHECK-NOT: __ARM_FEATURE_RCPC 1
// CHECK-NOT: __ARM_FEATURE_SHA2 1
// CHECK-NOT: __ARM_FEATURE_SHA3 1
// CHECK-NOT: __ARM_FEATURE_SHA512 1
@@ -561,3 +562,6 @@
// CHECK-BEFORE-V83-NOT: __ARM_FEATURE_COMPLEX 1
// CHECK-BEFORE-V83-NOT: __ARM_FEATURE_JCVT 1
// CHECK-BEFORE-V85-NOT: __ARM_FEATURE_FRINT 1
+
+// RUN: %clang --target=aarch64-none-linux-gnu -march=armv8.2-a+rcpc -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-RCPC %s
+// CHECK-RCPC: __ARM_FEATURE_RCPC 1
Index: clang/lib/Basic/Targets/AArch64.h
===================================================================
--- clang/lib/Basic/Targets/AArch64.h
+++ clang/lib/Basic/Targets/AArch64.h
@@ -54,6 +54,7 @@
bool HasLSE;
bool HasFlagM;
bool HasMOPS;
+ bool HasRCPC;
llvm::AArch64::ArchKind ArchKind;
Index: clang/lib/Basic/Targets/AArch64.cpp
===================================================================
--- clang/lib/Basic/Targets/AArch64.cpp
+++ clang/lib/Basic/Targets/AArch64.cpp
@@ -341,6 +341,9 @@
if (HasCRC)
Builder.defineMacro("__ARM_FEATURE_CRC32", "1");
+ if (HasRCPC)
+ Builder.defineMacro("__ARM_FEATURE_RCPC", "1");
+
// The __ARM_FEATURE_CRYPTO is deprecated in favor of finer grained feature
// macros for AES, SHA2, SHA3 and SM4
if (HasAES && HasSHA2)
@@ -544,6 +547,7 @@
HasMatmulFP32 = false;
HasLSE = false;
HasMOPS = false;
+ HasRCPC = false;
ArchKind = llvm::AArch64::ArchKind::INVALID;
@@ -593,6 +597,8 @@
}
if (Feature == "+crc")
HasCRC = true;
+ if (Feature == "+rcpc")
+ HasRCPC = true;
if (Feature == "+aes")
HasAES = true;
if (Feature == "+sha2")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127798.437749.patch
Type: text/x-patch
Size: 2017 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220616/1045e616/attachment.bin>
More information about the cfe-commits
mailing list