2
2
//@ assembly-output: emit-asm
3
3
4
4
//@[riscv64] compile-flags: --target riscv64imac-unknown-none-elf
5
+ //@[riscv64] compile-flags: -Zmerge-functions=disabled
5
6
//@[riscv64] needs-llvm-components: riscv
6
7
7
8
//@[riscv32] compile-flags: --target riscv32imac-unknown-none-elf
9
+ //@[riscv32] compile-flags: -Zmerge-functions=disabled
8
10
//@[riscv32] needs-llvm-components: riscv
9
11
10
12
//@[riscv64-zfhmin] compile-flags: --target riscv64imac-unknown-none-elf --cfg riscv64
13
+ //@[riscv64-zfhmin] compile-flags: -Zmerge-functions=disabled
11
14
//@[riscv64-zfhmin] needs-llvm-components: riscv
12
15
//@[riscv64-zfhmin] compile-flags: -C target-feature=+zfhmin
13
16
//@[riscv64-zfhmin] filecheck-flags: --check-prefix riscv64
14
17
15
18
//@[riscv32-zfhmin] compile-flags: --target riscv32imac-unknown-none-elf
19
+ //@[riscv32-zfhmin] compile-flags: -Zmerge-functions=disabled
16
20
//@[riscv32-zfhmin] needs-llvm-components: riscv
17
21
//@[riscv32-zfhmin] compile-flags: -C target-feature=+zfhmin
18
22
19
23
//@[riscv64-zfh] compile-flags: --target riscv64imac-unknown-none-elf --cfg riscv64
24
+ //@[riscv64-zfh] compile-flags: -Zmerge-functions=disabled
20
25
//@[riscv64-zfh] needs-llvm-components: riscv
21
26
//@[riscv64-zfh] compile-flags: -C target-feature=+zfh
22
27
//@[riscv64-zfh] filecheck-flags: --check-prefix riscv64 --check-prefix zfhmin
23
28
24
29
//@[riscv32-zfh] compile-flags: --target riscv32imac-unknown-none-elf
30
+ //@[riscv32-zfh] compile-flags: -Zmerge-functions=disabled
25
31
//@[riscv32-zfh] needs-llvm-components: riscv
26
32
//@[riscv32-zfh] compile-flags: -C target-feature=+zfh
27
33
//@[riscv32-zfh] filecheck-flags: --check-prefix zfhmin
@@ -90,12 +96,6 @@ macro_rules! check {
90
96
( $func: ident $ty: ident $class: ident $mov: literal) => {
91
97
#[ no_mangle]
92
98
pub unsafe fn $func( x: $ty) -> $ty {
93
- // Hack to avoid function merging
94
- extern "Rust" {
95
- fn dont_merge( s: & str ) ;
96
- }
97
- dont_merge( stringify!( $func) ) ;
98
-
99
99
let y;
100
100
asm!( concat!( $mov, " {}, {}" ) , out( $class) y, in( $class) x) ;
101
101
y
@@ -107,12 +107,6 @@ macro_rules! check_reg {
107
107
( $func: ident $ty: ident $reg: tt $mov: literal) => {
108
108
#[ no_mangle]
109
109
pub unsafe fn $func( x: $ty) -> $ty {
110
- // Hack to avoid function merging
111
- extern "Rust" {
112
- fn dont_merge( s: & str ) ;
113
- }
114
- dont_merge( stringify!( $func) ) ;
115
-
116
110
let y;
117
111
asm!( concat!( $mov, " " , $reg, ", " , $reg) , lateout( $reg) y, in( $reg) x) ;
118
112
y
0 commit comments