summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Stylinski <kungfujesus06@gmail.com>2025-08-16 11:35:33 -0400
committerHans Kristian Rosbach <hk-github@circlestorm.org>2025-08-18 22:56:21 +0200
commitf8bcae0d8d15284a87322f3cebf6d794bedf64be (patch)
treefc61a0531a1a18143720712a2753f5344d262586
parent3a52db3d3725be75a098e92a11879f037d6278f9 (diff)
downloadProject-Tick-f8bcae0d8d15284a87322f3cebf6d794bedf64be.tar.gz
Project-Tick-f8bcae0d8d15284a87322f3cebf6d794bedf64be.zip
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.
-rw-r--r--arch/x86/x86_features.c2
1 files changed, 1 insertions, 1 deletions
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) {