Fix hardcoding of SUPPORTS_AVX.

This commit is contained in:
4lDO2
2024-07-19 18:44:21 +02:00
parent 518ba4c884
commit 232f6e9ade
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -428,7 +428,7 @@ pub unsafe fn arch_pre(stack: &mut SigStack, area: &mut SigArea) {
}
}
static SUPPORTS_AVX: AtomicU8 = AtomicU8::new(1); // FIXME
pub(crate) static SUPPORTS_AVX: AtomicU8 = AtomicU8::new(0);
// __relibc will be prepended to the name, so mangling is fine
#[no_mangle]
+1
View File
@@ -491,6 +491,7 @@ pub fn setup_sighandler(tcb: &RtTcb) {
{
let cpuid_eax1_ecx = unsafe { core::arch::x86_64::__cpuid(1) }.ecx;
CPUID_EAX1_ECX.store(cpuid_eax1_ecx, core::sync::atomic::Ordering::Relaxed);
SUPPORTS_AVX.store(u8::from(cpuid_eax1_ecx & 1 << 28 != 0), Ordering::Relaxed);
}
let data = current_setsighandler_struct();