1
1
//@compile-flags: -C opt-level=3 -C no-prepopulate-passes
2
2
3
- #![ feature( core_intrinsics, repr_simd, arm_target_feature, mips_target_feature) ]
3
+ #![ feature(
4
+ core_intrinsics,
5
+ repr_simd,
6
+ arm_target_feature,
7
+ mips_target_feature,
8
+ s390x_target_feature
9
+ ) ]
4
10
#![ no_std]
5
11
#![ crate_type = "lib" ]
6
12
#![ allow( non_camel_case_types) ]
@@ -25,6 +31,7 @@ pub struct i8x16([i8; 16]);
25
31
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
26
32
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
27
33
#[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
34
+ #[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
28
35
unsafe extern "C" fn dyn_simd_extract ( x : i8x16 , idx : u32 ) -> i8 {
29
36
simd_extract_dyn ( x, idx)
30
37
}
@@ -36,6 +43,7 @@ unsafe extern "C" fn dyn_simd_extract(x: i8x16, idx: u32) -> i8 {
36
43
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
37
44
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
38
45
#[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
46
+ #[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
39
47
unsafe extern "C" fn literal_dyn_simd_extract ( x : i8x16 ) -> i8 {
40
48
simd_extract_dyn ( x, 7 )
41
49
}
@@ -47,6 +55,7 @@ unsafe extern "C" fn literal_dyn_simd_extract(x: i8x16) -> i8 {
47
55
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
48
56
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
49
57
#[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
58
+ #[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
50
59
unsafe extern "C" fn const_dyn_simd_extract ( x : i8x16 ) -> i8 {
51
60
simd_extract_dyn ( x, const { 3 + 4 } )
52
61
}
@@ -58,6 +67,7 @@ unsafe extern "C" fn const_dyn_simd_extract(x: i8x16) -> i8 {
58
67
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
59
68
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
60
69
#[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
70
+ #[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
61
71
unsafe extern "C" fn const_simd_extract ( x : i8x16 ) -> i8 {
62
72
simd_extract ( x, const { 3 + 4 } )
63
73
}
@@ -69,6 +79,7 @@ unsafe extern "C" fn const_simd_extract(x: i8x16) -> i8 {
69
79
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
70
80
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
71
81
#[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
82
+ #[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
72
83
unsafe extern "C" fn dyn_simd_insert ( x : i8x16 , e : i8 , idx : u32 ) -> i8x16 {
73
84
simd_insert_dyn ( x, idx, e)
74
85
}
@@ -80,6 +91,7 @@ unsafe extern "C" fn dyn_simd_insert(x: i8x16, e: i8, idx: u32) -> i8x16 {
80
91
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
81
92
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
82
93
#[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
94
+ #[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
83
95
unsafe extern "C" fn literal_dyn_simd_insert ( x : i8x16 , e : i8 ) -> i8x16 {
84
96
simd_insert_dyn ( x, 7 , e)
85
97
}
@@ -91,6 +103,7 @@ unsafe extern "C" fn literal_dyn_simd_insert(x: i8x16, e: i8) -> i8x16 {
91
103
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
92
104
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
93
105
#[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
106
+ #[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
94
107
unsafe extern "C" fn const_dyn_simd_insert ( x : i8x16 , e : i8 ) -> i8x16 {
95
108
simd_insert_dyn ( x, const { 3 + 4 } , e)
96
109
}
@@ -102,6 +115,7 @@ unsafe extern "C" fn const_dyn_simd_insert(x: i8x16, e: i8) -> i8x16 {
102
115
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
103
116
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
104
117
#[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
118
+ #[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
105
119
unsafe extern "C" fn const_simd_insert ( x : i8x16 , e : i8 ) -> i8x16 {
106
120
simd_insert ( x, const { 3 + 4 } , e)
107
121
}
0 commit comments