]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Check cpuid availability on FreeBSD/OpenBSD when detecting fast/pmull develop
authorNathan Moinvaziri <nathan@nathanm.com>
Sun, 25 Jan 2026 02:00:50 +0000 (18:00 -0800)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 26 Jan 2026 22:11:41 +0000 (23:11 +0100)
arch/arm/arm_features.c

index 96e7679fe5694a4ab687a00786d275bb555d4f37..20a363eb82e0213576adda419457a36678f33c78 100644 (file)
@@ -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));