@@ -61,27 +61,27 @@ pub unsafe fn __cpuid_count(leaf: u32, sub_leaf: u32) -> CpuidResult {
6161 #[ cfg( target_arch = "x86" ) ]
6262 {
6363 asm ! (
64- "mov {0}, ebx " ,
64+ "movl %ebx, {0}" ,
6565 "cpuid" ,
66- "xchg {0}, ebx " ,
66+ "xchgl %ebx, {0}" ,
6767 lateout( reg) ebx,
6868 inlateout( "eax" ) leaf => eax,
6969 inlateout( "ecx" ) sub_leaf => ecx,
7070 lateout( "edx" ) edx,
71- options( nostack, preserves_flags) ,
71+ options( nostack, preserves_flags, att_syntax ) ,
7272 ) ;
7373 }
7474 #[ cfg( target_arch = "x86_64" ) ]
7575 {
7676 asm ! (
77- "mov {0:r}, rbx " ,
77+ "movq %rbx, {0:r}" ,
7878 "cpuid" ,
79- "xchg {0:r}, rbx " ,
79+ "xchgq %rbx, {0:r}" ,
8080 lateout( reg) ebx,
8181 inlateout( "eax" ) leaf => eax,
8282 inlateout( "ecx" ) sub_leaf => ecx,
8383 lateout( "edx" ) edx,
84- options( nostack, preserves_flags) ,
84+ options( nostack, preserves_flags, att_syntax ) ,
8585 ) ;
8686 }
8787 CpuidResult { eax, ebx, ecx, edx }
@@ -130,20 +130,20 @@ pub fn has_cpuid() -> bool {
130130 // Read eflags and save a copy of it
131131 "pushfd" ,
132132 "pop {result}" ,
133- "mov {saved_flags }, {result }" ,
133+ "mov {result }, {saved_flags }" ,
134134 // Flip 21st bit of the flags
135- "xor {result}, 0x200000 " ,
135+ "xor $0x200000, {result}" ,
136136 // Load the modified flags and read them back.
137137 // Bit 21 can only be modified if cpuid is available.
138138 "push {result}" ,
139139 "popfd" ,
140140 "pushfd" ,
141141 "pop {result}" ,
142142 // Use xor to find out whether bit 21 has changed
143- "xor {result }, {saved_flags }" ,
143+ "xor {saved_flags }, {result }" ,
144144 result = out( reg) result,
145145 saved_flags = out( reg) _,
146- options( nomem) ,
146+ options( nomem, att_syntax ) ,
147147 ) ;
148148 // There is a race between popfd (A) and pushfd (B)
149149 // where other bits beyond 21st may have been modified due to
0 commit comments