[compiler-rt] [FMV][compiler-rt] Fix cpu features initialization. (PR #95149)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 11 10:30:01 PDT 2024
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 b1fe03f0840a2c488b1f07a669bfea3cc986ce3b 89f59cebc11853d3229fbb383706516c8e0e6732 -- compiler-rt/lib/builtins/aarch64/sme-abi-vg.c compiler-rt/lib/builtins/cpu_model/aarch64/fmv/android.inc compiler-rt/lib/builtins/cpu_model/aarch64/fmv/freebsd.inc compiler-rt/lib/builtins/cpu_model/aarch64/fmv/fuchsia.inc compiler-rt/lib/builtins/cpu_model/aarch64/fmv/mrs.inc compiler-rt/lib/builtins/cpu_model/aarch64/fmv/sysauxv.inc compiler-rt/lib/builtins/cpu_model/aarch64/hwcap.inc
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/compiler-rt/lib/builtins/cpu_model/aarch64/fmv/mrs.inc b/compiler-rt/lib/builtins/cpu_model/aarch64/fmv/mrs.inc
index 7c647b298a..e4d5e7f2bd 100644
--- a/compiler-rt/lib/builtins/cpu_model/aarch64/fmv/mrs.inc
+++ b/compiler-rt/lib/builtins/cpu_model/aarch64/fmv/mrs.inc
@@ -109,16 +109,16 @@ static void __init_cpu_features_constructor(unsigned long hwcap,
getCPUFeature(ID_AA64ISAR1_EL1, ftr);
/* ID_AA64ISAR1_EL1.SPECRES >= 0b0001 */
if (extractBits(ftr, 40, 4) >= 0x1)
- setCPUFeature(FEAT_PREDRES);
+ setCPUFeature(FEAT_PREDRES);
/* ID_AA64ISAR1_EL1.LS64 >= 0b0001 */
if (extractBits(ftr, 60, 4) >= 0x1)
- setCPUFeature(FEAT_LS64);
+ setCPUFeature(FEAT_LS64);
/* ID_AA64ISAR1_EL1.LS64 >= 0b0010 */
if (extractBits(ftr, 60, 4) >= 0x2)
- setCPUFeature(FEAT_LS64_V);
+ setCPUFeature(FEAT_LS64_V);
/* ID_AA64ISAR1_EL1.LS64 >= 0b0011 */
if (extractBits(ftr, 60, 4) >= 0x3)
- setCPUFeature(FEAT_LS64_ACCDATA);
+ setCPUFeature(FEAT_LS64_ACCDATA);
}
if (hwcap & HWCAP_FP) {
setCPUFeature(FEAT_FP);
diff --git a/compiler-rt/lib/builtins/cpu_model/aarch64/hwcap.inc b/compiler-rt/lib/builtins/cpu_model/aarch64/hwcap.inc
index 92c72beaa4..41aba82ef9 100644
--- a/compiler-rt/lib/builtins/cpu_model/aarch64/hwcap.inc
+++ b/compiler-rt/lib/builtins/cpu_model/aarch64/hwcap.inc
@@ -185,5 +185,5 @@
#define HWCAP2_MOPS (1ULL << 43)
#endif
#ifndef HWCAP2_LRCPC3
-#define HWCAP2_LRCPC3 (1UL << 46)
+#define HWCAP2_LRCPC3 (1UL << 46)
#endif
``````````
</details>
https://github.com/llvm/llvm-project/pull/95149
More information about the llvm-commits
mailing list