diff options
| author | Nathan Moinvaziri <nathan@nathanm.com> | 2026-01-24 18:00:50 -0800 |
|---|---|---|
| committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2026-01-26 23:11:41 +0100 |
| commit | 36df93cb3ce42f829c5076afcfaf382fbdff9c50 (patch) | |
| tree | fe6005661749f094e1e65b7c50a2fe1d9918d5e6 | |
| parent | 8cdb265558990bc9bd8eb852ff72cd45f138e751 (diff) | |
| download | Project-Tick-36df93cb3ce42f829c5076afcfaf382fbdff9c50.tar.gz Project-Tick-36df93cb3ce42f829c5076afcfaf382fbdff9c50.zip | |
Check cpuid availability on FreeBSD/OpenBSD when detecting fast/pmull
| -rw-r--r-- | arch/arm/arm_features.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm/arm_features.c b/arch/arm/arm_features.c index 96e7679fe5..20a363eb82 100644 --- a/arch/arm/arm_features.c +++ b/arch/arm/arm_features.c @@ -279,11 +279,10 @@ static inline int arm_cpu_has_fast_pmull(void) { /* On macOS, all Apple Silicon has fast PMULL */ has_fast_pmull = 1; #elif defined(ARCH_64BIT) && !defined(_WIN32) -# if defined(__linux__) - /* We have to support the CPUID feature in HWCAP */ + /* We need CPUID feature to read MIDR register */ if (!arm_has_cpuid()) return has_fast_pmull; -# endif + uint64_t midr; __asm__ ("mrs %0, midr_el1" : "=r" (midr)); |
