@@ -61,27 +61,27 @@ pub unsafe fn __cpuid_count(leaf: u32, sub_leaf: u32) -> CpuidResult {
61
61
#[ cfg( target_arch = "x86" ) ]
62
62
{
63
63
asm ! (
64
- "mov {0}, ebx " ,
64
+ "movl %ebx, {0}" ,
65
65
"cpuid" ,
66
- "xchg {0}, ebx " ,
66
+ "xchgl %ebx, {0}" ,
67
67
lateout( reg) ebx,
68
68
inlateout( "eax" ) leaf => eax,
69
69
inlateout( "ecx" ) sub_leaf => ecx,
70
70
lateout( "edx" ) edx,
71
- options( nostack, preserves_flags) ,
71
+ options( nostack, preserves_flags, att_syntax ) ,
72
72
) ;
73
73
}
74
74
#[ cfg( target_arch = "x86_64" ) ]
75
75
{
76
76
asm ! (
77
- "mov {0:r}, rbx " ,
77
+ "movq %rbx, {0:r}" ,
78
78
"cpuid" ,
79
- "xchg {0:r}, rbx " ,
79
+ "xchgq %rbx, {0:r}" ,
80
80
lateout( reg) ebx,
81
81
inlateout( "eax" ) leaf => eax,
82
82
inlateout( "ecx" ) sub_leaf => ecx,
83
83
lateout( "edx" ) edx,
84
- options( nostack, preserves_flags) ,
84
+ options( nostack, preserves_flags, att_syntax ) ,
85
85
) ;
86
86
}
87
87
CpuidResult { eax, ebx, ecx, edx }
@@ -130,20 +130,20 @@ pub fn has_cpuid() -> bool {
130
130
// Read eflags and save a copy of it
131
131
"pushfd" ,
132
132
"pop {result}" ,
133
- "mov {saved_flags }, {result }" ,
133
+ "mov {result }, {saved_flags }" ,
134
134
// Flip 21st bit of the flags
135
- "xor {result}, 0x200000 " ,
135
+ "xor $0x200000, {result}" ,
136
136
// Load the modified flags and read them back.
137
137
// Bit 21 can only be modified if cpuid is available.
138
138
"push {result}" ,
139
139
"popfd" ,
140
140
"pushfd" ,
141
141
"pop {result}" ,
142
142
// Use xor to find out whether bit 21 has changed
143
- "xor {result }, {saved_flags }" ,
143
+ "xor {saved_flags }, {result }" ,
144
144
result = out( reg) result,
145
145
saved_flags = out( reg) _,
146
- options( nomem) ,
146
+ options( nomem, att_syntax ) ,
147
147
) ;
148
148
// There is a race between popfd (A) and pushfd (B)
149
149
// where other bits beyond 21st may have been modified due to
0 commit comments