4848#![ cfg( not( feature = "no-asm" ) ) ]
4949// We only define stack probing for these architectures today.
5050#![ cfg( any( target_arch = "x86_64" , target_arch = "x86" ) ) ]
51- // We need to add .att_syntax for bootstraping the new global_asm!
52- #![ allow( unknown_lints, bad_asm_style) ]
5351
5452extern "C" {
5553 pub fn __rust_probestack ( ) ;
@@ -65,7 +63,6 @@ macro_rules! define_rust_probestack {
6563 ( $body: expr) => {
6664 concat!(
6765 "
68- .att_syntax
6966 .pushsection .text.__rust_probestack
7067 .globl __rust_probestack
7168 .type __rust_probestack, @function
@@ -86,7 +83,6 @@ macro_rules! define_rust_probestack {
8683 ( $body: expr) => {
8784 concat!(
8885 "
89- .att_syntax
9086 .globl __rust_probestack
9187 __rust_probestack:
9288 " ,
@@ -102,7 +98,6 @@ macro_rules! define_rust_probestack {
10298 ( $body: expr) => {
10399 concat!(
104100 "
105- .att_syntax
106101 .globl ___rust_probestack
107102 ___rust_probestack:
108103 " ,
@@ -117,7 +112,6 @@ macro_rules! define_rust_probestack {
117112 ( $body: expr) => {
118113 concat!(
119114 "
120- .att_syntax
121115 .globl ___rust_probestack
122116 ___rust_probestack:
123117 " ,
@@ -137,8 +131,9 @@ macro_rules! define_rust_probestack {
137131 target_arch = "x86_64" ,
138132 not( all( target_env = "sgx" , target_vendor = "fortanix" ) )
139133) ) ]
140- global_asm ! ( define_rust_probestack!(
141- "
134+ core:: arch:: global_asm!(
135+ define_rust_probestack!(
136+ "
142137 .cfi_startproc
143138 pushq %rbp
144139 .cfi_adjust_cfa_offset 8
@@ -188,7 +183,9 @@ global_asm!(define_rust_probestack!(
188183 ret
189184 .cfi_endproc
190185 "
191- ) ) ;
186+ ) ,
187+ options( att_syntax)
188+ ) ;
192189
193190// This function is the same as above, except that some instructions are
194191// [manually patched for LVI].
@@ -198,8 +195,9 @@ global_asm!(define_rust_probestack!(
198195 target_arch = "x86_64" ,
199196 all( target_env = "sgx" , target_vendor = "fortanix" )
200197) ) ]
201- global_asm ! ( define_rust_probestack!(
202- "
198+ core:: arch:: global_asm!(
199+ define_rust_probestack!(
200+ "
203201 .cfi_startproc
204202 pushq %rbp
205203 .cfi_adjust_cfa_offset 8
@@ -251,16 +249,19 @@ global_asm!(define_rust_probestack!(
251249 jmp *%r11
252250 .cfi_endproc
253251 "
254- ) ) ;
252+ ) ,
253+ options( att_syntax)
254+ ) ;
255255
256256#[ cfg( all( target_arch = "x86" , not( target_os = "uefi" ) ) ) ]
257257// This is the same as x86_64 above, only translated for 32-bit sizes. Note
258258// that on Unix we're expected to restore everything as it was, this
259259// function basically can't tamper with anything.
260260//
261261// The ABI here is the same as x86_64, except everything is 32-bits large.
262- global_asm ! ( define_rust_probestack!(
263- "
262+ core:: arch:: global_asm!(
263+ define_rust_probestack!(
264+ "
264265 .cfi_startproc
265266 push %ebp
266267 .cfi_adjust_cfa_offset 4
@@ -291,7 +292,9 @@ global_asm!(define_rust_probestack!(
291292 ret
292293 .cfi_endproc
293294 "
294- ) ) ;
295+ ) ,
296+ options( att_syntax)
297+ ) ;
295298
296299#[ cfg( all( target_arch = "x86" , target_os = "uefi" ) ) ]
297300// UEFI target is windows like target. LLVM will do _chkstk things like windows.
@@ -304,8 +307,9 @@ global_asm!(define_rust_probestack!(
304307// MSVC x32's _chkstk and cygwin/mingw's _alloca adjust %esp themselves.
305308// MSVC x64's __chkstk and cygwin/mingw's ___chkstk_ms do not adjust %rsp
306309// themselves.
307- global_asm ! ( define_rust_probestack!(
308- "
310+ core:: arch:: global_asm!(
311+ define_rust_probestack!(
312+ "
309313 .cfi_startproc
310314 push %ebp
311315 .cfi_adjust_cfa_offset 4
@@ -341,4 +345,6 @@ global_asm!(define_rust_probestack!(
341345 ret
342346 .cfi_endproc
343347 "
344- ) ) ;
348+ ) ,
349+ options( att_syntax)
350+ ) ;
0 commit comments