@@ -41,12 +41,6 @@ macro_rules! check {
4141 ( $func: ident $ty: ident $class: ident) => {
4242 #[ no_mangle]
4343 pub unsafe fn $func( x: $ty) -> $ty {
44- // Hack to avoid function merging
45- extern "Rust" {
46- fn dont_merge( s: & str ) ;
47- }
48- dont_merge( stringify!( $func) ) ;
49-
5044 let y;
5145 asm!( "{} = {}" , out( $class) y, in( $class) x) ;
5246 y
@@ -58,12 +52,6 @@ macro_rules! check_reg {
5852 ( $func: ident $ty: ident $reg: tt) => {
5953 #[ no_mangle]
6054 pub unsafe fn $func( x: $ty) -> $ty {
61- // Hack to avoid function merging
62- extern "Rust" {
63- fn dont_merge( s: & str ) ;
64- }
65- dont_merge( stringify!( $func) ) ;
66-
6755 let y;
6856 asm!( concat!( $reg, " = " , $reg) , lateout( $reg) y, in( $reg) x) ;
6957 y
@@ -77,12 +65,6 @@ macro_rules! check_reg {
7765// CHECK: InlineAsm End
7866#[ no_mangle]
7967pub unsafe fn sym_static ( ) {
80- // Hack to avoid function merging
81- extern "Rust" {
82- fn dont_merge ( s : & str ) ;
83- }
84- dont_merge ( stringify ! ( $func) ) ;
85-
8668 asm ! ( "r0 = #{}" , sym extern_static) ;
8769}
8870
@@ -92,12 +74,6 @@ pub unsafe fn sym_static() {
9274// CHECK: InlineAsm End
9375#[ no_mangle]
9476pub unsafe fn sym_fn ( ) {
95- // Hack to avoid function merging
96- extern "Rust" {
97- fn dont_merge ( s : & str ) ;
98- }
99- dont_merge ( stringify ! ( $func) ) ;
100-
10177 asm ! ( "r0 = #{}" , sym extern_func) ;
10278}
10379
0 commit comments