fix HWCAP_ASIMDHP test; ok kettenis@
authorjsg <jsg@openbsd.org>
Sun, 29 Sep 2024 11:22:39 +0000 (11:22 +0000)
committerjsg <jsg@openbsd.org>
Sun, 29 Sep 2024 11:22:39 +0000 (11:22 +0000)
sys/arch/arm64/arm64/cpu.c

index 94540ec..ee3a4cd 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: cpu.c,v 1.132 2024/09/23 13:50:33 jsg Exp $   */
+/*     $OpenBSD: cpu.c,v 1.133 2024/09/29 11:22:39 jsg Exp $   */
 
 /*
  * Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com>
@@ -1179,8 +1179,8 @@ cpu_identify_cleanup(void)
        if (ID_AA64PFR0_FP(cpu_id_aa64pfr0) != ID_AA64PFR0_FP_NONE &&
            ID_AA64PFR0_FP(cpu_id_aa64pfr0) >= ID_AA64PFR0_FP_HP)
                hwcap |= HWCAP_FPHP;
-       if (ID_AA64PFR0_FP(cpu_id_aa64pfr0) != ID_AA64PFR0_ADV_SIMD_NONE &&
-           ID_AA64PFR0_FP(cpu_id_aa64pfr0) >= ID_AA64PFR0_ADV_SIMD_HP)
+       if (ID_AA64PFR0_ADV_SIMD(cpu_id_aa64pfr0) != ID_AA64PFR0_ADV_SIMD_NONE &&
+           ID_AA64PFR0_ADV_SIMD(cpu_id_aa64pfr0) >= ID_AA64PFR0_ADV_SIMD_HP)
                hwcap |= HWCAP_ASIMDHP;
        id_aa64mmfr2 = READ_SPECIALREG(id_aa64mmfr2_el1);
        if (ID_AA64MMFR2_IDS(id_aa64mmfr2) >= ID_AA64MMFR2_IDS_IMPL)