Fix hardcoding of SUPPORTS_AVX.
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user