Skip to content

Commit 3049a31

Browse files
newpavlovAmanieu
authored andcommitted
Use mov and xchg instead of movl(q) and xchgl(q)
1 parent f1db941 commit 3049a31

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/core_arch/src/x86/cpuid.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ pub unsafe fn __cpuid_count(leaf: u32, sub_leaf: u32) -> CpuidResult {
6262
#[cfg(target_arch = "x86")]
6363
{
6464
asm!(
65-
"movl {0}, ebx",
65+
"mov {0}, ebx",
6666
"cpuid",
67-
"xchgl {0}, ebx",
67+
"xchg {0}, ebx",
6868
out(reg) ebx,
6969
inout("eax") leaf => eax,
7070
inout("ecx") sub_leaf => ecx,
@@ -75,9 +75,9 @@ pub unsafe fn __cpuid_count(leaf: u32, sub_leaf: u32) -> CpuidResult {
7575
#[cfg(target_arch = "x86_64")]
7676
{
7777
asm!(
78-
"movq {0:r}, rbx",
78+
"mov {0:r}, rbx",
7979
"cpuid",
80-
"xchgq {0:r}, rbx",
80+
"xchg {0:r}, rbx",
8181
out(reg) ebx,
8282
inout("eax") leaf => eax,
8383
inout("ecx") sub_leaf => ecx,

0 commit comments

Comments
 (0)