@@ -41,12 +41,6 @@ macro_rules! check {
41
41
( $func: ident $ty: ident $class: ident) => {
42
42
#[ no_mangle]
43
43
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
-
50
44
let y;
51
45
asm!( "{} = {}" , out( $class) y, in( $class) x) ;
52
46
y
@@ -58,12 +52,6 @@ macro_rules! check_reg {
58
52
( $func: ident $ty: ident $reg: tt) => {
59
53
#[ no_mangle]
60
54
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
-
67
55
let y;
68
56
asm!( concat!( $reg, " = " , $reg) , lateout( $reg) y, in( $reg) x) ;
69
57
y
@@ -77,12 +65,6 @@ macro_rules! check_reg {
77
65
// CHECK: InlineAsm End
78
66
#[ no_mangle]
79
67
pub 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
-
86
68
asm ! ( "r0 = #{}" , sym extern_static) ;
87
69
}
88
70
@@ -92,12 +74,6 @@ pub unsafe fn sym_static() {
92
74
// CHECK: InlineAsm End
93
75
#[ no_mangle]
94
76
pub 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
-
101
77
asm ! ( "r0 = #{}" , sym extern_func) ;
102
78
}
103
79
0 commit comments