From 3049a31937e4f7353e1dea2f6dc558b02451bb13 Mon Sep 17 00:00:00 2001 From: Artyom Pavlov Date: Sun, 4 Sep 2022 15:03:18 +0000 Subject: [PATCH] Use mov and xchg instead of movl(q) and xchgl(q) --- crates/core_arch/src/x86/cpuid.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/core_arch/src/x86/cpuid.rs b/crates/core_arch/src/x86/cpuid.rs index b47252bab6..2624e8bdf1 100644 --- a/crates/core_arch/src/x86/cpuid.rs +++ b/crates/core_arch/src/x86/cpuid.rs @@ -62,9 +62,9 @@ pub unsafe fn __cpuid_count(leaf: u32, sub_leaf: u32) -> CpuidResult { #[cfg(target_arch = "x86")] { asm!( - "movl {0}, ebx", + "mov {0}, ebx", "cpuid", - "xchgl {0}, ebx", + "xchg {0}, ebx", out(reg) ebx, inout("eax") leaf => eax, inout("ecx") sub_leaf => ecx, @@ -75,9 +75,9 @@ pub unsafe fn __cpuid_count(leaf: u32, sub_leaf: u32) -> CpuidResult { #[cfg(target_arch = "x86_64")] { asm!( - "movq {0:r}, rbx", + "mov {0:r}, rbx", "cpuid", - "xchgq {0:r}, rbx", + "xchg {0:r}, rbx", out(reg) ebx, inout("eax") leaf => eax, inout("ecx") sub_leaf => ecx,