2222//!
2323//! // Provide symbols for use in the assembly code.
2424//! symbols = sym path::to::symbols,
25- //! this = sym path::to::this;
26- //!
27- //! // Add additional `asm` options.
28- //! options(noreturn)
25+ //! this = sym path::to::this
2926//! );
3027//! ```
3128
@@ -40,17 +37,15 @@ macro_rules! naked_fn {
4037 $doc: literal;
4138 $vis: vis fn $name: ident $args: tt -> $ret: ty;
4239 $( $code: literal) ,* ;
43- $( $label: ident = $kind: ident $path: path) ,* ;
44- options( $( $option: ident) ,* )
40+ $( $label: ident = $kind: ident $path: path) ,*
4541 ) => {
4642 #[ doc = $doc]
4743 #[ naked]
4844 #[ no_mangle]
4945 $vis unsafe extern "C" fn $name $args -> $ret {
50- asm !(
46+ core :: arch :: naked_asm !(
5147 $( $code) ,* ,
52- $( $label = $kind $path, ) *
53- options( $( $option) ,* ) ,
48+ $( $label = $kind $path) ,*
5449 )
5550 }
5651 } ;
@@ -65,8 +60,7 @@ macro_rules! naked_fn {
6560 $doc: literal;
6661 $vis: vis fn $name: ident $args: tt -> $ret: ty;
6762 $( $code: literal) ,* ;
68- $( $label: ident = $kind: ident $path: path) ,* ;
69- options( $( $option: ident) ,* )
63+ $( $label: ident = $kind: ident $path: path) ,*
7064 ) => {
7165 extern "C" {
7266 #[ doc = $doc]
@@ -79,7 +73,6 @@ macro_rules! naked_fn {
7973 $( $code) ,* ,
8074 concat!( ".size " , stringify!( $name) , ", .-" , stringify!( $name) ) ,
8175 $( $label = $kind $path) ,*
82- // Omit the options because this is a `global_asm`.
8376 ) ;
8477 } ;
8578}
0 commit comments