Skip to content

Commit 0e5da2e

Browse files
authored
[compiler-rt] Fix the HWCAP2_EBF16 and HWCAP2_SVE_EBF16 macro value (#70905)
HWCAP2_EBF16 (1UL << 32) HWCAP2_SVE_EBF16 (1UL << 33) this will overflow in aarch64 ilp32 abi, and make func __init_cpu_features_constructor() wrong.
1 parent 22078bd commit 0e5da2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler-rt/lib/builtins/cpu_model.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,10 +1137,10 @@ typedef struct __ifunc_arg_t {
11371137
#define HWCAP2_WFXT (1UL << 31)
11381138
#endif
11391139
#ifndef HWCAP2_EBF16
1140-
#define HWCAP2_EBF16 (1UL << 32)
1140+
#define HWCAP2_EBF16 (1ULL << 32)
11411141
#endif
11421142
#ifndef HWCAP2_SVE_EBF16
1143-
#define HWCAP2_SVE_EBF16 (1UL << 33)
1143+
#define HWCAP2_SVE_EBF16 (1ULL << 33)
11441144
#endif
11451145

11461146
// Detect Exynos 9810 CPU

0 commit comments

Comments
 (0)