From f8bcae0d8d15284a87322f3cebf6d794bedf64be Mon Sep 17 00:00:00 2001 From: Adam Stylinski Date: Sat, 16 Aug 2025 11:35:33 -0400 Subject: Check the proper bit for BMI2 We were actually checking for BMI1 support here. This is unlikely to have caused any issues because to date there have not been any x86 CPUs with AVX2 support but no BMI2 support. --- arch/x86/x86_features.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/x86_features.c b/arch/x86/x86_features.c index c94a129235..bed1df3d12 100644 --- a/arch/x86/x86_features.c +++ b/arch/x86/x86_features.c @@ -101,7 +101,7 @@ void Z_INTERNAL x86_check_features(struct x86_cpu_features *features) { cpuidex(7, 0, &eax, &ebx, &ecx, &edx); // check BMI2 bit - features->has_bmi2 = ebx & 0x8; + features->has_bmi2 = ebx & 0x100; // check AVX2 bit if the OS supports saving YMM registers if (features->has_os_save_ymm) { -- cgit 0.0.5-2-1-g0f52