From cdcdb78b97180c7e266b7eaa63951fcbef272b07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Mon, 22 Sep 2025 14:08:29 +0800 Subject: [PATCH] CPU (Windows): refines ARMv8.4-A detection to require LSE2 --- src/detection/cpu/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/detection/cpu/cpu.c b/src/detection/cpu/cpu.c index 28c76434f..37bd27a63 100644 --- a/src/detection/cpu/cpu.c +++ b/src/detection/cpu/cpu.c @@ -429,7 +429,7 @@ void ffCPUDetectByCpuid(FFCPUResult* cpu) // ARMv8.4-A // My CPU (Apple M1 Pro in VM) does support LSE2, but Windows doesn't detect it for some reason - // bool has_lse2 = IsProcessorFeaturePresent(PF_ARM_LSE2_AVAILABLE); // Large System Extensions version 2, optional from v8.2 + bool has_lse2 = IsProcessorFeaturePresent(PF_ARM_LSE2_AVAILABLE); // Large System Extensions version 2, optional from v8.2 bool has_dp = IsProcessorFeaturePresent(PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE); // DotProd, optional from v8.1 (*) // ARMv9.0-A @@ -475,7 +475,7 @@ void ffCPUDetectByCpuid(FFCPUResult* cpu) cpu->march = "ARMv8.7-A"; } else if (has_i8mm && has_bf16) { cpu->march = "ARMv8.6-A"; - } else if (has_dp) { + } else if (has_dp && has_lse2) { cpu->march = "ARMv8.4-A"; } else if (has_lrcpc && has_jscvt) { cpu->march = "ARMv8.3-A";