11//@compile-flags: -C opt-level=3 -C no-prepopulate-passes
22
3- #![ feature( core_intrinsics, repr_simd, arm_target_feature) ]
3+ #![ feature( core_intrinsics, repr_simd, arm_target_feature, mips_target_feature ) ]
44#![ no_std]
55#![ crate_type = "lib" ]
66#![ allow( non_camel_case_types) ]
@@ -24,6 +24,7 @@ pub struct i8x16([i8; 16]);
2424#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
2525#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
2626#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
27+ #[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
2728unsafe extern "C" fn dyn_simd_extract ( x : i8x16 , idx : u32 ) -> i8 {
2829 simd_extract_dyn ( x, idx)
2930}
@@ -34,6 +35,7 @@ unsafe extern "C" fn dyn_simd_extract(x: i8x16, idx: u32) -> i8 {
3435#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
3536#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
3637#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
38+ #[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
3739unsafe extern "C" fn literal_dyn_simd_extract ( x : i8x16 ) -> i8 {
3840 simd_extract_dyn ( x, 7 )
3941}
@@ -44,6 +46,7 @@ unsafe extern "C" fn literal_dyn_simd_extract(x: i8x16) -> i8 {
4446#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
4547#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
4648#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
49+ #[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
4750unsafe extern "C" fn const_dyn_simd_extract ( x : i8x16 ) -> i8 {
4851 simd_extract_dyn ( x, const { 3 + 4 } )
4952}
@@ -54,6 +57,7 @@ unsafe extern "C" fn const_dyn_simd_extract(x: i8x16) -> i8 {
5457#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
5558#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
5659#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
60+ #[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
5761unsafe extern "C" fn const_simd_extract ( x : i8x16 ) -> i8 {
5862 simd_extract ( x, const { 3 + 4 } )
5963}
@@ -64,6 +68,7 @@ unsafe extern "C" fn const_simd_extract(x: i8x16) -> i8 {
6468#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
6569#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
6670#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
71+ #[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
6772unsafe extern "C" fn dyn_simd_insert ( x : i8x16 , e : i8 , idx : u32 ) -> i8x16 {
6873 simd_insert_dyn ( x, idx, e)
6974}
@@ -74,6 +79,7 @@ unsafe extern "C" fn dyn_simd_insert(x: i8x16, e: i8, idx: u32) -> i8x16 {
7479#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
7580#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
7681#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
82+ #[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
7783unsafe extern "C" fn literal_dyn_simd_insert ( x : i8x16 , e : i8 ) -> i8x16 {
7884 simd_insert_dyn ( x, 7 , e)
7985}
@@ -84,6 +90,7 @@ unsafe extern "C" fn literal_dyn_simd_insert(x: i8x16, e: i8) -> i8x16 {
8490#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
8591#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
8692#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
93+ #[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
8794unsafe extern "C" fn const_dyn_simd_insert ( x : i8x16 , e : i8 ) -> i8x16 {
8895 simd_insert_dyn ( x, const { 3 + 4 } , e)
8996}
@@ -94,6 +101,7 @@ unsafe extern "C" fn const_dyn_simd_insert(x: i8x16, e: i8) -> i8x16 {
94101#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
95102#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
96103#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
104+ #[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
97105unsafe extern "C" fn const_simd_insert ( x : i8x16 , e : i8 ) -> i8x16 {
98106 simd_insert ( x, const { 3 + 4 } , e)
99107}
0 commit comments