From 7e710e7e4a97109cb99f4e315976f645ad2bbe4f Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Sat, 23 Jun 2018 17:05:04 +0200 Subject: [PATCH] fix the shift --- library/stdarch/coresimd/x86/cpuid.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/stdarch/coresimd/x86/cpuid.rs b/library/stdarch/coresimd/x86/cpuid.rs index 31f943a30026..7a8c2f273c99 100644 --- a/library/stdarch/coresimd/x86/cpuid.rs +++ b/library/stdarch/coresimd/x86/cpuid.rs @@ -78,7 +78,7 @@ pub unsafe fn __cpuid(leaf: u32) -> CpuidResult { } /// Does the host support the `cpuid` instruction? -#[inline] +#[inline(never)] pub fn has_cpuid() -> bool { #[cfg(target_arch = "x86_64")] { @@ -117,7 +117,7 @@ pub fn has_cpuid() -> bool { # So if the value of the 21st bit is 1, cpuid is available, # and if it is zero, it isn't because we didn't manage to # modify it: - shrd %eax, 21 + shrl %eax, 21 # Restore original eflags popfd "#