[clang] [ARM] arm_acle.h add Coprocessor Instrinsics (PR #75440)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 22 05:31:56 PST 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 88d319a29ff5d3be1bb9a7e88ef6e17df1dfe607 5a746e97989ba795264d20aef4f056db0c17bc2c -- clang/test/CodeGen/arm-acle-coproc.c clang/lib/Basic/Targets/ARM.cpp clang/lib/Headers/arm_acle.h clang/test/Preprocessor/aarch64-target-features.c
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Basic/Targets/ARM.cpp b/clang/lib/Basic/Targets/ARM.cpp
index c7962210e4..bada097555 100644
--- a/clang/lib/Basic/Targets/ARM.cpp
+++ b/clang/lib/Basic/Targets/ARM.cpp
@@ -844,22 +844,21 @@ void ARMTargetInfo::getTargetDefines(const LangOptions &Opts,
Builder.defineMacro("__ARM_FEATURE_COPROC_V4", "1");
}
- if (ArchKind == llvm::ARM::ArchKind::ARMV5T &&
- !isThumb()) {
+ if (ArchKind == llvm::ARM::ArchKind::ARMV5T && !isThumb()) {
Builder.defineMacro("__ARM_FEATURE_COPROC", "1");
Builder.defineMacro("__ARM_FEATURE_COPROC_V5", "1");
}
if ((ArchKind == llvm::ARM::ArchKind::ARMV5TE ||
ArchKind == llvm::ARM::ArchKind::ARMV5TEJ) &&
- !isThumb()) {
+ !isThumb()) {
Builder.defineMacro("__ARM_FEATURE_COPROC", "1");
Builder.defineMacro("__ARM_FEATURE_COPROC_V5TE", "1");
}
if ((ArchKind == llvm::ARM::ArchKind::ARMV6 ||
- ArchKind == llvm::ARM::ArchKind::ARMV6K ||
- ArchKind == llvm::ARM::ArchKind::ARMV6KZ) &&
+ ArchKind == llvm::ARM::ArchKind::ARMV6K ||
+ ArchKind == llvm::ARM::ArchKind::ARMV6KZ) &&
!isThumb()) {
Builder.defineMacro("__ARM_FEATURE_COPROC", "1");
Builder.defineMacro("__ARM_FEATURE_COPROC_V6", "1");
@@ -894,7 +893,7 @@ void ARMTargetInfo::getTargetDefines(const LangOptions &Opts,
Builder.defineMacro("__ARM_FEATURE_COPROC_V8", "1");
}
- if (ArchKind == llvm::ARM::ArchKind::ARMV9A ||
+ if (ArchKind == llvm::ARM::ArchKind::ARMV9A ||
ArchKind == llvm::ARM::ArchKind::ARMV9_1A ||
ArchKind == llvm::ARM::ArchKind::ARMV9_2A ||
ArchKind == llvm::ARM::ArchKind::ARMV9_3A ||
diff --git a/clang/lib/Headers/arm_acle.h b/clang/lib/Headers/arm_acle.h
index 6852337c38..b91e227655 100644
--- a/clang/lib/Headers/arm_acle.h
+++ b/clang/lib/Headers/arm_acle.h
@@ -760,7 +760,8 @@ __arm_st64bv0(void *__addr, data512_t __value) {
#if __ARM_FEATURE_COPROC
#ifndef __ARM_TARGET_COPROC_V8
-#define __arm_cdp(coproc, opc1, CRd, CRn, CRm, opc2) __builtin_arm_cdp(coproc, opc1, CRd, CRn, CRm, opc2)
+#define __arm_cdp(coproc, opc1, CRd, CRn, CRm, opc2) \
+ __builtin_arm_cdp(coproc, opc1, CRd, CRn, CRm, opc2)
#endif
#define __arm_ldc(coproc, CRd, p) __builtin_arm_ldc(coproc, CRd, p)
@@ -771,28 +772,34 @@ __arm_st64bv0(void *__addr, data512_t __value) {
#define __arm_stcl(coproc, CRd, p) __builtin_arm_stcl(coproc, CRd, p)
#endif
-
-#define __arm_mcr(coproc, opc1, value, CRn, CRm, opc2) __builtin_arm_mcr(coproc, opc1, value, CRn, CRm, opc2)
-#define __arm_mrc(coproc, opc1, CRn, CRm, opc2) __builtin_arm_mrc(coproc, opc1, CRn, CRm, opc2)
+#define __arm_mcr(coproc, opc1, value, CRn, CRm, opc2) \
+ __builtin_arm_mcr(coproc, opc1, value, CRn, CRm, opc2)
+#define __arm_mrc(coproc, opc1, CRn, CRm, opc2) \
+ __builtin_arm_mrc(coproc, opc1, CRn, CRm, opc2)
#if !defined(__ARM_TARGET_COPROC_V4) && !defined(__ARM_TARGET_COPROC_V8)
-#define __arm_cdp2(coproc, opc1, CRd, CRn, CRm, opc2) __builtin_arm_cdp2(coproc, opc1, CRd, CRn, CRm, opc2)
+#define __arm_cdp2(coproc, opc1, CRd, CRn, CRm, opc2) \
+ __builtin_arm_cdp2(coproc, opc1, CRd, CRn, CRm, opc2)
#define __arm_ldc2(coproc, CRd, p) __builtin_arm_ldc2(coproc, CRd, p)
#define __arm_ldc2l(coproc, CRd, p) __builtin_arm_ldc2l(coproc, CRd, p)
#define __arm_stc2(coproc, CRd, p) __builtin_arm_stc2(coproc, CRd, p)
#define __arm_stc2l(coproc, CRd, p) __builtin_arm_stc2l(coproc, CRd, p)
-#define __arm_mcr2(coproc, opc1, value, CRn, CRm, opc2) __builtin_arm_mcr2(coproc, opc1, value, CRn, CRm, opc2)
-#define __arm_mrc2(coproc, opc1, CRn, CRm, opc2) __builtin_arm_mrc2(coproc, opc1, CRn, CRm, opc2)
+#define __arm_mcr2(coproc, opc1, value, CRn, CRm, opc2) \
+ __builtin_arm_mcr2(coproc, opc1, value, CRn, CRm, opc2)
+#define __arm_mrc2(coproc, opc1, CRn, CRm, opc2) \
+ __builtin_arm_mrc2(coproc, opc1, CRn, CRm, opc2)
#ifndef __ARM_TARGET_COPROC_V5
-#define __arm_mcrr(coproc, opc1, value, CRm) __builtin_arm_mcrr(coproc, opc1, value, CRm)
+#define __arm_mcrr(coproc, opc1, value, CRm) \
+ __builtin_arm_mcrr(coproc, opc1, value, CRm)
#define __arm_mrrc(coproc, opc1, CRm) __builtin_arm_mrrc(coproc, opc1, CRm)
#ifndef __ARM_TARGET_COPROC_V5TE
-#define __arm_mcrr2(coproc, opc1, value, CRm) __builtin_arm_mcrr2(coproc, opc1, value, CRm)
+#define __arm_mcrr2(coproc, opc1, value, CRm) \
+ __builtin_arm_mcrr2(coproc, opc1, value, CRm)
#define __arm_mrrc2(coproc, opc1, CRm) __builtin_arm_mrrc2(coproc, opc1, CRm)
#endif // __ARM_TARGET_COPROC_V5TE
@@ -802,7 +809,8 @@ __arm_st64bv0(void *__addr, data512_t __value) {
#ifdef __ARM_TARGET_COPROC_V8
-#define __arm_mcrr(coproc, opc1, value, CRm) __builtin_arm_mcrr(coproc, opc1, value, CRm)
+#define __arm_mcrr(coproc, opc1, value, CRm) \
+ __builtin_arm_mcrr(coproc, opc1, value, CRm)
#define __arm_mrrc(coproc, opc1, CRm) __builtin_arm_mrrc(coproc, opc1, CRm)
#endif // __ARM_TARGET_COPROC_V8
``````````
</details>
https://github.com/llvm/llvm-project/pull/75440
More information about the cfe-commits
mailing list