From e31a4f14799846a9aba70fc799a1cd5546da8b42 Mon Sep 17 00:00:00 2001 From: Lynnesbian Date: Mon, 16 Sep 2024 12:51:53 +1000 Subject: [PATCH] check bit 28 for avx support --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index aa54d2e..7a89a1a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -94,7 +94,7 @@ fn vectorization_support_no_cache_x86() -> Vectorization { let have_xsave = (proc_info_ecx >> 26) & 1 == 1; let have_osxsave = (proc_info_ecx >> 27) & 1 == 1; - let have_avx = (proc_info_ecx >> 27) & 1 == 1; + let have_avx = (proc_info_ecx >> 28) & 1 == 1; if have_xsave && have_osxsave && have_avx { // # Safety: We checked that the processor supports xsave if unsafe { avx2_support_no_cache_x86() } {