1
1
//@compile-flags: -C opt-level=3 -C no-prepopulate-passes
2
2
3
- #![ feature( core_intrinsics, repr_simd, arm_target_feature) ]
3
+ #![ feature( core_intrinsics, repr_simd, arm_target_feature, s390x_target_feature ) ]
4
4
#![ no_std]
5
5
#![ crate_type = "lib" ]
6
6
#![ allow( non_camel_case_types) ]
@@ -24,6 +24,7 @@ pub struct i8x16([i8; 16]);
24
24
#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
25
25
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
26
26
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
27
+ #[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
27
28
unsafe extern "C" fn dyn_simd_extract ( x : i8x16 , idx : u32 ) -> i8 {
28
29
simd_extract_dyn ( x, idx)
29
30
}
@@ -34,6 +35,7 @@ unsafe extern "C" fn dyn_simd_extract(x: i8x16, idx: u32) -> i8 {
34
35
#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
35
36
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
36
37
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
38
+ #[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
37
39
unsafe extern "C" fn literal_dyn_simd_extract ( x : i8x16 ) -> i8 {
38
40
simd_extract_dyn ( x, 7 )
39
41
}
@@ -44,6 +46,7 @@ unsafe extern "C" fn literal_dyn_simd_extract(x: i8x16) -> i8 {
44
46
#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
45
47
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
46
48
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
49
+ #[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
47
50
unsafe extern "C" fn const_dyn_simd_extract ( x : i8x16 ) -> i8 {
48
51
simd_extract_dyn ( x, const { 3 + 4 } )
49
52
}
@@ -54,6 +57,7 @@ unsafe extern "C" fn const_dyn_simd_extract(x: i8x16) -> i8 {
54
57
#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
55
58
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
56
59
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
60
+ #[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
57
61
unsafe extern "C" fn const_simd_extract ( x : i8x16 ) -> i8 {
58
62
simd_extract ( x, const { 3 + 4 } )
59
63
}
@@ -64,6 +68,7 @@ unsafe extern "C" fn const_simd_extract(x: i8x16) -> i8 {
64
68
#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
65
69
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
66
70
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
71
+ #[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
67
72
unsafe extern "C" fn dyn_simd_insert ( x : i8x16 , e : i8 , idx : u32 ) -> i8x16 {
68
73
simd_insert_dyn ( x, idx, e)
69
74
}
@@ -74,6 +79,7 @@ unsafe extern "C" fn dyn_simd_insert(x: i8x16, e: i8, idx: u32) -> i8x16 {
74
79
#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
75
80
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
76
81
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
82
+ #[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
77
83
unsafe extern "C" fn literal_dyn_simd_insert ( x : i8x16 , e : i8 ) -> i8x16 {
78
84
simd_insert_dyn ( x, 7 , e)
79
85
}
@@ -84,6 +90,7 @@ unsafe extern "C" fn literal_dyn_simd_insert(x: i8x16, e: i8) -> i8x16 {
84
90
#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
85
91
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
86
92
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
93
+ #[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
87
94
unsafe extern "C" fn const_dyn_simd_insert ( x : i8x16 , e : i8 ) -> i8x16 {
88
95
simd_insert_dyn ( x, const { 3 + 4 } , e)
89
96
}
@@ -94,6 +101,7 @@ unsafe extern "C" fn const_dyn_simd_insert(x: i8x16, e: i8) -> i8x16 {
94
101
#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
95
102
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
96
103
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
104
+ #[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
97
105
unsafe extern "C" fn const_simd_insert ( x : i8x16 , e : i8 ) -> i8x16 {
98
106
simd_insert ( x, const { 3 + 4 } , e)
99
107
}
0 commit comments