Skip to content
Snippets Groups Projects
Verified Commit 232f6e9a authored by Jacob Lorentzon's avatar Jacob Lorentzon
Browse files

Fix hardcoding of SUPPORTS_AVX.

parent 518ba4c8
No related branches found
No related tags found
No related merge requests found
...@@ -428,7 +428,7 @@ pub unsafe fn arch_pre(stack: &mut SigStack, area: &mut SigArea) { ...@@ -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 // __relibc will be prepended to the name, so mangling is fine
#[no_mangle] #[no_mangle]
......
...@@ -491,6 +491,7 @@ pub fn setup_sighandler(tcb: &RtTcb) { ...@@ -491,6 +491,7 @@ pub fn setup_sighandler(tcb: &RtTcb) {
{ {
let cpuid_eax1_ecx = unsafe { core::arch::x86_64::__cpuid(1) }.ecx; let cpuid_eax1_ecx = unsafe { core::arch::x86_64::__cpuid(1) }.ecx;
CPUID_EAX1_ECX.store(cpuid_eax1_ecx, core::sync::atomic::Ordering::Relaxed); 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(); let data = current_setsighandler_struct();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment