Skip to content

Commit

Permalink
[compiler-rt] Fix the HWCAP2_EBF16 and HWCAP2_SVE_EBF16 macro value (#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
joyhou-hw committed Nov 23, 2023
1 parent 22078bd commit 0e5da2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler-rt/lib/builtins/cpu_model.c
Original file line number Diff line number Diff line change
Expand Up @@ -1137,10 +1137,10 @@ typedef struct __ifunc_arg_t {
#define HWCAP2_WFXT (1UL << 31)
#endif
#ifndef HWCAP2_EBF16
#define HWCAP2_EBF16 (1UL << 32)
#define HWCAP2_EBF16 (1ULL << 32)
#endif
#ifndef HWCAP2_SVE_EBF16
#define HWCAP2_SVE_EBF16 (1UL << 33)
#define HWCAP2_SVE_EBF16 (1ULL << 33)
#endif

// Detect Exynos 9810 CPU
Expand Down

0 comments on commit 0e5da2e

Please sign in to comment.