1
- //@ revisions: arm mips thumb wasm32
1
+ //@ revisions: arm-linux arm-android armv7-linux armv7-android mips thumb sparc
2
2
//@ compile-flags: -C no-prepopulate-passes
3
- //
4
- //@[arm] only-arm
5
- //@[mips] only-mips
6
- //@[thumb] only-thumb
7
- //@[wasm32] only-wasm32
8
- //@ ignore-emscripten
3
+
4
+ //@[arm-linux] compile-flags: --target arm-unknown-linux-gnueabi
5
+ //@[arm-linux] needs-llvm-components: arm
6
+ //@[arm-android] compile-flags: --target arm-linux-androideabi
7
+ //@[arm-android] needs-llvm-components: arm
8
+ //@[armv7-linux] compile-flags: --target armv7-unknown-linux-gnueabi
9
+ //@[armv7-linux] needs-llvm-components: arm
10
+ //@[armv7-android] compile-flags: --target armv7-linux-androideabi
11
+ //@[armv7-android] needs-llvm-components: arm
12
+ //@[mips] compile-flags: --target mips-unknown-linux-gnu
13
+ //@[mips] needs-llvm-components: mips
14
+ //@[thumb] compile-flags: --target thumbv7neon-linux-androideabi
15
+ //@[thumb] needs-llvm-components: arm
16
+ //@[sparc] compile-flags: --target sparc-unknown-linux-gnu
17
+ //@[sparc] needs-llvm-components: sparc
18
+
9
19
// See ./transparent.rs
10
20
// Some platforms pass large aggregates using immediate arrays in LLVMIR
11
21
// Other platforms pass large aggregates using struct pointer in LLVMIR
12
22
// This covers the "immediate array" case.
13
23
14
- #![ feature( transparent_unions) ]
24
+ #![ feature( no_core, lang_items, transparent_unions) ]
25
+ #![ crate_type = "lib" ]
26
+ #![ no_std]
27
+ #![ no_core]
28
+
29
+ #[ lang="sized" ] trait Sized { }
30
+ #[ lang="freeze" ] trait Freeze { }
31
+ #[ lang="copy" ] trait Copy { }
15
32
16
- #![ crate_type="lib" ]
33
+ impl Copy for [ u32 ; 16 ] { }
34
+ impl Copy for BigS { }
35
+ impl Copy for BigU { }
17
36
18
37
19
- #[ derive( Clone , Copy ) ]
20
38
#[ repr( C ) ]
21
39
pub struct BigS ( [ u32 ; 16 ] ) ;
22
40
@@ -33,24 +51,23 @@ pub enum TeBigS {
33
51
Variant ( BigS ) ,
34
52
}
35
53
36
- // CHECK: define void @test_BigS(ptr [[BIGS_RET_ATTRS1:.*]] sret(%BigS ) [[BIGS_RET_ATTRS2:.*]], [16 x i32]
54
+ // CHECK: define void @test_BigS(ptr [[BIGS_RET_ATTRS1:.*]] sret([64 x i8] ) [[BIGS_RET_ATTRS2:.*]], [16 x i32]
37
55
#[ no_mangle]
38
56
pub extern fn test_BigS ( _: BigS ) -> BigS { loop { } }
39
57
40
- // CHECK: define void @test_TsBigS(ptr [[BIGS_RET_ATTRS1]] sret(%TsBigS ) [[BIGS_RET_ATTRS2]], [16 x i32]
58
+ // CHECK: define void @test_TsBigS(ptr [[BIGS_RET_ATTRS1]] sret([64 x i8] ) [[BIGS_RET_ATTRS2]], [16 x i32]
41
59
#[ no_mangle]
42
60
pub extern fn test_TsBigS ( _: TsBigS ) -> TsBigS { loop { } }
43
61
44
- // CHECK: define void @test_TuBigS(ptr [[BIGS_RET_ATTRS1]] sret(%TuBigS ) [[BIGS_RET_ATTRS2]], [16 x i32]
62
+ // CHECK: define void @test_TuBigS(ptr [[BIGS_RET_ATTRS1]] sret([64 x i8] ) [[BIGS_RET_ATTRS2]], [16 x i32]
45
63
#[ no_mangle]
46
64
pub extern fn test_TuBigS ( _: TuBigS ) -> TuBigS { loop { } }
47
65
48
- // CHECK: define void @test_TeBigS(ptr [[BIGS_RET_ATTRS1]] sret(%"TeBigS::Variant" ) [[BIGS_RET_ATTRS2]], [16 x i32]
66
+ // CHECK: define void @test_TeBigS(ptr [[BIGS_RET_ATTRS1]] sret([64 x i8] ) [[BIGS_RET_ATTRS2]], [16 x i32]
49
67
#[ no_mangle]
50
68
pub extern fn test_TeBigS ( _: TeBigS ) -> TeBigS { loop { } }
51
69
52
70
53
- #[ derive( Clone , Copy ) ]
54
71
#[ repr( C ) ]
55
72
pub union BigU {
56
73
foo : [ u32 ; 16 ] ,
@@ -69,18 +86,18 @@ pub enum TeBigU {
69
86
Variant ( BigU ) ,
70
87
}
71
88
72
- // CHECK: define void @test_BigU(ptr [[BIGU_RET_ATTRS1:.*]] sret(%BigU ) [[BIGU_RET_ATTRS2:.*]], [16 x i32]
89
+ // CHECK: define void @test_BigU(ptr [[BIGU_RET_ATTRS1:.*]] sret([64 x i8] ) [[BIGU_RET_ATTRS2:.*]], [16 x i32]
73
90
#[ no_mangle]
74
91
pub extern fn test_BigU ( _: BigU ) -> BigU { loop { } }
75
92
76
- // CHECK: define void @test_TsBigU(ptr [[BIGU_RET_ATTRS1]] sret(%TsBigU ) [[BIGU_RET_ATTRS2]], [16 x i32]
93
+ // CHECK: define void @test_TsBigU(ptr [[BIGU_RET_ATTRS1]] sret([64 x i8] ) [[BIGU_RET_ATTRS2]], [16 x i32]
77
94
#[ no_mangle]
78
95
pub extern fn test_TsBigU ( _: TsBigU ) -> TsBigU { loop { } }
79
96
80
- // CHECK: define void @test_TuBigU(ptr [[BIGU_RET_ATTRS1]] sret(%TuBigU ) [[BIGU_RET_ATTRS2]], [16 x i32]
97
+ // CHECK: define void @test_TuBigU(ptr [[BIGU_RET_ATTRS1]] sret([64 x i8] ) [[BIGU_RET_ATTRS2]], [16 x i32]
81
98
#[ no_mangle]
82
99
pub extern fn test_TuBigU ( _: TuBigU ) -> TuBigU { loop { } }
83
100
84
- // CHECK: define void @test_TeBigU(ptr [[BIGU_RET_ATTRS1]] sret(%"TeBigU::Variant" ) [[BIGU_RET_ATTRS2]], [16 x i32]
101
+ // CHECK: define void @test_TeBigU(ptr [[BIGU_RET_ATTRS1]] sret([64 x i8] ) [[BIGU_RET_ATTRS2]], [16 x i32]
85
102
#[ no_mangle]
86
103
pub extern fn test_TeBigU ( _: TeBigU ) -> TeBigU { loop { } }
0 commit comments