1 //! MIPS SIMD Architecture intrinsics
2 //!
3 //! The reference is [MIPS Architecture for Programmers Volume IV-j: The
4 //! MIPS32 SIMD Architecture Module Revision 1.12][msa_ref].
5 //!
6 //! [msa_ref]: http://cdn2.imgtec.com/documentation/MD00866-2B-MSA32-AFP-01.12.pdf
7 
8 #[cfg(test)]
9 use stdarch_test::assert_instr;
10 
11 use crate::mem;
12 
13 #[macro_use]
14 mod macros;
15 
16 types! {
17     // / MIPS-specific 128-bit wide vector of 16 packed `i8`.
18    pub struct v16i8(
19        i8, i8, i8, i8, i8, i8, i8, i8,
20        i8, i8, i8, i8, i8, i8, i8, i8,
21    );
22 
23     // / MIPS-specific 128-bit wide vector of 8 packed `i16`.
24    pub struct v8i16(
25        i16, i16, i16, i16, i16, i16, i16, i16,
26    );
27 
28     // / MIPS-specific 128-bit wide vector of 4 packed `i32`.
29    pub struct v4i32(
30        i32, i32, i32, i32,
31    );
32 
33     // / MIPS-specific 128-bit wide vector of 2 packed `i64`.
34    pub struct v2i64(
35        i64, i64,
36    );
37 
38     // / MIPS-specific 128-bit wide vector of 16 packed `u8`.
39    pub struct v16u8(
40        u8, u8, u8, u8, u8, u8, u8, u8,
41        u8, u8, u8, u8, u8, u8, u8, u8,
42    );
43 
44     // / MIPS-specific 128-bit wide vector of 8 packed `u16`.
45    pub struct v8u16(
46        u16, u16, u16, u16, u16, u16, u16, u16,
47    );
48 
49     // / MIPS-specific 128-bit wide vector of 4 packed `u32`.
50    pub struct v4u32(
51        u32, u32, u32, u32,
52    );
53 
54     // / MIPS-specific 128-bit wide vector of 2 packed `u64`.
55    pub struct v2u64(
56        u64, u64,
57    );
58 
59    // / MIPS-specific 128-bit wide vector of 4 packed `f32`.
60    pub struct v4f32(
61        f32, f32, f32, f32,
62    );
63 
64     // / MIPS-specific 128-bit wide vector of 2 packed `f64`.
65    pub struct v2f64(
66        f64, f64,
67    );
68 }
69 
70 #[allow(improper_ctypes)]
71 extern "C" {
72     #[link_name = "llvm.mips.add.a.b"]
msa_add_a_b(a: v16i8, b: v16i8) -> v16i873     fn msa_add_a_b(a: v16i8, b: v16i8) -> v16i8;
74     #[link_name = "llvm.mips.add.a.h"]
msa_add_a_h(a: v8i16, b: v8i16) -> v8i1675     fn msa_add_a_h(a: v8i16, b: v8i16) -> v8i16;
76     #[link_name = "llvm.mips.add.a.w"]
msa_add_a_w(a: v4i32, b: v4i32) -> v4i3277     fn msa_add_a_w(a: v4i32, b: v4i32) -> v4i32;
78     #[link_name = "llvm.mips.add.a.d"]
msa_add_a_d(a: v2i64, b: v2i64) -> v2i6479     fn msa_add_a_d(a: v2i64, b: v2i64) -> v2i64;
80     #[link_name = "llvm.mips.adds.a.b"]
msa_adds_a_b(a: v16i8, b: v16i8) -> v16i881     fn msa_adds_a_b(a: v16i8, b: v16i8) -> v16i8;
82     #[link_name = "llvm.mips.adds.a.h"]
msa_adds_a_h(a: v8i16, b: v8i16) -> v8i1683     fn msa_adds_a_h(a: v8i16, b: v8i16) -> v8i16;
84     #[link_name = "llvm.mips.adds.a.w"]
msa_adds_a_w(a: v4i32, b: v4i32) -> v4i3285     fn msa_adds_a_w(a: v4i32, b: v4i32) -> v4i32;
86     #[link_name = "llvm.mips.adds.a.d"]
msa_adds_a_d(a: v2i64, b: v2i64) -> v2i6487     fn msa_adds_a_d(a: v2i64, b: v2i64) -> v2i64;
88     #[link_name = "llvm.mips.adds.s.b"]
msa_adds_s_b(a: v16i8, b: v16i8) -> v16i889     fn msa_adds_s_b(a: v16i8, b: v16i8) -> v16i8;
90     #[link_name = "llvm.mips.adds.s.h"]
msa_adds_s_h(a: v8i16, b: v8i16) -> v8i1691     fn msa_adds_s_h(a: v8i16, b: v8i16) -> v8i16;
92     #[link_name = "llvm.mips.adds.s.w"]
msa_adds_s_w(a: v4i32, b: v4i32) -> v4i3293     fn msa_adds_s_w(a: v4i32, b: v4i32) -> v4i32;
94     #[link_name = "llvm.mips.adds.s.d"]
msa_adds_s_d(a: v2i64, b: v2i64) -> v2i6495     fn msa_adds_s_d(a: v2i64, b: v2i64) -> v2i64;
96     #[link_name = "llvm.mips.adds.u.b"]
msa_adds_u_b(a: v16u8, b: v16u8) -> v16u897     fn msa_adds_u_b(a: v16u8, b: v16u8) -> v16u8;
98     #[link_name = "llvm.mips.adds.u.h"]
msa_adds_u_h(a: v8u16, b: v8u16) -> v8u1699     fn msa_adds_u_h(a: v8u16, b: v8u16) -> v8u16;
100     #[link_name = "llvm.mips.adds.u.w"]
msa_adds_u_w(a: v4u32, b: v4u32) -> v4u32101     fn msa_adds_u_w(a: v4u32, b: v4u32) -> v4u32;
102     #[link_name = "llvm.mips.adds.u.d"]
msa_adds_u_d(a: v2u64, b: v2u64) -> v2u64103     fn msa_adds_u_d(a: v2u64, b: v2u64) -> v2u64;
104     #[link_name = "llvm.mips.addv.b"]
msa_addv_b(a: v16i8, b: v16i8) -> v16i8105     fn msa_addv_b(a: v16i8, b: v16i8) -> v16i8;
106     #[link_name = "llvm.mips.addv.h"]
msa_addv_h(a: v8i16, b: v8i16) -> v8i16107     fn msa_addv_h(a: v8i16, b: v8i16) -> v8i16;
108     #[link_name = "llvm.mips.addv.w"]
msa_addv_w(a: v4i32, b: v4i32) -> v4i32109     fn msa_addv_w(a: v4i32, b: v4i32) -> v4i32;
110     #[link_name = "llvm.mips.addv.d"]
msa_addv_d(a: v2i64, b: v2i64) -> v2i64111     fn msa_addv_d(a: v2i64, b: v2i64) -> v2i64;
112     #[link_name = "llvm.mips.addvi.b"]
msa_addvi_b(a: v16i8, b: i32) -> v16i8113     fn msa_addvi_b(a: v16i8, b: i32) -> v16i8;
114     #[link_name = "llvm.mips.addvi.h"]
msa_addvi_h(a: v8i16, b: i32) -> v8i16115     fn msa_addvi_h(a: v8i16, b: i32) -> v8i16;
116     #[link_name = "llvm.mips.addvi.w"]
msa_addvi_w(a: v4i32, b: i32) -> v4i32117     fn msa_addvi_w(a: v4i32, b: i32) -> v4i32;
118     #[link_name = "llvm.mips.addvi.d"]
msa_addvi_d(a: v2i64, b: i32) -> v2i64119     fn msa_addvi_d(a: v2i64, b: i32) -> v2i64;
120     #[link_name = "llvm.mips.and.v"]
msa_and_v(a: v16u8, b: v16u8) -> v16u8121     fn msa_and_v(a: v16u8, b: v16u8) -> v16u8;
122     #[link_name = "llvm.mips.andi.b"]
msa_andi_b(a: v16u8, b: i32) -> v16u8123     fn msa_andi_b(a: v16u8, b: i32) -> v16u8;
124     #[link_name = "llvm.mips.asub.s.b"]
msa_asub_s_b(a: v16i8, b: v16i8) -> v16i8125     fn msa_asub_s_b(a: v16i8, b: v16i8) -> v16i8;
126     #[link_name = "llvm.mips.asub.s.h"]
msa_asub_s_h(a: v8i16, b: v8i16) -> v8i16127     fn msa_asub_s_h(a: v8i16, b: v8i16) -> v8i16;
128     #[link_name = "llvm.mips.asub.s.w"]
msa_asub_s_w(a: v4i32, b: v4i32) -> v4i32129     fn msa_asub_s_w(a: v4i32, b: v4i32) -> v4i32;
130     #[link_name = "llvm.mips.asub.s.d"]
msa_asub_s_d(a: v2i64, b: v2i64) -> v2i64131     fn msa_asub_s_d(a: v2i64, b: v2i64) -> v2i64;
132     #[link_name = "llvm.mips.asub.u.b"]
msa_asub_u_b(a: v16u8, b: v16u8) -> v16u8133     fn msa_asub_u_b(a: v16u8, b: v16u8) -> v16u8;
134     #[link_name = "llvm.mips.asub.u.h"]
msa_asub_u_h(a: v8u16, b: v8u16) -> v8u16135     fn msa_asub_u_h(a: v8u16, b: v8u16) -> v8u16;
136     #[link_name = "llvm.mips.asub.u.w"]
msa_asub_u_w(a: v4u32, b: v4u32) -> v4u32137     fn msa_asub_u_w(a: v4u32, b: v4u32) -> v4u32;
138     #[link_name = "llvm.mips.asub.u.d"]
msa_asub_u_d(a: v2u64, b: v2u64) -> v2u64139     fn msa_asub_u_d(a: v2u64, b: v2u64) -> v2u64;
140     #[link_name = "llvm.mips.ave.s.b"]
msa_ave_s_b(a: v16i8, b: v16i8) -> v16i8141     fn msa_ave_s_b(a: v16i8, b: v16i8) -> v16i8;
142     #[link_name = "llvm.mips.ave.s.h"]
msa_ave_s_h(a: v8i16, b: v8i16) -> v8i16143     fn msa_ave_s_h(a: v8i16, b: v8i16) -> v8i16;
144     #[link_name = "llvm.mips.ave.s.w"]
msa_ave_s_w(a: v4i32, b: v4i32) -> v4i32145     fn msa_ave_s_w(a: v4i32, b: v4i32) -> v4i32;
146     #[link_name = "llvm.mips.ave.s.d"]
msa_ave_s_d(a: v2i64, b: v2i64) -> v2i64147     fn msa_ave_s_d(a: v2i64, b: v2i64) -> v2i64;
148     #[link_name = "llvm.mips.ave.u.b"]
msa_ave_u_b(a: v16u8, b: v16u8) -> v16u8149     fn msa_ave_u_b(a: v16u8, b: v16u8) -> v16u8;
150     #[link_name = "llvm.mips.ave.u.h"]
msa_ave_u_h(a: v8u16, b: v8u16) -> v8u16151     fn msa_ave_u_h(a: v8u16, b: v8u16) -> v8u16;
152     #[link_name = "llvm.mips.ave.u.w"]
msa_ave_u_w(a: v4u32, b: v4u32) -> v4u32153     fn msa_ave_u_w(a: v4u32, b: v4u32) -> v4u32;
154     #[link_name = "llvm.mips.ave.u.d"]
msa_ave_u_d(a: v2u64, b: v2u64) -> v2u64155     fn msa_ave_u_d(a: v2u64, b: v2u64) -> v2u64;
156     #[link_name = "llvm.mips.aver.s.b"]
msa_aver_s_b(a: v16i8, b: v16i8) -> v16i8157     fn msa_aver_s_b(a: v16i8, b: v16i8) -> v16i8;
158     #[link_name = "llvm.mips.aver.s.h"]
msa_aver_s_h(a: v8i16, b: v8i16) -> v8i16159     fn msa_aver_s_h(a: v8i16, b: v8i16) -> v8i16;
160     #[link_name = "llvm.mips.aver.s.w"]
msa_aver_s_w(a: v4i32, b: v4i32) -> v4i32161     fn msa_aver_s_w(a: v4i32, b: v4i32) -> v4i32;
162     #[link_name = "llvm.mips.aver.s.d"]
msa_aver_s_d(a: v2i64, b: v2i64) -> v2i64163     fn msa_aver_s_d(a: v2i64, b: v2i64) -> v2i64;
164     #[link_name = "llvm.mips.aver.u.b"]
msa_aver_u_b(a: v16u8, b: v16u8) -> v16u8165     fn msa_aver_u_b(a: v16u8, b: v16u8) -> v16u8;
166     #[link_name = "llvm.mips.aver.u.h"]
msa_aver_u_h(a: v8u16, b: v8u16) -> v8u16167     fn msa_aver_u_h(a: v8u16, b: v8u16) -> v8u16;
168     #[link_name = "llvm.mips.aver.u.w"]
msa_aver_u_w(a: v4u32, b: v4u32) -> v4u32169     fn msa_aver_u_w(a: v4u32, b: v4u32) -> v4u32;
170     #[link_name = "llvm.mips.aver.u.d"]
msa_aver_u_d(a: v2u64, b: v2u64) -> v2u64171     fn msa_aver_u_d(a: v2u64, b: v2u64) -> v2u64;
172     #[link_name = "llvm.mips.bclr.b"]
msa_bclr_b(a: v16u8, b: v16u8) -> v16u8173     fn msa_bclr_b(a: v16u8, b: v16u8) -> v16u8;
174     #[link_name = "llvm.mips.bclr.h"]
msa_bclr_h(a: v8u16, b: v8u16) -> v8u16175     fn msa_bclr_h(a: v8u16, b: v8u16) -> v8u16;
176     #[link_name = "llvm.mips.bclr.w"]
msa_bclr_w(a: v4u32, b: v4u32) -> v4u32177     fn msa_bclr_w(a: v4u32, b: v4u32) -> v4u32;
178     #[link_name = "llvm.mips.bclr.d"]
msa_bclr_d(a: v2u64, b: v2u64) -> v2u64179     fn msa_bclr_d(a: v2u64, b: v2u64) -> v2u64;
180     #[link_name = "llvm.mips.bclri.b"]
msa_bclri_b(a: v16u8, b: i32) -> v16u8181     fn msa_bclri_b(a: v16u8, b: i32) -> v16u8;
182     #[link_name = "llvm.mips.bclri.h"]
msa_bclri_h(a: v8u16, b: i32) -> v8u16183     fn msa_bclri_h(a: v8u16, b: i32) -> v8u16;
184     #[link_name = "llvm.mips.bclri.w"]
msa_bclri_w(a: v4u32, b: i32) -> v4u32185     fn msa_bclri_w(a: v4u32, b: i32) -> v4u32;
186     #[link_name = "llvm.mips.bclri.d"]
msa_bclri_d(a: v2u64, b: i32) -> v2u64187     fn msa_bclri_d(a: v2u64, b: i32) -> v2u64;
188     #[link_name = "llvm.mips.binsl.b"]
msa_binsl_b(a: v16u8, b: v16u8, c: v16u8) -> v16u8189     fn msa_binsl_b(a: v16u8, b: v16u8, c: v16u8) -> v16u8;
190     #[link_name = "llvm.mips.binsl.h"]
msa_binsl_h(a: v8u16, b: v8u16, c: v8u16) -> v8u16191     fn msa_binsl_h(a: v8u16, b: v8u16, c: v8u16) -> v8u16;
192     #[link_name = "llvm.mips.binsl.w"]
msa_binsl_w(a: v4u32, b: v4u32, c: v4u32) -> v4u32193     fn msa_binsl_w(a: v4u32, b: v4u32, c: v4u32) -> v4u32;
194     #[link_name = "llvm.mips.binsl.d"]
msa_binsl_d(a: v2u64, b: v2u64, c: v2u64) -> v2u64195     fn msa_binsl_d(a: v2u64, b: v2u64, c: v2u64) -> v2u64;
196     #[link_name = "llvm.mips.binsli.b"]
msa_binsli_b(a: v16u8, b: v16u8, c: i32) -> v16u8197     fn msa_binsli_b(a: v16u8, b: v16u8, c: i32) -> v16u8;
198     #[link_name = "llvm.mips.binsli.h"]
msa_binsli_h(a: v8u16, b: v8u16, c: i32) -> v8u16199     fn msa_binsli_h(a: v8u16, b: v8u16, c: i32) -> v8u16;
200     #[link_name = "llvm.mips.binsli.w"]
msa_binsli_w(a: v4u32, b: v4u32, c: i32) -> v4u32201     fn msa_binsli_w(a: v4u32, b: v4u32, c: i32) -> v4u32;
202     #[link_name = "llvm.mips.binsli.d"]
msa_binsli_d(a: v2u64, b: v2u64, c: i32) -> v2u64203     fn msa_binsli_d(a: v2u64, b: v2u64, c: i32) -> v2u64;
204     #[link_name = "llvm.mips.binsr.b"]
msa_binsr_b(a: v16u8, b: v16u8, c: v16u8) -> v16u8205     fn msa_binsr_b(a: v16u8, b: v16u8, c: v16u8) -> v16u8;
206     #[link_name = "llvm.mips.binsr.h"]
msa_binsr_h(a: v8u16, b: v8u16, c: v8u16) -> v8u16207     fn msa_binsr_h(a: v8u16, b: v8u16, c: v8u16) -> v8u16;
208     #[link_name = "llvm.mips.binsr.w"]
msa_binsr_w(a: v4u32, b: v4u32, c: v4u32) -> v4u32209     fn msa_binsr_w(a: v4u32, b: v4u32, c: v4u32) -> v4u32;
210     #[link_name = "llvm.mips.binsr.d"]
msa_binsr_d(a: v2u64, b: v2u64, c: v2u64) -> v2u64211     fn msa_binsr_d(a: v2u64, b: v2u64, c: v2u64) -> v2u64;
212     #[link_name = "llvm.mips.binsri.b"]
msa_binsri_b(a: v16u8, b: v16u8, c: i32) -> v16u8213     fn msa_binsri_b(a: v16u8, b: v16u8, c: i32) -> v16u8;
214     #[link_name = "llvm.mips.binsri.h"]
msa_binsri_h(a: v8u16, b: v8u16, c: i32) -> v8u16215     fn msa_binsri_h(a: v8u16, b: v8u16, c: i32) -> v8u16;
216     #[link_name = "llvm.mips.binsri.w"]
msa_binsri_w(a: v4u32, b: v4u32, c: i32) -> v4u32217     fn msa_binsri_w(a: v4u32, b: v4u32, c: i32) -> v4u32;
218     #[link_name = "llvm.mips.binsri.d"]
msa_binsri_d(a: v2u64, b: v2u64, c: i32) -> v2u64219     fn msa_binsri_d(a: v2u64, b: v2u64, c: i32) -> v2u64;
220     #[link_name = "llvm.mips.bmnz.v"]
msa_bmnz_v(a: v16u8, b: v16u8, c: v16u8) -> v16u8221     fn msa_bmnz_v(a: v16u8, b: v16u8, c: v16u8) -> v16u8;
222     #[link_name = "llvm.mips.bmnzi.b"]
msa_bmnzi_b(a: v16u8, b: v16u8, c: i32) -> v16u8223     fn msa_bmnzi_b(a: v16u8, b: v16u8, c: i32) -> v16u8;
224     #[link_name = "llvm.mips.bmz.v"]
msa_bmz_v(a: v16u8, b: v16u8, c: v16u8) -> v16u8225     fn msa_bmz_v(a: v16u8, b: v16u8, c: v16u8) -> v16u8;
226     #[link_name = "llvm.mips.bmzi.b"]
msa_bmzi_b(a: v16u8, b: v16u8, c: i32) -> v16u8227     fn msa_bmzi_b(a: v16u8, b: v16u8, c: i32) -> v16u8;
228     #[link_name = "llvm.mips.bneg.b"]
msa_bneg_b(a: v16u8, b: v16u8) -> v16u8229     fn msa_bneg_b(a: v16u8, b: v16u8) -> v16u8;
230     #[link_name = "llvm.mips.bneg.h"]
msa_bneg_h(a: v8u16, b: v8u16) -> v8u16231     fn msa_bneg_h(a: v8u16, b: v8u16) -> v8u16;
232     #[link_name = "llvm.mips.bneg.w"]
msa_bneg_w(a: v4u32, b: v4u32) -> v4u32233     fn msa_bneg_w(a: v4u32, b: v4u32) -> v4u32;
234     #[link_name = "llvm.mips.bneg.d"]
msa_bneg_d(a: v2u64, b: v2u64) -> v2u64235     fn msa_bneg_d(a: v2u64, b: v2u64) -> v2u64;
236     #[link_name = "llvm.mips.bnegi.b"]
msa_bnegi_b(a: v16u8, b: i32) -> v16u8237     fn msa_bnegi_b(a: v16u8, b: i32) -> v16u8;
238     #[link_name = "llvm.mips.bnegi.h"]
msa_bnegi_h(a: v8u16, b: i32) -> v8u16239     fn msa_bnegi_h(a: v8u16, b: i32) -> v8u16;
240     #[link_name = "llvm.mips.bnegi.w"]
msa_bnegi_w(a: v4u32, b: i32) -> v4u32241     fn msa_bnegi_w(a: v4u32, b: i32) -> v4u32;
242     #[link_name = "llvm.mips.bnegi.d"]
msa_bnegi_d(a: v2u64, b: i32) -> v2u64243     fn msa_bnegi_d(a: v2u64, b: i32) -> v2u64;
244     #[link_name = "llvm.mips.bnz.b"]
msa_bnz_b(a: v16u8) -> i32245     fn msa_bnz_b(a: v16u8) -> i32;
246     #[link_name = "llvm.mips.bnz.h"]
msa_bnz_h(a: v8u16) -> i32247     fn msa_bnz_h(a: v8u16) -> i32;
248     #[link_name = "llvm.mips.bnz.w"]
msa_bnz_w(a: v4u32) -> i32249     fn msa_bnz_w(a: v4u32) -> i32;
250     #[link_name = "llvm.mips.bnz.d"]
msa_bnz_d(a: v2u64) -> i32251     fn msa_bnz_d(a: v2u64) -> i32;
252     #[link_name = "llvm.mips.bnz.v"]
msa_bnz_v(a: v16u8) -> i32253     fn msa_bnz_v(a: v16u8) -> i32;
254     #[link_name = "llvm.mips.bsel.v"]
msa_bsel_v(a: v16u8, b: v16u8, c: v16u8) -> v16u8255     fn msa_bsel_v(a: v16u8, b: v16u8, c: v16u8) -> v16u8;
256     #[link_name = "llvm.mips.bseli.b"]
msa_bseli_b(a: v16u8, b: v16u8, c: i32) -> v16u8257     fn msa_bseli_b(a: v16u8, b: v16u8, c: i32) -> v16u8;
258     #[link_name = "llvm.mips.bset.b"]
msa_bset_b(a: v16u8, b: v16u8) -> v16u8259     fn msa_bset_b(a: v16u8, b: v16u8) -> v16u8;
260     #[link_name = "llvm.mips.bset.h"]
msa_bset_h(a: v8u16, b: v8u16) -> v8u16261     fn msa_bset_h(a: v8u16, b: v8u16) -> v8u16;
262     #[link_name = "llvm.mips.bset.w"]
msa_bset_w(a: v4u32, b: v4u32) -> v4u32263     fn msa_bset_w(a: v4u32, b: v4u32) -> v4u32;
264     #[link_name = "llvm.mips.bset.d"]
msa_bset_d(a: v2u64, b: v2u64) -> v2u64265     fn msa_bset_d(a: v2u64, b: v2u64) -> v2u64;
266     #[link_name = "llvm.mips.bseti.b"]
msa_bseti_b(a: v16u8, b: i32) -> v16u8267     fn msa_bseti_b(a: v16u8, b: i32) -> v16u8;
268     #[link_name = "llvm.mips.bseti.h"]
msa_bseti_h(a: v8u16, b: i32) -> v8u16269     fn msa_bseti_h(a: v8u16, b: i32) -> v8u16;
270     #[link_name = "llvm.mips.bseti.w"]
msa_bseti_w(a: v4u32, b: i32) -> v4u32271     fn msa_bseti_w(a: v4u32, b: i32) -> v4u32;
272     #[link_name = "llvm.mips.bseti.d"]
msa_bseti_d(a: v2u64, b: i32) -> v2u64273     fn msa_bseti_d(a: v2u64, b: i32) -> v2u64;
274     #[link_name = "llvm.mips.bz.b"]
msa_bz_b(a: v16u8) -> i32275     fn msa_bz_b(a: v16u8) -> i32;
276     #[link_name = "llvm.mips.bz.h"]
msa_bz_h(a: v8u16) -> i32277     fn msa_bz_h(a: v8u16) -> i32;
278     #[link_name = "llvm.mips.bz.w"]
msa_bz_w(a: v4u32) -> i32279     fn msa_bz_w(a: v4u32) -> i32;
280     #[link_name = "llvm.mips.bz.d"]
msa_bz_d(a: v2u64) -> i32281     fn msa_bz_d(a: v2u64) -> i32;
282     #[link_name = "llvm.mips.bz.v"]
msa_bz_v(a: v16u8) -> i32283     fn msa_bz_v(a: v16u8) -> i32;
284     #[link_name = "llvm.mips.ceq.b"]
msa_ceq_b(a: v16i8, b: v16i8) -> v16i8285     fn msa_ceq_b(a: v16i8, b: v16i8) -> v16i8;
286     #[link_name = "llvm.mips.ceq.h"]
msa_ceq_h(a: v8i16, b: v8i16) -> v8i16287     fn msa_ceq_h(a: v8i16, b: v8i16) -> v8i16;
288     #[link_name = "llvm.mips.ceq.w"]
msa_ceq_w(a: v4i32, b: v4i32) -> v4i32289     fn msa_ceq_w(a: v4i32, b: v4i32) -> v4i32;
290     #[link_name = "llvm.mips.ceq.d"]
msa_ceq_d(a: v2i64, b: v2i64) -> v2i64291     fn msa_ceq_d(a: v2i64, b: v2i64) -> v2i64;
292     #[link_name = "llvm.mips.ceqi.b"]
msa_ceqi_b(a: v16i8, b: i32) -> v16i8293     fn msa_ceqi_b(a: v16i8, b: i32) -> v16i8;
294     #[link_name = "llvm.mips.ceqi.h"]
msa_ceqi_h(a: v8i16, b: i32) -> v8i16295     fn msa_ceqi_h(a: v8i16, b: i32) -> v8i16;
296     #[link_name = "llvm.mips.ceqi.w"]
msa_ceqi_w(a: v4i32, b: i32) -> v4i32297     fn msa_ceqi_w(a: v4i32, b: i32) -> v4i32;
298     #[link_name = "llvm.mips.ceqi.d"]
msa_ceqi_d(a: v2i64, b: i32) -> v2i64299     fn msa_ceqi_d(a: v2i64, b: i32) -> v2i64;
300     #[link_name = "llvm.mips.cfcmsa"]
msa_cfcmsa(a: i32) -> i32301     fn msa_cfcmsa(a: i32) -> i32;
302     #[link_name = "llvm.mips.cle.s.b"]
msa_cle_s_b(a: v16i8, b: v16i8) -> v16i8303     fn msa_cle_s_b(a: v16i8, b: v16i8) -> v16i8;
304     #[link_name = "llvm.mips.cle.s.h"]
msa_cle_s_h(a: v8i16, b: v8i16) -> v8i16305     fn msa_cle_s_h(a: v8i16, b: v8i16) -> v8i16;
306     #[link_name = "llvm.mips.cle.s.w"]
msa_cle_s_w(a: v4i32, b: v4i32) -> v4i32307     fn msa_cle_s_w(a: v4i32, b: v4i32) -> v4i32;
308     #[link_name = "llvm.mips.cle.s.d"]
msa_cle_s_d(a: v2i64, b: v2i64) -> v2i64309     fn msa_cle_s_d(a: v2i64, b: v2i64) -> v2i64;
310     #[link_name = "llvm.mips.cle.u.b"]
msa_cle_u_b(a: v16u8, b: v16u8) -> v16i8311     fn msa_cle_u_b(a: v16u8, b: v16u8) -> v16i8;
312     #[link_name = "llvm.mips.cle.u.h"]
msa_cle_u_h(a: v8u16, b: v8u16) -> v8i16313     fn msa_cle_u_h(a: v8u16, b: v8u16) -> v8i16;
314     #[link_name = "llvm.mips.cle.u.w"]
msa_cle_u_w(a: v4u32, b: v4u32) -> v4i32315     fn msa_cle_u_w(a: v4u32, b: v4u32) -> v4i32;
316     #[link_name = "llvm.mips.cle.u.d"]
msa_cle_u_d(a: v2u64, b: v2u64) -> v2i64317     fn msa_cle_u_d(a: v2u64, b: v2u64) -> v2i64;
318     #[link_name = "llvm.mips.clei.s.b"]
msa_clei_s_b(a: v16i8, b: i32) -> v16i8319     fn msa_clei_s_b(a: v16i8, b: i32) -> v16i8;
320     #[link_name = "llvm.mips.clei.s.h"]
msa_clei_s_h(a: v8i16, b: i32) -> v8i16321     fn msa_clei_s_h(a: v8i16, b: i32) -> v8i16;
322     #[link_name = "llvm.mips.clei.s.w"]
msa_clei_s_w(a: v4i32, b: i32) -> v4i32323     fn msa_clei_s_w(a: v4i32, b: i32) -> v4i32;
324     #[link_name = "llvm.mips.clei.s.d"]
msa_clei_s_d(a: v2i64, b: i32) -> v2i64325     fn msa_clei_s_d(a: v2i64, b: i32) -> v2i64;
326     #[link_name = "llvm.mips.clei.u.b"]
msa_clei_u_b(a: v16u8, b: i32) -> v16i8327     fn msa_clei_u_b(a: v16u8, b: i32) -> v16i8;
328     #[link_name = "llvm.mips.clei.u.h"]
msa_clei_u_h(a: v8u16, b: i32) -> v8i16329     fn msa_clei_u_h(a: v8u16, b: i32) -> v8i16;
330     #[link_name = "llvm.mips.clei.u.w"]
msa_clei_u_w(a: v4u32, b: i32) -> v4i32331     fn msa_clei_u_w(a: v4u32, b: i32) -> v4i32;
332     #[link_name = "llvm.mips.clei.u.d"]
msa_clei_u_d(a: v2u64, b: i32) -> v2i64333     fn msa_clei_u_d(a: v2u64, b: i32) -> v2i64;
334     #[link_name = "llvm.mips.clt.s.b"]
msa_clt_s_b(a: v16i8, b: v16i8) -> v16i8335     fn msa_clt_s_b(a: v16i8, b: v16i8) -> v16i8;
336     #[link_name = "llvm.mips.clt.s.h"]
msa_clt_s_h(a: v8i16, b: v8i16) -> v8i16337     fn msa_clt_s_h(a: v8i16, b: v8i16) -> v8i16;
338     #[link_name = "llvm.mips.clt.s.w"]
msa_clt_s_w(a: v4i32, b: v4i32) -> v4i32339     fn msa_clt_s_w(a: v4i32, b: v4i32) -> v4i32;
340     #[link_name = "llvm.mips.clt.s.d"]
msa_clt_s_d(a: v2i64, b: v2i64) -> v2i64341     fn msa_clt_s_d(a: v2i64, b: v2i64) -> v2i64;
342     #[link_name = "llvm.mips.clt.u.b"]
msa_clt_u_b(a: v16u8, b: v16u8) -> v16i8343     fn msa_clt_u_b(a: v16u8, b: v16u8) -> v16i8;
344     #[link_name = "llvm.mips.clt.u.h"]
msa_clt_u_h(a: v8u16, b: v8u16) -> v8i16345     fn msa_clt_u_h(a: v8u16, b: v8u16) -> v8i16;
346     #[link_name = "llvm.mips.clt.u.w"]
msa_clt_u_w(a: v4u32, b: v4u32) -> v4i32347     fn msa_clt_u_w(a: v4u32, b: v4u32) -> v4i32;
348     #[link_name = "llvm.mips.clt.u.d"]
msa_clt_u_d(a: v2u64, b: v2u64) -> v2i64349     fn msa_clt_u_d(a: v2u64, b: v2u64) -> v2i64;
350     #[link_name = "llvm.mips.clti.s.b"]
msa_clti_s_b(a: v16i8, b: i32) -> v16i8351     fn msa_clti_s_b(a: v16i8, b: i32) -> v16i8;
352     #[link_name = "llvm.mips.clti.s.h"]
msa_clti_s_h(a: v8i16, b: i32) -> v8i16353     fn msa_clti_s_h(a: v8i16, b: i32) -> v8i16;
354     #[link_name = "llvm.mips.clti.s.w"]
msa_clti_s_w(a: v4i32, b: i32) -> v4i32355     fn msa_clti_s_w(a: v4i32, b: i32) -> v4i32;
356     #[link_name = "llvm.mips.clti.s.d"]
msa_clti_s_d(a: v2i64, b: i32) -> v2i64357     fn msa_clti_s_d(a: v2i64, b: i32) -> v2i64;
358     #[link_name = "llvm.mips.clti.u.b"]
msa_clti_u_b(a: v16u8, b: i32) -> v16i8359     fn msa_clti_u_b(a: v16u8, b: i32) -> v16i8;
360     #[link_name = "llvm.mips.clti.u.h"]
msa_clti_u_h(a: v8u16, b: i32) -> v8i16361     fn msa_clti_u_h(a: v8u16, b: i32) -> v8i16;
362     #[link_name = "llvm.mips.clti.u.w"]
msa_clti_u_w(a: v4u32, b: i32) -> v4i32363     fn msa_clti_u_w(a: v4u32, b: i32) -> v4i32;
364     #[link_name = "llvm.mips.clti.u.d"]
msa_clti_u_d(a: v2u64, b: i32) -> v2i64365     fn msa_clti_u_d(a: v2u64, b: i32) -> v2i64;
366     #[link_name = "llvm.mips.copy.s.b"]
msa_copy_s_b(a: v16i8, b: i32) -> i32367     fn msa_copy_s_b(a: v16i8, b: i32) -> i32;
368     #[link_name = "llvm.mips.copy.s.h"]
msa_copy_s_h(a: v8i16, b: i32) -> i32369     fn msa_copy_s_h(a: v8i16, b: i32) -> i32;
370     #[link_name = "llvm.mips.copy.s.w"]
msa_copy_s_w(a: v4i32, b: i32) -> i32371     fn msa_copy_s_w(a: v4i32, b: i32) -> i32;
372     #[link_name = "llvm.mips.copy.s.d"]
msa_copy_s_d(a: v2i64, b: i32) -> i64373     fn msa_copy_s_d(a: v2i64, b: i32) -> i64;
374     #[link_name = "llvm.mips.copy.u.b"]
msa_copy_u_b(a: v16i8, b: i32) -> u32375     fn msa_copy_u_b(a: v16i8, b: i32) -> u32;
376     #[link_name = "llvm.mips.copy.u.h"]
msa_copy_u_h(a: v8i16, b: i32) -> u32377     fn msa_copy_u_h(a: v8i16, b: i32) -> u32;
378     #[link_name = "llvm.mips.copy.u.w"]
msa_copy_u_w(a: v4i32, b: i32) -> u32379     fn msa_copy_u_w(a: v4i32, b: i32) -> u32;
380     #[link_name = "llvm.mips.copy.u.d"]
msa_copy_u_d(a: v2i64, b: i32) -> u64381     fn msa_copy_u_d(a: v2i64, b: i32) -> u64;
382     #[link_name = "llvm.mips.ctcmsa"]
msa_ctcmsa(imm5: i32, a: i32) -> ()383     fn msa_ctcmsa(imm5: i32, a: i32) -> ();
384     #[link_name = "llvm.mips.div.s.b"]
msa_div_s_b(a: v16i8, b: v16i8) -> v16i8385     fn msa_div_s_b(a: v16i8, b: v16i8) -> v16i8;
386     #[link_name = "llvm.mips.div.s.h"]
msa_div_s_h(a: v8i16, b: v8i16) -> v8i16387     fn msa_div_s_h(a: v8i16, b: v8i16) -> v8i16;
388     #[link_name = "llvm.mips.div.s.w"]
msa_div_s_w(a: v4i32, b: v4i32) -> v4i32389     fn msa_div_s_w(a: v4i32, b: v4i32) -> v4i32;
390     #[link_name = "llvm.mips.div.s.d"]
msa_div_s_d(a: v2i64, b: v2i64) -> v2i64391     fn msa_div_s_d(a: v2i64, b: v2i64) -> v2i64;
392     #[link_name = "llvm.mips.div.u.b"]
msa_div_u_b(a: v16u8, b: v16u8) -> v16u8393     fn msa_div_u_b(a: v16u8, b: v16u8) -> v16u8;
394     #[link_name = "llvm.mips.div.u.h"]
msa_div_u_h(a: v8u16, b: v8u16) -> v8u16395     fn msa_div_u_h(a: v8u16, b: v8u16) -> v8u16;
396     #[link_name = "llvm.mips.div.u.w"]
msa_div_u_w(a: v4u32, b: v4u32) -> v4u32397     fn msa_div_u_w(a: v4u32, b: v4u32) -> v4u32;
398     #[link_name = "llvm.mips.div.u.d"]
msa_div_u_d(a: v2u64, b: v2u64) -> v2u64399     fn msa_div_u_d(a: v2u64, b: v2u64) -> v2u64;
400     #[link_name = "llvm.mips.dotp.s.h"]
msa_dotp_s_h(a: v16i8, b: v16i8) -> v8i16401     fn msa_dotp_s_h(a: v16i8, b: v16i8) -> v8i16;
402     #[link_name = "llvm.mips.dotp.s.w"]
msa_dotp_s_w(a: v8i16, b: v8i16) -> v4i32403     fn msa_dotp_s_w(a: v8i16, b: v8i16) -> v4i32;
404     #[link_name = "llvm.mips.dotp.s.d"]
msa_dotp_s_d(a: v4i32, b: v4i32) -> v2i64405     fn msa_dotp_s_d(a: v4i32, b: v4i32) -> v2i64;
406     #[link_name = "llvm.mips.dotp.u.h"]
msa_dotp_u_h(a: v16u8, b: v16u8) -> v8u16407     fn msa_dotp_u_h(a: v16u8, b: v16u8) -> v8u16;
408     #[link_name = "llvm.mips.dotp.u.w"]
msa_dotp_u_w(a: v8u16, b: v8u16) -> v4u32409     fn msa_dotp_u_w(a: v8u16, b: v8u16) -> v4u32;
410     #[link_name = "llvm.mips.dotp.u.d"]
msa_dotp_u_d(a: v4u32, b: v4u32) -> v2u64411     fn msa_dotp_u_d(a: v4u32, b: v4u32) -> v2u64;
412     #[link_name = "llvm.mips.dpadd.s.h"]
msa_dpadd_s_h(a: v8i16, b: v16i8, c: v16i8) -> v8i16413     fn msa_dpadd_s_h(a: v8i16, b: v16i8, c: v16i8) -> v8i16;
414     #[link_name = "llvm.mips.dpadd.s.w"]
msa_dpadd_s_w(a: v4i32, b: v8i16, c: v8i16) -> v4i32415     fn msa_dpadd_s_w(a: v4i32, b: v8i16, c: v8i16) -> v4i32;
416     #[link_name = "llvm.mips.dpadd.s.d"]
msa_dpadd_s_d(a: v2i64, b: v4i32, c: v4i32) -> v2i64417     fn msa_dpadd_s_d(a: v2i64, b: v4i32, c: v4i32) -> v2i64;
418     #[link_name = "llvm.mips.dpadd.u.h"]
msa_dpadd_u_h(a: v8u16, b: v16u8, c: v16u8) -> v8u16419     fn msa_dpadd_u_h(a: v8u16, b: v16u8, c: v16u8) -> v8u16;
420     #[link_name = "llvm.mips.dpadd.u.w"]
msa_dpadd_u_w(a: v4u32, b: v8u16, c: v8u16) -> v4u32421     fn msa_dpadd_u_w(a: v4u32, b: v8u16, c: v8u16) -> v4u32;
422     #[link_name = "llvm.mips.dpadd.u.d"]
msa_dpadd_u_d(a: v2u64, b: v4u32, c: v4u32) -> v2u64423     fn msa_dpadd_u_d(a: v2u64, b: v4u32, c: v4u32) -> v2u64;
424     #[link_name = "llvm.mips.dpsub.s.h"]
msa_dpsub_s_h(a: v8i16, b: v16i8, c: v16i8) -> v8i16425     fn msa_dpsub_s_h(a: v8i16, b: v16i8, c: v16i8) -> v8i16;
426     #[link_name = "llvm.mips.dpsub.s.w"]
msa_dpsub_s_w(a: v4i32, b: v8i16, c: v8i16) -> v4i32427     fn msa_dpsub_s_w(a: v4i32, b: v8i16, c: v8i16) -> v4i32;
428     #[link_name = "llvm.mips.dpsub.s.d"]
msa_dpsub_s_d(a: v2i64, b: v4i32, c: v4i32) -> v2i64429     fn msa_dpsub_s_d(a: v2i64, b: v4i32, c: v4i32) -> v2i64;
430     #[link_name = "llvm.mips.dpsub.u.h"]
msa_dpsub_u_h(a: v8i16, b: v16u8, c: v16u8) -> v8i16431     fn msa_dpsub_u_h(a: v8i16, b: v16u8, c: v16u8) -> v8i16;
432     #[link_name = "llvm.mips.dpsub.u.w"]
msa_dpsub_u_w(a: v4i32, b: v8u16, c: v8u16) -> v4i32433     fn msa_dpsub_u_w(a: v4i32, b: v8u16, c: v8u16) -> v4i32;
434     #[link_name = "llvm.mips.dpsub.u.d"]
msa_dpsub_u_d(a: v2i64, b: v4u32, c: v4u32) -> v2i64435     fn msa_dpsub_u_d(a: v2i64, b: v4u32, c: v4u32) -> v2i64;
436     #[link_name = "llvm.mips.fadd.w"]
msa_fadd_w(a: v4f32, b: v4f32) -> v4f32437     fn msa_fadd_w(a: v4f32, b: v4f32) -> v4f32;
438     #[link_name = "llvm.mips.fadd.d"]
msa_fadd_d(a: v2f64, b: v2f64) -> v2f64439     fn msa_fadd_d(a: v2f64, b: v2f64) -> v2f64;
440     #[link_name = "llvm.mips.fcaf.w"]
msa_fcaf_w(a: v4f32, b: v4f32) -> v4i32441     fn msa_fcaf_w(a: v4f32, b: v4f32) -> v4i32;
442     #[link_name = "llvm.mips.fcaf.d"]
msa_fcaf_d(a: v2f64, b: v2f64) -> v2i64443     fn msa_fcaf_d(a: v2f64, b: v2f64) -> v2i64;
444     #[link_name = "llvm.mips.fceq.w"]
msa_fceq_w(a: v4f32, b: v4f32) -> v4i32445     fn msa_fceq_w(a: v4f32, b: v4f32) -> v4i32;
446     #[link_name = "llvm.mips.fceq.d"]
msa_fceq_d(a: v2f64, b: v2f64) -> v2i64447     fn msa_fceq_d(a: v2f64, b: v2f64) -> v2i64;
448     #[link_name = "llvm.mips.fclass.w"]
msa_fclass_w(a: v4f32) -> v4i32449     fn msa_fclass_w(a: v4f32) -> v4i32;
450     #[link_name = "llvm.mips.fclass.d"]
msa_fclass_d(a: v2f64) -> v2i64451     fn msa_fclass_d(a: v2f64) -> v2i64;
452     #[link_name = "llvm.mips.fcle.w"]
msa_fcle_w(a: v4f32, b: v4f32) -> v4i32453     fn msa_fcle_w(a: v4f32, b: v4f32) -> v4i32;
454     #[link_name = "llvm.mips.fcle.d"]
msa_fcle_d(a: v2f64, b: v2f64) -> v2i64455     fn msa_fcle_d(a: v2f64, b: v2f64) -> v2i64;
456     #[link_name = "llvm.mips.fclt.w"]
msa_fclt_w(a: v4f32, b: v4f32) -> v4i32457     fn msa_fclt_w(a: v4f32, b: v4f32) -> v4i32;
458     #[link_name = "llvm.mips.fclt.d"]
msa_fclt_d(a: v2f64, b: v2f64) -> v2i64459     fn msa_fclt_d(a: v2f64, b: v2f64) -> v2i64;
460     #[link_name = "llvm.mips.fcne.w"]
msa_fcne_w(a: v4f32, b: v4f32) -> v4i32461     fn msa_fcne_w(a: v4f32, b: v4f32) -> v4i32;
462     #[link_name = "llvm.mips.fcne.d"]
msa_fcne_d(a: v2f64, b: v2f64) -> v2i64463     fn msa_fcne_d(a: v2f64, b: v2f64) -> v2i64;
464     #[link_name = "llvm.mips.fcor.w"]
msa_fcor_w(a: v4f32, b: v4f32) -> v4i32465     fn msa_fcor_w(a: v4f32, b: v4f32) -> v4i32;
466     #[link_name = "llvm.mips.fcor.d"]
msa_fcor_d(a: v2f64, b: v2f64) -> v2i64467     fn msa_fcor_d(a: v2f64, b: v2f64) -> v2i64;
468     #[link_name = "llvm.mips.fcueq.w"]
msa_fcueq_w(a: v4f32, b: v4f32) -> v4i32469     fn msa_fcueq_w(a: v4f32, b: v4f32) -> v4i32;
470     #[link_name = "llvm.mips.fcueq.d"]
msa_fcueq_d(a: v2f64, b: v2f64) -> v2i64471     fn msa_fcueq_d(a: v2f64, b: v2f64) -> v2i64;
472     #[link_name = "llvm.mips.fcule.w"]
msa_fcule_w(a: v4f32, b: v4f32) -> v4i32473     fn msa_fcule_w(a: v4f32, b: v4f32) -> v4i32;
474     #[link_name = "llvm.mips.fcule.d"]
msa_fcule_d(a: v2f64, b: v2f64) -> v2i64475     fn msa_fcule_d(a: v2f64, b: v2f64) -> v2i64;
476     #[link_name = "llvm.mips.fcult.w"]
msa_fcult_w(a: v4f32, b: v4f32) -> v4i32477     fn msa_fcult_w(a: v4f32, b: v4f32) -> v4i32;
478     #[link_name = "llvm.mips.fcult.d"]
msa_fcult_d(a: v2f64, b: v2f64) -> v2i64479     fn msa_fcult_d(a: v2f64, b: v2f64) -> v2i64;
480     #[link_name = "llvm.mips.fcun.w"]
msa_fcun_w(a: v4f32, b: v4f32) -> v4i32481     fn msa_fcun_w(a: v4f32, b: v4f32) -> v4i32;
482     #[link_name = "llvm.mips.fcun.d"]
msa_fcun_d(a: v2f64, b: v2f64) -> v2i64483     fn msa_fcun_d(a: v2f64, b: v2f64) -> v2i64;
484     #[link_name = "llvm.mips.fcune.w"]
msa_fcune_w(a: v4f32, b: v4f32) -> v4i32485     fn msa_fcune_w(a: v4f32, b: v4f32) -> v4i32;
486     #[link_name = "llvm.mips.fcune.d"]
msa_fcune_d(a: v2f64, b: v2f64) -> v2i64487     fn msa_fcune_d(a: v2f64, b: v2f64) -> v2i64;
488     #[link_name = "llvm.mips.fdiv.w"]
msa_fdiv_w(a: v4f32, b: v4f32) -> v4f32489     fn msa_fdiv_w(a: v4f32, b: v4f32) -> v4f32;
490     #[link_name = "llvm.mips.fdiv.d"]
msa_fdiv_d(a: v2f64, b: v2f64) -> v2f64491     fn msa_fdiv_d(a: v2f64, b: v2f64) -> v2f64;
492     // FIXME: 16-bit floats
493     // #[link_name = "llvm.mips.fexdo.h"]
494     // fn msa_fexdo_h(a: v4f32, b: v4f32) -> f16x8;
495     #[link_name = "llvm.mips.fexdo.w"]
msa_fexdo_w(a: v2f64, b: v2f64) -> v4f32496     fn msa_fexdo_w(a: v2f64, b: v2f64) -> v4f32;
497     #[link_name = "llvm.mips.fexp2.w"]
msa_fexp2_w(a: v4f32, b: v4i32) -> v4f32498     fn msa_fexp2_w(a: v4f32, b: v4i32) -> v4f32;
499     #[link_name = "llvm.mips.fexp2.d"]
msa_fexp2_d(a: v2f64, b: v2i64) -> v2f64500     fn msa_fexp2_d(a: v2f64, b: v2i64) -> v2f64;
501     // FIXME: 16-bit floats
502     // #[link_name = "llvm.mips.fexupl.w"]
503     // fn msa_fexupl_w(a: f16x8) -> v4f32;
504     #[link_name = "llvm.mips.fexupl.d"]
msa_fexupl_d(a: v4f32) -> v2f64505     fn msa_fexupl_d(a: v4f32) -> v2f64;
506     // FIXME: 16-bit floats
507     // #[link_name = "llvm.mips.fexupr.w"]
508     // fn msa_fexupr_w(a: f16x8) -> v4f32;
509     #[link_name = "llvm.mips.fexupr.d"]
msa_fexupr_d(a: v4f32) -> v2f64510     fn msa_fexupr_d(a: v4f32) -> v2f64;
511     #[link_name = "llvm.mips.ffint.s.w"]
msa_ffint_s_w(a: v4i32) -> v4f32512     fn msa_ffint_s_w(a: v4i32) -> v4f32;
513     #[link_name = "llvm.mips.ffint.s.d"]
msa_ffint_s_d(a: v2i64) -> v2f64514     fn msa_ffint_s_d(a: v2i64) -> v2f64;
515     #[link_name = "llvm.mips.ffint.u.w"]
msa_ffint_u_w(a: v4u32) -> v4f32516     fn msa_ffint_u_w(a: v4u32) -> v4f32;
517     #[link_name = "llvm.mips.ffint.u.d"]
msa_ffint_u_d(a: v2u64) -> v2f64518     fn msa_ffint_u_d(a: v2u64) -> v2f64;
519     #[link_name = "llvm.mips.ffql.w"]
msa_ffql_w(a: v8i16) -> v4f32520     fn msa_ffql_w(a: v8i16) -> v4f32;
521     #[link_name = "llvm.mips.ffql.d"]
msa_ffql_d(a: v4i32) -> v2f64522     fn msa_ffql_d(a: v4i32) -> v2f64;
523     #[link_name = "llvm.mips.ffqr.w"]
msa_ffqr_w(a: v8i16) -> v4f32524     fn msa_ffqr_w(a: v8i16) -> v4f32;
525     #[link_name = "llvm.mips.ffqr.d"]
msa_ffqr_d(a: v4i32) -> v2f64526     fn msa_ffqr_d(a: v4i32) -> v2f64;
527     #[link_name = "llvm.mips.fill.b"]
msa_fill_b(a: i32) -> v16i8528     fn msa_fill_b(a: i32) -> v16i8;
529     #[link_name = "llvm.mips.fill.h"]
msa_fill_h(a: i32) -> v8i16530     fn msa_fill_h(a: i32) -> v8i16;
531     #[link_name = "llvm.mips.fill.w"]
msa_fill_w(a: i32) -> v4i32532     fn msa_fill_w(a: i32) -> v4i32;
533     #[link_name = "llvm.mips.fill.d"]
msa_fill_d(a: i64) -> v2i64534     fn msa_fill_d(a: i64) -> v2i64;
535     #[link_name = "llvm.mips.flog2.w"]
msa_flog2_w(a: v4f32) -> v4f32536     fn msa_flog2_w(a: v4f32) -> v4f32;
537     #[link_name = "llvm.mips.flog2.d"]
msa_flog2_d(a: v2f64) -> v2f64538     fn msa_flog2_d(a: v2f64) -> v2f64;
539     #[link_name = "llvm.mips.fmadd.w"]
msa_fmadd_w(a: v4f32, b: v4f32, c: v4f32) -> v4f32540     fn msa_fmadd_w(a: v4f32, b: v4f32, c: v4f32) -> v4f32;
541     #[link_name = "llvm.mips.fmadd.d"]
msa_fmadd_d(a: v2f64, b: v2f64, c: v2f64) -> v2f64542     fn msa_fmadd_d(a: v2f64, b: v2f64, c: v2f64) -> v2f64;
543     #[link_name = "llvm.mips.fmax.w"]
msa_fmax_w(a: v4f32, b: v4f32) -> v4f32544     fn msa_fmax_w(a: v4f32, b: v4f32) -> v4f32;
545     #[link_name = "llvm.mips.fmax.d"]
msa_fmax_d(a: v2f64, b: v2f64) -> v2f64546     fn msa_fmax_d(a: v2f64, b: v2f64) -> v2f64;
547     #[link_name = "llvm.mips.fmax.a.w"]
msa_fmax_a_w(a: v4f32, b: v4f32) -> v4f32548     fn msa_fmax_a_w(a: v4f32, b: v4f32) -> v4f32;
549     #[link_name = "llvm.mips.fmax.a.d"]
msa_fmax_a_d(a: v2f64, b: v2f64) -> v2f64550     fn msa_fmax_a_d(a: v2f64, b: v2f64) -> v2f64;
551     #[link_name = "llvm.mips.fmin.w"]
msa_fmin_w(a: v4f32, b: v4f32) -> v4f32552     fn msa_fmin_w(a: v4f32, b: v4f32) -> v4f32;
553     #[link_name = "llvm.mips.fmin.d"]
msa_fmin_d(a: v2f64, b: v2f64) -> v2f64554     fn msa_fmin_d(a: v2f64, b: v2f64) -> v2f64;
555     #[link_name = "llvm.mips.fmin.a.w"]
msa_fmin_a_w(a: v4f32, b: v4f32) -> v4f32556     fn msa_fmin_a_w(a: v4f32, b: v4f32) -> v4f32;
557     #[link_name = "llvm.mips.fmin.a.d"]
msa_fmin_a_d(a: v2f64, b: v2f64) -> v2f64558     fn msa_fmin_a_d(a: v2f64, b: v2f64) -> v2f64;
559     #[link_name = "llvm.mips.fmsub.w"]
msa_fmsub_w(a: v4f32, b: v4f32, c: v4f32) -> v4f32560     fn msa_fmsub_w(a: v4f32, b: v4f32, c: v4f32) -> v4f32;
561     #[link_name = "llvm.mips.fmsub.d"]
msa_fmsub_d(a: v2f64, b: v2f64, c: v2f64) -> v2f64562     fn msa_fmsub_d(a: v2f64, b: v2f64, c: v2f64) -> v2f64;
563     #[link_name = "llvm.mips.fmul.w"]
msa_fmul_w(a: v4f32, b: v4f32) -> v4f32564     fn msa_fmul_w(a: v4f32, b: v4f32) -> v4f32;
565     #[link_name = "llvm.mips.fmul.d"]
msa_fmul_d(a: v2f64, b: v2f64) -> v2f64566     fn msa_fmul_d(a: v2f64, b: v2f64) -> v2f64;
567     #[link_name = "llvm.mips.frint.w"]
msa_frint_w(a: v4f32) -> v4f32568     fn msa_frint_w(a: v4f32) -> v4f32;
569     #[link_name = "llvm.mips.frint.d"]
msa_frint_d(a: v2f64) -> v2f64570     fn msa_frint_d(a: v2f64) -> v2f64;
571     #[link_name = "llvm.mips.frcp.w"]
msa_frcp_w(a: v4f32) -> v4f32572     fn msa_frcp_w(a: v4f32) -> v4f32;
573     #[link_name = "llvm.mips.frcp.d"]
msa_frcp_d(a: v2f64) -> v2f64574     fn msa_frcp_d(a: v2f64) -> v2f64;
575     #[link_name = "llvm.mips.frsqrt.w"]
msa_frsqrt_w(a: v4f32) -> v4f32576     fn msa_frsqrt_w(a: v4f32) -> v4f32;
577     #[link_name = "llvm.mips.frsqrt.d"]
msa_frsqrt_d(a: v2f64) -> v2f64578     fn msa_frsqrt_d(a: v2f64) -> v2f64;
579     #[link_name = "llvm.mips.fsaf.w"]
msa_fsaf_w(a: v4f32, b: v4f32) -> v4i32580     fn msa_fsaf_w(a: v4f32, b: v4f32) -> v4i32;
581     #[link_name = "llvm.mips.fsaf.d"]
msa_fsaf_d(a: v2f64, b: v2f64) -> v2i64582     fn msa_fsaf_d(a: v2f64, b: v2f64) -> v2i64;
583     #[link_name = "llvm.mips.fseq.w"]
msa_fseq_w(a: v4f32, b: v4f32) -> v4i32584     fn msa_fseq_w(a: v4f32, b: v4f32) -> v4i32;
585     #[link_name = "llvm.mips.fseq.d"]
msa_fseq_d(a: v2f64, b: v2f64) -> v2i64586     fn msa_fseq_d(a: v2f64, b: v2f64) -> v2i64;
587     #[link_name = "llvm.mips.fsle.w"]
msa_fsle_w(a: v4f32, b: v4f32) -> v4i32588     fn msa_fsle_w(a: v4f32, b: v4f32) -> v4i32;
589     #[link_name = "llvm.mips.fsle.d"]
msa_fsle_d(a: v2f64, b: v2f64) -> v2i64590     fn msa_fsle_d(a: v2f64, b: v2f64) -> v2i64;
591     #[link_name = "llvm.mips.fslt.w"]
msa_fslt_w(a: v4f32, b: v4f32) -> v4i32592     fn msa_fslt_w(a: v4f32, b: v4f32) -> v4i32;
593     #[link_name = "llvm.mips.fslt.d"]
msa_fslt_d(a: v2f64, b: v2f64) -> v2i64594     fn msa_fslt_d(a: v2f64, b: v2f64) -> v2i64;
595     #[link_name = "llvm.mips.fsne.w"]
msa_fsne_w(a: v4f32, b: v4f32) -> v4i32596     fn msa_fsne_w(a: v4f32, b: v4f32) -> v4i32;
597     #[link_name = "llvm.mips.fsne.d"]
msa_fsne_d(a: v2f64, b: v2f64) -> v2i64598     fn msa_fsne_d(a: v2f64, b: v2f64) -> v2i64;
599     #[link_name = "llvm.mips.fsor.w"]
msa_fsor_w(a: v4f32, b: v4f32) -> v4i32600     fn msa_fsor_w(a: v4f32, b: v4f32) -> v4i32;
601     #[link_name = "llvm.mips.fsor.d"]
msa_fsor_d(a: v2f64, b: v2f64) -> v2i64602     fn msa_fsor_d(a: v2f64, b: v2f64) -> v2i64;
603     #[link_name = "llvm.mips.fsqrt.w"]
msa_fsqrt_w(a: v4f32) -> v4f32604     fn msa_fsqrt_w(a: v4f32) -> v4f32;
605     #[link_name = "llvm.mips.fsqrt.d"]
msa_fsqrt_d(a: v2f64) -> v2f64606     fn msa_fsqrt_d(a: v2f64) -> v2f64;
607     #[link_name = "llvm.mips.fsub.w"]
msa_fsub_w(a: v4f32, b: v4f32) -> v4f32608     fn msa_fsub_w(a: v4f32, b: v4f32) -> v4f32;
609     #[link_name = "llvm.mips.fsub.d"]
msa_fsub_d(a: v2f64, b: v2f64) -> v2f64610     fn msa_fsub_d(a: v2f64, b: v2f64) -> v2f64;
611     #[link_name = "llvm.mips.fsueq.w"]
msa_fsueq_w(a: v4f32, b: v4f32) -> v4i32612     fn msa_fsueq_w(a: v4f32, b: v4f32) -> v4i32;
613     #[link_name = "llvm.mips.fsueq.d"]
msa_fsueq_d(a: v2f64, b: v2f64) -> v2i64614     fn msa_fsueq_d(a: v2f64, b: v2f64) -> v2i64;
615     #[link_name = "llvm.mips.fsule.w"]
msa_fsule_w(a: v4f32, b: v4f32) -> v4i32616     fn msa_fsule_w(a: v4f32, b: v4f32) -> v4i32;
617     #[link_name = "llvm.mips.fsule.d"]
msa_fsule_d(a: v2f64, b: v2f64) -> v2i64618     fn msa_fsule_d(a: v2f64, b: v2f64) -> v2i64;
619     #[link_name = "llvm.mips.fsult.w"]
msa_fsult_w(a: v4f32, b: v4f32) -> v4i32620     fn msa_fsult_w(a: v4f32, b: v4f32) -> v4i32;
621     #[link_name = "llvm.mips.fsult.d"]
msa_fsult_d(a: v2f64, b: v2f64) -> v2i64622     fn msa_fsult_d(a: v2f64, b: v2f64) -> v2i64;
623     #[link_name = "llvm.mips.fsun.w"]
msa_fsun_w(a: v4f32, b: v4f32) -> v4i32624     fn msa_fsun_w(a: v4f32, b: v4f32) -> v4i32;
625     #[link_name = "llvm.mips.fsun.d"]
msa_fsun_d(a: v2f64, b: v2f64) -> v2i64626     fn msa_fsun_d(a: v2f64, b: v2f64) -> v2i64;
627     #[link_name = "llvm.mips.fsune.w"]
msa_fsune_w(a: v4f32, b: v4f32) -> v4i32628     fn msa_fsune_w(a: v4f32, b: v4f32) -> v4i32;
629     #[link_name = "llvm.mips.fsune.d"]
msa_fsune_d(a: v2f64, b: v2f64) -> v2i64630     fn msa_fsune_d(a: v2f64, b: v2f64) -> v2i64;
631     #[link_name = "llvm.mips.ftint.s.w"]
msa_ftint_s_w(a: v4f32) -> v4i32632     fn msa_ftint_s_w(a: v4f32) -> v4i32;
633     #[link_name = "llvm.mips.ftint.s.d"]
msa_ftint_s_d(a: v2f64) -> v2i64634     fn msa_ftint_s_d(a: v2f64) -> v2i64;
635     #[link_name = "llvm.mips.ftint.u.w"]
msa_ftint_u_w(a: v4f32) -> v4u32636     fn msa_ftint_u_w(a: v4f32) -> v4u32;
637     #[link_name = "llvm.mips.ftint.u.d"]
msa_ftint_u_d(a: v2f64) -> v2u64638     fn msa_ftint_u_d(a: v2f64) -> v2u64;
639     #[link_name = "llvm.mips.ftq.h"]
msa_ftq_h(a: v4f32, b: v4f32) -> v8i16640     fn msa_ftq_h(a: v4f32, b: v4f32) -> v8i16;
641     #[link_name = "llvm.mips.ftq.w"]
msa_ftq_w(a: v2f64, b: v2f64) -> v4i32642     fn msa_ftq_w(a: v2f64, b: v2f64) -> v4i32;
643     #[link_name = "llvm.mips.ftrunc.s.w"]
msa_ftrunc_s_w(a: v4f32) -> v4i32644     fn msa_ftrunc_s_w(a: v4f32) -> v4i32;
645     #[link_name = "llvm.mips.ftrunc.s.d"]
msa_ftrunc_s_d(a: v2f64) -> v2i64646     fn msa_ftrunc_s_d(a: v2f64) -> v2i64;
647     #[link_name = "llvm.mips.ftrunc.u.w"]
msa_ftrunc_u_w(a: v4f32) -> v4u32648     fn msa_ftrunc_u_w(a: v4f32) -> v4u32;
649     #[link_name = "llvm.mips.ftrunc.u.d"]
msa_ftrunc_u_d(a: v2f64) -> v2u64650     fn msa_ftrunc_u_d(a: v2f64) -> v2u64;
651     #[link_name = "llvm.mips.hadd.s.h"]
msa_hadd_s_h(a: v16i8, b: v16i8) -> v8i16652     fn msa_hadd_s_h(a: v16i8, b: v16i8) -> v8i16;
653     #[link_name = "llvm.mips.hadd.s.w"]
msa_hadd_s_w(a: v8i16, b: v8i16) -> v4i32654     fn msa_hadd_s_w(a: v8i16, b: v8i16) -> v4i32;
655     #[link_name = "llvm.mips.hadd.s.d"]
msa_hadd_s_d(a: v4i32, b: v4i32) -> v2i64656     fn msa_hadd_s_d(a: v4i32, b: v4i32) -> v2i64;
657     #[link_name = "llvm.mips.hadd.u.h"]
msa_hadd_u_h(a: v16u8, b: v16u8) -> v8u16658     fn msa_hadd_u_h(a: v16u8, b: v16u8) -> v8u16;
659     #[link_name = "llvm.mips.hadd.u.w"]
msa_hadd_u_w(a: v8u16, b: v8u16) -> v4u32660     fn msa_hadd_u_w(a: v8u16, b: v8u16) -> v4u32;
661     #[link_name = "llvm.mips.hadd.u.d"]
msa_hadd_u_d(a: v4u32, b: v4u32) -> v2u64662     fn msa_hadd_u_d(a: v4u32, b: v4u32) -> v2u64;
663     #[link_name = "llvm.mips.hsub.s.h"]
msa_hsub_s_h(a: v16i8, b: v16i8) -> v8i16664     fn msa_hsub_s_h(a: v16i8, b: v16i8) -> v8i16;
665     #[link_name = "llvm.mips.hsub.s.w"]
msa_hsub_s_w(a: v8i16, b: v8i16) -> v4i32666     fn msa_hsub_s_w(a: v8i16, b: v8i16) -> v4i32;
667     #[link_name = "llvm.mips.hsub.s.d"]
msa_hsub_s_d(a: v4i32, b: v4i32) -> v2i64668     fn msa_hsub_s_d(a: v4i32, b: v4i32) -> v2i64;
669     #[link_name = "llvm.mips.hsub.u.h"]
msa_hsub_u_h(a: v16u8, b: v16u8) -> v8i16670     fn msa_hsub_u_h(a: v16u8, b: v16u8) -> v8i16;
671     #[link_name = "llvm.mips.hsub.u.w"]
msa_hsub_u_w(a: v8u16, b: v8u16) -> v4i32672     fn msa_hsub_u_w(a: v8u16, b: v8u16) -> v4i32;
673     #[link_name = "llvm.mips.hsub.u.d"]
msa_hsub_u_d(a: v4u32, b: v4u32) -> v2i64674     fn msa_hsub_u_d(a: v4u32, b: v4u32) -> v2i64;
675     #[link_name = "llvm.mips.ilvev.b"]
msa_ilvev_b(a: v16i8, b: v16i8) -> v16i8676     fn msa_ilvev_b(a: v16i8, b: v16i8) -> v16i8;
677     #[link_name = "llvm.mips.ilvev.h"]
msa_ilvev_h(a: v8i16, b: v8i16) -> v8i16678     fn msa_ilvev_h(a: v8i16, b: v8i16) -> v8i16;
679     #[link_name = "llvm.mips.ilvev.w"]
msa_ilvev_w(a: v4i32, b: v4i32) -> v4i32680     fn msa_ilvev_w(a: v4i32, b: v4i32) -> v4i32;
681     #[link_name = "llvm.mips.ilvev.d"]
msa_ilvev_d(a: v2i64, b: v2i64) -> v2i64682     fn msa_ilvev_d(a: v2i64, b: v2i64) -> v2i64;
683     #[link_name = "llvm.mips.ilvl.b"]
msa_ilvl_b(a: v16i8, b: v16i8) -> v16i8684     fn msa_ilvl_b(a: v16i8, b: v16i8) -> v16i8;
685     #[link_name = "llvm.mips.ilvl.h"]
msa_ilvl_h(a: v8i16, b: v8i16) -> v8i16686     fn msa_ilvl_h(a: v8i16, b: v8i16) -> v8i16;
687     #[link_name = "llvm.mips.ilvl.w"]
msa_ilvl_w(a: v4i32, b: v4i32) -> v4i32688     fn msa_ilvl_w(a: v4i32, b: v4i32) -> v4i32;
689     #[link_name = "llvm.mips.ilvl.d"]
msa_ilvl_d(a: v2i64, b: v2i64) -> v2i64690     fn msa_ilvl_d(a: v2i64, b: v2i64) -> v2i64;
691     #[link_name = "llvm.mips.ilvod.b"]
msa_ilvod_b(a: v16i8, b: v16i8) -> v16i8692     fn msa_ilvod_b(a: v16i8, b: v16i8) -> v16i8;
693     #[link_name = "llvm.mips.ilvod.h"]
msa_ilvod_h(a: v8i16, b: v8i16) -> v8i16694     fn msa_ilvod_h(a: v8i16, b: v8i16) -> v8i16;
695     #[link_name = "llvm.mips.ilvod.w"]
msa_ilvod_w(a: v4i32, b: v4i32) -> v4i32696     fn msa_ilvod_w(a: v4i32, b: v4i32) -> v4i32;
697     #[link_name = "llvm.mips.ilvod.d"]
msa_ilvod_d(a: v2i64, b: v2i64) -> v2i64698     fn msa_ilvod_d(a: v2i64, b: v2i64) -> v2i64;
699     #[link_name = "llvm.mips.ilvr.b"]
msa_ilvr_b(a: v16i8, b: v16i8) -> v16i8700     fn msa_ilvr_b(a: v16i8, b: v16i8) -> v16i8;
701     #[link_name = "llvm.mips.ilvr.h"]
msa_ilvr_h(a: v8i16, b: v8i16) -> v8i16702     fn msa_ilvr_h(a: v8i16, b: v8i16) -> v8i16;
703     #[link_name = "llvm.mips.ilvr.w"]
msa_ilvr_w(a: v4i32, b: v4i32) -> v4i32704     fn msa_ilvr_w(a: v4i32, b: v4i32) -> v4i32;
705     #[link_name = "llvm.mips.ilvr.d"]
msa_ilvr_d(a: v2i64, b: v2i64) -> v2i64706     fn msa_ilvr_d(a: v2i64, b: v2i64) -> v2i64;
707     #[link_name = "llvm.mips.insert.b"]
msa_insert_b(a: v16i8, b: i32, c: i32) -> v16i8708     fn msa_insert_b(a: v16i8, b: i32, c: i32) -> v16i8;
709     #[link_name = "llvm.mips.insert.h"]
msa_insert_h(a: v8i16, b: i32, c: i32) -> v8i16710     fn msa_insert_h(a: v8i16, b: i32, c: i32) -> v8i16;
711     #[link_name = "llvm.mips.insert.w"]
msa_insert_w(a: v4i32, b: i32, c: i32) -> v4i32712     fn msa_insert_w(a: v4i32, b: i32, c: i32) -> v4i32;
713     #[link_name = "llvm.mips.insert.d"]
msa_insert_d(a: v2i64, b: i32, c: i64) -> v2i64714     fn msa_insert_d(a: v2i64, b: i32, c: i64) -> v2i64;
715     #[link_name = "llvm.mips.insve.b"]
msa_insve_b(a: v16i8, b: i32, c: v16i8) -> v16i8716     fn msa_insve_b(a: v16i8, b: i32, c: v16i8) -> v16i8;
717     #[link_name = "llvm.mips.insve.h"]
msa_insve_h(a: v8i16, b: i32, c: v8i16) -> v8i16718     fn msa_insve_h(a: v8i16, b: i32, c: v8i16) -> v8i16;
719     #[link_name = "llvm.mips.insve.w"]
msa_insve_w(a: v4i32, b: i32, c: v4i32) -> v4i32720     fn msa_insve_w(a: v4i32, b: i32, c: v4i32) -> v4i32;
721     #[link_name = "llvm.mips.insve.d"]
msa_insve_d(a: v2i64, b: i32, c: v2i64) -> v2i64722     fn msa_insve_d(a: v2i64, b: i32, c: v2i64) -> v2i64;
723     #[link_name = "llvm.mips.ld.b"]
msa_ld_b(mem_addr: *mut u8, b: i32) -> v16i8724     fn msa_ld_b(mem_addr: *mut u8, b: i32) -> v16i8;
725     #[link_name = "llvm.mips.ld.h"]
msa_ld_h(mem_addr: *mut u8, b: i32) -> v8i16726     fn msa_ld_h(mem_addr: *mut u8, b: i32) -> v8i16;
727     #[link_name = "llvm.mips.ld.w"]
msa_ld_w(mem_addr: *mut u8, b: i32) -> v4i32728     fn msa_ld_w(mem_addr: *mut u8, b: i32) -> v4i32;
729     #[link_name = "llvm.mips.ld.d"]
msa_ld_d(mem_addr: *mut u8, b: i32) -> v2i64730     fn msa_ld_d(mem_addr: *mut u8, b: i32) -> v2i64;
731     #[link_name = "llvm.mips.ldi.b"]
msa_ldi_b(a: i32) -> v16i8732     fn msa_ldi_b(a: i32) -> v16i8;
733     #[link_name = "llvm.mips.ldi.h"]
msa_ldi_h(a: i32) -> v8i16734     fn msa_ldi_h(a: i32) -> v8i16;
735     #[link_name = "llvm.mips.ldi.w"]
msa_ldi_w(a: i32) -> v4i32736     fn msa_ldi_w(a: i32) -> v4i32;
737     #[link_name = "llvm.mips.ldi.d"]
msa_ldi_d(a: i32) -> v2i64738     fn msa_ldi_d(a: i32) -> v2i64;
739     #[link_name = "llvm.mips.madd.q.h"]
msa_madd_q_h(a: v8i16, b: v8i16, c: v8i16) -> v8i16740     fn msa_madd_q_h(a: v8i16, b: v8i16, c: v8i16) -> v8i16;
741     #[link_name = "llvm.mips.madd.q.w"]
msa_madd_q_w(a: v4i32, b: v4i32, c: v4i32) -> v4i32742     fn msa_madd_q_w(a: v4i32, b: v4i32, c: v4i32) -> v4i32;
743     #[link_name = "llvm.mips.maddr.q.h"]
msa_maddr_q_h(a: v8i16, b: v8i16, c: v8i16) -> v8i16744     fn msa_maddr_q_h(a: v8i16, b: v8i16, c: v8i16) -> v8i16;
745     #[link_name = "llvm.mips.maddr.q.w"]
msa_maddr_q_w(a: v4i32, b: v4i32, c: v4i32) -> v4i32746     fn msa_maddr_q_w(a: v4i32, b: v4i32, c: v4i32) -> v4i32;
747     #[link_name = "llvm.mips.maddv.b"]
msa_maddv_b(a: v16i8, b: v16i8, c: v16i8) -> v16i8748     fn msa_maddv_b(a: v16i8, b: v16i8, c: v16i8) -> v16i8;
749     #[link_name = "llvm.mips.maddv.h"]
msa_maddv_h(a: v8i16, b: v8i16, c: v8i16) -> v8i16750     fn msa_maddv_h(a: v8i16, b: v8i16, c: v8i16) -> v8i16;
751     #[link_name = "llvm.mips.maddv.w"]
msa_maddv_w(a: v4i32, b: v4i32, c: v4i32) -> v4i32752     fn msa_maddv_w(a: v4i32, b: v4i32, c: v4i32) -> v4i32;
753     #[link_name = "llvm.mips.maddv.d"]
msa_maddv_d(a: v2i64, b: v2i64, c: v2i64) -> v2i64754     fn msa_maddv_d(a: v2i64, b: v2i64, c: v2i64) -> v2i64;
755     #[link_name = "llvm.mips.max.a.b"]
msa_max_a_b(a: v16i8, b: v16i8) -> v16i8756     fn msa_max_a_b(a: v16i8, b: v16i8) -> v16i8;
757     #[link_name = "llvm.mips.max.a.h"]
msa_max_a_h(a: v8i16, b: v8i16) -> v8i16758     fn msa_max_a_h(a: v8i16, b: v8i16) -> v8i16;
759     #[link_name = "llvm.mips.max.a.w"]
msa_max_a_w(a: v4i32, b: v4i32) -> v4i32760     fn msa_max_a_w(a: v4i32, b: v4i32) -> v4i32;
761     #[link_name = "llvm.mips.max.a.d"]
msa_max_a_d(a: v2i64, b: v2i64) -> v2i64762     fn msa_max_a_d(a: v2i64, b: v2i64) -> v2i64;
763     #[link_name = "llvm.mips.max.s.b"]
msa_max_s_b(a: v16i8, b: v16i8) -> v16i8764     fn msa_max_s_b(a: v16i8, b: v16i8) -> v16i8;
765     #[link_name = "llvm.mips.max.s.h"]
msa_max_s_h(a: v8i16, b: v8i16) -> v8i16766     fn msa_max_s_h(a: v8i16, b: v8i16) -> v8i16;
767     #[link_name = "llvm.mips.max.s.w"]
msa_max_s_w(a: v4i32, b: v4i32) -> v4i32768     fn msa_max_s_w(a: v4i32, b: v4i32) -> v4i32;
769     #[link_name = "llvm.mips.max.s.d"]
msa_max_s_d(a: v2i64, b: v2i64) -> v2i64770     fn msa_max_s_d(a: v2i64, b: v2i64) -> v2i64;
771     #[link_name = "llvm.mips.max.u.b"]
msa_max_u_b(a: v16u8, b: v16u8) -> v16u8772     fn msa_max_u_b(a: v16u8, b: v16u8) -> v16u8;
773     #[link_name = "llvm.mips.max.u.h"]
msa_max_u_h(a: v8u16, b: v8u16) -> v8u16774     fn msa_max_u_h(a: v8u16, b: v8u16) -> v8u16;
775     #[link_name = "llvm.mips.max.u.w"]
msa_max_u_w(a: v4u32, b: v4u32) -> v4u32776     fn msa_max_u_w(a: v4u32, b: v4u32) -> v4u32;
777     #[link_name = "llvm.mips.max.u.d"]
msa_max_u_d(a: v2u64, b: v2u64) -> v2u64778     fn msa_max_u_d(a: v2u64, b: v2u64) -> v2u64;
779     #[link_name = "llvm.mips.maxi.s.b"]
msa_maxi_s_b(a: v16i8, b: i32) -> v16i8780     fn msa_maxi_s_b(a: v16i8, b: i32) -> v16i8;
781     #[link_name = "llvm.mips.maxi.s.h"]
msa_maxi_s_h(a: v8i16, b: i32) -> v8i16782     fn msa_maxi_s_h(a: v8i16, b: i32) -> v8i16;
783     #[link_name = "llvm.mips.maxi.s.w"]
msa_maxi_s_w(a: v4i32, b: i32) -> v4i32784     fn msa_maxi_s_w(a: v4i32, b: i32) -> v4i32;
785     #[link_name = "llvm.mips.maxi.s.d"]
msa_maxi_s_d(a: v2i64, b: i32) -> v2i64786     fn msa_maxi_s_d(a: v2i64, b: i32) -> v2i64;
787     #[link_name = "llvm.mips.maxi.u.b"]
msa_maxi_u_b(a: v16u8, b: i32) -> v16u8788     fn msa_maxi_u_b(a: v16u8, b: i32) -> v16u8;
789     #[link_name = "llvm.mips.maxi.u.h"]
msa_maxi_u_h(a: v8u16, b: i32) -> v8u16790     fn msa_maxi_u_h(a: v8u16, b: i32) -> v8u16;
791     #[link_name = "llvm.mips.maxi.u.w"]
msa_maxi_u_w(a: v4u32, b: i32) -> v4u32792     fn msa_maxi_u_w(a: v4u32, b: i32) -> v4u32;
793     #[link_name = "llvm.mips.maxi.u.d"]
msa_maxi_u_d(a: v2u64, b: i32) -> v2u64794     fn msa_maxi_u_d(a: v2u64, b: i32) -> v2u64;
795     #[link_name = "llvm.mips.min.a.b"]
msa_min_a_b(a: v16i8, b: v16i8) -> v16i8796     fn msa_min_a_b(a: v16i8, b: v16i8) -> v16i8;
797     #[link_name = "llvm.mips.min.a.h"]
msa_min_a_h(a: v8i16, b: v8i16) -> v8i16798     fn msa_min_a_h(a: v8i16, b: v8i16) -> v8i16;
799     #[link_name = "llvm.mips.min.a.w"]
msa_min_a_w(a: v4i32, b: v4i32) -> v4i32800     fn msa_min_a_w(a: v4i32, b: v4i32) -> v4i32;
801     #[link_name = "llvm.mips.min.a.d"]
msa_min_a_d(a: v2i64, b: v2i64) -> v2i64802     fn msa_min_a_d(a: v2i64, b: v2i64) -> v2i64;
803     #[link_name = "llvm.mips.min.s.b"]
msa_min_s_b(a: v16i8, b: v16i8) -> v16i8804     fn msa_min_s_b(a: v16i8, b: v16i8) -> v16i8;
805     #[link_name = "llvm.mips.min.s.h"]
msa_min_s_h(a: v8i16, b: v8i16) -> v8i16806     fn msa_min_s_h(a: v8i16, b: v8i16) -> v8i16;
807     #[link_name = "llvm.mips.min.s.w"]
msa_min_s_w(a: v4i32, b: v4i32) -> v4i32808     fn msa_min_s_w(a: v4i32, b: v4i32) -> v4i32;
809     #[link_name = "llvm.mips.min.s.d"]
msa_min_s_d(a: v2i64, b: v2i64) -> v2i64810     fn msa_min_s_d(a: v2i64, b: v2i64) -> v2i64;
811     #[link_name = "llvm.mips.min.u.b"]
msa_min_u_b(a: v16u8, b: v16u8) -> v16u8812     fn msa_min_u_b(a: v16u8, b: v16u8) -> v16u8;
813     #[link_name = "llvm.mips.min.u.h"]
msa_min_u_h(a: v8u16, b: v8u16) -> v8u16814     fn msa_min_u_h(a: v8u16, b: v8u16) -> v8u16;
815     #[link_name = "llvm.mips.min.u.w"]
msa_min_u_w(a: v4u32, b: v4u32) -> v4u32816     fn msa_min_u_w(a: v4u32, b: v4u32) -> v4u32;
817     #[link_name = "llvm.mips.min.u.d"]
msa_min_u_d(a: v2u64, b: v2u64) -> v2u64818     fn msa_min_u_d(a: v2u64, b: v2u64) -> v2u64;
819     #[link_name = "llvm.mips.mini.s.b"]
msa_mini_s_b(a: v16i8, b: i32) -> v16i8820     fn msa_mini_s_b(a: v16i8, b: i32) -> v16i8;
821     #[link_name = "llvm.mips.mini.s.h"]
msa_mini_s_h(a: v8i16, b: i32) -> v8i16822     fn msa_mini_s_h(a: v8i16, b: i32) -> v8i16;
823     #[link_name = "llvm.mips.mini.s.w"]
msa_mini_s_w(a: v4i32, b: i32) -> v4i32824     fn msa_mini_s_w(a: v4i32, b: i32) -> v4i32;
825     #[link_name = "llvm.mips.mini.s.d"]
msa_mini_s_d(a: v2i64, b: i32) -> v2i64826     fn msa_mini_s_d(a: v2i64, b: i32) -> v2i64;
827     #[link_name = "llvm.mips.mini.u.b"]
msa_mini_u_b(a: v16u8, b: i32) -> v16u8828     fn msa_mini_u_b(a: v16u8, b: i32) -> v16u8;
829     #[link_name = "llvm.mips.mini.u.h"]
msa_mini_u_h(a: v8u16, b: i32) -> v8u16830     fn msa_mini_u_h(a: v8u16, b: i32) -> v8u16;
831     #[link_name = "llvm.mips.mini.u.w"]
msa_mini_u_w(a: v4u32, b: i32) -> v4u32832     fn msa_mini_u_w(a: v4u32, b: i32) -> v4u32;
833     #[link_name = "llvm.mips.mini.u.d"]
msa_mini_u_d(a: v2u64, b: i32) -> v2u64834     fn msa_mini_u_d(a: v2u64, b: i32) -> v2u64;
835     #[link_name = "llvm.mips.mod.s.b"]
msa_mod_s_b(a: v16i8, b: v16i8) -> v16i8836     fn msa_mod_s_b(a: v16i8, b: v16i8) -> v16i8;
837     #[link_name = "llvm.mips.mod.s.h"]
msa_mod_s_h(a: v8i16, b: v8i16) -> v8i16838     fn msa_mod_s_h(a: v8i16, b: v8i16) -> v8i16;
839     #[link_name = "llvm.mips.mod.s.w"]
msa_mod_s_w(a: v4i32, b: v4i32) -> v4i32840     fn msa_mod_s_w(a: v4i32, b: v4i32) -> v4i32;
841     #[link_name = "llvm.mips.mod.s.d"]
msa_mod_s_d(a: v2i64, b: v2i64) -> v2i64842     fn msa_mod_s_d(a: v2i64, b: v2i64) -> v2i64;
843     #[link_name = "llvm.mips.mod.u.b"]
msa_mod_u_b(a: v16u8, b: v16u8) -> v16u8844     fn msa_mod_u_b(a: v16u8, b: v16u8) -> v16u8;
845     #[link_name = "llvm.mips.mod.u.h"]
msa_mod_u_h(a: v8u16, b: v8u16) -> v8u16846     fn msa_mod_u_h(a: v8u16, b: v8u16) -> v8u16;
847     #[link_name = "llvm.mips.mod.u.w"]
msa_mod_u_w(a: v4u32, b: v4u32) -> v4u32848     fn msa_mod_u_w(a: v4u32, b: v4u32) -> v4u32;
849     #[link_name = "llvm.mips.mod.u.d"]
msa_mod_u_d(a: v2u64, b: v2u64) -> v2u64850     fn msa_mod_u_d(a: v2u64, b: v2u64) -> v2u64;
851     #[link_name = "llvm.mips.move.v"]
msa_move_v(a: v16i8) -> v16i8852     fn msa_move_v(a: v16i8) -> v16i8;
853     #[link_name = "llvm.mips.msub.q.h"]
msa_msub_q_h(a: v8i16, b: v8i16, c: v8i16) -> v8i16854     fn msa_msub_q_h(a: v8i16, b: v8i16, c: v8i16) -> v8i16;
855     #[link_name = "llvm.mips.msub.q.w"]
msa_msub_q_w(a: v4i32, b: v4i32, c: v4i32) -> v4i32856     fn msa_msub_q_w(a: v4i32, b: v4i32, c: v4i32) -> v4i32;
857     #[link_name = "llvm.mips.msubr.q.h"]
msa_msubr_q_h(a: v8i16, b: v8i16, c: v8i16) -> v8i16858     fn msa_msubr_q_h(a: v8i16, b: v8i16, c: v8i16) -> v8i16;
859     #[link_name = "llvm.mips.msubr.q.w"]
msa_msubr_q_w(a: v4i32, b: v4i32, c: v4i32) -> v4i32860     fn msa_msubr_q_w(a: v4i32, b: v4i32, c: v4i32) -> v4i32;
861     #[link_name = "llvm.mips.msubv.b"]
msa_msubv_b(a: v16i8, b: v16i8, c: v16i8) -> v16i8862     fn msa_msubv_b(a: v16i8, b: v16i8, c: v16i8) -> v16i8;
863     #[link_name = "llvm.mips.msubv.h"]
msa_msubv_h(a: v8i16, b: v8i16, c: v8i16) -> v8i16864     fn msa_msubv_h(a: v8i16, b: v8i16, c: v8i16) -> v8i16;
865     #[link_name = "llvm.mips.msubv.w"]
msa_msubv_w(a: v4i32, b: v4i32, c: v4i32) -> v4i32866     fn msa_msubv_w(a: v4i32, b: v4i32, c: v4i32) -> v4i32;
867     #[link_name = "llvm.mips.msubv.d"]
msa_msubv_d(a: v2i64, b: v2i64, c: v2i64) -> v2i64868     fn msa_msubv_d(a: v2i64, b: v2i64, c: v2i64) -> v2i64;
869     #[link_name = "llvm.mips.mul.q.h"]
msa_mul_q_h(a: v8i16, b: v8i16) -> v8i16870     fn msa_mul_q_h(a: v8i16, b: v8i16) -> v8i16;
871     #[link_name = "llvm.mips.mul.q.w"]
msa_mul_q_w(a: v4i32, b: v4i32) -> v4i32872     fn msa_mul_q_w(a: v4i32, b: v4i32) -> v4i32;
873     #[link_name = "llvm.mips.mulr.q.h"]
msa_mulr_q_h(a: v8i16, b: v8i16) -> v8i16874     fn msa_mulr_q_h(a: v8i16, b: v8i16) -> v8i16;
875     #[link_name = "llvm.mips.mulr.q.w"]
msa_mulr_q_w(a: v4i32, b: v4i32) -> v4i32876     fn msa_mulr_q_w(a: v4i32, b: v4i32) -> v4i32;
877     #[link_name = "llvm.mips.mulv.b"]
msa_mulv_b(a: v16i8, b: v16i8) -> v16i8878     fn msa_mulv_b(a: v16i8, b: v16i8) -> v16i8;
879     #[link_name = "llvm.mips.mulv.h"]
msa_mulv_h(a: v8i16, b: v8i16) -> v8i16880     fn msa_mulv_h(a: v8i16, b: v8i16) -> v8i16;
881     #[link_name = "llvm.mips.mulv.w"]
msa_mulv_w(a: v4i32, b: v4i32) -> v4i32882     fn msa_mulv_w(a: v4i32, b: v4i32) -> v4i32;
883     #[link_name = "llvm.mips.mulv.d"]
msa_mulv_d(a: v2i64, b: v2i64) -> v2i64884     fn msa_mulv_d(a: v2i64, b: v2i64) -> v2i64;
885     #[link_name = "llvm.mips.nloc.b"]
msa_nloc_b(a: v16i8) -> v16i8886     fn msa_nloc_b(a: v16i8) -> v16i8;
887     #[link_name = "llvm.mips.nloc.h"]
msa_nloc_h(a: v8i16) -> v8i16888     fn msa_nloc_h(a: v8i16) -> v8i16;
889     #[link_name = "llvm.mips.nloc.w"]
msa_nloc_w(a: v4i32) -> v4i32890     fn msa_nloc_w(a: v4i32) -> v4i32;
891     #[link_name = "llvm.mips.nloc.d"]
msa_nloc_d(a: v2i64) -> v2i64892     fn msa_nloc_d(a: v2i64) -> v2i64;
893     #[link_name = "llvm.mips.nlzc.b"]
msa_nlzc_b(a: v16i8) -> v16i8894     fn msa_nlzc_b(a: v16i8) -> v16i8;
895     #[link_name = "llvm.mips.nlzc.h"]
msa_nlzc_h(a: v8i16) -> v8i16896     fn msa_nlzc_h(a: v8i16) -> v8i16;
897     #[link_name = "llvm.mips.nlzc.w"]
msa_nlzc_w(a: v4i32) -> v4i32898     fn msa_nlzc_w(a: v4i32) -> v4i32;
899     #[link_name = "llvm.mips.nlzc.d"]
msa_nlzc_d(a: v2i64) -> v2i64900     fn msa_nlzc_d(a: v2i64) -> v2i64;
901     #[link_name = "llvm.mips.nor.v"]
msa_nor_v(a: v16u8, b: v16u8) -> v16u8902     fn msa_nor_v(a: v16u8, b: v16u8) -> v16u8;
903     #[link_name = "llvm.mips.nori.b"]
msa_nori_b(a: v16u8, b: i32) -> v16u8904     fn msa_nori_b(a: v16u8, b: i32) -> v16u8;
905     #[link_name = "llvm.mips.or.v"]
msa_or_v(a: v16u8, b: v16u8) -> v16u8906     fn msa_or_v(a: v16u8, b: v16u8) -> v16u8;
907     #[link_name = "llvm.mips.ori.b"]
msa_ori_b(a: v16u8, b: i32) -> v16u8908     fn msa_ori_b(a: v16u8, b: i32) -> v16u8;
909     #[link_name = "llvm.mips.pckev.b"]
msa_pckev_b(a: v16i8, b: v16i8) -> v16i8910     fn msa_pckev_b(a: v16i8, b: v16i8) -> v16i8;
911     #[link_name = "llvm.mips.pckev.h"]
msa_pckev_h(a: v8i16, b: v8i16) -> v8i16912     fn msa_pckev_h(a: v8i16, b: v8i16) -> v8i16;
913     #[link_name = "llvm.mips.pckev.w"]
msa_pckev_w(a: v4i32, b: v4i32) -> v4i32914     fn msa_pckev_w(a: v4i32, b: v4i32) -> v4i32;
915     #[link_name = "llvm.mips.pckev.d"]
msa_pckev_d(a: v2i64, b: v2i64) -> v2i64916     fn msa_pckev_d(a: v2i64, b: v2i64) -> v2i64;
917     #[link_name = "llvm.mips.pckod.b"]
msa_pckod_b(a: v16i8, b: v16i8) -> v16i8918     fn msa_pckod_b(a: v16i8, b: v16i8) -> v16i8;
919     #[link_name = "llvm.mips.pckod.h"]
msa_pckod_h(a: v8i16, b: v8i16) -> v8i16920     fn msa_pckod_h(a: v8i16, b: v8i16) -> v8i16;
921     #[link_name = "llvm.mips.pckod.w"]
msa_pckod_w(a: v4i32, b: v4i32) -> v4i32922     fn msa_pckod_w(a: v4i32, b: v4i32) -> v4i32;
923     #[link_name = "llvm.mips.pckod.d"]
msa_pckod_d(a: v2i64, b: v2i64) -> v2i64924     fn msa_pckod_d(a: v2i64, b: v2i64) -> v2i64;
925     #[link_name = "llvm.mips.pcnt.b"]
msa_pcnt_b(a: v16i8) -> v16i8926     fn msa_pcnt_b(a: v16i8) -> v16i8;
927     #[link_name = "llvm.mips.pcnt.h"]
msa_pcnt_h(a: v8i16) -> v8i16928     fn msa_pcnt_h(a: v8i16) -> v8i16;
929     #[link_name = "llvm.mips.pcnt.w"]
msa_pcnt_w(a: v4i32) -> v4i32930     fn msa_pcnt_w(a: v4i32) -> v4i32;
931     #[link_name = "llvm.mips.pcnt.d"]
msa_pcnt_d(a: v2i64) -> v2i64932     fn msa_pcnt_d(a: v2i64) -> v2i64;
933     #[link_name = "llvm.mips.sat.s.b"]
msa_sat_s_b(a: v16i8, b: i32) -> v16i8934     fn msa_sat_s_b(a: v16i8, b: i32) -> v16i8;
935     #[link_name = "llvm.mips.sat.s.h"]
msa_sat_s_h(a: v8i16, b: i32) -> v8i16936     fn msa_sat_s_h(a: v8i16, b: i32) -> v8i16;
937     #[link_name = "llvm.mips.sat.s.w"]
msa_sat_s_w(a: v4i32, b: i32) -> v4i32938     fn msa_sat_s_w(a: v4i32, b: i32) -> v4i32;
939     #[link_name = "llvm.mips.sat.s.d"]
msa_sat_s_d(a: v2i64, b: i32) -> v2i64940     fn msa_sat_s_d(a: v2i64, b: i32) -> v2i64;
941     #[link_name = "llvm.mips.sat.u.b"]
msa_sat_u_b(a: v16u8, b: i32) -> v16u8942     fn msa_sat_u_b(a: v16u8, b: i32) -> v16u8;
943     #[link_name = "llvm.mips.sat.u.h"]
msa_sat_u_h(a: v8u16, b: i32) -> v8u16944     fn msa_sat_u_h(a: v8u16, b: i32) -> v8u16;
945     #[link_name = "llvm.mips.sat.u.w"]
msa_sat_u_w(a: v4u32, b: i32) -> v4u32946     fn msa_sat_u_w(a: v4u32, b: i32) -> v4u32;
947     #[link_name = "llvm.mips.sat.u.d"]
msa_sat_u_d(a: v2u64, b: i32) -> v2u64948     fn msa_sat_u_d(a: v2u64, b: i32) -> v2u64;
949     #[link_name = "llvm.mips.shf.b"]
msa_shf_b(a: v16i8, b: i32) -> v16i8950     fn msa_shf_b(a: v16i8, b: i32) -> v16i8;
951     #[link_name = "llvm.mips.shf.h"]
msa_shf_h(a: v8i16, b: i32) -> v8i16952     fn msa_shf_h(a: v8i16, b: i32) -> v8i16;
953     #[link_name = "llvm.mips.shf.w"]
msa_shf_w(a: v4i32, b: i32) -> v4i32954     fn msa_shf_w(a: v4i32, b: i32) -> v4i32;
955     #[link_name = "llvm.mips.sld.b"]
msa_sld_b(a: v16i8, b: v16i8, c: i32) -> v16i8956     fn msa_sld_b(a: v16i8, b: v16i8, c: i32) -> v16i8;
957     #[link_name = "llvm.mips.sld.h"]
msa_sld_h(a: v8i16, b: v8i16, c: i32) -> v8i16958     fn msa_sld_h(a: v8i16, b: v8i16, c: i32) -> v8i16;
959     #[link_name = "llvm.mips.sld.w"]
msa_sld_w(a: v4i32, b: v4i32, c: i32) -> v4i32960     fn msa_sld_w(a: v4i32, b: v4i32, c: i32) -> v4i32;
961     #[link_name = "llvm.mips.sld.d"]
msa_sld_d(a: v2i64, b: v2i64, c: i32) -> v2i64962     fn msa_sld_d(a: v2i64, b: v2i64, c: i32) -> v2i64;
963     #[link_name = "llvm.mips.sldi.b"]
msa_sldi_b(a: v16i8, b: v16i8, c: i32) -> v16i8964     fn msa_sldi_b(a: v16i8, b: v16i8, c: i32) -> v16i8;
965     #[link_name = "llvm.mips.sldi.h"]
msa_sldi_h(a: v8i16, b: v8i16, c: i32) -> v8i16966     fn msa_sldi_h(a: v8i16, b: v8i16, c: i32) -> v8i16;
967     #[link_name = "llvm.mips.sldi.w"]
msa_sldi_w(a: v4i32, b: v4i32, c: i32) -> v4i32968     fn msa_sldi_w(a: v4i32, b: v4i32, c: i32) -> v4i32;
969     #[link_name = "llvm.mips.sldi.d"]
msa_sldi_d(a: v2i64, b: v2i64, c: i32) -> v2i64970     fn msa_sldi_d(a: v2i64, b: v2i64, c: i32) -> v2i64;
971     #[link_name = "llvm.mips.sll.b"]
msa_sll_b(a: v16i8, b: v16i8) -> v16i8972     fn msa_sll_b(a: v16i8, b: v16i8) -> v16i8;
973     #[link_name = "llvm.mips.sll.h"]
msa_sll_h(a: v8i16, b: v8i16) -> v8i16974     fn msa_sll_h(a: v8i16, b: v8i16) -> v8i16;
975     #[link_name = "llvm.mips.sll.w"]
msa_sll_w(a: v4i32, b: v4i32) -> v4i32976     fn msa_sll_w(a: v4i32, b: v4i32) -> v4i32;
977     #[link_name = "llvm.mips.sll.d"]
msa_sll_d(a: v2i64, b: v2i64) -> v2i64978     fn msa_sll_d(a: v2i64, b: v2i64) -> v2i64;
979     #[link_name = "llvm.mips.slli.b"]
msa_slli_b(a: v16i8, b: i32) -> v16i8980     fn msa_slli_b(a: v16i8, b: i32) -> v16i8;
981     #[link_name = "llvm.mips.slli.h"]
msa_slli_h(a: v8i16, b: i32) -> v8i16982     fn msa_slli_h(a: v8i16, b: i32) -> v8i16;
983     #[link_name = "llvm.mips.slli.w"]
msa_slli_w(a: v4i32, b: i32) -> v4i32984     fn msa_slli_w(a: v4i32, b: i32) -> v4i32;
985     #[link_name = "llvm.mips.slli.d"]
msa_slli_d(a: v2i64, b: i32) -> v2i64986     fn msa_slli_d(a: v2i64, b: i32) -> v2i64;
987     #[link_name = "llvm.mips.splat.b"]
msa_splat_b(a: v16i8, c: i32) -> v16i8988     fn msa_splat_b(a: v16i8, c: i32) -> v16i8;
989     #[link_name = "llvm.mips.splat.h"]
msa_splat_h(a: v8i16, c: i32) -> v8i16990     fn msa_splat_h(a: v8i16, c: i32) -> v8i16;
991     #[link_name = "llvm.mips.splat.w"]
msa_splat_w(a: v4i32, w: i32) -> v4i32992     fn msa_splat_w(a: v4i32, w: i32) -> v4i32;
993     #[link_name = "llvm.mips.splat.d"]
msa_splat_d(a: v2i64, c: i32) -> v2i64994     fn msa_splat_d(a: v2i64, c: i32) -> v2i64;
995     #[link_name = "llvm.mips.splati.b"]
msa_splati_b(a: v16i8, b: i32) -> v16i8996     fn msa_splati_b(a: v16i8, b: i32) -> v16i8;
997     #[link_name = "llvm.mips.splati.h"]
msa_splati_h(a: v8i16, b: i32) -> v8i16998     fn msa_splati_h(a: v8i16, b: i32) -> v8i16;
999     #[link_name = "llvm.mips.splati.w"]
msa_splati_w(a: v4i32, b: i32) -> v4i321000     fn msa_splati_w(a: v4i32, b: i32) -> v4i32;
1001     #[link_name = "llvm.mips.splati.d"]
msa_splati_d(a: v2i64, b: i32) -> v2i641002     fn msa_splati_d(a: v2i64, b: i32) -> v2i64;
1003     #[link_name = "llvm.mips.sra.b"]
msa_sra_b(a: v16i8, b: v16i8) -> v16i81004     fn msa_sra_b(a: v16i8, b: v16i8) -> v16i8;
1005     #[link_name = "llvm.mips.sra.h"]
msa_sra_h(a: v8i16, b: v8i16) -> v8i161006     fn msa_sra_h(a: v8i16, b: v8i16) -> v8i16;
1007     #[link_name = "llvm.mips.sra.w"]
msa_sra_w(a: v4i32, b: v4i32) -> v4i321008     fn msa_sra_w(a: v4i32, b: v4i32) -> v4i32;
1009     #[link_name = "llvm.mips.sra.d"]
msa_sra_d(a: v2i64, b: v2i64) -> v2i641010     fn msa_sra_d(a: v2i64, b: v2i64) -> v2i64;
1011     #[link_name = "llvm.mips.srai.b"]
msa_srai_b(a: v16i8, b: i32) -> v16i81012     fn msa_srai_b(a: v16i8, b: i32) -> v16i8;
1013     #[link_name = "llvm.mips.srai.h"]
msa_srai_h(a: v8i16, b: i32) -> v8i161014     fn msa_srai_h(a: v8i16, b: i32) -> v8i16;
1015     #[link_name = "llvm.mips.srai.w"]
msa_srai_w(a: v4i32, b: i32) -> v4i321016     fn msa_srai_w(a: v4i32, b: i32) -> v4i32;
1017     #[link_name = "llvm.mips.srai.d"]
msa_srai_d(a: v2i64, b: i32) -> v2i641018     fn msa_srai_d(a: v2i64, b: i32) -> v2i64;
1019     #[link_name = "llvm.mips.srar.b"]
msa_srar_b(a: v16i8, b: v16i8) -> v16i81020     fn msa_srar_b(a: v16i8, b: v16i8) -> v16i8;
1021     #[link_name = "llvm.mips.srar.h"]
msa_srar_h(a: v8i16, b: v8i16) -> v8i161022     fn msa_srar_h(a: v8i16, b: v8i16) -> v8i16;
1023     #[link_name = "llvm.mips.srar.w"]
msa_srar_w(a: v4i32, b: v4i32) -> v4i321024     fn msa_srar_w(a: v4i32, b: v4i32) -> v4i32;
1025     #[link_name = "llvm.mips.srar.d"]
msa_srar_d(a: v2i64, b: v2i64) -> v2i641026     fn msa_srar_d(a: v2i64, b: v2i64) -> v2i64;
1027     #[link_name = "llvm.mips.srari.b"]
msa_srari_b(a: v16i8, b: i32) -> v16i81028     fn msa_srari_b(a: v16i8, b: i32) -> v16i8;
1029     #[link_name = "llvm.mips.srari.h"]
msa_srari_h(a: v8i16, b: i32) -> v8i161030     fn msa_srari_h(a: v8i16, b: i32) -> v8i16;
1031     #[link_name = "llvm.mips.srari.w"]
msa_srari_w(a: v4i32, b: i32) -> v4i321032     fn msa_srari_w(a: v4i32, b: i32) -> v4i32;
1033     #[link_name = "llvm.mips.srari.d"]
msa_srari_d(a: v2i64, b: i32) -> v2i641034     fn msa_srari_d(a: v2i64, b: i32) -> v2i64;
1035     #[link_name = "llvm.mips.srl.b"]
msa_srl_b(a: v16i8, b: v16i8) -> v16i81036     fn msa_srl_b(a: v16i8, b: v16i8) -> v16i8;
1037     #[link_name = "llvm.mips.srl.h"]
msa_srl_h(a: v8i16, b: v8i16) -> v8i161038     fn msa_srl_h(a: v8i16, b: v8i16) -> v8i16;
1039     #[link_name = "llvm.mips.srl.w"]
msa_srl_w(a: v4i32, b: v4i32) -> v4i321040     fn msa_srl_w(a: v4i32, b: v4i32) -> v4i32;
1041     #[link_name = "llvm.mips.srl.d"]
msa_srl_d(a: v2i64, b: v2i64) -> v2i641042     fn msa_srl_d(a: v2i64, b: v2i64) -> v2i64;
1043     #[link_name = "llvm.mips.srli.b"]
msa_srli_b(a: v16i8, b: i32) -> v16i81044     fn msa_srli_b(a: v16i8, b: i32) -> v16i8;
1045     #[link_name = "llvm.mips.srli.h"]
msa_srli_h(a: v8i16, b: i32) -> v8i161046     fn msa_srli_h(a: v8i16, b: i32) -> v8i16;
1047     #[link_name = "llvm.mips.srli.w"]
msa_srli_w(a: v4i32, b: i32) -> v4i321048     fn msa_srli_w(a: v4i32, b: i32) -> v4i32;
1049     #[link_name = "llvm.mips.srli.d"]
msa_srli_d(a: v2i64, b: i32) -> v2i641050     fn msa_srli_d(a: v2i64, b: i32) -> v2i64;
1051     #[link_name = "llvm.mips.srlr.b"]
msa_srlr_b(a: v16i8, b: v16i8) -> v16i81052     fn msa_srlr_b(a: v16i8, b: v16i8) -> v16i8;
1053     #[link_name = "llvm.mips.srlr.h"]
msa_srlr_h(a: v8i16, b: v8i16) -> v8i161054     fn msa_srlr_h(a: v8i16, b: v8i16) -> v8i16;
1055     #[link_name = "llvm.mips.srlr.w"]
msa_srlr_w(a: v4i32, b: v4i32) -> v4i321056     fn msa_srlr_w(a: v4i32, b: v4i32) -> v4i32;
1057     #[link_name = "llvm.mips.srlr.d"]
msa_srlr_d(a: v2i64, b: v2i64) -> v2i641058     fn msa_srlr_d(a: v2i64, b: v2i64) -> v2i64;
1059     #[link_name = "llvm.mips.srlri.b"]
msa_srlri_b(a: v16i8, b: i32) -> v16i81060     fn msa_srlri_b(a: v16i8, b: i32) -> v16i8;
1061     #[link_name = "llvm.mips.srlri.h"]
msa_srlri_h(a: v8i16, b: i32) -> v8i161062     fn msa_srlri_h(a: v8i16, b: i32) -> v8i16;
1063     #[link_name = "llvm.mips.srlri.w"]
msa_srlri_w(a: v4i32, b: i32) -> v4i321064     fn msa_srlri_w(a: v4i32, b: i32) -> v4i32;
1065     #[link_name = "llvm.mips.srlri.d"]
msa_srlri_d(a: v2i64, b: i32) -> v2i641066     fn msa_srlri_d(a: v2i64, b: i32) -> v2i64;
1067     #[link_name = "llvm.mips.st.b"]
msa_st_b(a: v16i8, mem_addr: *mut u8, imm_s10: i32) -> ()1068     fn msa_st_b(a: v16i8, mem_addr: *mut u8, imm_s10: i32) -> ();
1069     #[link_name = "llvm.mips.st.h"]
msa_st_h(a: v8i16, mem_addr: *mut u8, imm_s11: i32) -> ()1070     fn msa_st_h(a: v8i16, mem_addr: *mut u8, imm_s11: i32) -> ();
1071     #[link_name = "llvm.mips.st.w"]
msa_st_w(a: v4i32, mem_addr: *mut u8, imm_s12: i32) -> ()1072     fn msa_st_w(a: v4i32, mem_addr: *mut u8, imm_s12: i32) -> ();
1073     #[link_name = "llvm.mips.st.d"]
msa_st_d(a: v2i64, mem_addr: *mut u8, imm_s13: i32) -> ()1074     fn msa_st_d(a: v2i64, mem_addr: *mut u8, imm_s13: i32) -> ();
1075     #[link_name = "llvm.mips.subs.s.b"]
msa_subs_s_b(a: v16i8, b: v16i8) -> v16i81076     fn msa_subs_s_b(a: v16i8, b: v16i8) -> v16i8;
1077     #[link_name = "llvm.mips.subs.s.h"]
msa_subs_s_h(a: v8i16, b: v8i16) -> v8i161078     fn msa_subs_s_h(a: v8i16, b: v8i16) -> v8i16;
1079     #[link_name = "llvm.mips.subs.s.w"]
msa_subs_s_w(a: v4i32, b: v4i32) -> v4i321080     fn msa_subs_s_w(a: v4i32, b: v4i32) -> v4i32;
1081     #[link_name = "llvm.mips.subs.s.d"]
msa_subs_s_d(a: v2i64, b: v2i64) -> v2i641082     fn msa_subs_s_d(a: v2i64, b: v2i64) -> v2i64;
1083     #[link_name = "llvm.mips.subs.u.b"]
msa_subs_u_b(a: v16u8, b: v16u8) -> v16u81084     fn msa_subs_u_b(a: v16u8, b: v16u8) -> v16u8;
1085     #[link_name = "llvm.mips.subs.u.h"]
msa_subs_u_h(a: v8u16, b: v8u16) -> v8u161086     fn msa_subs_u_h(a: v8u16, b: v8u16) -> v8u16;
1087     #[link_name = "llvm.mips.subs.u.w"]
msa_subs_u_w(a: v4u32, b: v4u32) -> v4u321088     fn msa_subs_u_w(a: v4u32, b: v4u32) -> v4u32;
1089     #[link_name = "llvm.mips.subs.u.d"]
msa_subs_u_d(a: v2u64, b: v2u64) -> v2u641090     fn msa_subs_u_d(a: v2u64, b: v2u64) -> v2u64;
1091     #[link_name = "llvm.mips.subsus.u.b"]
msa_subsus_u_b(a: v16u8, b: v16i8) -> v16u81092     fn msa_subsus_u_b(a: v16u8, b: v16i8) -> v16u8;
1093     #[link_name = "llvm.mips.subsus.u.h"]
msa_subsus_u_h(a: v8u16, b: v8i16) -> v8u161094     fn msa_subsus_u_h(a: v8u16, b: v8i16) -> v8u16;
1095     #[link_name = "llvm.mips.subsus.u.w"]
msa_subsus_u_w(a: v4u32, b: v4i32) -> v4u321096     fn msa_subsus_u_w(a: v4u32, b: v4i32) -> v4u32;
1097     #[link_name = "llvm.mips.subsus.u.d"]
msa_subsus_u_d(a: v2u64, b: v2i64) -> v2u641098     fn msa_subsus_u_d(a: v2u64, b: v2i64) -> v2u64;
1099     #[link_name = "llvm.mips.subsuu.s.b"]
msa_subsuu_s_b(a: v16u8, b: v16u8) -> v16i81100     fn msa_subsuu_s_b(a: v16u8, b: v16u8) -> v16i8;
1101     #[link_name = "llvm.mips.subsuu.s.h"]
msa_subsuu_s_h(a: v8u16, b: v8u16) -> v8i161102     fn msa_subsuu_s_h(a: v8u16, b: v8u16) -> v8i16;
1103     #[link_name = "llvm.mips.subsuu.s.w"]
msa_subsuu_s_w(a: v4u32, b: v4u32) -> v4i321104     fn msa_subsuu_s_w(a: v4u32, b: v4u32) -> v4i32;
1105     #[link_name = "llvm.mips.subsuu.s.d"]
msa_subsuu_s_d(a: v2u64, b: v2u64) -> v2i641106     fn msa_subsuu_s_d(a: v2u64, b: v2u64) -> v2i64;
1107     #[link_name = "llvm.mips.subv.b"]
msa_subv_b(a: v16i8, b: v16i8) -> v16i81108     fn msa_subv_b(a: v16i8, b: v16i8) -> v16i8;
1109     #[link_name = "llvm.mips.subv.h"]
msa_subv_h(a: v8i16, b: v8i16) -> v8i161110     fn msa_subv_h(a: v8i16, b: v8i16) -> v8i16;
1111     #[link_name = "llvm.mips.subv.w"]
msa_subv_w(a: v4i32, b: v4i32) -> v4i321112     fn msa_subv_w(a: v4i32, b: v4i32) -> v4i32;
1113     #[link_name = "llvm.mips.subv.d"]
msa_subv_d(a: v2i64, b: v2i64) -> v2i641114     fn msa_subv_d(a: v2i64, b: v2i64) -> v2i64;
1115     #[link_name = "llvm.mips.subvi.b"]
msa_subvi_b(a: v16i8, b: i32) -> v16i81116     fn msa_subvi_b(a: v16i8, b: i32) -> v16i8;
1117     #[link_name = "llvm.mips.subvi.h"]
msa_subvi_h(a: v8i16, b: i32) -> v8i161118     fn msa_subvi_h(a: v8i16, b: i32) -> v8i16;
1119     #[link_name = "llvm.mips.subvi.w"]
msa_subvi_w(a: v4i32, b: i32) -> v4i321120     fn msa_subvi_w(a: v4i32, b: i32) -> v4i32;
1121     #[link_name = "llvm.mips.subvi.d"]
msa_subvi_d(a: v2i64, b: i32) -> v2i641122     fn msa_subvi_d(a: v2i64, b: i32) -> v2i64;
1123     #[link_name = "llvm.mips.vshf.b"]
msa_vshf_b(a: v16i8, b: v16i8, c: v16i8) -> v16i81124     fn msa_vshf_b(a: v16i8, b: v16i8, c: v16i8) -> v16i8;
1125     #[link_name = "llvm.mips.vshf.h"]
msa_vshf_h(a: v8i16, b: v8i16, c: v8i16) -> v8i161126     fn msa_vshf_h(a: v8i16, b: v8i16, c: v8i16) -> v8i16;
1127     #[link_name = "llvm.mips.vshf.w"]
msa_vshf_w(a: v4i32, b: v4i32, c: v4i32) -> v4i321128     fn msa_vshf_w(a: v4i32, b: v4i32, c: v4i32) -> v4i32;
1129     #[link_name = "llvm.mips.vshf.d"]
msa_vshf_d(a: v2i64, b: v2i64, c: v2i64) -> v2i641130     fn msa_vshf_d(a: v2i64, b: v2i64, c: v2i64) -> v2i64;
1131     #[link_name = "llvm.mips.xor.v"]
msa_xor_v(a: v16u8, b: v16u8) -> v16u81132     fn msa_xor_v(a: v16u8, b: v16u8) -> v16u8;
1133     #[link_name = "llvm.mips.xori.b"]
msa_xori_b(a: v16u8, b: i32) -> v16u81134     fn msa_xori_b(a: v16u8, b: i32) -> v16u8;
1135 }
1136 
1137 /// Vector Add Absolute Values.
1138 ///
1139 /// The absolute values of the elements in vector in `a` (sixteen signed 8-bit integer numbers)
1140 /// are added to the absolute values of the elements in vector `b` (sixteen signed 8-bit integer numbers).
1141 /// The result is written to vector (sixteen signed 8-bit integer numbers).
1142 ///
1143 #[inline]
1144 #[target_feature(enable = "msa")]
1145 #[cfg_attr(test, assert_instr(add_a.b))]
__msa_add_a_b(a: v16i8, b: v16i8) -> v16i81146 pub unsafe fn __msa_add_a_b(a: v16i8, b: v16i8) -> v16i8 {
1147     msa_add_a_b(a, mem::transmute(b))
1148 }
1149 
1150 /// Vector Add Absolute Values
1151 ///
1152 /// The absolute values of the elements in vector in `a` (eight signed 16-bit integer numbers)
1153 /// are added to the absolute values of the elements in vector `b` (eight signed 16-bit integer numbers).
1154 /// The result is written to vector (eight signed 16-bit integer numbers).
1155 ///
1156 #[inline]
1157 #[target_feature(enable = "msa")]
1158 #[cfg_attr(test, assert_instr(add_a.h))]
__msa_add_a_h(a: v8i16, b: v8i16) -> v8i161159 pub unsafe fn __msa_add_a_h(a: v8i16, b: v8i16) -> v8i16 {
1160     msa_add_a_h(a, mem::transmute(b))
1161 }
1162 
1163 /// Vector Add Absolute Values
1164 ///
1165 /// The absolute values of the elements in vector in `a` (four signed 32-bit integer numbers)
1166 /// are added to the absolute values of the elements in vector `b` (four signed 32-bit integer numbers).
1167 /// The result is written to vector (four signed 32-bit integer numbers).
1168 ///
1169 #[inline]
1170 #[target_feature(enable = "msa")]
1171 #[cfg_attr(test, assert_instr(add_a.w))]
__msa_add_a_w(a: v4i32, b: v4i32) -> v4i321172 pub unsafe fn __msa_add_a_w(a: v4i32, b: v4i32) -> v4i32 {
1173     msa_add_a_w(a, mem::transmute(b))
1174 }
1175 
1176 /// Vector Add Absolute Values
1177 ///
1178 /// The absolute values of the elements in vector in `a` (two signed 64-bit integer numbers)
1179 /// are added to the absolute values of the elements in vector `b` (two signed 64-bit integer numbers).
1180 /// The result is written to vector (two signed 64-bit integer numbers).
1181 ///
1182 #[inline]
1183 #[target_feature(enable = "msa")]
1184 #[cfg_attr(test, assert_instr(add_a.d))]
__msa_add_a_d(a: v2i64, b: v2i64) -> v2i641185 pub unsafe fn __msa_add_a_d(a: v2i64, b: v2i64) -> v2i64 {
1186     msa_add_a_d(a, mem::transmute(b))
1187 }
1188 
1189 /// Signed Saturated Vector Saturated Add of Absolute Values
1190 ///
1191 /// The absolute values of the elements in vector in `a` (sixteen signed 8-bit integer numbers)
1192 /// are added to the absolute values of the elements in vector `b` (sixteen signed 8-bit integer numbers).
1193 /// The saturated signed result is written to vector (sixteen signed 8-bit integer numbers).
1194 ///
1195 #[inline]
1196 #[target_feature(enable = "msa")]
1197 #[cfg_attr(test, assert_instr(adds_a.b))]
__msa_adds_a_b(a: v16i8, b: v16i8) -> v16i81198 pub unsafe fn __msa_adds_a_b(a: v16i8, b: v16i8) -> v16i8 {
1199     msa_adds_a_b(a, mem::transmute(b))
1200 }
1201 
1202 /// Vector Saturated Add of Absolute Values
1203 ///
1204 /// The absolute values of the elements in vector in `a` (eight signed 16-bit integer numbers)
1205 /// are added to the absolute values of the elements in vector `b` (eight signed 16-bit integer numbers).
1206 /// The saturated signed result is written to vector (eight signed 16-bit integer numbers).
1207 ///
1208 #[inline]
1209 #[target_feature(enable = "msa")]
1210 #[cfg_attr(test, assert_instr(adds_a.h))]
__msa_adds_a_h(a: v8i16, b: v8i16) -> v8i161211 pub unsafe fn __msa_adds_a_h(a: v8i16, b: v8i16) -> v8i16 {
1212     msa_adds_a_h(a, mem::transmute(b))
1213 }
1214 
1215 /// Vector Saturated Add of Absolute Values
1216 ///
1217 /// The absolute values of the elements in vector in `a` (four signed 32-bit integer numbers)
1218 /// are added to the absolute values of the elements in vector `b` (four signed 32-bit integer numbers).
1219 /// The saturated signed result is written to vector (four signed 32-bit integer numbers).
1220 ///
1221 #[inline]
1222 #[target_feature(enable = "msa")]
1223 #[cfg_attr(test, assert_instr(adds_a.w))]
__msa_adds_a_w(a: v4i32, b: v4i32) -> v4i321224 pub unsafe fn __msa_adds_a_w(a: v4i32, b: v4i32) -> v4i32 {
1225     msa_adds_a_w(a, mem::transmute(b))
1226 }
1227 
1228 /// Vector Saturated Add of Absolute Values
1229 ///
1230 /// The absolute values of the elements in vector in `a` (two signed 64-bit integer numbers)
1231 /// are added to the absolute values of the elements in vector `b` (two signed 64-bit integer numbers).
1232 /// The saturated signed result is written to vector (two signed 64-bit integer numbers).
1233 ///
1234 #[inline]
1235 #[target_feature(enable = "msa")]
1236 #[cfg_attr(test, assert_instr(adds_a.d))]
__msa_adds_a_d(a: v2i64, b: v2i64) -> v2i641237 pub unsafe fn __msa_adds_a_d(a: v2i64, b: v2i64) -> v2i64 {
1238     msa_adds_a_d(a, mem::transmute(b))
1239 }
1240 
1241 /// Vector Signed Saturated Add of Signed Values
1242 ///
1243 /// The elements in vector in `a` (sixteen signed 8-bit integer numbers)
1244 /// are added to the elements in vector `b` (sixteen signed 8-bit integer numbers).
1245 /// Signed arithmetic is performed and overflows clamp to the largest and/or smallest
1246 /// representable signed values before writing the result to vector (sixteen signed 8-bit integer numbers).
1247 ///
1248 #[inline]
1249 #[target_feature(enable = "msa")]
1250 #[cfg_attr(test, assert_instr(adds_s.b))]
__msa_adds_s_b(a: v16i8, b: v16i8) -> v16i81251 pub unsafe fn __msa_adds_s_b(a: v16i8, b: v16i8) -> v16i8 {
1252     msa_adds_s_b(a, mem::transmute(b))
1253 }
1254 
1255 /// Vector Signed Saturated Add of Signed Values
1256 ///
1257 /// The elements in vector in `a` (eight signed 16-bit integer numbers)
1258 /// are added to the elements in vector `b` (eight signed 16-bit integer numbers).
1259 /// Signed arithmetic is performed and overflows clamp to the largest and/or smallest
1260 /// representable signed values before writing the result to vector (eight signed 16-bit integer numbers).
1261 ///
1262 #[inline]
1263 #[target_feature(enable = "msa")]
1264 #[cfg_attr(test, assert_instr(adds_s.h))]
__msa_adds_s_h(a: v8i16, b: v8i16) -> v8i161265 pub unsafe fn __msa_adds_s_h(a: v8i16, b: v8i16) -> v8i16 {
1266     msa_adds_s_h(a, mem::transmute(b))
1267 }
1268 
1269 /// Vector Signed Saturated Add of Signed Values
1270 ///
1271 /// The elements in vector in `a` (four signed 32-bit integer numbers)
1272 /// are added to the elements in vector `b` (four signed 32-bit integer numbers).
1273 /// Signed arithmetic is performed and overflows clamp to the largest and/or smallest
1274 /// representable signed values before writing the result to vector (four signed 32-bit integer numbers).
1275 ///
1276 #[inline]
1277 #[target_feature(enable = "msa")]
1278 #[cfg_attr(test, assert_instr(adds_s.w))]
__msa_adds_s_w(a: v4i32, b: v4i32) -> v4i321279 pub unsafe fn __msa_adds_s_w(a: v4i32, b: v4i32) -> v4i32 {
1280     msa_adds_s_w(a, mem::transmute(b))
1281 }
1282 
1283 /// Vector Signed Saturated Add of Signed Values
1284 ///
1285 /// The elements in vector in `a` (two signed 64-bit integer numbers)
1286 /// are added to the elements in vector `b` (two signed 64-bit integer numbers).
1287 /// Signed arithmetic is performed and overflows clamp to the largest and/or smallest
1288 /// representable signed values before writing the result to vector (two signed 64-bit integer numbers).
1289 ///
1290 #[inline]
1291 #[target_feature(enable = "msa")]
1292 #[cfg_attr(test, assert_instr(adds_s.d))]
__msa_adds_s_d(a: v2i64, b: v2i64) -> v2i641293 pub unsafe fn __msa_adds_s_d(a: v2i64, b: v2i64) -> v2i64 {
1294     msa_adds_s_d(a, mem::transmute(b))
1295 }
1296 
1297 /// Vector Unsigned Saturated Add of Unsigned Values
1298 ///
1299 /// The elements in vector in `a` (sixteen unsigned 8-bit integer numbers)
1300 /// are added to the elements in vector `b` (sixteen unsigned 8-bit integer numbers).
1301 /// Signed arithmetic is performed and overflows clamp to the largest and/or smallest
1302 /// representable signed values before writing the result to vector (sixteen unsigned 8-bit integer numbers).
1303 ///
1304 #[inline]
1305 #[target_feature(enable = "msa")]
1306 #[cfg_attr(test, assert_instr(adds_u.b))]
__msa_adds_u_b(a: v16u8, b: v16u8) -> v16u81307 pub unsafe fn __msa_adds_u_b(a: v16u8, b: v16u8) -> v16u8 {
1308     msa_adds_u_b(a, mem::transmute(b))
1309 }
1310 
1311 /// Vector Unsigned Saturated Add of Unsigned Values
1312 ///
1313 /// The elements in vector in `a` (eight unsigned 16-bit integer numbers)
1314 /// are added to the elements in vector `b` (eight unsigned 16-bit integer numbers).
1315 /// Signed arithmetic is performed and overflows clamp to the largest and/or smallest
1316 /// representable signed values before writing the result to vector (eight unsigned 16-bit integer numbers).
1317 ///
1318 #[inline]
1319 #[target_feature(enable = "msa")]
1320 #[cfg_attr(test, assert_instr(adds_u.h))]
__msa_adds_u_h(a: v8u16, b: v8u16) -> v8u161321 pub unsafe fn __msa_adds_u_h(a: v8u16, b: v8u16) -> v8u16 {
1322     msa_adds_u_h(a, mem::transmute(b))
1323 }
1324 
1325 /// Vector Unsigned Saturated Add of Unsigned Values
1326 ///
1327 /// The elements in vector in `a` (four unsigned 32-bit integer numbers)
1328 /// are added to the elements in vector `b` (four unsigned 32-bit integer numbers).
1329 /// Signed arithmetic is performed and overflows clamp to the largest and/or smallest
1330 /// representable signed values before writing the result to vector (four unsigned 32-bit integer numbers).
1331 ///
1332 #[inline]
1333 #[target_feature(enable = "msa")]
1334 #[cfg_attr(test, assert_instr(adds_u.w))]
__msa_adds_u_w(a: v4u32, b: v4u32) -> v4u321335 pub unsafe fn __msa_adds_u_w(a: v4u32, b: v4u32) -> v4u32 {
1336     msa_adds_u_w(a, mem::transmute(b))
1337 }
1338 
1339 /// Vector Unsigned Saturated Add of Unsigned Values
1340 ///
1341 /// The elements in vector in `a` (two unsigned 64-bit integer numbers)
1342 /// are added to the elements in vector `b` (two unsigned 64-bit integer numbers).
1343 /// Signed arithmetic is performed and overflows clamp to the largest and/or smallest
1344 /// representable signed values before writing the result to vector (two unsigned 64-bit integer numbers).
1345 ///
1346 #[inline]
1347 #[target_feature(enable = "msa")]
1348 #[cfg_attr(test, assert_instr(adds_u.d))]
__msa_adds_u_d(a: v2u64, b: v2u64) -> v2u641349 pub unsafe fn __msa_adds_u_d(a: v2u64, b: v2u64) -> v2u64 {
1350     msa_adds_u_d(a, mem::transmute(b))
1351 }
1352 
1353 /// Vector Add
1354 ///
1355 /// The elements in vector in `a` (sixteen signed 8-bit integer numbers)
1356 /// are added to the elements in vector `b` (sixteen signed 8-bit integer numbers).
1357 /// The result is written to vector (sixteen signed 8-bit integer numbers).
1358 ///
1359 #[inline]
1360 #[target_feature(enable = "msa")]
1361 #[cfg_attr(test, assert_instr(addv.b))]
__msa_addv_b(a: v16i8, b: v16i8) -> v16i81362 pub unsafe fn __msa_addv_b(a: v16i8, b: v16i8) -> v16i8 {
1363     msa_addv_b(a, mem::transmute(b))
1364 }
1365 
1366 /// Vector Add
1367 ///
1368 /// The elements in vector in `a` (eight signed 16-bit integer numbers)
1369 /// are added to the elements in vector `b` (eight signed 16-bit integer numbers).
1370 /// The result is written to vector (eight signed 16-bit integer numbers).
1371 ///
1372 #[inline]
1373 #[target_feature(enable = "msa")]
1374 #[cfg_attr(test, assert_instr(addv.h))]
__msa_addv_h(a: v8i16, b: v8i16) -> v8i161375 pub unsafe fn __msa_addv_h(a: v8i16, b: v8i16) -> v8i16 {
1376     msa_addv_h(a, mem::transmute(b))
1377 }
1378 
1379 /// Vector Add
1380 ///
1381 /// The elements in vector in `a` (four signed 32-bit integer numbers)
1382 /// are added to the elements in vector `b` (four signed 32-bit integer numbers).
1383 /// The result is written to vector (four signed 32-bit integer numbers).
1384 ///
1385 #[inline]
1386 #[target_feature(enable = "msa")]
1387 #[cfg_attr(test, assert_instr(addv.w))]
__msa_addv_w(a: v4i32, b: v4i32) -> v4i321388 pub unsafe fn __msa_addv_w(a: v4i32, b: v4i32) -> v4i32 {
1389     msa_addv_w(a, mem::transmute(b))
1390 }
1391 
1392 /// Vector Add
1393 ///
1394 /// The elements in vector in `a` (two signed 64-bit integer numbers)
1395 /// are added to the elements in vector `b` (two signed 64-bit integer numbers).
1396 /// The result is written to vector (two signed 64-bit integer numbers).
1397 ///
1398 #[inline]
1399 #[target_feature(enable = "msa")]
1400 #[cfg_attr(test, assert_instr(addv.d))]
__msa_addv_d(a: v2i64, b: v2i64) -> v2i641401 pub unsafe fn __msa_addv_d(a: v2i64, b: v2i64) -> v2i64 {
1402     msa_addv_d(a, mem::transmute(b))
1403 }
1404 
1405 /// Immediate Add
1406 ///
1407 /// The 5-bit immediate unsigned value `imm5` is added to the elements
1408 /// vector in `a` (sixteen signed 8-bit integer numbers).
1409 /// The result is written to vector (sixteen signed 8-bit integer numbers).
1410 ///
1411 #[inline]
1412 #[target_feature(enable = "msa")]
1413 #[cfg_attr(test, assert_instr(addvi.b, imm5 = 0b10111))]
1414 #[rustc_legacy_const_generics(1)]
__msa_addvi_b<const IMM5: i32>(a: v16i8) -> v16i81415 pub unsafe fn __msa_addvi_b<const IMM5: i32>(a: v16i8) -> v16i8 {
1416     static_assert_imm5!(IMM5);
1417     msa_addvi_b(a, IMM5)
1418 }
1419 
1420 /// Immediate Add
1421 ///
1422 /// The 5-bit immediate unsigned value `imm5` is added to the elements
1423 /// vector in `a` (eight signed 16-bit integer numbers).
1424 /// The result is written to vector (eight signed 16-bit integer numbers).
1425 ///
1426 #[inline]
1427 #[target_feature(enable = "msa")]
1428 #[cfg_attr(test, assert_instr(addvi.h, imm5 = 0b10111))]
1429 #[rustc_legacy_const_generics(1)]
__msa_addvi_h<const IMM5: i32>(a: v8i16) -> v8i161430 pub unsafe fn __msa_addvi_h<const IMM5: i32>(a: v8i16) -> v8i16 {
1431     static_assert_imm5!(IMM5);
1432     msa_addvi_h(a, IMM5)
1433 }
1434 
1435 /// Immediate Add
1436 ///
1437 /// The 5-bit immediate unsigned value `imm5` is added to the elements
1438 /// vector in `a` (four signed 32-bit integer numbers).
1439 /// The result is written to vector (four signed 32-bit integer numbers).
1440 ///
1441 #[inline]
1442 #[target_feature(enable = "msa")]
1443 #[cfg_attr(test, assert_instr(addvi.w, imm5 = 0b10111))]
1444 #[rustc_legacy_const_generics(1)]
__msa_addvi_w<const IMM5: i32>(a: v4i32) -> v4i321445 pub unsafe fn __msa_addvi_w<const IMM5: i32>(a: v4i32) -> v4i32 {
1446     static_assert_imm5!(IMM5);
1447     msa_addvi_w(a, IMM5)
1448 }
1449 
1450 /// Immediate Add
1451 ///
1452 /// The 5-bit immediate unsigned value `imm5` is added to the elements
1453 /// vector in `a` (two signed 64-bit integer numbers).
1454 /// The result is written to vector (two signed 64-bit integer numbers).
1455 ///
1456 #[inline]
1457 #[target_feature(enable = "msa")]
1458 #[cfg_attr(test, assert_instr(addvi.d, imm5 = 0b10111))]
1459 #[rustc_legacy_const_generics(1)]
__msa_addvi_d<const IMM5: i32>(a: v2i64) -> v2i641460 pub unsafe fn __msa_addvi_d<const IMM5: i32>(a: v2i64) -> v2i64 {
1461     static_assert_imm5!(IMM5);
1462     msa_addvi_d(a, IMM5)
1463 }
1464 
1465 /// Vector Logical And
1466 ///
1467 /// Each bit of vector `a` (sixteen unsigned 8-bit integer numbers)
1468 /// is combined with the corresponding bit of vector `b` (sixteen unsigned 8-bit integer numbers)
1469 /// in a bitwise logical AND operation.
1470 /// The result is written to vector (sixteen unsigned 8-bit integer numbers).
1471 ///
1472 #[inline]
1473 #[target_feature(enable = "msa")]
1474 #[cfg_attr(test, assert_instr(and.v))]
__msa_and_v(a: v16u8, b: v16u8) -> v16u81475 pub unsafe fn __msa_and_v(a: v16u8, b: v16u8) -> v16u8 {
1476     msa_and_v(a, mem::transmute(b))
1477 }
1478 
1479 /// Immediate Logical And
1480 ///
1481 /// Each byte element of vector `a` (sixteen unsigned 8-bit integer numbers)
1482 /// is combined with the 8-bit immediate i8 (signed 8-bit integer number) in a bitwise logical AND operation.
1483 /// The result is written to vector (sixteen unsigned 8-bit integer numbers).
1484 ///
1485 #[inline]
1486 #[target_feature(enable = "msa")]
1487 #[cfg_attr(test, assert_instr(andi.b, imm8 = 0b10010111))]
1488 #[rustc_legacy_const_generics(1)]
__msa_andi_b<const IMM8: i32>(a: v16u8) -> v16u81489 pub unsafe fn __msa_andi_b<const IMM8: i32>(a: v16u8) -> v16u8 {
1490     static_assert_imm8!(IMM8);
1491     msa_andi_b(a, IMM8)
1492 }
1493 
1494 /// Vector Absolute Values of Signed Subtract
1495 ///
1496 /// The signed elements in vector `a` (sixteen signed 8-bit integer numbers)
1497 /// are subtracted from the signed elements in vector `b` (sixteen signed 8-bit integer numbers).
1498 /// The absolute value of the signed result is written to vector (sixteen signed 8-bit integer numbers).
1499 ///
1500 #[inline]
1501 #[target_feature(enable = "msa")]
1502 #[cfg_attr(test, assert_instr(asub_s.b))]
__msa_asub_s_b(a: v16i8, b: v16i8) -> v16i81503 pub unsafe fn __msa_asub_s_b(a: v16i8, b: v16i8) -> v16i8 {
1504     msa_asub_s_b(a, mem::transmute(b))
1505 }
1506 
1507 /// Vector Absolute Values of Signed Subtract
1508 ///
1509 /// The signed elements in vector `a` (eight signed 16-bit integer numbers)
1510 /// are subtracted from the signed elements in vector `b` (eight signed 16-bit integer numbers).
1511 /// The absolute value of the signed result is written to vector (eight signed 16-bit integer numbers).
1512 ///
1513 #[inline]
1514 #[target_feature(enable = "msa")]
1515 #[cfg_attr(test, assert_instr(asub_s.h))]
__msa_asub_s_h(a: v8i16, b: v8i16) -> v8i161516 pub unsafe fn __msa_asub_s_h(a: v8i16, b: v8i16) -> v8i16 {
1517     msa_asub_s_h(a, mem::transmute(b))
1518 }
1519 
1520 /// Vector Absolute Values of Signed Subtract
1521 ///
1522 /// The signed elements in vector `a` (four signed 32-bit integer numbers)
1523 /// are subtracted from the signed elements in vector `b` (four signed 32-bit integer numbers).
1524 /// The absolute value of the signed result is written to vector (four signed 32-bit integer numbers).
1525 ///
1526 #[inline]
1527 #[target_feature(enable = "msa")]
1528 #[cfg_attr(test, assert_instr(asub_s.w))]
__msa_asub_s_w(a: v4i32, b: v4i32) -> v4i321529 pub unsafe fn __msa_asub_s_w(a: v4i32, b: v4i32) -> v4i32 {
1530     msa_asub_s_w(a, mem::transmute(b))
1531 }
1532 
1533 /// Vector Absolute Values of Signed Subtract
1534 ///
1535 /// The signed elements in vector `a` (two signed 64-bit integer numbers)
1536 /// are subtracted from the signed elements in vector `b` (two signed 64-bit integer numbers).
1537 /// The absolute value of the signed result is written to vector (two signed 64-bit integer numbers).
1538 ///
1539 #[inline]
1540 #[target_feature(enable = "msa")]
1541 #[cfg_attr(test, assert_instr(asub_s.d))]
__msa_asub_s_d(a: v2i64, b: v2i64) -> v2i641542 pub unsafe fn __msa_asub_s_d(a: v2i64, b: v2i64) -> v2i64 {
1543     msa_asub_s_d(a, mem::transmute(b))
1544 }
1545 
1546 /// Vector Absolute Values of Unsigned Subtract
1547 ///
1548 /// The unsigned elements in vector `a` (sixteen unsigned 8-bit integer numbers)
1549 /// are subtracted from the unsigned elements in vector `b` (sixteen unsigned 8-bit integer numbers).
1550 /// The absolute value of the unsigned result is written to vector (sixteen unsigned 8-bit integer numbers).
1551 ///
1552 #[inline]
1553 #[target_feature(enable = "msa")]
1554 #[cfg_attr(test, assert_instr(asub_u.b))]
__msa_asub_u_b(a: v16u8, b: v16u8) -> v16u81555 pub unsafe fn __msa_asub_u_b(a: v16u8, b: v16u8) -> v16u8 {
1556     msa_asub_u_b(a, mem::transmute(b))
1557 }
1558 
1559 /// Vector Absolute Values of Unsigned Subtract
1560 ///
1561 /// The unsigned elements in vector `a` (eight unsigned 16-bit integer numbers)
1562 /// are subtracted from the unsigned elements in vector `b` (eight unsigned 16-bit integer numbers).
1563 /// The absolute value of the unsigned result is written to vector (eight unsigned 16-bit integer numbers).
1564 ///
1565 #[inline]
1566 #[target_feature(enable = "msa")]
1567 #[cfg_attr(test, assert_instr(asub_u.h))]
__msa_asub_u_h(a: v8u16, b: v8u16) -> v8u161568 pub unsafe fn __msa_asub_u_h(a: v8u16, b: v8u16) -> v8u16 {
1569     msa_asub_u_h(a, mem::transmute(b))
1570 }
1571 
1572 /// Vector Absolute Values of Unsigned Subtract
1573 ///
1574 /// The unsigned elements in vector `a` (four unsigned 32-bit integer numbers)
1575 /// are subtracted from the unsigned elements in vector `b` (four unsigned 32-bit integer numbers).
1576 /// The absolute value of the unsigned result is written to vector (four unsigned 32-bit integer numbers).
1577 ///
1578 #[inline]
1579 #[target_feature(enable = "msa")]
1580 #[cfg_attr(test, assert_instr(asub_u.w))]
__msa_asub_u_w(a: v4u32, b: v4u32) -> v4u321581 pub unsafe fn __msa_asub_u_w(a: v4u32, b: v4u32) -> v4u32 {
1582     msa_asub_u_w(a, mem::transmute(b))
1583 }
1584 
1585 /// Vector Absolute Values of Unsigned Subtract
1586 ///
1587 /// The unsigned elements in vector `a` (two unsigned 64-bit integer numbers)
1588 /// are subtracted from the unsigned elements in vector `b` (two unsigned 64-bit integer numbers).
1589 /// The absolute value of the unsigned result is written to vector (two unsigned 64-bit integer numbers).
1590 ///
1591 #[inline]
1592 #[target_feature(enable = "msa")]
1593 #[cfg_attr(test, assert_instr(asub_u.d))]
__msa_asub_u_d(a: v2u64, b: v2u64) -> v2u641594 pub unsafe fn __msa_asub_u_d(a: v2u64, b: v2u64) -> v2u64 {
1595     msa_asub_u_d(a, mem::transmute(b))
1596 }
1597 
1598 /// Vector Signed Average
1599 ///
1600 /// The elements in vector `a` (sixteen signed 8-bit integer numbers)
1601 /// are added to the elements in vector `b` (sixteen signed 8-bit integer numbers).
1602 /// The addition is done signed with full precision, i.e. the result has one extra bit.
1603 /// Signed division by 2 (or arithmetic shift right by one bit) is performed before
1604 /// writing the result to vector (sixteen signed 8-bit integer numbers).
1605 ///
1606 #[inline]
1607 #[target_feature(enable = "msa")]
1608 #[cfg_attr(test, assert_instr(ave_s.b))]
__msa_ave_s_b(a: v16i8, b: v16i8) -> v16i81609 pub unsafe fn __msa_ave_s_b(a: v16i8, b: v16i8) -> v16i8 {
1610     msa_ave_s_b(a, mem::transmute(b))
1611 }
1612 
1613 /// Vector Signed Average
1614 ///
1615 /// The elements in vector `a` (eight signed 16-bit integer numbers)
1616 /// are added to the elements in vector `b` (eight signed 16-bit integer numbers).
1617 /// The addition is done signed with full precision, i.e. the result has one extra bit.
1618 /// Signed division by 2 (or arithmetic shift right by one bit) is performed before
1619 /// writing the result to vector (eight signed 16-bit integer numbers).
1620 ///
1621 #[inline]
1622 #[target_feature(enable = "msa")]
1623 #[cfg_attr(test, assert_instr(ave_s.h))]
__msa_ave_s_h(a: v8i16, b: v8i16) -> v8i161624 pub unsafe fn __msa_ave_s_h(a: v8i16, b: v8i16) -> v8i16 {
1625     msa_ave_s_h(a, mem::transmute(b))
1626 }
1627 
1628 /// Vector Signed Average
1629 ///
1630 /// The elements in vector `a` (four signed 32-bit integer numbers)
1631 /// are added to the elements in vector `b` (four signed 32-bit integer numbers).
1632 /// The addition is done signed with full precision, i.e. the result has one extra bit.
1633 /// Signed division by 2 (or arithmetic shift right by one bit) is performed before
1634 /// writing the result to vector (four signed 32-bit integer numbers).
1635 ///
1636 #[inline]
1637 #[target_feature(enable = "msa")]
1638 #[cfg_attr(test, assert_instr(ave_s.w))]
__msa_ave_s_w(a: v4i32, b: v4i32) -> v4i321639 pub unsafe fn __msa_ave_s_w(a: v4i32, b: v4i32) -> v4i32 {
1640     msa_ave_s_w(a, mem::transmute(b))
1641 }
1642 
1643 /// Vector Signed Average
1644 ///
1645 /// The elements in vector `a` (two signed 64-bit integer numbers)
1646 /// are added to the elements in vector `b` (two signed 64-bit integer numbers).
1647 /// The addition is done signed with full precision, i.e. the result has one extra bit.
1648 /// Signed division by 2 (or arithmetic shift right by one bit) is performed before
1649 /// writing the result to vector (two signed 64-bit integer numbers).
1650 ///
1651 #[inline]
1652 #[target_feature(enable = "msa")]
1653 #[cfg_attr(test, assert_instr(ave_s.d))]
__msa_ave_s_d(a: v2i64, b: v2i64) -> v2i641654 pub unsafe fn __msa_ave_s_d(a: v2i64, b: v2i64) -> v2i64 {
1655     msa_ave_s_d(a, mem::transmute(b))
1656 }
1657 
1658 /// Vector Unsigned Average
1659 ///
1660 /// The elements in vector `a` (sixteen unsigned 8-bit integer numbers)
1661 /// are added to the elements in vector `b` (sixteen unsigned 8-bit integer numbers).
1662 /// The addition is done unsigned with full precision, i.e. the result has one extra bit.
1663 /// Unsigned division by 2 (or logical shift right by one bit) is performed before
1664 /// writing the result to vector (sixteen unsigned 8-bit integer numbers).
1665 ///
1666 #[inline]
1667 #[target_feature(enable = "msa")]
1668 #[cfg_attr(test, assert_instr(ave_u.b))]
__msa_ave_u_b(a: v16u8, b: v16u8) -> v16u81669 pub unsafe fn __msa_ave_u_b(a: v16u8, b: v16u8) -> v16u8 {
1670     msa_ave_u_b(a, mem::transmute(b))
1671 }
1672 
1673 /// Vector Unsigned Average
1674 ///
1675 /// The elements in vector `a` (eight unsigned 16-bit integer numbers)
1676 /// are added to the elements in vector `b` (eight unsigned 16-bit integer numbers).
1677 /// The addition is done unsigned with full precision, i.e. the result has one extra bit.
1678 /// Unsigned division by 2 (or logical shift right by one bit) is performed before
1679 /// writing the result to vector (eight unsigned 16-bit integer numbers).
1680 ///
1681 #[inline]
1682 #[target_feature(enable = "msa")]
1683 #[cfg_attr(test, assert_instr(ave_u.h))]
__msa_ave_u_h(a: v8u16, b: v8u16) -> v8u161684 pub unsafe fn __msa_ave_u_h(a: v8u16, b: v8u16) -> v8u16 {
1685     msa_ave_u_h(a, mem::transmute(b))
1686 }
1687 
1688 /// Vector Unsigned Average
1689 ///
1690 /// The elements in vector `a` (four unsigned 32-bit integer numbers)
1691 /// are added to the elements in vector `b` (four unsigned 32-bit integer numbers).
1692 /// The addition is done unsigned with full precision, i.e. the result has one extra bit.
1693 /// Unsigned division by 2 (or logical shift right by one bit) is performed before
1694 /// writing the result to vector (four unsigned 32-bit integer numbers).
1695 ///
1696 #[inline]
1697 #[target_feature(enable = "msa")]
1698 #[cfg_attr(test, assert_instr(ave_u.w))]
__msa_ave_u_w(a: v4u32, b: v4u32) -> v4u321699 pub unsafe fn __msa_ave_u_w(a: v4u32, b: v4u32) -> v4u32 {
1700     msa_ave_u_w(a, mem::transmute(b))
1701 }
1702 
1703 /// Vector Unsigned Average
1704 ///
1705 /// The elements in vector `a` (two unsigned 64-bit integer numbers)
1706 /// are added to the elements in vector `b` (two unsigned 64-bit integer numbers).
1707 /// The addition is done unsigned with full precision, i.e. the result has one extra bit.
1708 /// Unsigned division by 2 (or logical shift right by one bit) is performed before
1709 /// writing the result to vector (two unsigned 64-bit integer numbers).
1710 ///
1711 #[inline]
1712 #[target_feature(enable = "msa")]
1713 #[cfg_attr(test, assert_instr(ave_u.d))]
__msa_ave_u_d(a: v2u64, b: v2u64) -> v2u641714 pub unsafe fn __msa_ave_u_d(a: v2u64, b: v2u64) -> v2u64 {
1715     msa_ave_u_d(a, mem::transmute(b))
1716 }
1717 
1718 /// Vector Signed Average Rounded
1719 ///
1720 /// The elements in vector `a` (sixteen signed 8-bit integer numbers)
1721 /// are added to the elements in vector `b` (sixteen signed 8-bit integer numbers).
1722 /// The addition of the elements plus 1 (for rounding) is done signed with full precision,
1723 /// i.e. the result has one extra bit.
1724 /// Signed division by 2 (or arithmetic shift right by one bit) is performed before
1725 /// writing the result to vector (sixteen signed 8-bit integer numbers).
1726 ///
1727 #[inline]
1728 #[target_feature(enable = "msa")]
1729 #[cfg_attr(test, assert_instr(aver_s.b))]
__msa_aver_s_b(a: v16i8, b: v16i8) -> v16i81730 pub unsafe fn __msa_aver_s_b(a: v16i8, b: v16i8) -> v16i8 {
1731     msa_aver_s_b(a, mem::transmute(b))
1732 }
1733 
1734 /// Vector Signed Average Rounded
1735 ///
1736 /// The elements in vector `a` (eight signed 16-bit integer numbers)
1737 /// are added to the elements in vector `b` (eight signed 16-bit integer numbers).
1738 /// The addition of the elements plus 1 (for rounding) is done signed with full precision,
1739 /// i.e. the result has one extra bit.
1740 /// Signed division by 2 (or arithmetic shift right by one bit) is performed before
1741 /// writing the result to vector (eight signed 16-bit integer numbers).
1742 ///
1743 #[inline]
1744 #[target_feature(enable = "msa")]
1745 #[cfg_attr(test, assert_instr(aver_s.h))]
__msa_aver_s_h(a: v8i16, b: v8i16) -> v8i161746 pub unsafe fn __msa_aver_s_h(a: v8i16, b: v8i16) -> v8i16 {
1747     msa_aver_s_h(a, mem::transmute(b))
1748 }
1749 
1750 /// Vector Signed Average Rounded
1751 ///
1752 /// The elements in vector `a` (four signed 32-bit integer numbers)
1753 /// are added to the elements in vector `b` (four signed 32-bit integer numbers).
1754 /// The addition of the elements plus 1 (for rounding) is done signed with full precision,
1755 /// i.e. the result has one extra bit.
1756 /// Signed division by 2 (or arithmetic shift right by one bit) is performed before
1757 /// writing the result to vector (four signed 32-bit integer numbers).
1758 ///
1759 #[inline]
1760 #[target_feature(enable = "msa")]
1761 #[cfg_attr(test, assert_instr(aver_s.w))]
__msa_aver_s_w(a: v4i32, b: v4i32) -> v4i321762 pub unsafe fn __msa_aver_s_w(a: v4i32, b: v4i32) -> v4i32 {
1763     msa_aver_s_w(a, mem::transmute(b))
1764 }
1765 
1766 /// Vector Signed Average Rounded
1767 ///
1768 /// The elements in vector `a` (two signed 64-bit integer numbers)
1769 /// are added to the elements in vector `b` (two signed 64-bit integer numbers).
1770 /// The addition of the elements plus 1 (for rounding) is done signed with full precision,
1771 /// i.e. the result has one extra bit.
1772 /// Signed division by 2 (or arithmetic shift right by one bit) is performed before
1773 /// writing the result to vector (two signed 64-bit integer numbers).
1774 ///
1775 #[inline]
1776 #[target_feature(enable = "msa")]
1777 #[cfg_attr(test, assert_instr(aver_s.d))]
__msa_aver_s_d(a: v2i64, b: v2i64) -> v2i641778 pub unsafe fn __msa_aver_s_d(a: v2i64, b: v2i64) -> v2i64 {
1779     msa_aver_s_d(a, mem::transmute(b))
1780 }
1781 
1782 /// Vector Unsigned Average Rounded
1783 ///
1784 /// The elements in vector `a` (sixteen unsigned 8-bit integer numbers)
1785 /// are added to the elements in vector `b` (sixteen unsigned 8-bit integer numbers).
1786 /// The addition of the elements plus 1 (for rounding) is done unsigned with full precision,
1787 /// i.e. the result has one extra bit.
1788 /// Unsigned division by 2 (or logical shift right by one bit) is performed before
1789 /// writing the result to vector (sixteen unsigned 8-bit integer numbers).
1790 ///
1791 #[inline]
1792 #[target_feature(enable = "msa")]
1793 #[cfg_attr(test, assert_instr(aver_u.b))]
__msa_aver_u_b(a: v16u8, b: v16u8) -> v16u81794 pub unsafe fn __msa_aver_u_b(a: v16u8, b: v16u8) -> v16u8 {
1795     msa_aver_u_b(a, mem::transmute(b))
1796 }
1797 
1798 /// Vector Unsigned Average Rounded
1799 ///
1800 /// The elements in vector `a` (eight unsigned 16-bit integer numbers)
1801 /// are added to the elements in vector `b` (eight unsigned 16-bit integer numbers).
1802 /// The addition of the elements plus 1 (for rounding) is done unsigned with full precision,
1803 /// i.e. the result has one extra bit.
1804 /// Unsigned division by 2 (or logical shift right by one bit) is performed before
1805 /// writing the result to vector (eight unsigned 16-bit integer numbers).
1806 ///
1807 #[inline]
1808 #[target_feature(enable = "msa")]
1809 #[cfg_attr(test, assert_instr(aver_u.h))]
__msa_aver_u_h(a: v8u16, b: v8u16) -> v8u161810 pub unsafe fn __msa_aver_u_h(a: v8u16, b: v8u16) -> v8u16 {
1811     msa_aver_u_h(a, mem::transmute(b))
1812 }
1813 
1814 /// Vector Unsigned Average Rounded
1815 ///
1816 /// The elements in vector `a` (four unsigned 32-bit integer numbers)
1817 /// are added to the elements in vector `b` (four unsigned 32-bit integer numbers).
1818 /// The addition of the elements plus 1 (for rounding) is done unsigned with full precision,
1819 /// i.e. the result has one extra bit.
1820 /// Unsigned division by 2 (or logical shift right by one bit) is performed before
1821 /// writing the result to vector (four unsigned 32-bit integer numbers).
1822 ///
1823 #[inline]
1824 #[target_feature(enable = "msa")]
1825 #[cfg_attr(test, assert_instr(aver_u.w))]
__msa_aver_u_w(a: v4u32, b: v4u32) -> v4u321826 pub unsafe fn __msa_aver_u_w(a: v4u32, b: v4u32) -> v4u32 {
1827     msa_aver_u_w(a, mem::transmute(b))
1828 }
1829 
1830 /// Vector Unsigned Average Rounded
1831 ///
1832 /// The elements in vector `a` (two unsigned 64-bit integer numbers)
1833 /// are added to the elements in vector `b` (two unsigned 64-bit integer numbers).
1834 /// The addition of the elements plus 1 (for rounding) is done unsigned with full precision,
1835 /// i.e. the result has one extra bit.
1836 /// Unsigned division by 2 (or logical shift right by one bit) is performed before
1837 /// writing the result to vector (two unsigned 64-bit integer numbers).
1838 ///
1839 #[inline]
1840 #[target_feature(enable = "msa")]
1841 #[cfg_attr(test, assert_instr(aver_u.d))]
__msa_aver_u_d(a: v2u64, b: v2u64) -> v2u641842 pub unsafe fn __msa_aver_u_d(a: v2u64, b: v2u64) -> v2u64 {
1843     msa_aver_u_d(a, mem::transmute(b))
1844 }
1845 
1846 /// Vector Bit Clear
1847 ///
1848 /// Clear (set to 0) one bit in each element of vector `a` (sixteen unsigned 8-bit integer numbers).
1849 /// The bit position is given by the elements in `b` (sixteen unsigned 8-bit integer numbers)
1850 /// modulo the size of the element in bits.
1851 /// The result is written to vector (sixteen unsigned 8-bit integer numbers).
1852 ///
1853 #[inline]
1854 #[target_feature(enable = "msa")]
1855 #[cfg_attr(test, assert_instr(bclr.b))]
__msa_bclr_b(a: v16u8, b: v16u8) -> v16u81856 pub unsafe fn __msa_bclr_b(a: v16u8, b: v16u8) -> v16u8 {
1857     msa_bclr_b(a, mem::transmute(b))
1858 }
1859 
1860 /// Vector Bit Clear
1861 ///
1862 /// Clear (set to 0) one bit in each element of vector `a` (eight unsigned 16-bit integer numbers).
1863 /// The bit position is given by the elements in `b` (eight unsigned 16-bit integer numbers)
1864 /// modulo the size of the element in bits.
1865 /// The result is written to vector (eight unsigned 16-bit integer numbers).
1866 ///
1867 #[inline]
1868 #[target_feature(enable = "msa")]
1869 #[cfg_attr(test, assert_instr(bclr.h))]
__msa_bclr_h(a: v8u16, b: v8u16) -> v8u161870 pub unsafe fn __msa_bclr_h(a: v8u16, b: v8u16) -> v8u16 {
1871     msa_bclr_h(a, mem::transmute(b))
1872 }
1873 
1874 /// Vector Bit Clear
1875 ///
1876 /// Clear (set to 0) one bit in each element of vector `a` (four unsigned 32-bit integer numbers).
1877 /// The bit position is given by the elements in `b` (four unsigned 32-bit integer numbers)
1878 /// modulo the size of the element in bits.
1879 /// The result is written to vector (four unsigned 32-bit integer numbers).
1880 ///
1881 #[inline]
1882 #[target_feature(enable = "msa")]
1883 #[cfg_attr(test, assert_instr(bclr.w))]
__msa_bclr_w(a: v4u32, b: v4u32) -> v4u321884 pub unsafe fn __msa_bclr_w(a: v4u32, b: v4u32) -> v4u32 {
1885     msa_bclr_w(a, mem::transmute(b))
1886 }
1887 
1888 /// Vector Bit Clear
1889 ///
1890 /// Clear (set to 0) one bit in each element of vector `a` (two unsigned 64-bit integer numbers).
1891 /// The bit position is given by the elements in `b` (two unsigned 64-bit integer numbers)
1892 /// modulo the size of the element in bits.
1893 /// The result is written to vector (two unsigned 64-bit integer numbers).
1894 ///
1895 #[inline]
1896 #[target_feature(enable = "msa")]
1897 #[cfg_attr(test, assert_instr(bclr.d))]
__msa_bclr_d(a: v2u64, b: v2u64) -> v2u641898 pub unsafe fn __msa_bclr_d(a: v2u64, b: v2u64) -> v2u64 {
1899     msa_bclr_d(a, mem::transmute(b))
1900 }
1901 
1902 /// Immediate Bit Clear
1903 ///
1904 /// Clear (set to 0) one bit in each element of vector `a` (sixteen unsigned 8-bit integer numbers).
1905 /// The bit position is given by the immediate `m` modulo the size of the element in bits.
1906 /// The result is written to vector (sixteen unsigned 8-bit integer numbers).
1907 ///
1908 #[inline]
1909 #[target_feature(enable = "msa")]
1910 #[cfg_attr(test, assert_instr(bclri.b, imm3 = 0b111))]
1911 #[rustc_legacy_const_generics(1)]
__msa_bclri_b<const IMM3: i32>(a: v16u8) -> v16u81912 pub unsafe fn __msa_bclri_b<const IMM3: i32>(a: v16u8) -> v16u8 {
1913     static_assert_imm3!(IMM3);
1914     msa_bclri_b(a, IMM3)
1915 }
1916 
1917 /// Immediate Bit Clear
1918 ///
1919 /// Clear (set to 0) one bit in each element of vector `a` (eight unsigned 16-bit integer numbers).
1920 /// The bit position is given by the immediate `m` modulo the size of the element in bits.
1921 /// The result is written to vector (eight unsigned 16-bit integer numbers).
1922 ///
1923 #[inline]
1924 #[target_feature(enable = "msa")]
1925 #[cfg_attr(test, assert_instr(bclri.h, imm4 = 0b1111))]
1926 #[rustc_legacy_const_generics(1)]
__msa_bclri_h<const IMM4: i32>(a: v8u16) -> v8u161927 pub unsafe fn __msa_bclri_h<const IMM4: i32>(a: v8u16) -> v8u16 {
1928     static_assert_imm4!(IMM4);
1929     msa_bclri_h(a, IMM4)
1930 }
1931 
1932 /// Immediate Bit Clear
1933 ///
1934 /// Clear (set to 0) one bit in each element of vector `a` (four unsigned 32-bit integer numbers).
1935 /// The bit position is given by the immediate `m` modulo the size of the element in bits.
1936 /// The result is written to vector (four unsigned 32-bit integer numbers).
1937 ///
1938 #[inline]
1939 #[target_feature(enable = "msa")]
1940 #[cfg_attr(test, assert_instr(bclri.w, imm5 = 0b11111))]
1941 #[rustc_legacy_const_generics(1)]
__msa_bclri_w<const IMM5: i32>(a: v4u32) -> v4u321942 pub unsafe fn __msa_bclri_w<const IMM5: i32>(a: v4u32) -> v4u32 {
1943     static_assert_imm5!(IMM5);
1944     msa_bclri_w(a, IMM5)
1945 }
1946 
1947 /// Immediate Bit Clear
1948 ///
1949 /// Clear (set to 0) one bit in each element of vector `a` (two unsigned 64-bit integer numbers).
1950 /// The bit position is given by the immediate `m` modulo the size of the element in bits.
1951 /// The result is written to vector (two unsigned 64-bit integer numbers).
1952 ///
1953 #[inline]
1954 #[target_feature(enable = "msa")]
1955 #[cfg_attr(test, assert_instr(bclri.d, imm6 = 0b111111))]
1956 #[rustc_legacy_const_generics(1)]
__msa_bclri_d<const IMM6: i32>(a: v2u64) -> v2u641957 pub unsafe fn __msa_bclri_d<const IMM6: i32>(a: v2u64) -> v2u64 {
1958     static_assert_imm6!(IMM6);
1959     msa_bclri_d(a, IMM6)
1960 }
1961 
1962 /// Vector Bit Insert Left
1963 ///
1964 /// Copy most significant (left) bits in each element of vector `b` (sixteen unsigned 8-bit integer numbers)
1965 /// to elements in vector `a` (sixteen unsigned 8-bit integer numbers) while preserving the least significant (right) bits.
1966 /// The number of bits to copy is given by the elements in vector `c` (sixteen unsigned 8-bit integer numbers)
1967 /// modulo the size of the element in bits plus 1.
1968 ///
1969 #[inline]
1970 #[target_feature(enable = "msa")]
1971 #[cfg_attr(test, assert_instr(binsl.b))]
__msa_binsl_b(a: v16u8, b: v16u8, c: v16u8) -> v16u81972 pub unsafe fn __msa_binsl_b(a: v16u8, b: v16u8, c: v16u8) -> v16u8 {
1973     msa_binsl_b(a, mem::transmute(b), c)
1974 }
1975 
1976 /// Vector Bit Insert Left
1977 ///
1978 /// Copy most significant (left) bits in each element of vector `b` (eight unsigned 16-bit integer numbers)
1979 /// to elements in vector `a` (eight unsigned 16-bit integer numbers) while preserving the least significant (right) bits.
1980 /// The number of bits to copy is given by the elements in vector `c` (eight unsigned 16-bit integer numbers)
1981 /// modulo the size of the element in bits plus 1.
1982 ///
1983 #[inline]
1984 #[target_feature(enable = "msa")]
1985 #[cfg_attr(test, assert_instr(binsl.h))]
__msa_binsl_h(a: v8u16, b: v8u16, c: v8u16) -> v8u161986 pub unsafe fn __msa_binsl_h(a: v8u16, b: v8u16, c: v8u16) -> v8u16 {
1987     msa_binsl_h(a, mem::transmute(b), c)
1988 }
1989 
1990 /// Vector Bit Insert Left
1991 ///
1992 /// Copy most significant (left) bits in each element of vector `b` (four unsigned 32-bit integer numbers)
1993 /// to elements in vector `a` (four unsigned 32-bit integer numbers) while preserving the least significant (right) bits.
1994 /// The number of bits to copy is given by the elements in vector `c` (four unsigned 32-bit integer numbers)
1995 /// modulo the size of the element in bits plus 1.
1996 ///
1997 #[inline]
1998 #[target_feature(enable = "msa")]
1999 #[cfg_attr(test, assert_instr(binsl.w))]
__msa_binsl_w(a: v4u32, b: v4u32, c: v4u32) -> v4u322000 pub unsafe fn __msa_binsl_w(a: v4u32, b: v4u32, c: v4u32) -> v4u32 {
2001     msa_binsl_w(a, mem::transmute(b), c)
2002 }
2003 
2004 /// Vector Bit Insert Left
2005 ///
2006 /// Copy most significant (left) bits in each element of vector `b` (two unsigned 64-bit integer numbers)
2007 /// to elements in vector `a` (two unsigned 64-bit integer numbers) while preserving the least significant (right) bits.
2008 /// The number of bits to copy is given by the elements in vector `c` (two unsigned 64-bit integer numbers)
2009 /// modulo the size of the element in bits plus 1.
2010 ///
2011 #[inline]
2012 #[target_feature(enable = "msa")]
2013 #[cfg_attr(test, assert_instr(binsl.d))]
__msa_binsl_d(a: v2u64, b: v2u64, c: v2u64) -> v2u642014 pub unsafe fn __msa_binsl_d(a: v2u64, b: v2u64, c: v2u64) -> v2u64 {
2015     msa_binsl_d(a, mem::transmute(b), c)
2016 }
2017 
2018 /// Immediate Bit Insert Left
2019 ///
2020 /// Copy most significant (left) bits in each element of vector `b` (sixteen unsigned 8-bit integer numbers)
2021 /// to elements in vector `a` (sixteen unsigned 8-bit integer numbers) while preserving the least significant (right) bits.
2022 /// The number of bits to copy is given by the immediate `imm3` modulo the size of the element in bits plus 1.
2023 ///
2024 #[inline]
2025 #[target_feature(enable = "msa")]
2026 #[cfg_attr(test, assert_instr(binsli.b, imm3 = 0b111))]
2027 #[rustc_legacy_const_generics(2)]
__msa_binsli_b<const IMM3: i32>(a: v16u8, b: v16u8) -> v16u82028 pub unsafe fn __msa_binsli_b<const IMM3: i32>(a: v16u8, b: v16u8) -> v16u8 {
2029     static_assert_imm3!(IMM3);
2030     msa_binsli_b(a, mem::transmute(b), IMM3)
2031 }
2032 
2033 /// Immediate Bit Insert Left
2034 ///
2035 /// Copy most significant (left) bits in each element of vector `b` (eight unsigned 16-bit integer numbers)
2036 /// to elements in vector `a` (eight unsigned 16-bit integer numbers) while preserving the least significant (right) bits.
2037 /// The number of bits to copy is given by the immediate `imm4` modulo the size of the element in bits plus 1.
2038 ///
2039 #[inline]
2040 #[target_feature(enable = "msa")]
2041 #[cfg_attr(test, assert_instr(binsli.h, imm4 = 0b1111))]
2042 #[rustc_legacy_const_generics(2)]
__msa_binsli_h<const IMM4: i32>(a: v8u16, b: v8u16) -> v8u162043 pub unsafe fn __msa_binsli_h<const IMM4: i32>(a: v8u16, b: v8u16) -> v8u16 {
2044     static_assert_imm4!(IMM4);
2045     msa_binsli_h(a, mem::transmute(b), IMM4)
2046 }
2047 
2048 /// Immediate Bit Insert Left
2049 ///
2050 /// Copy most significant (left) bits in each element of vector `b` (four unsigned 32-bit integer numbers)
2051 /// to elements in vector `a` (four unsigned 32-bit integer numbers) while preserving the least significant (right) bits.
2052 /// The number of bits to copy is given by the immediate `imm5` modulo the size of the element in bits plus 1.
2053 ///
2054 #[inline]
2055 #[target_feature(enable = "msa")]
2056 #[cfg_attr(test, assert_instr(binsli.w, imm5 = 0b11111))]
2057 #[rustc_legacy_const_generics(2)]
__msa_binsli_w<const IMM5: i32>(a: v4u32, b: v4u32) -> v4u322058 pub unsafe fn __msa_binsli_w<const IMM5: i32>(a: v4u32, b: v4u32) -> v4u32 {
2059     static_assert_imm5!(IMM5);
2060     msa_binsli_w(a, mem::transmute(b), IMM5)
2061 }
2062 
2063 /// Immediate Bit Insert Left
2064 ///
2065 /// Copy most significant (left) bits in each element of vector `b` (two unsigned 64-bit integer numbers)
2066 /// to elements in vector `a` (two unsigned 64-bit integer numbers) while preserving the least significant (right) bits.
2067 /// The number of bits to copy is given by the immediate `imm6` modulo the size of the element in bits plus 1.
2068 ///
2069 #[inline]
2070 #[target_feature(enable = "msa")]
2071 #[cfg_attr(test, assert_instr(binsli.d, imm6 = 0b111111))]
2072 #[rustc_legacy_const_generics(2)]
__msa_binsli_d<const IMM6: i32>(a: v2u64, b: v2u64) -> v2u642073 pub unsafe fn __msa_binsli_d<const IMM6: i32>(a: v2u64, b: v2u64) -> v2u64 {
2074     static_assert_imm6!(IMM6);
2075     msa_binsli_d(a, mem::transmute(b), IMM6)
2076 }
2077 
2078 /// Vector Bit Insert Right
2079 ///
2080 /// Copy most significant (right) bits in each element of vector `b` (sixteen unsigned 8-bit integer numbers)
2081 /// to elements in vector `a` (sixteen unsigned 8-bit integer numbers) while preserving the least significant (left) bits.
2082 /// The number of bits to copy is given by the elements in vector `c` (sixteen unsigned 8-bit integer numbers)
2083 /// modulo the size of the element in bits plus 1.
2084 ///
2085 #[inline]
2086 #[target_feature(enable = "msa")]
2087 #[cfg_attr(test, assert_instr(binsr.b))]
__msa_binsr_b(a: v16u8, b: v16u8, c: v16u8) -> v16u82088 pub unsafe fn __msa_binsr_b(a: v16u8, b: v16u8, c: v16u8) -> v16u8 {
2089     msa_binsr_b(a, mem::transmute(b), c)
2090 }
2091 
2092 /// Vector Bit Insert Right
2093 ///
2094 /// Copy most significant (right) bits in each element of vector `b` (eight unsigned 16-bit integer numbers)
2095 /// to elements in vector `a` (eight unsigned 16-bit integer numbers) while preserving the least significant (left) bits.
2096 /// The number of bits to copy is given by the elements in vector `c` (eight unsigned 16-bit integer numbers)
2097 /// modulo the size of the element in bits plus 1.
2098 ///
2099 #[inline]
2100 #[target_feature(enable = "msa")]
2101 #[cfg_attr(test, assert_instr(binsr.h))]
__msa_binsr_h(a: v8u16, b: v8u16, c: v8u16) -> v8u162102 pub unsafe fn __msa_binsr_h(a: v8u16, b: v8u16, c: v8u16) -> v8u16 {
2103     msa_binsr_h(a, mem::transmute(b), c)
2104 }
2105 
2106 /// Vector Bit Insert Right
2107 ///
2108 /// Copy most significant (right) bits in each element of vector `b` (four unsigned 32-bit integer numbers)
2109 /// to elements in vector `a` (four unsigned 32-bit integer numbers) while preserving the least significant (left) bits.
2110 /// The number of bits to copy is given by the elements in vector `c` (four unsigned 32-bit integer numbers)
2111 /// modulo the size of the element in bits plus 1.
2112 ///
2113 #[inline]
2114 #[target_feature(enable = "msa")]
2115 #[cfg_attr(test, assert_instr(binsr.w))]
__msa_binsr_w(a: v4u32, b: v4u32, c: v4u32) -> v4u322116 pub unsafe fn __msa_binsr_w(a: v4u32, b: v4u32, c: v4u32) -> v4u32 {
2117     msa_binsr_w(a, mem::transmute(b), c)
2118 }
2119 
2120 /// Vector Bit Insert Right
2121 ///
2122 /// Copy most significant (right) bits in each element of vector `b` (two unsigned 64-bit integer numbers)
2123 /// to elements in vector `a` (two unsigned 64-bit integer numbers) while preserving the least significant (left) bits.
2124 /// The number of bits to copy is given by the elements in vector `c` (two unsigned 64-bit integer numbers)
2125 /// modulo the size of the element in bits plus 1.
2126 ///
2127 #[inline]
2128 #[target_feature(enable = "msa")]
2129 #[cfg_attr(test, assert_instr(binsr.d))]
__msa_binsr_d(a: v2u64, b: v2u64, c: v2u64) -> v2u642130 pub unsafe fn __msa_binsr_d(a: v2u64, b: v2u64, c: v2u64) -> v2u64 {
2131     msa_binsr_d(a, mem::transmute(b), c)
2132 }
2133 
2134 /// Immediate Bit Insert Right
2135 ///
2136 /// Copy most significant (right) bits in each element of vector `b` (sixteen unsigned 8-bit integer numbers)
2137 /// to elements in vector `a` (sixteen unsigned 8-bit integer numbers) while preserving the least significant (left) bits.
2138 /// The number of bits to copy is given by the immediate `imm3` modulo the size of the element in bits plus 1.
2139 ///
2140 #[inline]
2141 #[target_feature(enable = "msa")]
2142 #[cfg_attr(test, assert_instr(binsri.b, imm3 = 0b111))]
2143 #[rustc_legacy_const_generics(2)]
__msa_binsri_b<const IMM3: i32>(a: v16u8, b: v16u8) -> v16u82144 pub unsafe fn __msa_binsri_b<const IMM3: i32>(a: v16u8, b: v16u8) -> v16u8 {
2145     static_assert_imm3!(IMM3);
2146     msa_binsri_b(a, mem::transmute(b), IMM3)
2147 }
2148 
2149 /// Immediate Bit Insert Right
2150 ///
2151 /// Copy most significant (right) bits in each element of vector `b` (eight unsigned 16-bit integer numbers)
2152 /// to elements in vector `a` (eight unsigned 16-bit integer numbers) while preserving the least significant (left) bits.
2153 /// The number of bits to copy is given by the immediate `imm4` modulo the size of the element in bits plus 1.
2154 ///
2155 #[inline]
2156 #[target_feature(enable = "msa")]
2157 #[cfg_attr(test, assert_instr(binsri.h, imm4 = 0b1111))]
2158 #[rustc_legacy_const_generics(2)]
__msa_binsri_h<const IMM4: i32>(a: v8u16, b: v8u16) -> v8u162159 pub unsafe fn __msa_binsri_h<const IMM4: i32>(a: v8u16, b: v8u16) -> v8u16 {
2160     static_assert_imm4!(IMM4);
2161     msa_binsri_h(a, mem::transmute(b), IMM4)
2162 }
2163 
2164 /// Immediate Bit Insert Right
2165 ///
2166 /// Copy most significant (right) bits in each element of vector `b` (four unsigned 32-bit integer numbers)
2167 /// to elements in vector `a` (four unsigned 32-bit integer numbers) while preserving the least significant (left) bits.
2168 /// The number of bits to copy is given by the immediate `imm5` modulo the size of the element in bits plus 1.
2169 ///
2170 #[inline]
2171 #[target_feature(enable = "msa")]
2172 #[cfg_attr(test, assert_instr(binsri.w, imm5 = 0b11111))]
2173 #[rustc_legacy_const_generics(2)]
__msa_binsri_w<const IMM5: i32>(a: v4u32, b: v4u32) -> v4u322174 pub unsafe fn __msa_binsri_w<const IMM5: i32>(a: v4u32, b: v4u32) -> v4u32 {
2175     static_assert_imm5!(IMM5);
2176     msa_binsri_w(a, mem::transmute(b), IMM5)
2177 }
2178 
2179 /// Immediate Bit Insert Right
2180 ///
2181 /// Copy most significant (right) bits in each element of vector `b` (two unsigned 64-bit integer numbers)
2182 /// to elements in vector `a` (two unsigned 64-bit integer numbers) while preserving the least significant (left) bits.
2183 /// The number of bits to copy is given by the immediate `imm6` modulo the size of the element in bits plus 1.
2184 ///
2185 #[inline]
2186 #[target_feature(enable = "msa")]
2187 #[cfg_attr(test, assert_instr(binsri.d, imm6 = 0b111111))]
2188 #[rustc_legacy_const_generics(2)]
__msa_binsri_d<const IMM6: i32>(a: v2u64, b: v2u64) -> v2u642189 pub unsafe fn __msa_binsri_d<const IMM6: i32>(a: v2u64, b: v2u64) -> v2u64 {
2190     static_assert_imm6!(IMM6);
2191     msa_binsri_d(a, mem::transmute(b), IMM6)
2192 }
2193 
2194 /// Vector Bit Move If Not Zero
2195 ///
2196 /// Copy to destination vector `a` (sixteen unsigned 8-bit integer numbers) all bits from source vector
2197 /// `b` (sixteen unsigned 8-bit integer numbers) for which the corresponding bits from target vector `c`
2198 /// (sixteen unsigned 8-bit integer numbers) are 1 and leaves unchanged all destination bits
2199 /// for which the corresponding target bits are 0.
2200 ///
2201 #[inline]
2202 #[target_feature(enable = "msa")]
2203 #[cfg_attr(test, assert_instr(bmnz.v))]
__msa_bmnz_v(a: v16u8, b: v16u8, c: v16u8) -> v16u82204 pub unsafe fn __msa_bmnz_v(a: v16u8, b: v16u8, c: v16u8) -> v16u8 {
2205     msa_bmnz_v(a, mem::transmute(b), c)
2206 }
2207 
2208 /// Immediate Bit Move If Not Zero
2209 ///
2210 /// Copy to destination vector `a` (sixteen unsigned 8-bit integer numbers) all bits from source vector
2211 /// `b` (sixteen unsigned 8-bit integer numbers) for which the corresponding bits from from immediate `imm8`
2212 /// are 1 and leaves unchanged all destination bits for which the corresponding target bits are 0.
2213 ///
2214 #[inline]
2215 #[target_feature(enable = "msa")]
2216 #[cfg_attr(test, assert_instr(bmnzi.b, imm8 = 0b11111111))]
2217 #[rustc_legacy_const_generics(2)]
__msa_bmnzi_b<const IMM8: i32>(a: v16u8, b: v16u8) -> v16u82218 pub unsafe fn __msa_bmnzi_b<const IMM8: i32>(a: v16u8, b: v16u8) -> v16u8 {
2219     static_assert_imm8!(IMM8);
2220     msa_bmnzi_b(a, mem::transmute(b), IMM8)
2221 }
2222 
2223 /// Vector Bit Move If Zero
2224 ///
2225 /// Copy to destination vector `a` (sixteen unsigned 8-bit integer numbers) all bits from source vector
2226 /// `b` (sixteen unsigned 8-bit integer numbers) for which the corresponding bits from target vector `c`
2227 /// (sixteen unsigned 8-bit integer numbers) are 0 and leaves unchanged all destination bits
2228 /// for which the corresponding target bits are 1.
2229 ///
2230 #[inline]
2231 #[target_feature(enable = "msa")]
2232 #[cfg_attr(test, assert_instr(bmz.v))]
__msa_bmz_v(a: v16u8, b: v16u8, c: v16u8) -> v16u82233 pub unsafe fn __msa_bmz_v(a: v16u8, b: v16u8, c: v16u8) -> v16u8 {
2234     msa_bmz_v(a, mem::transmute(b), c)
2235 }
2236 
2237 /// Immediate Bit Move If Zero
2238 ///
2239 /// Copy to destination vector `a` (sixteen unsigned 8-bit integer numbers) all bits from source vector
2240 /// `b` (sixteen unsigned 8-bit integer numbers) for which the corresponding bits from from immediate `imm8`
2241 /// are 0 and leaves unchanged all destination bits for which the corresponding immediate bits are 1.
2242 ///
2243 #[inline]
2244 #[target_feature(enable = "msa")]
2245 #[cfg_attr(test, assert_instr(bmzi.b, imm8 = 0b11111111))]
2246 #[rustc_legacy_const_generics(2)]
__msa_bmzi_b<const IMM8: i32>(a: v16u8, b: v16u8) -> v16u82247 pub unsafe fn __msa_bmzi_b<const IMM8: i32>(a: v16u8, b: v16u8) -> v16u8 {
2248     static_assert_imm8!(IMM8);
2249     msa_bmzi_b(a, mem::transmute(b), IMM8)
2250 }
2251 
2252 /// Vector Bit Negate
2253 ///
2254 /// Negate (complement) one bit in each element of vector `a` (sixteen unsigned 8-bit integer numbers).
2255 /// The bit position is given by the elements in vector `b` (sixteen unsigned 8-bit integer numbers)
2256 /// modulo the size of the element in bits.
2257 /// The result is written to vector (sixteen unsigned 8-bit integer numbers).
2258 ///
2259 #[inline]
2260 #[target_feature(enable = "msa")]
2261 #[cfg_attr(test, assert_instr(bneg.b))]
__msa_bneg_b(a: v16u8, b: v16u8) -> v16u82262 pub unsafe fn __msa_bneg_b(a: v16u8, b: v16u8) -> v16u8 {
2263     msa_bneg_b(a, mem::transmute(b))
2264 }
2265 
2266 /// Vector Bit Negate
2267 ///
2268 /// Negate (complement) one bit in each element of vector `a` (eight unsigned 16-bit integer numbers).
2269 /// The bit position is given by the elements in vector `b` (eight unsigned 16-bit integer numbers)
2270 /// modulo the size of the element in bits.
2271 /// The result is written to vector (eight unsigned 16-bit integer numbers).
2272 ///
2273 #[inline]
2274 #[target_feature(enable = "msa")]
2275 #[cfg_attr(test, assert_instr(bneg.h))]
__msa_bneg_h(a: v8u16, b: v8u16) -> v8u162276 pub unsafe fn __msa_bneg_h(a: v8u16, b: v8u16) -> v8u16 {
2277     msa_bneg_h(a, mem::transmute(b))
2278 }
2279 
2280 /// Vector Bit Negate
2281 ///
2282 /// Negate (complement) one bit in each element of vector `a` (four unsigned 32-bit integer numbers).
2283 /// The bit position is given by the elements in vector `b` (four unsigned 32-bit integer numbers)
2284 /// modulo the size of the element in bits.
2285 /// The result is written to vector (four unsigned 32-bit integer numbers).
2286 ///
2287 #[inline]
2288 #[target_feature(enable = "msa")]
2289 #[cfg_attr(test, assert_instr(bneg.w))]
__msa_bneg_w(a: v4u32, b: v4u32) -> v4u322290 pub unsafe fn __msa_bneg_w(a: v4u32, b: v4u32) -> v4u32 {
2291     msa_bneg_w(a, mem::transmute(b))
2292 }
2293 
2294 /// Vector Bit Negate
2295 ///
2296 /// Negate (complement) one bit in each element of vector `a` (two unsigned 64-bit integer numbers).
2297 /// The bit position is given by the elements in vector `b` (two unsigned 64-bit integer numbers)
2298 /// modulo the size of the element in bits.
2299 /// The result is written to vector (two unsigned 64-bit integer numbers).
2300 ///
2301 #[inline]
2302 #[target_feature(enable = "msa")]
2303 #[cfg_attr(test, assert_instr(bneg.d))]
__msa_bneg_d(a: v2u64, b: v2u64) -> v2u642304 pub unsafe fn __msa_bneg_d(a: v2u64, b: v2u64) -> v2u64 {
2305     msa_bneg_d(a, mem::transmute(b))
2306 }
2307 
2308 /// Immediate Bit Negate
2309 ///
2310 /// Negate (complement) one bit in each element of vector `a` (sixteen unsigned 8-bit integer numbers).
2311 /// The bit position is given by immediate `imm3` modulo the size of the element in bits.
2312 /// The result is written to vector (sixteen unsigned 8-bit integer numbers).
2313 ///
2314 #[inline]
2315 #[target_feature(enable = "msa")]
2316 #[cfg_attr(test, assert_instr(bnegi.b, imm3 = 0b111))]
2317 #[rustc_legacy_const_generics(1)]
__msa_bnegi_b<const IMM3: i32>(a: v16u8) -> v16u82318 pub unsafe fn __msa_bnegi_b<const IMM3: i32>(a: v16u8) -> v16u8 {
2319     static_assert_imm3!(IMM3);
2320     msa_bnegi_b(a, IMM3)
2321 }
2322 
2323 /// Immediate Bit Negate
2324 ///
2325 /// Negate (complement) one bit in each element of vector `a` (eight unsigned 16-bit integer numbers).
2326 /// The bit position is given by immediate `imm4` modulo the size of the element in bits.
2327 /// The result is written to vector (eight unsigned 16-bit integer numbers).
2328 ///
2329 #[inline]
2330 #[target_feature(enable = "msa")]
2331 #[cfg_attr(test, assert_instr(bnegi.h, imm4 = 0b1111))]
2332 #[rustc_legacy_const_generics(1)]
__msa_bnegi_h<const IMM4: i32>(a: v8u16) -> v8u162333 pub unsafe fn __msa_bnegi_h<const IMM4: i32>(a: v8u16) -> v8u16 {
2334     static_assert_imm4!(IMM4);
2335     msa_bnegi_h(a, IMM4)
2336 }
2337 
2338 /// Immediate Bit Negate
2339 ///
2340 /// Negate (complement) one bit in each element of vector `a` (four unsigned 32-bit integer numbers).
2341 /// The bit position is given by immediate `imm5` modulo the size of the element in bits.
2342 /// The result is written to vector (four unsigned 32-bit integer numbers).
2343 ///
2344 #[inline]
2345 #[target_feature(enable = "msa")]
2346 #[cfg_attr(test, assert_instr(bnegi.w, imm5 = 0b11111))]
2347 #[rustc_legacy_const_generics(1)]
__msa_bnegi_w<const IMM5: i32>(a: v4u32) -> v4u322348 pub unsafe fn __msa_bnegi_w<const IMM5: i32>(a: v4u32) -> v4u32 {
2349     static_assert_imm5!(IMM5);
2350     msa_bnegi_w(a, IMM5)
2351 }
2352 
2353 /// Immediate Bit Negate
2354 ///
2355 /// Negate (complement) one bit in each element of vector `a` (two unsigned 64-bit integer numbers).
2356 /// The bit position is given by immediate `imm6` modulo the size of the element in bits.
2357 /// The result is written to vector (two unsigned 64-bit integer numbers).
2358 ///
2359 #[inline]
2360 #[target_feature(enable = "msa")]
2361 #[cfg_attr(test, assert_instr(bnegi.d, imm6 = 0b111111))]
2362 #[rustc_legacy_const_generics(1)]
__msa_bnegi_d<const IMM6: i32>(a: v2u64) -> v2u642363 pub unsafe fn __msa_bnegi_d<const IMM6: i32>(a: v2u64) -> v2u64 {
2364     static_assert_imm6!(IMM6);
2365     msa_bnegi_d(a, IMM6)
2366 }
2367 
2368 /// Immediate Branch If All Elements Are Not Zero
2369 ///
2370 /// PC-relative branch if all elements in `a` (sixteen unsigned 8-bit integer numbers) are not zero.
2371 ///
2372 #[inline]
2373 #[target_feature(enable = "msa")]
2374 #[cfg_attr(test, assert_instr(bnz.b))]
__msa_bnz_b(a: v16u8) -> i322375 pub unsafe fn __msa_bnz_b(a: v16u8) -> i32 {
2376     msa_bnz_b(a)
2377 }
2378 
2379 /// Immediate Branch If All Elements Are Not Zero
2380 ///
2381 /// PC-relative branch if all elements in `a` (eight unsigned 16-bit integer numbers) are not zero.
2382 ///
2383 #[inline]
2384 #[target_feature(enable = "msa")]
2385 #[cfg_attr(test, assert_instr(bnz.h))]
__msa_bnz_h(a: v8u16) -> i322386 pub unsafe fn __msa_bnz_h(a: v8u16) -> i32 {
2387     msa_bnz_h(a)
2388 }
2389 
2390 /// Immediate Branch If All Elements Are Not Zero
2391 ///
2392 /// PC-relative branch if all elements in `a` (four unsigned 32-bit integer numbers) are not zero.
2393 ///
2394 #[inline]
2395 #[target_feature(enable = "msa")]
2396 #[cfg_attr(test, assert_instr(bnz.w))]
__msa_bnz_w(a: v4u32) -> i322397 pub unsafe fn __msa_bnz_w(a: v4u32) -> i32 {
2398     msa_bnz_w(a)
2399 }
2400 
2401 /// Immediate Branch If All Elements Are Not Zero
2402 ///
2403 /// PC-relative branch if all elements in `a` (two unsigned 64-bit integer numbers) are not zero.
2404 ///
2405 #[inline]
2406 #[target_feature(enable = "msa")]
2407 #[cfg_attr(test, assert_instr(bnz.d))]
__msa_bnz_d(a: v2u64) -> i322408 pub unsafe fn __msa_bnz_d(a: v2u64) -> i32 {
2409     msa_bnz_d(a)
2410 }
2411 
2412 /// Immediate Branch If Not Zero (At Least One Element of Any Format Is Not Zero)
2413 ///
2414 /// PC-relative branch if at least one bit in `a` (four unsigned 32-bit integer numbers) are not zero.
2415 /// i.e at least one element is not zero regardless of the data format.
2416 ///
2417 #[inline]
2418 #[target_feature(enable = "msa")]
2419 #[cfg_attr(test, assert_instr(bnz.v))]
__msa_bnz_v(a: v16u8) -> i322420 pub unsafe fn __msa_bnz_v(a: v16u8) -> i32 {
2421     msa_bnz_v(a)
2422 }
2423 
2424 /// Vector Bit Select
2425 ///
2426 /// Selectively copy bits from the source vectors `b` (eight unsigned 16-bit integer numbers)
2427 /// and `c` (eight unsigned 16-bit integer numbers)
2428 /// into destination vector `a` (eight unsigned 16-bit integer numbers) based on the corresponding bit in `a`:
2429 /// if 0 copies the bit from `b`, if 1 copies the bit from `c`.
2430 ///
2431 #[inline]
2432 #[target_feature(enable = "msa")]
2433 #[cfg_attr(test, assert_instr(bsel.v))]
__msa_bsel_v(a: v16u8, b: v16u8, c: v16u8) -> v16u82434 pub unsafe fn __msa_bsel_v(a: v16u8, b: v16u8, c: v16u8) -> v16u8 {
2435     msa_bsel_v(a, mem::transmute(b), c)
2436 }
2437 
2438 /// Immediate Bit Select
2439 ///
2440 /// Selectively copy bits from the 8-bit immediate `imm8` and `c` (eight unsigned 16-bit integer numbers)
2441 /// into destination vector `a` (eight unsigned 16-bit integer numbers) based on the corresponding bit in `a`:
2442 /// if 0 copies the bit from `b`, if 1 copies the bit from `c`.
2443 ///
2444 #[inline]
2445 #[target_feature(enable = "msa")]
2446 #[cfg_attr(test, assert_instr(bseli.b, imm8 = 0b11111111))]
2447 #[rustc_legacy_const_generics(2)]
__msa_bseli_b<const IMM8: i32>(a: v16u8, b: v16u8) -> v16u82448 pub unsafe fn __msa_bseli_b<const IMM8: i32>(a: v16u8, b: v16u8) -> v16u8 {
2449     static_assert_imm8!(IMM8);
2450     msa_bseli_b(a, mem::transmute(b), IMM8)
2451 }
2452 
2453 /// Vector Bit Set
2454 ///
2455 /// Set to 1 one bit in each element of vector `a` (sixteen unsigned 8-bit integer numbers).
2456 /// The bit position is given by the elements in vector `b` (sixteen unsigned 8-bit integer numbers)
2457 /// modulo the size of the element in bits.
2458 /// The result is written to vector (sixteen unsigned 8-bit integer numbers).
2459 ///
2460 #[inline]
2461 #[target_feature(enable = "msa")]
2462 #[cfg_attr(test, assert_instr(bset.b))]
__msa_bset_b(a: v16u8, b: v16u8) -> v16u82463 pub unsafe fn __msa_bset_b(a: v16u8, b: v16u8) -> v16u8 {
2464     msa_bset_b(a, mem::transmute(b))
2465 }
2466 
2467 /// Vector Bit Set
2468 ///
2469 /// Set to 1 one bit in each element of vector `a` (eight unsigned 16-bit integer numbers).
2470 /// The bit position is given by the elements in vector `b` (eight unsigned 16-bit integer numbers)
2471 /// modulo the size of the element in bits.
2472 /// The result is written to vector (eight unsigned 16-bit integer numbers).
2473 ///
2474 #[inline]
2475 #[target_feature(enable = "msa")]
2476 #[cfg_attr(test, assert_instr(bset.h))]
__msa_bset_h(a: v8u16, b: v8u16) -> v8u162477 pub unsafe fn __msa_bset_h(a: v8u16, b: v8u16) -> v8u16 {
2478     msa_bset_h(a, mem::transmute(b))
2479 }
2480 
2481 /// Vector Bit Set
2482 ///
2483 /// Set to 1 one bit in each element of vector `a` (four unsigned 32-bit integer numbers).
2484 /// The bit position is given by the elements in vector `b` (four unsigned 32-bit integer numbers)
2485 /// modulo the size of the element in bits.
2486 /// The result is written to vector (four unsigned 32-bit integer numbers).
2487 ///
2488 #[inline]
2489 #[target_feature(enable = "msa")]
2490 #[cfg_attr(test, assert_instr(bset.w))]
__msa_bset_w(a: v4u32, b: v4u32) -> v4u322491 pub unsafe fn __msa_bset_w(a: v4u32, b: v4u32) -> v4u32 {
2492     msa_bset_w(a, mem::transmute(b))
2493 }
2494 
2495 /// Vector Bit Set
2496 ///
2497 /// Set to 1 one bit in each element of vector `a` (two unsigned 64-bit integer numbers).
2498 /// The bit position is given by the elements in vector `b` (two unsigned 64-bit integer numbers)
2499 /// modulo the size of the element in bits.
2500 /// The result is written to vector (two unsigned 64-bit integer numbers).
2501 ///
2502 #[inline]
2503 #[target_feature(enable = "msa")]
2504 #[cfg_attr(test, assert_instr(bset.d))]
__msa_bset_d(a: v2u64, b: v2u64) -> v2u642505 pub unsafe fn __msa_bset_d(a: v2u64, b: v2u64) -> v2u64 {
2506     msa_bset_d(a, mem::transmute(b))
2507 }
2508 
2509 /// Immediate Bit Set
2510 ///
2511 /// Set to 1 one bit in each element of vector `a` (sixteen unsigned 8-bit integer numbers).
2512 /// The bit position is given by immediate `imm3`.
2513 /// The result is written to vector `a` (sixteen unsigned 8-bit integer numbers).
2514 ///
2515 #[inline]
2516 #[target_feature(enable = "msa")]
2517 #[cfg_attr(test, assert_instr(bseti.b, imm3 = 0b111))]
2518 #[rustc_legacy_const_generics(1)]
__msa_bseti_b<const IMM3: i32>(a: v16u8) -> v16u82519 pub unsafe fn __msa_bseti_b<const IMM3: i32>(a: v16u8) -> v16u8 {
2520     static_assert_imm3!(IMM3);
2521     msa_bseti_b(a, IMM3)
2522 }
2523 
2524 /// Immediate Bit Set
2525 ///
2526 /// Set to 1 one bit in each element of vector `a` (eight unsigned 16-bit integer numbers).
2527 /// The bit position is given by immediate `imm4`.
2528 /// The result is written to vector `a` (eight unsigned 16-bit integer numbers).
2529 ///
2530 #[inline]
2531 #[target_feature(enable = "msa")]
2532 #[cfg_attr(test, assert_instr(bseti.h, imm4 = 0b1111))]
2533 #[rustc_legacy_const_generics(1)]
__msa_bseti_h<const IMM4: i32>(a: v8u16) -> v8u162534 pub unsafe fn __msa_bseti_h<const IMM4: i32>(a: v8u16) -> v8u16 {
2535     static_assert_imm4!(IMM4);
2536     msa_bseti_h(a, IMM4)
2537 }
2538 
2539 /// Immediate Bit Set
2540 ///
2541 /// Set to 1 one bit in each element of vector `a` (four unsigned 32-bit integer numbers).
2542 /// The bit position is given by immediate `imm5`.
2543 /// The result is written to vector `a` (four unsigned 32-bit integer numbers).
2544 ///
2545 #[inline]
2546 #[target_feature(enable = "msa")]
2547 #[cfg_attr(test, assert_instr(bseti.w, imm5 = 0b11111))]
2548 #[rustc_legacy_const_generics(1)]
__msa_bseti_w<const IMM5: i32>(a: v4u32) -> v4u322549 pub unsafe fn __msa_bseti_w<const IMM5: i32>(a: v4u32) -> v4u32 {
2550     static_assert_imm5!(IMM5);
2551     msa_bseti_w(a, IMM5)
2552 }
2553 
2554 /// Immediate Bit Set
2555 ///
2556 /// Set to 1 one bit in each element of vector `a` (two unsigned 64-bit integer numbers).
2557 /// The bit position is given by immediate `imm6`.
2558 /// The result is written to vector `a` (two unsigned 64-bit integer numbers).
2559 ///
2560 #[inline]
2561 #[target_feature(enable = "msa")]
2562 #[cfg_attr(test, assert_instr(bseti.d, imm6 = 0b111111))]
2563 #[rustc_legacy_const_generics(1)]
__msa_bseti_d<const IMM6: i32>(a: v2u64) -> v2u642564 pub unsafe fn __msa_bseti_d<const IMM6: i32>(a: v2u64) -> v2u64 {
2565     static_assert_imm6!(IMM6);
2566     msa_bseti_d(a, IMM6)
2567 }
2568 
2569 /// Immediate Branch If At Least One Element Is Zero
2570 ///
2571 /// PC-relative branch if at least one element in `a` (sixteen unsigned 8-bit integer numbers) is zero.
2572 ///
2573 #[inline]
2574 #[target_feature(enable = "msa")]
2575 #[cfg_attr(test, assert_instr(bz.b))]
__msa_bz_b(a: v16u8) -> i322576 pub unsafe fn __msa_bz_b(a: v16u8) -> i32 {
2577     msa_bz_b(a)
2578 }
2579 
2580 /// Immediate Branch If At Least One Element Is Zero
2581 ///
2582 /// PC-relative branch if at least one element in `a` (eight unsigned 16-bit integer numbers) is zero.
2583 ///
2584 #[inline]
2585 #[target_feature(enable = "msa")]
2586 #[cfg_attr(test, assert_instr(bz.h))]
__msa_bz_h(a: v8u16) -> i322587 pub unsafe fn __msa_bz_h(a: v8u16) -> i32 {
2588     msa_bz_h(a)
2589 }
2590 
2591 /// Immediate Branch If At Least One Element Is Zero
2592 ///
2593 /// PC-relative branch if at least one element in `a` (four unsigned 32-bit integer numbers) is zero.
2594 ///
2595 #[inline]
2596 #[target_feature(enable = "msa")]
2597 #[cfg_attr(test, assert_instr(bz.w))]
__msa_bz_w(a: v4u32) -> i322598 pub unsafe fn __msa_bz_w(a: v4u32) -> i32 {
2599     msa_bz_w(a)
2600 }
2601 
2602 /// Immediate Branch If At Least One Element Is Zero
2603 ///
2604 /// PC-relative branch if at least one element in `a` (two unsigned 64-bit integer numbers) is zero.
2605 ///
2606 #[inline]
2607 #[target_feature(enable = "msa")]
2608 #[cfg_attr(test, assert_instr(bz.d))]
__msa_bz_d(a: v2u64) -> i322609 pub unsafe fn __msa_bz_d(a: v2u64) -> i32 {
2610     msa_bz_d(a)
2611 }
2612 
2613 /// Immediate Branch If Zero (All Elements of Any Format Are Zero)
2614 ///
2615 /// PC-relative branch if all elements in `a` (sixteen unsigned 8-bit integer numbers) bits are zero,
2616 /// i.e. all elements are zero regardless of the data format.
2617 ///
2618 #[inline]
2619 #[target_feature(enable = "msa")]
2620 #[cfg_attr(test, assert_instr(bz.v))]
__msa_bz_v(a: v16u8) -> i322621 pub unsafe fn __msa_bz_v(a: v16u8) -> i32 {
2622     msa_bz_v(a)
2623 }
2624 
2625 /// Vector Compare Equal
2626 ///
2627 /// Set all bits to 1 in vector (sixteen signed 8-bit integer numbers) elements
2628 /// if the corresponding `a` (sixteen signed 8-bit integer numbers) and `b` (sixteen signed 8-bit integer numbers)
2629 /// elements are equal, otherwise set all bits to 0.
2630 ///
2631 #[inline]
2632 #[target_feature(enable = "msa")]
2633 #[cfg_attr(test, assert_instr(ceq.b))]
__msa_ceq_b(a: v16i8, b: v16i8) -> v16i82634 pub unsafe fn __msa_ceq_b(a: v16i8, b: v16i8) -> v16i8 {
2635     msa_ceq_b(a, mem::transmute(b))
2636 }
2637 
2638 /// Vector Compare Equal
2639 ///
2640 /// Set all bits to 1 in vector (eight signed 16-bit integer numbers) elements
2641 /// if the corresponding `a` (eight signed 16-bit integer numbers) and `b` (eight signed 16-bit integer numbers)
2642 /// elements are equal, otherwise set all bits to 0.
2643 ///
2644 #[inline]
2645 #[target_feature(enable = "msa")]
2646 #[cfg_attr(test, assert_instr(ceq.h))]
__msa_ceq_h(a: v8i16, b: v8i16) -> v8i162647 pub unsafe fn __msa_ceq_h(a: v8i16, b: v8i16) -> v8i16 {
2648     msa_ceq_h(a, mem::transmute(b))
2649 }
2650 
2651 /// Vector Compare Equal
2652 ///
2653 /// Set all bits to 1 in vector (four signed 32-bit integer numbers) elements
2654 /// if the corresponding `a` (four signed 32-bit integer numbers) and `b` (four signed 32-bit integer numbers)
2655 /// elements are equal, otherwise set all bits to 0.
2656 ///
2657 #[inline]
2658 #[target_feature(enable = "msa")]
2659 #[cfg_attr(test, assert_instr(ceq.w))]
__msa_ceq_w(a: v4i32, b: v4i32) -> v4i322660 pub unsafe fn __msa_ceq_w(a: v4i32, b: v4i32) -> v4i32 {
2661     msa_ceq_w(a, mem::transmute(b))
2662 }
2663 
2664 /// Vector Compare Equal
2665 ///
2666 /// Set all bits to 1 in vector (two signed 64-bit integer numbers) elements
2667 /// if the corresponding `a` (two signed 64-bit integer numbers) and `b` (two signed 64-bit integer numbers)
2668 /// elements are equal, otherwise set all bits to 0.
2669 ///
2670 #[inline]
2671 #[target_feature(enable = "msa")]
2672 #[cfg_attr(test, assert_instr(ceq.d))]
__msa_ceq_d(a: v2i64, b: v2i64) -> v2i642673 pub unsafe fn __msa_ceq_d(a: v2i64, b: v2i64) -> v2i64 {
2674     msa_ceq_d(a, mem::transmute(b))
2675 }
2676 
2677 /// Immediate Compare Equal
2678 ///
2679 /// Set all bits to 1 in vector (sixteen signed 8-bit integer numbers) elements
2680 /// if the corresponding `a` (sixteen signed 8-bit integer numbers) the 5-bit signed immediate imm_s5
2681 /// are equal, otherwise set all bits to 0.
2682 ///
2683 #[inline]
2684 #[target_feature(enable = "msa")]
2685 #[cfg_attr(test, assert_instr(ceqi.b, imm_s5 = 0b11111))]
2686 #[rustc_legacy_const_generics(1)]
__msa_ceqi_b<const IMM_S5: i32>(a: v16i8) -> v16i82687 pub unsafe fn __msa_ceqi_b<const IMM_S5: i32>(a: v16i8) -> v16i8 {
2688     static_assert_imm_s5!(IMM_S5);
2689     msa_ceqi_b(a, IMM_S5)
2690 }
2691 
2692 /// Immediate Compare Equal
2693 ///
2694 /// Set all bits to 1 in vector (eight signed 16-bit integer numbers) elements
2695 /// if the corresponding `a` (eight signed 16-bit integer numbers) the 5-bit signed immediate imm_s5
2696 /// are equal, otherwise set all bits to 0.
2697 ///
2698 #[inline]
2699 #[target_feature(enable = "msa")]
2700 #[cfg_attr(test, assert_instr(ceqi.h, imm_s5 = 0b11111))]
2701 #[rustc_legacy_const_generics(1)]
__msa_ceqi_h<const IMM_S5: i32>(a: v8i16) -> v8i162702 pub unsafe fn __msa_ceqi_h<const IMM_S5: i32>(a: v8i16) -> v8i16 {
2703     static_assert_imm_s5!(IMM_S5);
2704     msa_ceqi_h(a, IMM_S5)
2705 }
2706 
2707 /// Immediate Compare Equal
2708 ///
2709 /// Set all bits to 1 in vector (four signed 32-bit integer numbers) elements
2710 /// if the corresponding `a` (four signed 32-bit integer numbers) the 5-bit signed immediate imm_s5
2711 /// are equal, otherwise set all bits to 0.
2712 ///
2713 #[inline]
2714 #[target_feature(enable = "msa")]
2715 #[cfg_attr(test, assert_instr(ceqi.w, imm_s5 = 0b11111))]
2716 #[rustc_legacy_const_generics(1)]
__msa_ceqi_w<const IMM_S5: i32>(a: v4i32) -> v4i322717 pub unsafe fn __msa_ceqi_w<const IMM_S5: i32>(a: v4i32) -> v4i32 {
2718     static_assert_imm_s5!(IMM_S5);
2719     msa_ceqi_w(a, IMM_S5)
2720 }
2721 
2722 /// Immediate Compare Equal
2723 ///
2724 /// Set all bits to 1 in vector (two signed 64-bit integer numbers) elements
2725 /// if the corresponding `a` (two signed 64-bit integer numbers) the 5-bit signed immediate imm_s5
2726 /// are equal, otherwise set all bits to 0.
2727 ///
2728 #[inline]
2729 #[target_feature(enable = "msa")]
2730 #[cfg_attr(test, assert_instr(ceqi.d, imm_s5 = 0b11111))]
2731 #[rustc_legacy_const_generics(1)]
__msa_ceqi_d<const IMM_S5: i32>(a: v2i64) -> v2i642732 pub unsafe fn __msa_ceqi_d<const IMM_S5: i32>(a: v2i64) -> v2i64 {
2733     static_assert_imm_s5!(IMM_S5);
2734     msa_ceqi_d(a, IMM_S5)
2735 }
2736 
2737 /// GPR Copy from MSA Control Register
2738 ///
2739 /// The sign extended content of MSA control register cs is copied to GPR rd.
2740 ///
2741 /// Can not be tested in user mode
2742 #[inline]
2743 #[target_feature(enable = "msa")]
2744 #[cfg_attr(test, assert_instr(cfcmsa, imm5 = 0b11111))]
2745 #[rustc_legacy_const_generics(0)]
__msa_cfcmsa<const IMM5: i32>() -> i322746 pub unsafe fn __msa_cfcmsa<const IMM5: i32>() -> i32 {
2747     static_assert_imm5!(IMM5);
2748     msa_cfcmsa(IMM5)
2749 }
2750 
2751 /// Vector Compare Signed Less Than or Equal
2752 ///
2753 /// Set all bits to 1 in vector (sixteen signed 8-bit integer numbers) elements
2754 /// if the corresponding `a` (sixteen signed 8-bit integer numbers) element
2755 /// are signed less than or equal to `b` (sixteen signed 8-bit integer numbers) element.
2756 /// Otherwise set all bits to 0.
2757 ///
2758 #[inline]
2759 #[target_feature(enable = "msa")]
2760 #[cfg_attr(test, assert_instr(cle_s.b))]
__msa_cle_s_b(a: v16i8, b: v16i8) -> v16i82761 pub unsafe fn __msa_cle_s_b(a: v16i8, b: v16i8) -> v16i8 {
2762     msa_cle_s_b(a, mem::transmute(b))
2763 }
2764 
2765 /// Vector Compare Signed Less Than or Equal
2766 ///
2767 /// Set all bits to 1 in vector (eight signed 16-bit integer numbers) elements
2768 /// if the corresponding `a` (eight signed 16-bit integer numbers) element
2769 /// are signed less than or equal to `b` (eight signed 16-bit integer numbers) element.
2770 /// Otherwise set all bits to 0.
2771 ///
2772 #[inline]
2773 #[target_feature(enable = "msa")]
2774 #[cfg_attr(test, assert_instr(cle_s.h))]
__msa_cle_s_h(a: v8i16, b: v8i16) -> v8i162775 pub unsafe fn __msa_cle_s_h(a: v8i16, b: v8i16) -> v8i16 {
2776     msa_cle_s_h(a, mem::transmute(b))
2777 }
2778 
2779 /// Vector Compare Signed Less Than or Equal
2780 ///
2781 /// Set all bits to 1 in vector (four signed 32-bit integer numbers) elements
2782 /// if the corresponding `a` (four signed 32-bit integer numbers) element
2783 /// are signed less than or equal to `b` (four signed 32-bit integer numbers) element.
2784 /// Otherwise set all bits to 0.
2785 ///
2786 #[inline]
2787 #[target_feature(enable = "msa")]
2788 #[cfg_attr(test, assert_instr(cle_s.w))]
__msa_cle_s_w(a: v4i32, b: v4i32) -> v4i322789 pub unsafe fn __msa_cle_s_w(a: v4i32, b: v4i32) -> v4i32 {
2790     msa_cle_s_w(a, mem::transmute(b))
2791 }
2792 
2793 /// Vector Compare Signed Less Than or Equal
2794 ///
2795 /// Set all bits to 1 in vector (two signed 64-bit integer numbers) elements
2796 /// if the corresponding `a` (two signed 64-bit integer numbers) element
2797 /// are signed less than or equal to `b` (two signed 64-bit integer numbers) element.
2798 /// Otherwise set all bits to 0.
2799 ///
2800 #[inline]
2801 #[target_feature(enable = "msa")]
2802 #[cfg_attr(test, assert_instr(cle_s.d))]
__msa_cle_s_d(a: v2i64, b: v2i64) -> v2i642803 pub unsafe fn __msa_cle_s_d(a: v2i64, b: v2i64) -> v2i64 {
2804     msa_cle_s_d(a, mem::transmute(b))
2805 }
2806 
2807 /// Vector Compare Unsigned Less Than or Equal
2808 ///
2809 /// Set all bits to 1 in vector (sixteen signed 8-bit integer numbers) elements
2810 /// if the corresponding `a` (sixteen unsigned 8-bit integer numbers) element
2811 /// are unsigned less than or equal to `b` (sixteen unsigned 8-bit integer numbers) element.
2812 /// Otherwise set all bits to 0.
2813 ///
2814 #[inline]
2815 #[target_feature(enable = "msa")]
2816 #[cfg_attr(test, assert_instr(cle_u.b))]
__msa_cle_u_b(a: v16u8, b: v16u8) -> v16i82817 pub unsafe fn __msa_cle_u_b(a: v16u8, b: v16u8) -> v16i8 {
2818     msa_cle_u_b(a, mem::transmute(b))
2819 }
2820 
2821 /// Vector Compare Unsigned Less Than or Equal
2822 ///
2823 /// Set all bits to 1 in vector (eight signed 16-bit integer numbers) elements
2824 /// if the corresponding `a` (eight unsigned 16-bit integer numbers) element
2825 /// are unsigned less than or equal to `b` (eight unsigned 16-bit integer numbers) element.
2826 /// Otherwise set all bits to 0.
2827 ///
2828 #[inline]
2829 #[target_feature(enable = "msa")]
2830 #[cfg_attr(test, assert_instr(cle_u.h))]
__msa_cle_u_h(a: v8u16, b: v8u16) -> v8i162831 pub unsafe fn __msa_cle_u_h(a: v8u16, b: v8u16) -> v8i16 {
2832     msa_cle_u_h(a, mem::transmute(b))
2833 }
2834 
2835 /// Vector Compare Unsigned Less Than or Equal
2836 ///
2837 /// Set all bits to 1 in vector (four signed 32-bit integer numbers) elements
2838 /// if the corresponding `a` (four unsigned 32-bit integer numbers) element
2839 /// are unsigned less than or equal to `b` (four unsigned 32-bit integer numbers) element.
2840 /// Otherwise set all bits to 0.
2841 ///
2842 #[inline]
2843 #[target_feature(enable = "msa")]
2844 #[cfg_attr(test, assert_instr(cle_u.w))]
__msa_cle_u_w(a: v4u32, b: v4u32) -> v4i322845 pub unsafe fn __msa_cle_u_w(a: v4u32, b: v4u32) -> v4i32 {
2846     msa_cle_u_w(a, mem::transmute(b))
2847 }
2848 
2849 /// Vector Compare Unsigned Less Than or Equal
2850 ///
2851 /// Set all bits to 1 in vector (two signed 64-bit integer numbers) elements
2852 /// if the corresponding `a` (two unsigned 64-bit integer numbers) element
2853 /// are unsigned less than or equal to `b` (two unsigned 64-bit integer numbers) element.
2854 /// Otherwise set all bits to 0.
2855 ///
2856 #[inline]
2857 #[target_feature(enable = "msa")]
2858 #[cfg_attr(test, assert_instr(cle_u.d))]
__msa_cle_u_d(a: v2u64, b: v2u64) -> v2i642859 pub unsafe fn __msa_cle_u_d(a: v2u64, b: v2u64) -> v2i64 {
2860     msa_cle_u_d(a, mem::transmute(b))
2861 }
2862 
2863 /// Immediate Compare Signed Less Than or Equal
2864 ///
2865 /// Set all bits to 1 in vector (sixteen signed 8-bit integer numbers) elements
2866 /// if the corresponding `a` (sixteen signed 8-bit integer numbers) element
2867 /// is less than or equal to the 5-bit signed immediate imm_s5,
2868 /// otherwise set all bits to 0.
2869 ///
2870 #[inline]
2871 #[target_feature(enable = "msa")]
2872 #[cfg_attr(test, assert_instr(clei_s.b, imm_s5 = 0b11111))]
2873 #[rustc_legacy_const_generics(1)]
__msa_clei_s_b<const IMM_S5: i32>(a: v16i8) -> v16i82874 pub unsafe fn __msa_clei_s_b<const IMM_S5: i32>(a: v16i8) -> v16i8 {
2875     static_assert_imm_s5!(IMM_S5);
2876     msa_clei_s_b(a, IMM_S5)
2877 }
2878 
2879 /// Immediate Compare Signed Less Than or Equal
2880 ///
2881 /// Set all bits to 1 in vector (eight signed 16-bit integer numbers) elements
2882 /// if the corresponding `a` (eight signed 16-bit integer numbers) element
2883 /// is less than or equal to the 5-bit signed immediate imm_s5,
2884 /// otherwise set all bits to 0.
2885 ///
2886 #[inline]
2887 #[target_feature(enable = "msa")]
2888 #[cfg_attr(test, assert_instr(clei_s.h, imm_s5 = 0b11111))]
2889 #[rustc_legacy_const_generics(1)]
__msa_clei_s_h<const IMM_S5: i32>(a: v8i16) -> v8i162890 pub unsafe fn __msa_clei_s_h<const IMM_S5: i32>(a: v8i16) -> v8i16 {
2891     static_assert_imm_s5!(IMM_S5);
2892     msa_clei_s_h(a, IMM_S5)
2893 }
2894 
2895 /// Immediate Compare Signed Less Than or Equal
2896 ///
2897 /// Set all bits to 1 in vector (four signed 32-bit integer numbers) elements
2898 /// if the corresponding `a` (four signed 32-bit integer numbers) element
2899 /// is less than or equal to the 5-bit signed immediate imm_s5,
2900 /// otherwise set all bits to 0.
2901 ///
2902 #[inline]
2903 #[target_feature(enable = "msa")]
2904 #[cfg_attr(test, assert_instr(clei_s.w, imm_s5 = 0b11111))]
2905 #[rustc_legacy_const_generics(1)]
__msa_clei_s_w<const IMM_S5: i32>(a: v4i32) -> v4i322906 pub unsafe fn __msa_clei_s_w<const IMM_S5: i32>(a: v4i32) -> v4i32 {
2907     static_assert_imm_s5!(IMM_S5);
2908     msa_clei_s_w(a, IMM_S5)
2909 }
2910 
2911 /// Immediate Compare Signed Less Than or Equal
2912 ///
2913 /// Set all bits to 1 in vector (two signed 64-bit integer numbers) elements
2914 /// if the corresponding `a` (two signed 64-bit integer numbers) element
2915 /// is less than or equal to the 5-bit signed immediate imm_s5,
2916 /// otherwise set all bits to 0.
2917 ///
2918 #[inline]
2919 #[target_feature(enable = "msa")]
2920 #[cfg_attr(test, assert_instr(clei_s.d, imm_s5 = 0b11111))]
2921 #[rustc_legacy_const_generics(1)]
__msa_clei_s_d<const IMM_S5: i32>(a: v2i64) -> v2i642922 pub unsafe fn __msa_clei_s_d<const IMM_S5: i32>(a: v2i64) -> v2i64 {
2923     static_assert_imm_s5!(IMM_S5);
2924     msa_clei_s_d(a, IMM_S5)
2925 }
2926 
2927 /// Immediate Compare Unsigned Less Than or Equal
2928 ///
2929 /// Set all bits to 1 in vector (sixteen signed 8-bit integer numbers) elements
2930 /// if the corresponding `a` (sixteen unsigned 8-bit integer numbers) element
2931 /// is unsigned less than or equal to the 5-bit unsigned immediate `imm5`,
2932 /// otherwise set all bits to 0.
2933 ///
2934 #[inline]
2935 #[target_feature(enable = "msa")]
2936 #[cfg_attr(test, assert_instr(clei_u.b, imm5 = 0b111))]
2937 #[rustc_legacy_const_generics(1)]
__msa_clei_u_b<const IMM5: i32>(a: v16u8) -> v16i82938 pub unsafe fn __msa_clei_u_b<const IMM5: i32>(a: v16u8) -> v16i8 {
2939     static_assert_imm5!(IMM5);
2940     msa_clei_u_b(a, IMM5)
2941 }
2942 
2943 /// Immediate Compare Unsigned Less Than or Equal
2944 ///
2945 /// Set all bits to 1 in vector (eight signed 16-bit integer numbers) elements
2946 /// if the corresponding `a` (eight unsigned 16-bit integer numbers) element
2947 /// is unsigned less than or equal to the 5-bit unsigned immediate `imm5`,
2948 /// otherwise set all bits to 0.
2949 ///
2950 #[inline]
2951 #[target_feature(enable = "msa")]
2952 #[cfg_attr(test, assert_instr(clei_u.h, imm5 = 0b11111))]
2953 #[rustc_legacy_const_generics(1)]
__msa_clei_u_h<const IMM5: i32>(a: v8u16) -> v8i162954 pub unsafe fn __msa_clei_u_h<const IMM5: i32>(a: v8u16) -> v8i16 {
2955     static_assert_imm5!(IMM5);
2956     msa_clei_u_h(a, IMM5)
2957 }
2958 
2959 /// Immediate Compare Unsigned Less Than or Equal
2960 ///
2961 /// Set all bits to 1 in vector (four signed 32-bit integer numbers) elements
2962 /// if the corresponding `a` (four unsigned 32-bit integer numbers) element
2963 /// is unsigned less than or equal to the 5-bit unsigned immediate `imm5`,
2964 /// otherwise set all bits to 0.
2965 ///
2966 #[inline]
2967 #[target_feature(enable = "msa")]
2968 #[cfg_attr(test, assert_instr(clei_u.w, imm5 = 0b11111))]
2969 #[rustc_legacy_const_generics(1)]
__msa_clei_u_w<const IMM5: i32>(a: v4u32) -> v4i322970 pub unsafe fn __msa_clei_u_w<const IMM5: i32>(a: v4u32) -> v4i32 {
2971     static_assert_imm5!(IMM5);
2972     msa_clei_u_w(a, IMM5)
2973 }
2974 
2975 /// Immediate Compare Unsigned Less Than or Equal
2976 ///
2977 /// Set all bits to 1 in vector (two signed 64-bit integer numbers) elements
2978 /// if the corresponding `a` (two unsigned 64-bit integer numbers) element
2979 /// is unsigned less than or equal to the 5-bit unsigned immediate `imm5`,
2980 /// otherwise set all bits to 0.
2981 ///
2982 #[inline]
2983 #[target_feature(enable = "msa")]
2984 #[cfg_attr(test, assert_instr(clei_u.d, imm5 = 0b11111))]
2985 #[rustc_legacy_const_generics(1)]
__msa_clei_u_d<const IMM5: i32>(a: v2u64) -> v2i642986 pub unsafe fn __msa_clei_u_d<const IMM5: i32>(a: v2u64) -> v2i64 {
2987     static_assert_imm5!(IMM5);
2988     msa_clei_u_d(a, IMM5)
2989 }
2990 
2991 /// Vector Compare Signed Less Than
2992 ///
2993 /// Set all bits to 1 in vector (sixteen signed 8-bit integer numbers) elements
2994 /// if the corresponding `a` (sixteen signed 8-bit integer numbers) element
2995 /// are signed less than `b` (sixteen signed 8-bit integer numbers) element.
2996 /// Otherwise set all bits to 0.
2997 ///
2998 #[inline]
2999 #[target_feature(enable = "msa")]
3000 #[cfg_attr(test, assert_instr(clt_s.b))]
__msa_clt_s_b(a: v16i8, b: v16i8) -> v16i83001 pub unsafe fn __msa_clt_s_b(a: v16i8, b: v16i8) -> v16i8 {
3002     msa_clt_s_b(a, mem::transmute(b))
3003 }
3004 
3005 /// Vector Compare Signed Less Than
3006 ///
3007 /// Set all bits to 1 in vector (eight signed 16-bit integer numbers) elements
3008 /// if the corresponding `a` (eight signed 16-bit integer numbers) element
3009 /// are signed less than `b` (eight signed 16-bit integer numbers) element.
3010 /// Otherwise set all bits to 0.
3011 ///
3012 #[inline]
3013 #[target_feature(enable = "msa")]
3014 #[cfg_attr(test, assert_instr(clt_s.h))]
__msa_clt_s_h(a: v8i16, b: v8i16) -> v8i163015 pub unsafe fn __msa_clt_s_h(a: v8i16, b: v8i16) -> v8i16 {
3016     msa_clt_s_h(a, mem::transmute(b))
3017 }
3018 
3019 /// Vector Compare Signed Less Than
3020 ///
3021 /// Set all bits to 1 in vector (four signed 32-bit integer numbers) elements
3022 /// if the corresponding `a` (four signed 32-bit integer numbers) element
3023 /// are signed less than `b` (four signed 32-bit integer numbers) element.
3024 /// Otherwise set all bits to 0.
3025 ///
3026 #[inline]
3027 #[target_feature(enable = "msa")]
3028 #[cfg_attr(test, assert_instr(clt_s.w))]
__msa_clt_s_w(a: v4i32, b: v4i32) -> v4i323029 pub unsafe fn __msa_clt_s_w(a: v4i32, b: v4i32) -> v4i32 {
3030     msa_clt_s_w(a, mem::transmute(b))
3031 }
3032 
3033 /// Vector Compare Signed Less Than
3034 ///
3035 /// Set all bits to 1 in vector (two signed 64-bit integer numbers) elements
3036 /// if the corresponding `a` (two signed 64-bit integer numbers) element
3037 /// are signed less than `b` (two signed 64-bit integer numbers) element.
3038 /// Otherwise set all bits to 0.
3039 ///
3040 #[inline]
3041 #[target_feature(enable = "msa")]
3042 #[cfg_attr(test, assert_instr(clt_s.d))]
__msa_clt_s_d(a: v2i64, b: v2i64) -> v2i643043 pub unsafe fn __msa_clt_s_d(a: v2i64, b: v2i64) -> v2i64 {
3044     msa_clt_s_d(a, mem::transmute(b))
3045 }
3046 
3047 /// Vector Compare Unsigned Less Than
3048 ///
3049 /// Set all bits to 1 in vector (sixteen signed 8-bit integer numbers) elements
3050 /// if the corresponding `a` (sixteen unsigned 8-bit integer numbers) element
3051 /// are unsigned less than `b` (sixteen unsigned 8-bit integer numbers) element.
3052 /// Otherwise set all bits to 0.
3053 ///
3054 #[inline]
3055 #[target_feature(enable = "msa")]
3056 #[cfg_attr(test, assert_instr(clt_u.b))]
__msa_clt_u_b(a: v16u8, b: v16u8) -> v16i83057 pub unsafe fn __msa_clt_u_b(a: v16u8, b: v16u8) -> v16i8 {
3058     msa_clt_u_b(a, mem::transmute(b))
3059 }
3060 
3061 /// Vector Compare Unsigned Less Than
3062 ///
3063 /// Set all bits to 1 in vector (eight signed 16-bit integer numbers) elements
3064 /// if the corresponding `a` (eight unsigned 16-bit integer numbers) element
3065 /// are unsigned less than `b` (eight unsigned 16-bit integer numbers) element.
3066 /// Otherwise set all bits to 0.
3067 ///
3068 #[inline]
3069 #[target_feature(enable = "msa")]
3070 #[cfg_attr(test, assert_instr(clt_u.h))]
__msa_clt_u_h(a: v8u16, b: v8u16) -> v8i163071 pub unsafe fn __msa_clt_u_h(a: v8u16, b: v8u16) -> v8i16 {
3072     msa_clt_u_h(a, mem::transmute(b))
3073 }
3074 
3075 /// Vector Compare Unsigned Less Than
3076 ///
3077 /// Set all bits to 1 in vector (four signed 32-bit integer numbers) elements
3078 /// if the corresponding `a` (four unsigned 32-bit integer numbers) element
3079 /// are unsigned less than `b` (four unsigned 32-bit integer numbers) element.
3080 /// Otherwise set all bits to 0.
3081 ///
3082 #[inline]
3083 #[target_feature(enable = "msa")]
3084 #[cfg_attr(test, assert_instr(clt_u.w))]
__msa_clt_u_w(a: v4u32, b: v4u32) -> v4i323085 pub unsafe fn __msa_clt_u_w(a: v4u32, b: v4u32) -> v4i32 {
3086     msa_clt_u_w(a, mem::transmute(b))
3087 }
3088 
3089 /// Vector Compare Unsigned Less Than
3090 ///
3091 /// Set all bits to 1 in vector (two signed 64-bit integer numbers) elements
3092 /// if the corresponding `a` (two unsigned 64-bit integer numbers) element
3093 /// are unsigned less than `b` (two unsigned 64-bit integer numbers) element.
3094 /// Otherwise set all bits to 0.
3095 ///
3096 #[inline]
3097 #[target_feature(enable = "msa")]
3098 #[cfg_attr(test, assert_instr(clt_u.d))]
__msa_clt_u_d(a: v2u64, b: v2u64) -> v2i643099 pub unsafe fn __msa_clt_u_d(a: v2u64, b: v2u64) -> v2i64 {
3100     msa_clt_u_d(a, mem::transmute(b))
3101 }
3102 
3103 /// Immediate Compare Signed Less Than
3104 ///
3105 /// Set all bits to 1 in vector (sixteen signed 8-bit integer numbers) elements
3106 /// if the corresponding `a` (sixteen signed 8-bit integer numbers) element
3107 /// is less than the 5-bit signed immediate imm_s5,
3108 /// otherwise set all bits to 0.
3109 ///
3110 #[inline]
3111 #[target_feature(enable = "msa")]
3112 #[cfg_attr(test, assert_instr(clti_s.b, imm_s5 = 0b111))]
3113 #[rustc_legacy_const_generics(1)]
__msa_clti_s_b<const IMM_S5: i32>(a: v16i8) -> v16i83114 pub unsafe fn __msa_clti_s_b<const IMM_S5: i32>(a: v16i8) -> v16i8 {
3115     static_assert_imm_s5!(IMM_S5);
3116     msa_clti_s_b(a, IMM_S5)
3117 }
3118 
3119 /// Immediate Compare Signed Less Than
3120 ///
3121 /// Set all bits to 1 in vector (eight signed 16-bit integer numbers) elements
3122 /// if the corresponding `a` (eight signed 16-bit integer numbers) element
3123 /// is less than the 5-bit signed immediate imm_s5,
3124 /// otherwise set all bits to 0.
3125 ///
3126 #[inline]
3127 #[target_feature(enable = "msa")]
3128 #[cfg_attr(test, assert_instr(clti_s.h, imm_s5 = 0b11111))]
3129 #[rustc_legacy_const_generics(1)]
__msa_clti_s_h<const IMM_S5: i32>(a: v8i16) -> v8i163130 pub unsafe fn __msa_clti_s_h<const IMM_S5: i32>(a: v8i16) -> v8i16 {
3131     static_assert_imm_s5!(IMM_S5);
3132     msa_clti_s_h(a, IMM_S5)
3133 }
3134 
3135 /// Immediate Compare Signed Less Than
3136 ///
3137 /// Set all bits to 1 in vector (four signed 32-bit integer numbers) elements
3138 /// if the corresponding `a` (four signed 32-bit integer numbers) element
3139 /// is less than the 5-bit signed immediate imm_s5,
3140 /// otherwise set all bits to 0.
3141 ///
3142 #[inline]
3143 #[target_feature(enable = "msa")]
3144 #[cfg_attr(test, assert_instr(clti_s.w, imm_s5 = 0b11111))]
3145 #[rustc_legacy_const_generics(1)]
__msa_clti_s_w<const IMM_S5: i32>(a: v4i32) -> v4i323146 pub unsafe fn __msa_clti_s_w<const IMM_S5: i32>(a: v4i32) -> v4i32 {
3147     static_assert_imm_s5!(IMM_S5);
3148     msa_clti_s_w(a, IMM_S5)
3149 }
3150 
3151 /// Immediate Compare Signed Less Than
3152 ///
3153 /// Set all bits to 1 in vector (two signed 64-bit integer numbers) elements
3154 /// if the corresponding `a` (two signed 64-bit integer numbers) element
3155 /// is less than the 5-bit signed immediate imm_s5,
3156 /// otherwise set all bits to 0.
3157 ///
3158 #[inline]
3159 #[target_feature(enable = "msa")]
3160 #[cfg_attr(test, assert_instr(clti_s.d, imm_s5 = 0b11111))]
3161 #[rustc_legacy_const_generics(1)]
__msa_clti_s_d<const IMM_S5: i32>(a: v2i64) -> v2i643162 pub unsafe fn __msa_clti_s_d<const IMM_S5: i32>(a: v2i64) -> v2i64 {
3163     static_assert_imm_s5!(IMM_S5);
3164     msa_clti_s_d(a, IMM_S5)
3165 }
3166 
3167 /// Immediate Compare Unsigned Less Than
3168 ///
3169 /// Set all bits to 1 in vector (sixteen signed 8-bit integer numbers) elements
3170 /// if the corresponding `a` (sixteen unsigned 8-bit integer numbers) element
3171 /// is unsigned less than the 5-bit unsigned immediate `imm5`,
3172 /// otherwise set all bits to 0.
3173 ///
3174 #[inline]
3175 #[target_feature(enable = "msa")]
3176 #[cfg_attr(test, assert_instr(clti_u.b, imm5 = 0b111))]
3177 #[rustc_legacy_const_generics(1)]
__msa_clti_u_b<const IMM5: i32>(a: v16u8) -> v16i83178 pub unsafe fn __msa_clti_u_b<const IMM5: i32>(a: v16u8) -> v16i8 {
3179     static_assert_imm5!(IMM5);
3180     msa_clti_u_b(a, IMM5)
3181 }
3182 
3183 /// Immediate Compare Unsigned Less Than
3184 ///
3185 /// Set all bits to 1 in vector (eight signed 16-bit integer numbers) elements
3186 /// if the corresponding `a` (eight unsigned 16-bit integer numbers) element
3187 /// is unsigned less than the 5-bit unsigned immediate `imm5`,
3188 /// otherwise set all bits to 0.
3189 ///
3190 #[inline]
3191 #[target_feature(enable = "msa")]
3192 #[cfg_attr(test, assert_instr(clti_u.h, imm5 = 0b11111))]
3193 #[rustc_legacy_const_generics(1)]
__msa_clti_u_h<const IMM5: i32>(a: v8u16) -> v8i163194 pub unsafe fn __msa_clti_u_h<const IMM5: i32>(a: v8u16) -> v8i16 {
3195     static_assert_imm5!(IMM5);
3196     msa_clti_u_h(a, IMM5)
3197 }
3198 
3199 /// Immediate Compare Unsigned Less Than
3200 ///
3201 /// Set all bits to 1 in vector (four signed 32-bit integer numbers) elements
3202 /// if the corresponding `a` (four unsigned 32-bit integer numbers) element
3203 /// is unsigned less than the 5-bit unsigned immediate `imm5`,
3204 /// otherwise set all bits to 0.
3205 ///
3206 #[inline]
3207 #[target_feature(enable = "msa")]
3208 #[cfg_attr(test, assert_instr(clti_u.w, imm5 = 0b11111))]
3209 #[rustc_legacy_const_generics(1)]
__msa_clti_u_w<const IMM5: i32>(a: v4u32) -> v4i323210 pub unsafe fn __msa_clti_u_w<const IMM5: i32>(a: v4u32) -> v4i32 {
3211     static_assert_imm5!(IMM5);
3212     msa_clti_u_w(a, IMM5)
3213 }
3214 
3215 /// Immediate Compare Unsigned Less Than
3216 ///
3217 /// Set all bits to 1 in vector (two signed 64-bit integer numbers) elements
3218 /// if the corresponding `a` (two unsigned 64-bit integer numbers) element
3219 /// is unsigned less than the 5-bit unsigned immediate `imm5`,
3220 /// otherwise set all bits to 0.
3221 ///
3222 #[inline]
3223 #[target_feature(enable = "msa")]
3224 #[cfg_attr(test, assert_instr(clti_u.d, imm5 = 0b11111))]
3225 #[rustc_legacy_const_generics(1)]
__msa_clti_u_d<const IMM5: i32>(a: v2u64) -> v2i643226 pub unsafe fn __msa_clti_u_d<const IMM5: i32>(a: v2u64) -> v2i64 {
3227     static_assert_imm5!(IMM5);
3228     msa_clti_u_d(a, IMM5)
3229 }
3230 
3231 /// Element Copy to GPR Signed
3232 ///
3233 /// Sign-extend element `imm4` of vector `a` (sixteen signed 8-bit integer numbers)
3234 /// and copy the result to GPR rd.
3235 ///
3236 #[inline]
3237 #[target_feature(enable = "msa")]
3238 #[cfg_attr(test, assert_instr(copy_s.b, imm4 = 0b1111))]
3239 #[rustc_legacy_const_generics(1)]
__msa_copy_s_b<const IMM4: i32>(a: v16i8) -> i323240 pub unsafe fn __msa_copy_s_b<const IMM4: i32>(a: v16i8) -> i32 {
3241     static_assert_imm4!(IMM4);
3242     msa_copy_s_b(a, IMM4)
3243 }
3244 
3245 /// Element Copy to GPR Signed
3246 ///
3247 /// Sign-extend element `imm3` of vector `a` (eight signed 16-bit integer numbers)
3248 /// and copy the result to GPR rd.
3249 ///
3250 #[inline]
3251 #[target_feature(enable = "msa")]
3252 #[cfg_attr(test, assert_instr(copy_s.h, imm3 = 0b111))]
3253 #[rustc_legacy_const_generics(1)]
__msa_copy_s_h<const IMM3: i32>(a: v8i16) -> i323254 pub unsafe fn __msa_copy_s_h<const IMM3: i32>(a: v8i16) -> i32 {
3255     static_assert_imm3!(IMM3);
3256     msa_copy_s_h(a, IMM3)
3257 }
3258 
3259 /// Element Copy to GPR Signed
3260 ///
3261 /// Sign-extend element `imm2` of vector `a` (four signed 32-bit integer numbers)
3262 /// and copy the result to GPR rd.
3263 ///
3264 #[inline]
3265 #[target_feature(enable = "msa")]
3266 #[cfg_attr(test, assert_instr(copy_s.w, imm2 = 0b11))]
3267 #[rustc_legacy_const_generics(1)]
__msa_copy_s_w<const IMM2: i32>(a: v4i32) -> i323268 pub unsafe fn __msa_copy_s_w<const IMM2: i32>(a: v4i32) -> i32 {
3269     static_assert_imm2!(IMM2);
3270     msa_copy_s_w(a, IMM2)
3271 }
3272 
3273 /// Element Copy to GPR Signed
3274 ///
3275 /// Sign-extend element `imm1` of vector `a` (two signed 64-bit integer numbers)
3276 /// and copy the result to GPR rd.
3277 ///
3278 #[inline]
3279 #[target_feature(enable = "msa")]
3280 #[cfg_attr(test, assert_instr(copy_s.d, imm1 = 0b1))]
3281 #[rustc_legacy_const_generics(1)]
__msa_copy_s_d<const IMM1: i32>(a: v2i64) -> i643282 pub unsafe fn __msa_copy_s_d<const IMM1: i32>(a: v2i64) -> i64 {
3283     static_assert_imm1!(IMM1);
3284     msa_copy_s_d(a, IMM1)
3285 }
3286 
3287 /// Element Copy to GPR Unsigned
3288 ///
3289 /// Zero-extend element `imm4` of vector `a` (sixteen signed 8-bit integer numbers)
3290 /// and copy the result to GPR rd.
3291 ///
3292 #[inline]
3293 #[target_feature(enable = "msa")]
3294 #[cfg_attr(test, assert_instr(copy_u.b, imm4 = 0b1111))]
3295 #[rustc_legacy_const_generics(1)]
__msa_copy_u_b<const IMM4: i32>(a: v16i8) -> u323296 pub unsafe fn __msa_copy_u_b<const IMM4: i32>(a: v16i8) -> u32 {
3297     static_assert_imm4!(IMM4);
3298     msa_copy_u_b(a, IMM4)
3299 }
3300 
3301 /// Element Copy to GPR Unsigned
3302 ///
3303 /// Zero-extend element `imm3` of vector `a` (eight signed 16-bit integer numbers)
3304 /// and copy the result to GPR rd.
3305 ///
3306 #[inline]
3307 #[target_feature(enable = "msa")]
3308 #[cfg_attr(test, assert_instr(copy_u.h, imm3 = 0b111))]
3309 #[rustc_legacy_const_generics(1)]
__msa_copy_u_h<const IMM3: i32>(a: v8i16) -> u323310 pub unsafe fn __msa_copy_u_h<const IMM3: i32>(a: v8i16) -> u32 {
3311     static_assert_imm3!(IMM3);
3312     msa_copy_u_h(a, IMM3)
3313 }
3314 
3315 /// Element Copy to GPR Unsigned
3316 ///
3317 /// Zero-extend element `imm2` of vector `a` (four signed 32-bit integer numbers)
3318 /// and copy the result to GPR rd.
3319 ///
3320 #[inline]
3321 #[target_feature(enable = "msa")]
3322 #[cfg_attr(test, assert_instr(copy_u.w, imm2 = 0b11))]
3323 #[rustc_legacy_const_generics(1)]
__msa_copy_u_w<const IMM2: i32>(a: v4i32) -> u323324 pub unsafe fn __msa_copy_u_w<const IMM2: i32>(a: v4i32) -> u32 {
3325     static_assert_imm2!(IMM2);
3326     msa_copy_u_w(a, IMM2)
3327 }
3328 
3329 /// Element Copy to GPR Unsigned
3330 ///
3331 /// Zero-extend element `imm1` of vector `a` (two signed 64-bit integer numbers)
3332 /// and copy the result to GPR rd.
3333 ///
3334 #[inline]
3335 #[target_feature(enable = "msa")]
3336 #[cfg_attr(test, assert_instr(copy_u.d, imm1 = 0b1))]
3337 #[rustc_legacy_const_generics(1)]
__msa_copy_u_d<const IMM1: i32>(a: v2i64) -> u643338 pub unsafe fn __msa_copy_u_d<const IMM1: i32>(a: v2i64) -> u64 {
3339     static_assert_imm1!(IMM1);
3340     msa_copy_u_d(a, IMM1)
3341 }
3342 
3343 /// GPR Copy to MSA Control Register
3344 ///
3345 /// The content of the least significant 31 bits of GPR `imm1` is copied to
3346 /// MSA control register cd.
3347 ///
3348 /// Can not be tested in user mode
3349 ///
3350 #[inline]
3351 #[target_feature(enable = "msa")]
3352 #[cfg_attr(test, assert_instr(ctcmsa, imm1 = 0b1))]
3353 #[rustc_legacy_const_generics(0)]
__msa_ctcmsa<const IMM5: i32>(a: i32) -> ()3354 pub unsafe fn __msa_ctcmsa<const IMM5: i32>(a: i32) -> () {
3355     static_assert_imm5!(IMM5);
3356     msa_ctcmsa(IMM5, a)
3357 }
3358 
3359 /// Vector Signed Divide
3360 ///
3361 /// The signed integer elements in vector `a` (sixteen signed 8-bit integer numbers)
3362 /// are divided by signed integer elements in vector `b` (sixteen signed 8-bit integer numbers).
3363 /// The result is written to vector (sixteen signed 8-bit integer numbers).
3364 ///
3365 #[inline]
3366 #[target_feature(enable = "msa")]
3367 #[cfg_attr(test, assert_instr(div_s.b))]
__msa_div_s_b(a: v16i8, b: v16i8) -> v16i83368 pub unsafe fn __msa_div_s_b(a: v16i8, b: v16i8) -> v16i8 {
3369     msa_div_s_b(a, mem::transmute(b))
3370 }
3371 
3372 /// Vector Signed Divide
3373 ///
3374 /// The signed integer elements in vector `a` (eight signed 16-bit integer numbers)
3375 /// are divided by signed integer elements in vector `b` (eight signed 16-bit integer numbers).
3376 /// The result is written to vector (eight signed 16-bit integer numbers).
3377 ///
3378 #[inline]
3379 #[target_feature(enable = "msa")]
3380 #[cfg_attr(test, assert_instr(div_s.h))]
__msa_div_s_h(a: v8i16, b: v8i16) -> v8i163381 pub unsafe fn __msa_div_s_h(a: v8i16, b: v8i16) -> v8i16 {
3382     msa_div_s_h(a, mem::transmute(b))
3383 }
3384 
3385 /// Vector Signed Divide
3386 ///
3387 /// The signed integer elements in vector `a` (four signed 32-bit integer numbers)
3388 /// are divided by signed integer elements in vector `b` (four signed 32-bit integer numbers).
3389 /// The result is written to vector (four signed 32-bit integer numbers).
3390 ///
3391 #[inline]
3392 #[target_feature(enable = "msa")]
3393 #[cfg_attr(test, assert_instr(div_s.w))]
__msa_div_s_w(a: v4i32, b: v4i32) -> v4i323394 pub unsafe fn __msa_div_s_w(a: v4i32, b: v4i32) -> v4i32 {
3395     msa_div_s_w(a, mem::transmute(b))
3396 }
3397 
3398 /// Vector Signed Divide
3399 ///
3400 /// The signed integer elements in vector `a` (two signed 64-bit integer numbers)
3401 /// are divided by signed integer elements in vector `b` (two signed 64-bit integer numbers).
3402 /// The result is written to vector (two signed 64-bit integer numbers).
3403 ///
3404 #[inline]
3405 #[target_feature(enable = "msa")]
3406 #[cfg_attr(test, assert_instr(div_s.d))]
__msa_div_s_d(a: v2i64, b: v2i64) -> v2i643407 pub unsafe fn __msa_div_s_d(a: v2i64, b: v2i64) -> v2i64 {
3408     msa_div_s_d(a, mem::transmute(b))
3409 }
3410 
3411 /// Vector Unsigned Divide
3412 ///
3413 /// The unsigned integer elements in vector `a` (sixteen unsigned 8-bit integer numbers)
3414 /// are divided by unsigned integer elements in vector `b` (sixteen unsigned 8-bit integer numbers).
3415 /// The result is written to vector (sixteen unsigned 8-bit integer numbers).
3416 ///
3417 #[inline]
3418 #[target_feature(enable = "msa")]
3419 #[cfg_attr(test, assert_instr(div_u.b))]
__msa_div_u_b(a: v16u8, b: v16u8) -> v16u83420 pub unsafe fn __msa_div_u_b(a: v16u8, b: v16u8) -> v16u8 {
3421     msa_div_u_b(a, mem::transmute(b))
3422 }
3423 
3424 /// Vector Unsigned Divide
3425 ///
3426 /// The unsigned integer elements in vector `a` (eight unsigned 16-bit integer numbers)
3427 /// are divided by unsigned integer elements in vector `b` (eight unsigned 16-bit integer numbers).
3428 /// The result is written to vector (eight unsigned 16-bit integer numbers).
3429 ///
3430 #[inline]
3431 #[target_feature(enable = "msa")]
3432 #[cfg_attr(test, assert_instr(div_u.h))]
__msa_div_u_h(a: v8u16, b: v8u16) -> v8u163433 pub unsafe fn __msa_div_u_h(a: v8u16, b: v8u16) -> v8u16 {
3434     msa_div_u_h(a, mem::transmute(b))
3435 }
3436 
3437 /// Vector Unsigned Divide
3438 ///
3439 /// The unsigned integer elements in vector `a` (four unsigned 32-bit integer numbers)
3440 /// are divided by unsigned integer elements in vector `b` (four unsigned 32-bit integer numbers).
3441 /// The result is written to vector (four unsigned 32-bit integer numbers).
3442 ///
3443 #[inline]
3444 #[target_feature(enable = "msa")]
3445 #[cfg_attr(test, assert_instr(div_u.w))]
__msa_div_u_w(a: v4u32, b: v4u32) -> v4u323446 pub unsafe fn __msa_div_u_w(a: v4u32, b: v4u32) -> v4u32 {
3447     msa_div_u_w(a, mem::transmute(b))
3448 }
3449 
3450 /// Vector Unsigned Divide
3451 ///
3452 /// The unsigned integer elements in vector `a` (two unsigned 64-bit integer numbers)
3453 /// are divided by unsigned integer elements in vector `b` (two unsigned 64-bit integer numbers).
3454 /// The result is written to vector (two unsigned 64-bit integer numbers).
3455 ///
3456 #[inline]
3457 #[target_feature(enable = "msa")]
3458 #[cfg_attr(test, assert_instr(div_u.d))]
__msa_div_u_d(a: v2u64, b: v2u64) -> v2u643459 pub unsafe fn __msa_div_u_d(a: v2u64, b: v2u64) -> v2u64 {
3460     msa_div_u_d(a, mem::transmute(b))
3461 }
3462 
3463 /// Vector Signed Dot Product
3464 ///
3465 /// The signed integer elements in vector `a` (sixteen signed 8-bit integer numbers)
3466 /// are multiplied by signed integer elements in vector `b` (sixteen signed 8-bit integer numbers)
3467 /// producing a result the size of the input operands. The multiplication results of
3468 /// adjacent odd/even elements are added and stored to the destination
3469 /// vector (eight signed 16-bit integer numbers).
3470 ///
3471 #[inline]
3472 #[target_feature(enable = "msa")]
3473 #[cfg_attr(test, assert_instr(dotp_s.h))]
__msa_dotp_s_h(a: v16i8, b: v16i8) -> v8i163474 pub unsafe fn __msa_dotp_s_h(a: v16i8, b: v16i8) -> v8i16 {
3475     msa_dotp_s_h(a, mem::transmute(b))
3476 }
3477 
3478 /// Vector Signed Dot Product
3479 ///
3480 /// The signed integer elements in vector `a` (eight signed 16-bit integer numbers)
3481 /// are multiplied by signed integer elements in vector `b` (eight signed 16-bit integer numbers)
3482 /// producing a result the size of the input operands. The multiplication results of
3483 /// adjacent odd/even elements are added and stored to the destination
3484 /// vector (four signed 32-bit integer numbers).
3485 ///
3486 #[inline]
3487 #[target_feature(enable = "msa")]
3488 #[cfg_attr(test, assert_instr(dotp_s.w))]
__msa_dotp_s_w(a: v8i16, b: v8i16) -> v4i323489 pub unsafe fn __msa_dotp_s_w(a: v8i16, b: v8i16) -> v4i32 {
3490     msa_dotp_s_w(a, mem::transmute(b))
3491 }
3492 
3493 /// Vector Signed Dot Product
3494 ///
3495 /// The signed integer elements in vector `a` (four signed 32-bit integer numbers)
3496 /// are multiplied by signed integer elements in vector `b` (four signed 32-bit integer numbers)
3497 /// producing a result the size of the input operands. The multiplication results of
3498 /// adjacent odd/even elements are added and stored to the destination
3499 /// vector (two signed 64-bit integer numbers).
3500 ///
3501 #[inline]
3502 #[target_feature(enable = "msa")]
3503 #[cfg_attr(test, assert_instr(dotp_s.d))]
__msa_dotp_s_d(a: v4i32, b: v4i32) -> v2i643504 pub unsafe fn __msa_dotp_s_d(a: v4i32, b: v4i32) -> v2i64 {
3505     msa_dotp_s_d(a, mem::transmute(b))
3506 }
3507 
3508 /// Vector Unsigned Dot Product
3509 ///
3510 /// The unsigned integer elements in vector `a` (sixteen unsigned 8-bit integer numbers)
3511 /// are multiplied by unsigned integer elements in vector `b` (sixteen unsigned 8-bit integer numbers)
3512 /// producing a result the size of the input operands. The multiplication results of
3513 /// adjacent odd/even elements are added and stored to the destination
3514 /// vector (eight unsigned 16-bit integer numbers).
3515 ///
3516 #[inline]
3517 #[target_feature(enable = "msa")]
3518 #[cfg_attr(test, assert_instr(dotp_u.h))]
__msa_dotp_u_h(a: v16u8, b: v16u8) -> v8u163519 pub unsafe fn __msa_dotp_u_h(a: v16u8, b: v16u8) -> v8u16 {
3520     msa_dotp_u_h(a, mem::transmute(b))
3521 }
3522 
3523 /// Vector Unsigned Dot Product
3524 ///
3525 /// The unsigned integer elements in vector `a` (eight unsigned 16-bit integer numbers)
3526 /// are multiplied by unsigned integer elements in vector `b` (eight unsigned 16-bit integer numbers)
3527 /// producing a result the size of the input operands. The multiplication results of
3528 /// adjacent odd/even elements are added and stored to the destination
3529 /// vector (four unsigned 32-bit integer numbers).
3530 ///
3531 #[inline]
3532 #[target_feature(enable = "msa")]
3533 #[cfg_attr(test, assert_instr(dotp_u.w))]
__msa_dotp_u_w(a: v8u16, b: v8u16) -> v4u323534 pub unsafe fn __msa_dotp_u_w(a: v8u16, b: v8u16) -> v4u32 {
3535     msa_dotp_u_w(a, mem::transmute(b))
3536 }
3537 
3538 /// Vector Unsigned Dot Product
3539 ///
3540 /// The unsigned integer elements in vector `a` (four unsigned 32-bit integer numbers)
3541 /// are multiplied by unsigned integer elements in vector `b` (four unsigned 32-bit integer numbers)
3542 /// producing a result the size of the input operands. The multiplication results of
3543 /// adjacent odd/even elements are added and stored to the destination
3544 /// vector (two unsigned 64-bit integer numbers).
3545 ///
3546 #[inline]
3547 #[target_feature(enable = "msa")]
3548 #[cfg_attr(test, assert_instr(dotp_u.d))]
__msa_dotp_u_d(a: v4u32, b: v4u32) -> v2u643549 pub unsafe fn __msa_dotp_u_d(a: v4u32, b: v4u32) -> v2u64 {
3550     msa_dotp_u_d(a, mem::transmute(b))
3551 }
3552 
3553 /// Vector Signed Dot Product and Add
3554 ///
3555 /// The signed integer elements in vector `b` (sixteen signed 8-bit integer numbers)
3556 /// are multiplied by signed integer elements in vector `c` (sixteen signed 8-bit integer numbers)
3557 /// producing a result twice the size of the input operands. The multiplication results
3558 /// of adjacent odd/even elements are added to the vector `a` (eight signed 16-bit integer numbers).
3559 ///
3560 #[inline]
3561 #[target_feature(enable = "msa")]
3562 #[cfg_attr(test, assert_instr(dpadd_s.h))]
__msa_dpadd_s_h(a: v8i16, b: v16i8, c: v16i8) -> v8i163563 pub unsafe fn __msa_dpadd_s_h(a: v8i16, b: v16i8, c: v16i8) -> v8i16 {
3564     msa_dpadd_s_h(a, mem::transmute(b), c)
3565 }
3566 
3567 /// Vector Signed Dot Product and Add
3568 ///
3569 /// The signed integer elements in vector `b` (eight signed 16-bit integer numbers)
3570 /// are multiplied by signed integer elements in vector `c` (eight signed 16-bit integer numbers)
3571 /// producing a result twice the size of the input operands. The multiplication results
3572 /// of adjacent odd/even elements are added to the vector `a` (four signed 32-bit integer numbers).
3573 ///
3574 #[inline]
3575 #[target_feature(enable = "msa")]
3576 #[cfg_attr(test, assert_instr(dpadd_s.w))]
__msa_dpadd_s_w(a: v4i32, b: v8i16, c: v8i16) -> v4i323577 pub unsafe fn __msa_dpadd_s_w(a: v4i32, b: v8i16, c: v8i16) -> v4i32 {
3578     msa_dpadd_s_w(a, mem::transmute(b), c)
3579 }
3580 
3581 /// Vector Signed Dot Product and Add
3582 ///
3583 /// The signed integer elements in vector `b` (four signed 32-bit integer numbers)
3584 /// are multiplied by signed integer elements in vector `c` (four signed 32-bit integer numbers)
3585 /// producing a result twice the size of the input operands. The multiplication results
3586 /// of adjacent odd/even elements are added to the vector `a` (two signed 64-bit integer numbers).
3587 ///
3588 #[inline]
3589 #[target_feature(enable = "msa")]
3590 #[cfg_attr(test, assert_instr(dpadd_s.d))]
__msa_dpadd_s_d(a: v2i64, b: v4i32, c: v4i32) -> v2i643591 pub unsafe fn __msa_dpadd_s_d(a: v2i64, b: v4i32, c: v4i32) -> v2i64 {
3592     msa_dpadd_s_d(a, mem::transmute(b), c)
3593 }
3594 
3595 /// Vector Unsigned Dot Product and Add
3596 ///
3597 /// The unsigned integer elements in vector `b` (sixteen unsigned 8-bit integer numbers)
3598 /// are multiplied by unsigned integer elements in vector `c` (sixteen unsigned 8-bit integer numbers)
3599 /// producing a result twice the size of the input operands. The multiplication results
3600 /// of adjacent odd/even elements are added to the vector `a` (eight unsigned 16-bit integer numbers).
3601 ///
3602 #[inline]
3603 #[target_feature(enable = "msa")]
3604 #[cfg_attr(test, assert_instr(dpadd_u.h))]
__msa_dpadd_u_h(a: v8u16, b: v16u8, c: v16u8) -> v8u163605 pub unsafe fn __msa_dpadd_u_h(a: v8u16, b: v16u8, c: v16u8) -> v8u16 {
3606     msa_dpadd_u_h(a, mem::transmute(b), c)
3607 }
3608 
3609 /// Vector Unsigned Dot Product and Add
3610 ///
3611 /// The unsigned integer elements in vector `b` (eight unsigned 16-bit integer numbers)
3612 /// are multiplied by unsigned integer elements in vector `c` (eight unsigned 16-bit integer numbers)
3613 /// producing a result twice the size of the input operands. The multiplication results
3614 /// of adjacent odd/even elements are added to the vector `a` (four unsigned 32-bit integer numbers).
3615 ///
3616 #[inline]
3617 #[target_feature(enable = "msa")]
3618 #[cfg_attr(test, assert_instr(dpadd_u.w))]
__msa_dpadd_u_w(a: v4u32, b: v8u16, c: v8u16) -> v4u323619 pub unsafe fn __msa_dpadd_u_w(a: v4u32, b: v8u16, c: v8u16) -> v4u32 {
3620     msa_dpadd_u_w(a, mem::transmute(b), c)
3621 }
3622 
3623 /// Vector Unsigned Dot Product and Add
3624 ///
3625 /// The unsigned integer elements in vector `b` (four unsigned 32-bit integer numbers)
3626 /// are multiplied by unsigned integer elements in vector `c` (four unsigned 32-bit integer numbers)
3627 /// producing a result twice the size of the input operands. The multiplication results
3628 /// of adjacent odd/even elements are added to the vector `a` (two unsigned 64-bit integer numbers).
3629 ///
3630 #[inline]
3631 #[target_feature(enable = "msa")]
3632 #[cfg_attr(test, assert_instr(dpadd_u.d))]
__msa_dpadd_u_d(a: v2u64, b: v4u32, c: v4u32) -> v2u643633 pub unsafe fn __msa_dpadd_u_d(a: v2u64, b: v4u32, c: v4u32) -> v2u64 {
3634     msa_dpadd_u_d(a, mem::transmute(b), c)
3635 }
3636 
3637 /// Vector Signed Dot Product and Add
3638 ///
3639 /// The signed integer elements in vector `b` (sixteen signed 8-bit integer numbers)
3640 /// are multiplied by signed integer elements in vector `c` (sixteen signed 8-bit integer numbers)
3641 /// producing a result twice the size of the input operands. The multiplication results
3642 /// of adjacent odd/even elements are subtracted from the integer elements in vector `a`
3643 /// (eight signed 16-bit integer numbers).
3644 ///
3645 #[inline]
3646 #[target_feature(enable = "msa")]
3647 #[cfg_attr(test, assert_instr(dpsub_s.h))]
__msa_dpsub_s_h(a: v8i16, b: v16i8, c: v16i8) -> v8i163648 pub unsafe fn __msa_dpsub_s_h(a: v8i16, b: v16i8, c: v16i8) -> v8i16 {
3649     msa_dpsub_s_h(a, mem::transmute(b), c)
3650 }
3651 
3652 /// Vector Signed Dot Product and Add
3653 ///
3654 /// The signed integer elements in vector `b` (eight signed 16-bit integer numbers)
3655 /// are multiplied by signed integer elements in vector `c` (eight signed 16-bit integer numbers)
3656 /// producing a result twice the size of the input operands. The multiplication results
3657 /// of adjacent odd/even elements are subtracted from the integer elements in vector `a`
3658 /// (four signed 32-bit integer numbers).
3659 ///
3660 #[inline]
3661 #[target_feature(enable = "msa")]
3662 #[cfg_attr(test, assert_instr(dpsub_s.w))]
__msa_dpsub_s_w(a: v4i32, b: v8i16, c: v8i16) -> v4i323663 pub unsafe fn __msa_dpsub_s_w(a: v4i32, b: v8i16, c: v8i16) -> v4i32 {
3664     msa_dpsub_s_w(a, mem::transmute(b), c)
3665 }
3666 
3667 /// Vector Signed Dot Product and Add
3668 ///
3669 /// The signed integer elements in vector `b` (four signed 32-bit integer numbers)
3670 /// are multiplied by signed integer elements in vector `c` (four signed 32-bit integer numbers)
3671 /// producing a result twice the size of the input operands. The multiplication results
3672 /// of adjacent odd/even elements are subtracted from the integer elements in vector `a`
3673 /// (two signed 64-bit integer numbers).
3674 ///
3675 #[inline]
3676 #[target_feature(enable = "msa")]
3677 #[cfg_attr(test, assert_instr(dpsub_s.d))]
__msa_dpsub_s_d(a: v2i64, b: v4i32, c: v4i32) -> v2i643678 pub unsafe fn __msa_dpsub_s_d(a: v2i64, b: v4i32, c: v4i32) -> v2i64 {
3679     msa_dpsub_s_d(a, mem::transmute(b), c)
3680 }
3681 
3682 /// Vector Unsigned Dot Product and Add
3683 ///
3684 /// The unsigned integer elements in vector `b` (sixteen unsigned 8-bit integer numbers)
3685 /// are multiplied by unsigned integer elements in vector `c` (sixteen unsigned 8-bit integer numbers)
3686 /// producing a result twice the size of the input operands. The multiplication results
3687 /// of adjacent odd/even elements are subtracted from the integer elements in vector `a`
3688 /// (eight signed 16-bit integer numbers).
3689 ///
3690 #[inline]
3691 #[target_feature(enable = "msa")]
3692 #[cfg_attr(test, assert_instr(dpsub_u.h))]
__msa_dpsub_u_h(a: v8i16, b: v16u8, c: v16u8) -> v8i163693 pub unsafe fn __msa_dpsub_u_h(a: v8i16, b: v16u8, c: v16u8) -> v8i16 {
3694     msa_dpsub_u_h(a, mem::transmute(b), c)
3695 }
3696 
3697 /// Vector Unsigned Dot Product and Add
3698 ///
3699 /// The unsigned integer elements in vector `b` (eight unsigned 16-bit integer numbers)
3700 /// are multiplied by unsigned integer elements in vector `c` (eight unsigned 16-bit integer numbers)
3701 /// producing a result twice the size of the input operands. The multiplication results
3702 /// of adjacent odd/even elements are subtracted from the integer elements in vector `a`
3703 /// (four signed 32-bit integer numbers).
3704 ///
3705 #[inline]
3706 #[target_feature(enable = "msa")]
3707 #[cfg_attr(test, assert_instr(dpsub_u.w))]
__msa_dpsub_u_w(a: v4i32, b: v8u16, c: v8u16) -> v4i323708 pub unsafe fn __msa_dpsub_u_w(a: v4i32, b: v8u16, c: v8u16) -> v4i32 {
3709     msa_dpsub_u_w(a, mem::transmute(b), c)
3710 }
3711 
3712 /// Vector Unsigned Dot Product and Add
3713 ///
3714 /// The unsigned integer elements in vector `b` (four unsigned 32-bit integer numbers)
3715 /// are multiplied by unsigned integer elements in vector `c` (four unsigned 32-bit integer numbers)
3716 /// producing a result twice the size of the input operands. The multiplication results
3717 /// of adjacent odd/even elements are subtracted from the integer elements in vector `a`
3718 /// (two signed 64-bit integer numbers).
3719 ///
3720 #[inline]
3721 #[target_feature(enable = "msa")]
3722 #[cfg_attr(test, assert_instr(dpsub_u.d))]
__msa_dpsub_u_d(a: v2i64, b: v4u32, c: v4u32) -> v2i643723 pub unsafe fn __msa_dpsub_u_d(a: v2i64, b: v4u32, c: v4u32) -> v2i64 {
3724     msa_dpsub_u_d(a, mem::transmute(b), c)
3725 }
3726 
3727 /// Vector Floating-Point Addition
3728 ///
3729 /// The floating-point elements in vector `a` (four 32-bit floating point numbers)
3730 /// are added to the floating-point elements in `bc` (four 32-bit floating point numbers).
3731 /// The result is written to vector (four 32-bit floating point numbers).
3732 ///
3733 #[inline]
3734 #[target_feature(enable = "msa")]
3735 #[cfg_attr(test, assert_instr(fadd.w))]
__msa_fadd_w(a: v4f32, b: v4f32) -> v4f323736 pub unsafe fn __msa_fadd_w(a: v4f32, b: v4f32) -> v4f32 {
3737     msa_fadd_w(a, mem::transmute(b))
3738 }
3739 
3740 /// Vector Floating-Point Addition
3741 ///
3742 /// The floating-point elements in vector `a` (two 64-bit floating point numbers)
3743 /// are added to the floating-point elements in `bc` (two 64-bit floating point numbers).
3744 /// The result is written to vector (two 64-bit floating point numbers).
3745 ///
3746 #[inline]
3747 #[target_feature(enable = "msa")]
3748 #[cfg_attr(test, assert_instr(fadd.d))]
__msa_fadd_d(a: v2f64, b: v2f64) -> v2f643749 pub unsafe fn __msa_fadd_d(a: v2f64, b: v2f64) -> v2f64 {
3750     msa_fadd_d(a, mem::transmute(b))
3751 }
3752 
3753 /// Vector Floating-Point Quiet Compare Always False
3754 ///
3755 /// Set all bits to 0 in vector (four signed 32-bit integer numbers).
3756 /// Signaling NaN elements in `a` (four 32-bit floating point numbers)
3757 /// or `b` (four 32-bit floating point numbers) signal Invalid Operation exception.
3758 ///
3759 #[inline]
3760 #[target_feature(enable = "msa")]
3761 #[cfg_attr(test, assert_instr(fcaf.w))]
__msa_fcaf_w(a: v4f32, b: v4f32) -> v4i323762 pub unsafe fn __msa_fcaf_w(a: v4f32, b: v4f32) -> v4i32 {
3763     msa_fcaf_w(a, mem::transmute(b))
3764 }
3765 
3766 /// Vector Floating-Point Quiet Compare Always False
3767 ///
3768 /// Set all bits to 0 in vector (two signed 64-bit integer numbers).
3769 /// Signaling NaN elements in `a` (two 64-bit floating point numbers)
3770 /// or `b` (two 64-bit floating point numbers) signal Invalid Operation exception.
3771 ///
3772 #[inline]
3773 #[target_feature(enable = "msa")]
3774 #[cfg_attr(test, assert_instr(fcaf.d))]
__msa_fcaf_d(a: v2f64, b: v2f64) -> v2i643775 pub unsafe fn __msa_fcaf_d(a: v2f64, b: v2f64) -> v2i64 {
3776     msa_fcaf_d(a, mem::transmute(b))
3777 }
3778 
3779 /// Vector Floating-Point Quiet Compare Equal
3780 ///
3781 /// Set all bits to 1 in vector (four signed 32-bit integer numbers)
3782 /// elements if the corresponding in `a` (four 32-bit floating point numbers)
3783 /// and `b` (four 32-bit floating point numbers) elements are ordered and equal,
3784 /// otherwise set all bits to 0.
3785 ///
3786 #[inline]
3787 #[target_feature(enable = "msa")]
3788 #[cfg_attr(test, assert_instr(fceq.w))]
__msa_fceq_w(a: v4f32, b: v4f32) -> v4i323789 pub unsafe fn __msa_fceq_w(a: v4f32, b: v4f32) -> v4i32 {
3790     msa_fceq_w(a, mem::transmute(b))
3791 }
3792 
3793 /// Vector Floating-Point Quiet Compare Equal
3794 ///
3795 /// Set all bits to 1 in vector (two signed 64-bit integer numbers)
3796 /// elements if the corresponding in `a` (two 64-bit floating point numbers)
3797 /// and `b` (two 64-bit floating point numbers) elements are ordered and equal,
3798 /// otherwise set all bits to 0.
3799 ///
3800 #[inline]
3801 #[target_feature(enable = "msa")]
3802 #[cfg_attr(test, assert_instr(fceq.d))]
__msa_fceq_d(a: v2f64, b: v2f64) -> v2i643803 pub unsafe fn __msa_fceq_d(a: v2f64, b: v2f64) -> v2i64 {
3804     msa_fceq_d(a, mem::transmute(b))
3805 }
3806 
3807 /// Vector Floating-Point Class Mask
3808 ///
3809 /// Store in each element of vector (four signed 32-bit integer numbers)
3810 /// a bit mask reflecting the floating-point class of the corresponding element of vector
3811 /// `a` (four 32-bit floating point numbers).
3812 /// The mask has 10 bits as follows. Bits 0 and 1 indicate NaN values: signaling NaN (bit 0) and quiet NaN (bit 1).
3813 /// Bits 2, 3, 4, 5 classify negative values: infinity (bit 2), normal (bit 3), subnormal (bit 4), and zero (bit 5).
3814 /// Bits 6, 7, 8, 9 classify positive values: infinity (bit 6), normal (bit 7), subnormal (bit 8), and zero (bit 9).
3815 ///
3816 #[inline]
3817 #[target_feature(enable = "msa")]
3818 #[cfg_attr(test, assert_instr(fclass.w))]
__msa_fclass_w(a: v4f32) -> v4i323819 pub unsafe fn __msa_fclass_w(a: v4f32) -> v4i32 {
3820     msa_fclass_w(a)
3821 }
3822 
3823 /// Vector Floating-Point Class Mask
3824 ///
3825 /// Store in each element of vector (two signed 64-bit integer numbers)
3826 /// a bit mask reflecting the floating-point class of the corresponding element of vector
3827 /// `a` (two 64-bit floating point numbers).
3828 /// The mask has 10 bits as follows. Bits 0 and 1 indicate NaN values: signaling NaN (bit 0) and quiet NaN (bit 1).
3829 /// Bits 2, 3, 4, 5 classify negative values: infinity (bit 2), normal (bit 3), subnormal (bit 4), and zero (bit 5).
3830 /// Bits 6, 7, 8, 9 classify positive values: infinity (bit 6), normal (bit 7), subnormal (bit 8), and zero (bit 9).
3831 ///
3832 #[inline]
3833 #[target_feature(enable = "msa")]
3834 #[cfg_attr(test, assert_instr(fclass.d))]
__msa_fclass_d(a: v2f64) -> v2i643835 pub unsafe fn __msa_fclass_d(a: v2f64) -> v2i64 {
3836     msa_fclass_d(a)
3837 }
3838 
3839 /// Vector Floating-Point Quiet Compare Less or Equal
3840 ///
3841 /// Set all bits to 1 in vector (four signed 32-bit integer numbers)
3842 /// elements if the corresponding `a` (four 32-bit floating point numbers) elements are ordered
3843 /// and either less than or equal to `b` (four 32-bit floating point numbers) elements,
3844 /// otherwise set all bits to 0.
3845 ///
3846 #[inline]
3847 #[target_feature(enable = "msa")]
3848 #[cfg_attr(test, assert_instr(fcle.w))]
__msa_fcle_w(a: v4f32, b: v4f32) -> v4i323849 pub unsafe fn __msa_fcle_w(a: v4f32, b: v4f32) -> v4i32 {
3850     msa_fcle_w(a, mem::transmute(b))
3851 }
3852 
3853 /// Vector Floating-Point Quiet Compare Less or Equal
3854 ///
3855 /// Set all bits to 1 in vector (two signed 64-bit integer numbers)
3856 /// elements if the corresponding `a` (two 64-bit floating point numbers) elements are ordered
3857 /// and either less than or equal to `b` (two 64-bit floating point numbers) elements,
3858 /// otherwise set all bits to 0.
3859 ///
3860 #[inline]
3861 #[target_feature(enable = "msa")]
3862 #[cfg_attr(test, assert_instr(fcle.d))]
__msa_fcle_d(a: v2f64, b: v2f64) -> v2i643863 pub unsafe fn __msa_fcle_d(a: v2f64, b: v2f64) -> v2i64 {
3864     msa_fcle_d(a, mem::transmute(b))
3865 }
3866 
3867 /// Vector Floating-Point Quiet Compare Less Than
3868 ///
3869 /// Set all bits to 1 in vector (four signed 32-bit integer numbers)
3870 /// elements if the corresponding `a` (four 32-bit floating point numbers) elements are ordered
3871 /// and less than `b` (four 32-bit floating point numbers) elements,
3872 /// otherwise set all bits to 0.
3873 ///
3874 #[inline]
3875 #[target_feature(enable = "msa")]
3876 #[cfg_attr(test, assert_instr(fclt.w))]
__msa_fclt_w(a: v4f32, b: v4f32) -> v4i323877 pub unsafe fn __msa_fclt_w(a: v4f32, b: v4f32) -> v4i32 {
3878     msa_fclt_w(a, mem::transmute(b))
3879 }
3880 
3881 /// Vector Floating-Point Quiet Compare Less Than
3882 ///
3883 /// Set all bits to 1 in vector (two signed 64-bit integer numbers)
3884 /// elements if the corresponding `a` (two 64-bit floating point numbers) elements are ordered
3885 /// and less than `b` (two 64-bit floating point numbers) elements,
3886 /// otherwise set all bits to 0.
3887 ///
3888 #[inline]
3889 #[target_feature(enable = "msa")]
3890 #[cfg_attr(test, assert_instr(fclt.d))]
__msa_fclt_d(a: v2f64, b: v2f64) -> v2i643891 pub unsafe fn __msa_fclt_d(a: v2f64, b: v2f64) -> v2i64 {
3892     msa_fclt_d(a, mem::transmute(b))
3893 }
3894 
3895 /// Vector Floating-Point Quiet Compare Not Equal
3896 ///
3897 /// Set all bits to 1 in vector (four signed 32-bit integer numbers)
3898 /// elements if the corresponding `a` (four 32-bit floating point numbers) and
3899 /// `b` (four 32-bit floating point numbers) elements are ordered and not equal,
3900 /// otherwise set all bits to 0.
3901 ///
3902 #[inline]
3903 #[target_feature(enable = "msa")]
3904 #[cfg_attr(test, assert_instr(fcne.w))]
__msa_fcne_w(a: v4f32, b: v4f32) -> v4i323905 pub unsafe fn __msa_fcne_w(a: v4f32, b: v4f32) -> v4i32 {
3906     msa_fcne_w(a, mem::transmute(b))
3907 }
3908 
3909 /// Vector Floating-Point Quiet Compare Not Equal
3910 ///
3911 /// Set all bits to 1 in vector (two signed 64-bit integer numbers)
3912 /// elements if the corresponding `a` (two 64-bit floating point numbers) and
3913 /// `b` (two 64-bit floating point numbers) elements are ordered and not equal,
3914 /// otherwise set all bits to 0.
3915 ///
3916 #[inline]
3917 #[target_feature(enable = "msa")]
3918 #[cfg_attr(test, assert_instr(fcne.d))]
__msa_fcne_d(a: v2f64, b: v2f64) -> v2i643919 pub unsafe fn __msa_fcne_d(a: v2f64, b: v2f64) -> v2i64 {
3920     msa_fcne_d(a, mem::transmute(b))
3921 }
3922 
3923 /// Vector Floating-Point Quiet Compare Ordered
3924 ///
3925 /// Set all bits to 1 in vector (four signed 32-bit integer numbers)
3926 /// elements if the corresponding `a` (four 32-bit floating point numbers) and
3927 /// `b` (four 32-bit floating point numbers) elements are ordered, i.e. both elements are not NaN values,
3928 /// otherwise set all bits to 0.
3929 ///
3930 #[inline]
3931 #[target_feature(enable = "msa")]
3932 #[cfg_attr(test, assert_instr(fcor.w))]
__msa_fcor_w(a: v4f32, b: v4f32) -> v4i323933 pub unsafe fn __msa_fcor_w(a: v4f32, b: v4f32) -> v4i32 {
3934     msa_fcor_w(a, mem::transmute(b))
3935 }
3936 
3937 /// Vector Floating-Point Quiet Compare Ordered
3938 ///
3939 /// Set all bits to 1 in vector (two signed 64-bit integer numbers)
3940 /// elements if the corresponding `a` (two 64-bit floating point numbers) and
3941 /// `b` (two 64-bit floating point numbers) elements are ordered, i.e. both elements are not NaN values,
3942 /// otherwise set all bits to 0.
3943 ///
3944 #[inline]
3945 #[target_feature(enable = "msa")]
3946 #[cfg_attr(test, assert_instr(fcor.d))]
__msa_fcor_d(a: v2f64, b: v2f64) -> v2i643947 pub unsafe fn __msa_fcor_d(a: v2f64, b: v2f64) -> v2i64 {
3948     msa_fcor_d(a, mem::transmute(b))
3949 }
3950 
3951 /// Vector Floating-Point Quiet Compare Unordered or Equal
3952 ///
3953 /// Set all bits to 1 in vector (four signed 32-bit integer numbers)
3954 /// elements if the corresponding `a` (four 32-bit floating point numbers) and
3955 /// `b` (four 32-bit floating point numbers) elements are unordered or equal,
3956 /// otherwise set all bits to 0.
3957 ///
3958 #[inline]
3959 #[target_feature(enable = "msa")]
3960 #[cfg_attr(test, assert_instr(fcueq.w))]
__msa_fcueq_w(a: v4f32, b: v4f32) -> v4i323961 pub unsafe fn __msa_fcueq_w(a: v4f32, b: v4f32) -> v4i32 {
3962     msa_fcueq_w(a, mem::transmute(b))
3963 }
3964 
3965 /// Vector Floating-Point Quiet Compare Unordered or Equal
3966 ///
3967 /// Set all bits to 1 in vector (two signed 64-bit integer numbers)
3968 /// elements if the corresponding `a` (two 64-bit floating point numbers) and
3969 /// `b` (two 64-bit floating point numbers) elements are unordered or equal,
3970 /// otherwise set all bits to 0.
3971 ///
3972 #[inline]
3973 #[target_feature(enable = "msa")]
3974 #[cfg_attr(test, assert_instr(fcueq.d))]
__msa_fcueq_d(a: v2f64, b: v2f64) -> v2i643975 pub unsafe fn __msa_fcueq_d(a: v2f64, b: v2f64) -> v2i64 {
3976     msa_fcueq_d(a, mem::transmute(b))
3977 }
3978 
3979 /// Vector Floating-Point Quiet Compare Unordered or Less or Equal
3980 ///
3981 /// Set all bits to 1 in vector (four signed 32-bit integer numbers)
3982 /// elements if the corresponding elements in `a` (four 32-bit floating point numbers)
3983 /// are unordered or less than or equal to `b` (four 32-bit floating point numbers) elements,
3984 /// otherwise set all bits to 0.
3985 ///
3986 #[inline]
3987 #[target_feature(enable = "msa")]
3988 #[cfg_attr(test, assert_instr(fcule.w))]
__msa_fcule_w(a: v4f32, b: v4f32) -> v4i323989 pub unsafe fn __msa_fcule_w(a: v4f32, b: v4f32) -> v4i32 {
3990     msa_fcule_w(a, mem::transmute(b))
3991 }
3992 
3993 /// Vector Floating-Point Quiet Compare Unordered or Less or Equal
3994 ///
3995 /// Set all bits to 1 in vector (two signed 64-bit integer numbers)
3996 /// elements if the corresponding elements in `a` (two 64-bit floating point numbers)
3997 /// are unordered or less than or equal to `b` (two 64-bit floating point numbers) elements,
3998 /// otherwise set all bits to 0.
3999 ///
4000 #[inline]
4001 #[target_feature(enable = "msa")]
4002 #[cfg_attr(test, assert_instr(fcule.d))]
__msa_fcule_d(a: v2f64, b: v2f64) -> v2i644003 pub unsafe fn __msa_fcule_d(a: v2f64, b: v2f64) -> v2i64 {
4004     msa_fcule_d(a, mem::transmute(b))
4005 }
4006 
4007 /// Vector Floating-Point Quiet Compare Unordered or Less Than
4008 ///
4009 /// Set all bits to 1 in vector (four signed 32-bit integer numbers)
4010 /// elements if the corresponding elements in `a` (four 32-bit floating point numbers)
4011 /// are unordered or less than `b` (four 32-bit floating point numbers) elements,
4012 /// otherwise set all bits to 0.
4013 ///
4014 #[inline]
4015 #[target_feature(enable = "msa")]
4016 #[cfg_attr(test, assert_instr(fcult.w))]
__msa_fcult_w(a: v4f32, b: v4f32) -> v4i324017 pub unsafe fn __msa_fcult_w(a: v4f32, b: v4f32) -> v4i32 {
4018     msa_fcult_w(a, mem::transmute(b))
4019 }
4020 
4021 /// Vector Floating-Point Quiet Compare Unordered or Less Than
4022 ///
4023 /// Set all bits to 1 in vector (two signed 64-bit integer numbers)
4024 /// elements if the corresponding elements in `a` (two 64-bit floating point numbers)
4025 /// are unordered or less than `b` (two 64-bit floating point numbers) elements,
4026 /// otherwise set all bits to 0.
4027 ///
4028 #[inline]
4029 #[target_feature(enable = "msa")]
4030 #[cfg_attr(test, assert_instr(fcult.d))]
__msa_fcult_d(a: v2f64, b: v2f64) -> v2i644031 pub unsafe fn __msa_fcult_d(a: v2f64, b: v2f64) -> v2i64 {
4032     msa_fcult_d(a, mem::transmute(b))
4033 }
4034 
4035 /// Vector Floating-Point Quiet Compare Unordered
4036 ///
4037 /// Set all bits to 1 in vector (four signed 32-bit integer numbers)
4038 /// elements if the corresponding `a` (four 32-bit floating point numbers)
4039 /// and `b` (four 32-bit floating point numbers) elements are unordered,
4040 /// i.e. at least one element is a NaN value, otherwise set all bits to 0.
4041 ///
4042 #[inline]
4043 #[target_feature(enable = "msa")]
4044 #[cfg_attr(test, assert_instr(fcun.w))]
__msa_fcun_w(a: v4f32, b: v4f32) -> v4i324045 pub unsafe fn __msa_fcun_w(a: v4f32, b: v4f32) -> v4i32 {
4046     msa_fcun_w(a, mem::transmute(b))
4047 }
4048 
4049 /// Vector Floating-Point Quiet Compare Unordered
4050 ///
4051 /// Set all bits to 1 in vector (two signed 64-bit integer numbers)
4052 /// elements if the corresponding `a` (two 64-bit floating point numbers)
4053 /// and `b` (two 64-bit floating point numbers) elements are unordered,
4054 /// i.e. at least one element is a NaN value, otherwise set all bits to 0.
4055 ///
4056 #[inline]
4057 #[target_feature(enable = "msa")]
4058 #[cfg_attr(test, assert_instr(fcun.d))]
__msa_fcun_d(a: v2f64, b: v2f64) -> v2i644059 pub unsafe fn __msa_fcun_d(a: v2f64, b: v2f64) -> v2i64 {
4060     msa_fcun_d(a, mem::transmute(b))
4061 }
4062 
4063 /// Vector Floating-Point Quiet Compare Unordered or Not Equal
4064 ///
4065 /// Set all bits to 1 in vector (four signed 32-bit integer numbers)
4066 /// elements if the corresponding `a` (four 32-bit floating point numbers)
4067 /// and `b` (four 32-bit floating point numbers) elements are unordered or not equal,
4068 /// otherwise set all bits to 0.
4069 ///
4070 #[inline]
4071 #[target_feature(enable = "msa")]
4072 #[cfg_attr(test, assert_instr(fcune.w))]
__msa_fcune_w(a: v4f32, b: v4f32) -> v4i324073 pub unsafe fn __msa_fcune_w(a: v4f32, b: v4f32) -> v4i32 {
4074     msa_fcune_w(a, mem::transmute(b))
4075 }
4076 
4077 /// Vector Floating-Point Quiet Compare Unordered or Not Equal
4078 ///
4079 /// Set all bits to 1 in vector (two signed 64-bit integer numbers)
4080 /// elements if the corresponding `a` (two 64-bit floating point numbers)
4081 /// and `b` (two 64-bit floating point numbers) elements are unordered or not equal,
4082 /// otherwise set all bits to 0.
4083 ///
4084 #[inline]
4085 #[target_feature(enable = "msa")]
4086 #[cfg_attr(test, assert_instr(fcune.d))]
__msa_fcune_d(a: v2f64, b: v2f64) -> v2i644087 pub unsafe fn __msa_fcune_d(a: v2f64, b: v2f64) -> v2i64 {
4088     msa_fcune_d(a, mem::transmute(b))
4089 }
4090 
4091 /// Vector Floating-Point Division
4092 ///
4093 /// The floating-point elements in vector `a` (four 32-bit floating point numbers)
4094 /// are divided by the floating-point elements in vector `b` (four 32-bit floating point numbers).
4095 /// The result is written to vector (four 32-bit floating point numbers).
4096 ///
4097 #[inline]
4098 #[target_feature(enable = "msa")]
4099 #[cfg_attr(test, assert_instr(fdiv.w))]
__msa_fdiv_w(a: v4f32, b: v4f32) -> v4f324100 pub unsafe fn __msa_fdiv_w(a: v4f32, b: v4f32) -> v4f32 {
4101     msa_fdiv_w(a, mem::transmute(b))
4102 }
4103 
4104 /// Vector Floating-Point Division
4105 ///
4106 /// The floating-point elements in vector `a` (two 64-bit floating point numbers)
4107 /// are divided by the floating-point elements in vector `b` (two 64-bit floating point numbers).
4108 /// The result is written to vector (two 64-bit floating point numbers).
4109 ///
4110 #[inline]
4111 #[target_feature(enable = "msa")]
4112 #[cfg_attr(test, assert_instr(fdiv.d))]
__msa_fdiv_d(a: v2f64, b: v2f64) -> v2f644113 pub unsafe fn __msa_fdiv_d(a: v2f64, b: v2f64) -> v2f64 {
4114     msa_fdiv_d(a, mem::transmute(b))
4115 }
4116 
4117 /* FIXME: 16-bit float
4118 /// Vector Floating-Point Down-Convert Interchange Format
4119 ///
4120 /// The floating-point elements in vector `a` (four 64-bit floating point numbers)
4121 /// and vector `b` (four 64-bit floating point numbers) are down-converted
4122 /// to a smaller interchange format, i.e. from 64-bit to 32-bit, or from 32-bit to 16-bit.
4123 /// The result is written to vector (8 16-bit floating point numbers).
4124 ///
4125 #[inline]
4126 #[target_feature(enable = "msa")]
4127 #[cfg_attr(test, assert_instr(fexdo.h))]
4128 pub unsafe fn __msa_fexdo_h(a: v4f32, b: v4f32) -> f16x8 {
4129     msa_fexdo_h(a, mem::transmute(b))
4130 }*/
4131 
4132 /// Vector Floating-Point Down-Convert Interchange Format
4133 ///
4134 /// The floating-point elements in vector `a` (two 64-bit floating point numbers)
4135 /// and vector `b` (two 64-bit floating point numbers) are down-converted
4136 /// to a smaller interchange format, i.e. from 64-bit to 32-bit, or from 32-bit to 16-bit.
4137 /// The result is written to vector (four 32-bit floating point numbers).
4138 ///
4139 #[inline]
4140 #[target_feature(enable = "msa")]
4141 #[cfg_attr(test, assert_instr(fexdo.w))]
__msa_fexdo_w(a: v2f64, b: v2f64) -> v4f324142 pub unsafe fn __msa_fexdo_w(a: v2f64, b: v2f64) -> v4f32 {
4143     msa_fexdo_w(a, mem::transmute(b))
4144 }
4145 
4146 /// Vector Floating-Point Down-Convert Interchange Format
4147 ///
4148 /// The floating-point elements in vector `a` (four 32-bit floating point numbers)
4149 /// are scaled, i.e. multiplied, by 2 to the power of integer elements in vector `b`
4150 /// (four signed 32-bit integer numbers).
4151 /// The result is written to vector (four 32-bit floating point numbers).
4152 ///
4153 #[inline]
4154 #[target_feature(enable = "msa")]
4155 #[cfg_attr(test, assert_instr(fexp2.w))]
__msa_fexp2_w(a: v4f32, b: v4i32) -> v4f324156 pub unsafe fn __msa_fexp2_w(a: v4f32, b: v4i32) -> v4f32 {
4157     msa_fexp2_w(a, mem::transmute(b))
4158 }
4159 
4160 /// Vector Floating-Point Down-Convert Interchange Format
4161 ///
4162 /// The floating-point elements in vector `a` (two 64-bit floating point numbers)
4163 /// are scaled, i.e. multiplied, by 2 to the power of integer elements in vector `b`
4164 /// (two signed 64-bit integer numbers).
4165 /// The result is written to vector (two 64-bit floating point numbers).
4166 ///
4167 #[inline]
4168 #[target_feature(enable = "msa")]
4169 #[cfg_attr(test, assert_instr(fexp2.d))]
__msa_fexp2_d(a: v2f64, b: v2i64) -> v2f644170 pub unsafe fn __msa_fexp2_d(a: v2f64, b: v2i64) -> v2f64 {
4171     msa_fexp2_d(a, mem::transmute(b))
4172 }
4173 
4174 /* FIXME: 16-bit float
4175 /// Vector Floating-Point Up-Convert Interchange Format Left
4176 ///
4177 /// The left half floating-point elements in vector `a` (two 16-bit floating point numbers)
4178 /// are up-converted to a larger interchange format,
4179 /// i.e. from 16-bit to 32-bit, or from 32-bit to 64-bit.
4180 /// The result is written to vector (four 32-bit floating point numbers).
4181 ///
4182 #[inline]
4183 #[target_feature(enable = "msa")]
4184 #[cfg_attr(test, assert_instr(fexupl.w))]
4185 pub unsafe fn __msa_fexupl_w(a: f16x8) -> v4f32 {
4186     msa_fexupl_w(a)
4187 }*/
4188 
4189 /// Vector Floating-Point Up-Convert Interchange Format Left
4190 ///
4191 /// The left half floating-point elements in vector `a` (four 32-bit floating point numbers)
4192 /// are up-converted to a larger interchange format,
4193 /// i.e. from 16-bit to 32-bit, or from 32-bit to 64-bit.
4194 /// The result is written to vector (two 64-bit floating point numbers).
4195 ///
4196 #[inline]
4197 #[target_feature(enable = "msa")]
4198 #[cfg_attr(test, assert_instr(fexupl.d))]
__msa_fexupl_d(a: v4f32) -> v2f644199 pub unsafe fn __msa_fexupl_d(a: v4f32) -> v2f64 {
4200     msa_fexupl_d(a)
4201 }
4202 
4203 /* FIXME: 16-bit float
4204 /// Vector Floating-Point Up-Convert Interchange Format Left
4205 ///
4206 /// The right half floating-point elements in vector `a` (two 16-bit floating point numbers)
4207 /// are up-converted to a larger interchange format,
4208 /// i.e. from 16-bit to 32-bit, or from 32-bit to 64-bit.
4209 /// The result is written to vector (four 32-bit floating point numbers).
4210 ///
4211 #[inline]
4212 #[target_feature(enable = "msa")]
4213 #[cfg_attr(test, assert_instr(fexupr.w))]
4214 pub unsafe fn __msa_fexupr_w(a: f16x8) -> v4f32 {
4215     msa_fexupr_w(a)
4216 } */
4217 
4218 /// Vector Floating-Point Up-Convert Interchange Format Left
4219 ///
4220 /// The right half floating-point elements in vector `a` (four 32-bit floating point numbers)
4221 /// are up-converted to a larger interchange format,
4222 /// i.e. from 16-bit to 32-bit, or from 32-bit to 64-bit.
4223 /// The result is written to vector (two 64-bit floating point numbers).
4224 ///
4225 #[inline]
4226 #[target_feature(enable = "msa")]
4227 #[cfg_attr(test, assert_instr(fexupr.d))]
__msa_fexupr_d(a: v4f32) -> v2f644228 pub unsafe fn __msa_fexupr_d(a: v4f32) -> v2f64 {
4229     msa_fexupr_d(a)
4230 }
4231 
4232 /// Vector Floating-Point Round and Convert from Signed Integer
4233 ///
4234 /// The signed integer elements in vector `a` (four signed 32-bit integer numbers)
4235 /// are converted to floating-point values.
4236 /// The result is written to vector (four 32-bit floating point numbers).
4237 ///
4238 #[inline]
4239 #[target_feature(enable = "msa")]
4240 #[cfg_attr(test, assert_instr(ffint_s.w))]
__msa_ffint_s_w(a: v4i32) -> v4f324241 pub unsafe fn __msa_ffint_s_w(a: v4i32) -> v4f32 {
4242     msa_ffint_s_w(a)
4243 }
4244 
4245 /// Vector Floating-Point Round and Convert from Signed Integer
4246 ///
4247 /// The signed integer elements in vector `a` (two signed 64-bit integer numbers)
4248 /// are converted to floating-point values.
4249 /// The result is written to vector (two 64-bit floating point numbers).
4250 ///
4251 #[inline]
4252 #[target_feature(enable = "msa")]
4253 #[cfg_attr(test, assert_instr(ffint_s.d))]
__msa_ffint_s_d(a: v2i64) -> v2f644254 pub unsafe fn __msa_ffint_s_d(a: v2i64) -> v2f64 {
4255     msa_ffint_s_d(a)
4256 }
4257 
4258 /// Vector Floating-Point Round and Convert from Unsigned Integer
4259 ///
4260 /// The unsigned integer elements in vector `a` (four unsigned 32-bit integer numbers)
4261 /// are converted to floating-point values.
4262 /// The result is written to vector (four 32-bit floating point numbers).
4263 ///
4264 #[inline]
4265 #[target_feature(enable = "msa")]
4266 #[cfg_attr(test, assert_instr(ffint_u.w))]
__msa_ffint_u_w(a: v4u32) -> v4f324267 pub unsafe fn __msa_ffint_u_w(a: v4u32) -> v4f32 {
4268     msa_ffint_u_w(a)
4269 }
4270 
4271 /// Vector Floating-Point Round and Convert from Unsigned Integer
4272 ///
4273 /// The unsigned integer elements in vector `a` (two unsigned 64-bit integer numbers)
4274 /// are converted to floating-point values.
4275 /// The result is written to vector (two 64-bit floating point numbers).
4276 ///
4277 #[inline]
4278 #[target_feature(enable = "msa")]
4279 #[cfg_attr(test, assert_instr(ffint_u.d))]
__msa_ffint_u_d(a: v2u64) -> v2f644280 pub unsafe fn __msa_ffint_u_d(a: v2u64) -> v2f64 {
4281     msa_ffint_u_d(a)
4282 }
4283 
4284 /// Vector Floating-Point Convert from Fixed-Point Left
4285 ///
4286 /// The left half fixed-point elements in vector `a` (eight signed 16-bit integer numbers)
4287 /// are up-converted to floating-point data format.
4288 /// i.e. from 16-bit Q15 to 32-bit floating-point, or from 32-bit Q31 to 64-bit floating-point.
4289 /// The result is written to vector (four 32-bit floating point numbers).
4290 ///
4291 #[inline]
4292 #[target_feature(enable = "msa")]
4293 #[cfg_attr(test, assert_instr(ffql.w))]
__msa_ffql_w(a: v8i16) -> v4f324294 pub unsafe fn __msa_ffql_w(a: v8i16) -> v4f32 {
4295     msa_ffql_w(a)
4296 }
4297 
4298 /// Vector Floating-Point Convert from Fixed-Point Left
4299 ///
4300 /// The left half fixed-point elements in vector `a` (four signed 32-bit integer numbers)
4301 /// are up-converted to floating-point data format.
4302 /// i.e. from 16-bit Q15 to 32-bit floating-point, or from 32-bit Q31 to 64-bit floating-point.
4303 /// The result is written to vector (two 64-bit floating point numbers).
4304 ///
4305 #[inline]
4306 #[target_feature(enable = "msa")]
4307 #[cfg_attr(test, assert_instr(ffql.d))]
__msa_ffql_d(a: v4i32) -> v2f644308 pub unsafe fn __msa_ffql_d(a: v4i32) -> v2f64 {
4309     msa_ffql_d(a)
4310 }
4311 
4312 /// Vector Floating-Point Convert from Fixed-Point Left
4313 ///
4314 /// The right half fixed-point elements in vector `a` (eight signed 16-bit integer numbers)
4315 /// are up-converted to floating-point data format.
4316 /// i.e. from 16-bit Q15 to 32-bit floating-point, or from 32-bit Q31 to 64-bit floating-point.
4317 /// The result is written to vector (four 32-bit floating point numbers).
4318 ///
4319 #[inline]
4320 #[target_feature(enable = "msa")]
4321 #[cfg_attr(test, assert_instr(ffqr.w))]
__msa_ffqr_w(a: v8i16) -> v4f324322 pub unsafe fn __msa_ffqr_w(a: v8i16) -> v4f32 {
4323     msa_ffqr_w(a)
4324 }
4325 
4326 /// Vector Floating-Point Convert from Fixed-Point Left
4327 ///
4328 /// The right half fixed-point elements in vector `a` (four signed 32-bit integer numbers)
4329 /// are up-converted to floating-point data format.
4330 /// i.e. from 16-bit Q15 to 32-bit floating-point, or from 32-bit Q31 to 64-bit floating-point.
4331 /// The result is written to vector (two 64-bit floating point numbers).
4332 ///
4333 #[inline]
4334 #[target_feature(enable = "msa")]
4335 #[cfg_attr(test, assert_instr(ffqr.d))]
__msa_ffqr_d(a: v4i32) -> v2f644336 pub unsafe fn __msa_ffqr_d(a: v4i32) -> v2f64 {
4337     msa_ffqr_d(a)
4338 }
4339 
4340 /// Vector Fill from GPR
4341 ///
4342 /// Replicate GPR rs value to all elements in vector (sixteen signed 8-bit integer numbers).
4343 /// If the source GPR is wider than the destination data format, the destination's elements
4344 /// will be set to the least significant bits of the GPR.
4345 ///
4346 #[inline]
4347 #[target_feature(enable = "msa")]
4348 #[cfg_attr(test, assert_instr(fill.b))]
__msa_fill_b(a: i32) -> v16i84349 pub unsafe fn __msa_fill_b(a: i32) -> v16i8 {
4350     msa_fill_b(a)
4351 }
4352 
4353 /// Vector Fill from GPR
4354 ///
4355 /// Replicate GPR rs value to all elements in vector (eight signed 16-bit integer numbers).
4356 /// If the source GPR is wider than the destination data format, the destination's elements
4357 /// will be set to the least significant bits of the GPR.
4358 ///
4359 #[inline]
4360 #[target_feature(enable = "msa")]
4361 #[cfg_attr(test, assert_instr(fill.h))]
__msa_fill_h(a: i32) -> v8i164362 pub unsafe fn __msa_fill_h(a: i32) -> v8i16 {
4363     msa_fill_h(a)
4364 }
4365 
4366 /// Vector Fill from GPR
4367 ///
4368 /// Replicate GPR rs value to all elements in vector (four signed 32-bit integer numbers).
4369 /// If the source GPR is wider than the destination data format, the destination's elements
4370 /// will be set to the least significant bits of the GPR.
4371 ///
4372 #[inline]
4373 #[target_feature(enable = "msa")]
4374 #[cfg_attr(test, assert_instr(fill.w))]
__msa_fill_w(a: i32) -> v4i324375 pub unsafe fn __msa_fill_w(a: i32) -> v4i32 {
4376     msa_fill_w(a)
4377 }
4378 
4379 /// Vector Fill from GPR
4380 ///
4381 /// Replicate GPR rs value to all elements in vector (two signed 64-bit integer numbers).
4382 /// If the source GPR is wider than the destination data format, the destination's elements
4383 /// will be set to the least significant bits of the GPR.
4384 ///
4385 #[inline]
4386 #[target_feature(enable = "msa")]
4387 #[cfg_attr(test, assert_instr(fill.d))]
__msa_fill_d(a: i64) -> v2i644388 pub unsafe fn __msa_fill_d(a: i64) -> v2i64 {
4389     msa_fill_d(a)
4390 }
4391 
4392 /// Vector Floating-Point Base 2 Logarithm
4393 ///
4394 /// The signed integral base 2 exponents of floating-point elements in vector `a`
4395 /// (four 32-bit floating point numbers) are written as floating-point values to vector elements
4396 /// (four 32-bit floating point numbers).
4397 ///
4398 #[inline]
4399 #[target_feature(enable = "msa")]
4400 #[cfg_attr(test, assert_instr(flog2.w))]
__msa_flog2_w(a: v4f32) -> v4f324401 pub unsafe fn __msa_flog2_w(a: v4f32) -> v4f32 {
4402     msa_flog2_w(a)
4403 }
4404 
4405 /// Vector Floating-Point Base 2 Logarithm
4406 ///
4407 /// The signed integral base 2 exponents of floating-point elements in vector `a`
4408 /// (two 64-bit floating point numbers) are written as floating-point values to vector elements
4409 /// (two 64-bit floating point numbers).
4410 ///
4411 #[inline]
4412 #[target_feature(enable = "msa")]
4413 #[cfg_attr(test, assert_instr(flog2.d))]
__msa_flog2_d(a: v2f64) -> v2f644414 pub unsafe fn __msa_flog2_d(a: v2f64) -> v2f64 {
4415     msa_flog2_d(a)
4416 }
4417 
4418 /// Vector Floating-Point Multiply-Add
4419 ///
4420 /// The floating-point elements in vector `b` (four 32-bit floating point numbers)
4421 /// multiplied by floating-point elements in vector `c` (four 32-bit floating point numbers)
4422 /// are added to the floating-point elements in vector `a` (four 32-bit floating point numbers).
4423 ///
4424 #[inline]
4425 #[target_feature(enable = "msa")]
4426 #[cfg_attr(test, assert_instr(fmadd.w))]
__msa_fmadd_w(a: v4f32, b: v4f32, c: v4f32) -> v4f324427 pub unsafe fn __msa_fmadd_w(a: v4f32, b: v4f32, c: v4f32) -> v4f32 {
4428     msa_fmadd_w(a, mem::transmute(b), c)
4429 }
4430 
4431 /// Vector Floating-Point Multiply-Add
4432 ///
4433 /// The floating-point elements in vector `b` (two 64-bit floating point numbers)
4434 /// multiplied by floating-point elements in vector `c` (two 64-bit floating point numbers)
4435 /// are added to the floating-point elements in vector `a` (two 64-bit floating point numbers).
4436 ///
4437 #[inline]
4438 #[target_feature(enable = "msa")]
4439 #[cfg_attr(test, assert_instr(fmadd.d))]
__msa_fmadd_d(a: v2f64, b: v2f64, c: v2f64) -> v2f644440 pub unsafe fn __msa_fmadd_d(a: v2f64, b: v2f64, c: v2f64) -> v2f64 {
4441     msa_fmadd_d(a, mem::transmute(b), c)
4442 }
4443 
4444 /// Vector Floating-Point Maximum
4445 ///
4446 /// The largest values between corresponding floating-point elements in vector `a`
4447 /// (four 32-bit floating point numbers) and vector `b` (four 32-bit floating point numbers)
4448 /// are written to vector (four 32-bit floating point numbers).
4449 ///
4450 #[inline]
4451 #[target_feature(enable = "msa")]
4452 #[cfg_attr(test, assert_instr(fmax.w))]
__msa_fmax_w(a: v4f32, b: v4f32) -> v4f324453 pub unsafe fn __msa_fmax_w(a: v4f32, b: v4f32) -> v4f32 {
4454     msa_fmax_w(a, mem::transmute(b))
4455 }
4456 
4457 /// Vector Floating-Point Maximum
4458 ///
4459 /// The largest values between corresponding floating-point elements in vector `a`
4460 /// (two 64-bit floating point numbers) and vector `b` (two 64-bit floating point numbers)
4461 /// are written to vector (two 64-bit floating point numbers).
4462 ///
4463 #[inline]
4464 #[target_feature(enable = "msa")]
4465 #[cfg_attr(test, assert_instr(fmax.d))]
__msa_fmax_d(a: v2f64, b: v2f64) -> v2f644466 pub unsafe fn __msa_fmax_d(a: v2f64, b: v2f64) -> v2f64 {
4467     msa_fmax_d(a, mem::transmute(b))
4468 }
4469 
4470 /// Vector Floating-Point Maximum Based on Absolute Values
4471 ///
4472 /// The value with the largest magnitude, i.e. absolute value, between corresponding
4473 /// floating-point elements in vector `a` (four 32-bit floating point numbers)
4474 /// and vector `b` (four 32-bit floating point numbers)
4475 /// are written to vector (four 32-bit floating point numbers).
4476 ///
4477 #[inline]
4478 #[target_feature(enable = "msa")]
4479 #[cfg_attr(test, assert_instr(fmax_a.w))]
__msa_fmax_a_w(a: v4f32, b: v4f32) -> v4f324480 pub unsafe fn __msa_fmax_a_w(a: v4f32, b: v4f32) -> v4f32 {
4481     msa_fmax_a_w(a, mem::transmute(b))
4482 }
4483 
4484 /// Vector Floating-Point Maximum Based on Absolute Values
4485 ///
4486 /// The value with the largest magnitude, i.e. absolute value, between corresponding
4487 /// floating-point elements in vector `a` (two 64-bit floating point numbers)
4488 /// and vector `b` (two 64-bit floating point numbers)
4489 /// are written to vector (two 64-bit floating point numbers).
4490 ///
4491 #[inline]
4492 #[target_feature(enable = "msa")]
4493 #[cfg_attr(test, assert_instr(fmax_a.d))]
__msa_fmax_a_d(a: v2f64, b: v2f64) -> v2f644494 pub unsafe fn __msa_fmax_a_d(a: v2f64, b: v2f64) -> v2f64 {
4495     msa_fmax_a_d(a, mem::transmute(b))
4496 }
4497 
4498 /// Vector Floating-Point Minimum
4499 ///
4500 /// The smallest values between corresponding floating-point elements in vector `a`
4501 /// (four 32-bit floating point numbers) and vector `b` (four 32-bit floating point numbers)
4502 /// are written to vector (four 32-bit floating point numbers).
4503 ///
4504 #[inline]
4505 #[target_feature(enable = "msa")]
4506 #[cfg_attr(test, assert_instr(fmin.w))]
__msa_fmin_w(a: v4f32, b: v4f32) -> v4f324507 pub unsafe fn __msa_fmin_w(a: v4f32, b: v4f32) -> v4f32 {
4508     msa_fmin_w(a, mem::transmute(b))
4509 }
4510 
4511 /// Vector Floating-Point Minimum
4512 ///
4513 /// The smallest values between corresponding floating-point elements in vector `a`
4514 /// (two 64-bit floating point numbers) and vector `b` (two 64-bit floating point numbers)
4515 /// are written to vector (two 64-bit floating point numbers).
4516 ///
4517 #[inline]
4518 #[target_feature(enable = "msa")]
4519 #[cfg_attr(test, assert_instr(fmin.d))]
__msa_fmin_d(a: v2f64, b: v2f64) -> v2f644520 pub unsafe fn __msa_fmin_d(a: v2f64, b: v2f64) -> v2f64 {
4521     msa_fmin_d(a, mem::transmute(b))
4522 }
4523 
4524 /// Vector Floating-Point Minimum Based on Absolute Values
4525 ///
4526 /// The value with the smallest magnitude, i.e. absolute value, between corresponding
4527 /// floating-point elements in vector `a` (four 32-bit floating point numbers)
4528 /// and vector `b` (four 32-bit floating point numbers)
4529 /// are written to vector (four 32-bit floating point numbers).
4530 ///
4531 #[inline]
4532 #[target_feature(enable = "msa")]
4533 #[cfg_attr(test, assert_instr(fmin_a.w))]
__msa_fmin_a_w(a: v4f32, b: v4f32) -> v4f324534 pub unsafe fn __msa_fmin_a_w(a: v4f32, b: v4f32) -> v4f32 {
4535     msa_fmin_a_w(a, mem::transmute(b))
4536 }
4537 
4538 /// Vector Floating-Point Minimum Based on Absolute Values
4539 ///
4540 /// The value with the smallest magnitude, i.e. absolute value, between corresponding
4541 /// floating-point elements in vector `a` (two 64-bit floating point numbers)
4542 /// and vector `b` (two 64-bit floating point numbers)
4543 /// are written to vector (two 64-bit floating point numbers).
4544 ///
4545 #[inline]
4546 #[target_feature(enable = "msa")]
4547 #[cfg_attr(test, assert_instr(fmin_a.d))]
__msa_fmin_a_d(a: v2f64, b: v2f64) -> v2f644548 pub unsafe fn __msa_fmin_a_d(a: v2f64, b: v2f64) -> v2f64 {
4549     msa_fmin_a_d(a, mem::transmute(b))
4550 }
4551 
4552 /// Vector Floating-Point Multiply-Sub
4553 ///
4554 /// The floating-point elements in vector `b` (four 32-bit floating point numbers)
4555 /// multiplied by floating-point elements in vector `c` (four 32-bit floating point numbers)
4556 /// are subtracted from the floating-point elements in vector `a` (four 32-bit floating point numbers).
4557 ///
4558 #[inline]
4559 #[target_feature(enable = "msa")]
4560 #[cfg_attr(test, assert_instr(fmsub.w))]
__msa_fmsub_w(a: v4f32, b: v4f32, c: v4f32) -> v4f324561 pub unsafe fn __msa_fmsub_w(a: v4f32, b: v4f32, c: v4f32) -> v4f32 {
4562     msa_fmsub_w(a, mem::transmute(b), c)
4563 }
4564 
4565 /// Vector Floating-Point Multiply-Sub
4566 ///
4567 /// The floating-point elements in vector `b` (two 64-bit floating point numbers)
4568 /// multiplied by floating-point elements in vector `c` (two 64-bit floating point numbers)
4569 /// are subtracted from the floating-point elements in vector `a` (two 64-bit floating point numbers).
4570 ///
4571 #[inline]
4572 #[target_feature(enable = "msa")]
4573 #[cfg_attr(test, assert_instr(fmsub.d))]
__msa_fmsub_d(a: v2f64, b: v2f64, c: v2f64) -> v2f644574 pub unsafe fn __msa_fmsub_d(a: v2f64, b: v2f64, c: v2f64) -> v2f64 {
4575     msa_fmsub_d(a, mem::transmute(b), c)
4576 }
4577 
4578 /// Vector Floating-Point Multiplication
4579 ///
4580 /// The floating-point elements in vector `a` (four 32-bit floating point numbers) are
4581 /// multiplied by floating-point elements in vector `b` (four 32-bit floating point numbers).
4582 ///
4583 #[inline]
4584 #[target_feature(enable = "msa")]
4585 #[cfg_attr(test, assert_instr(fmul.w))]
__msa_fmul_w(a: v4f32, b: v4f32) -> v4f324586 pub unsafe fn __msa_fmul_w(a: v4f32, b: v4f32) -> v4f32 {
4587     msa_fmul_w(a, mem::transmute(b))
4588 }
4589 
4590 /// Vector Floating-Point Multiplication
4591 ///
4592 /// The floating-point elements in vector `a` (two 64-bit floating point numbers) are
4593 /// multiplied by floating-point elements in vector `b` (two 64-bit floating point numbers).
4594 ///
4595 #[inline]
4596 #[target_feature(enable = "msa")]
4597 #[cfg_attr(test, assert_instr(fmul.d))]
__msa_fmul_d(a: v2f64, b: v2f64) -> v2f644598 pub unsafe fn __msa_fmul_d(a: v2f64, b: v2f64) -> v2f64 {
4599     msa_fmul_d(a, mem::transmute(b))
4600 }
4601 
4602 /// Vector Floating-Point Round to Integer
4603 ///
4604 /// The floating-point elements in vector `a` (four 32-bit floating point numbers)
4605 /// are rounded to an integral valued floating-point number in the same format based
4606 /// on the rounding mode bits RM in MSA Control and Status Register MSACSR.
4607 ///
4608 #[inline]
4609 #[target_feature(enable = "msa")]
4610 #[cfg_attr(test, assert_instr(frint.w))]
__msa_frint_w(a: v4f32) -> v4f324611 pub unsafe fn __msa_frint_w(a: v4f32) -> v4f32 {
4612     msa_frint_w(a)
4613 }
4614 
4615 /// Vector Floating-Point Round to Integer
4616 ///
4617 /// The floating-point elements in vector `a` (two 64-bit floating point numbers)
4618 /// are rounded to an integral valued floating-point number in the same format based
4619 /// on the rounding mode bits RM in MSA Control and Status Register MSACSR.
4620 ///
4621 #[inline]
4622 #[target_feature(enable = "msa")]
4623 #[cfg_attr(test, assert_instr(frint.d))]
__msa_frint_d(a: v2f64) -> v2f644624 pub unsafe fn __msa_frint_d(a: v2f64) -> v2f64 {
4625     msa_frint_d(a)
4626 }
4627 
4628 /// Vector Approximate Floating-Point Reciprocal
4629 ///
4630 /// The reciprocals of floating-point elements in vector `a` (four 32-bit floating point numbers)
4631 /// are calculated and the result is written to vector (four 32-bit floating point numbers).
4632 ///
4633 #[inline]
4634 #[target_feature(enable = "msa")]
4635 #[cfg_attr(test, assert_instr(frcp.w))]
__msa_frcp_w(a: v4f32) -> v4f324636 pub unsafe fn __msa_frcp_w(a: v4f32) -> v4f32 {
4637     msa_frcp_w(a)
4638 }
4639 
4640 /// Vector Approximate Floating-Point Reciprocal
4641 ///
4642 /// The reciprocals of floating-point elements in vector `a` (two 64-bit floating point numbers)
4643 /// are calculated and the result is written to vector (two 64-bit floating point numbers).
4644 ///
4645 #[inline]
4646 #[target_feature(enable = "msa")]
4647 #[cfg_attr(test, assert_instr(frcp.d))]
__msa_frcp_d(a: v2f64) -> v2f644648 pub unsafe fn __msa_frcp_d(a: v2f64) -> v2f64 {
4649     msa_frcp_d(a)
4650 }
4651 
4652 /// Vector Approximate Floating-Point Reciprocal of Square Root
4653 ///
4654 /// The reciprocals of the square roots of floating-point elements in vector `a` (four 32-bit floating point numbers)
4655 /// are calculated and the result is written to vector (four 32-bit floating point numbers).
4656 ///
4657 #[inline]
4658 #[target_feature(enable = "msa")]
4659 #[cfg_attr(test, assert_instr(frsqrt.w))]
__msa_frsqrt_w(a: v4f32) -> v4f324660 pub unsafe fn __msa_frsqrt_w(a: v4f32) -> v4f32 {
4661     msa_frsqrt_w(a)
4662 }
4663 
4664 /// Vector Approximate Floating-Point Reciprocal of Square Root
4665 ///
4666 /// The reciprocals of the square roots of floating-point elements in vector `a` (two 64-bit floating point numbers)
4667 /// are calculated and the result is written to vector (two 64-bit floating point numbers).
4668 ///
4669 #[inline]
4670 #[target_feature(enable = "msa")]
4671 #[cfg_attr(test, assert_instr(frsqrt.d))]
__msa_frsqrt_d(a: v2f64) -> v2f644672 pub unsafe fn __msa_frsqrt_d(a: v2f64) -> v2f64 {
4673     msa_frsqrt_d(a)
4674 }
4675 
4676 /// Vector Floating-Point Signaling Compare Always False
4677 ///
4678 /// Set all bits to 0 in vector (four signed 32-bit integer numbers) elements.
4679 /// Signaling and quiet NaN elements in vector `a` (four 32-bit floating point numbers)
4680 /// or `b` (four 32-bit floating point numbers) signal Invalid Operation exception.
4681 /// In case of a floating-point exception, the default result has all bits set to 0.
4682 ///
4683 #[inline]
4684 #[target_feature(enable = "msa")]
4685 #[cfg_attr(test, assert_instr(fsaf.w))]
__msa_fsaf_w(a: v4f32, b: v4f32) -> v4i324686 pub unsafe fn __msa_fsaf_w(a: v4f32, b: v4f32) -> v4i32 {
4687     msa_fsaf_w(a, mem::transmute(b))
4688 }
4689 
4690 /// Vector Floating-Point Signaling Compare Always False
4691 ///
4692 /// Set all bits to 0 in vector (two signed 64-bit integer numbers) elements.
4693 /// Signaling and quiet NaN elements in vector `a` (two 64-bit floating point numbers)
4694 /// or `b` (two 64-bit floating point numbers) signal Invalid Operation exception.
4695 /// In case of a floating-point exception, the default result has all bits set to 0.
4696 ///
4697 #[inline]
4698 #[target_feature(enable = "msa")]
4699 #[cfg_attr(test, assert_instr(fsaf.d))]
__msa_fsaf_d(a: v2f64, b: v2f64) -> v2i644700 pub unsafe fn __msa_fsaf_d(a: v2f64, b: v2f64) -> v2i64 {
4701     msa_fsaf_d(a, mem::transmute(b))
4702 }
4703 
4704 /// Vector Floating-Point Signaling Compare Equal
4705 ///
4706 /// Set all bits to 1 in vector (four signed 32-bit integer numbers) elements
4707 /// if the corresponding `a` (four 32-bit floating point numbers)
4708 /// and `b` (four 32-bit floating point numbers) elements are equal, otherwise set all bits to 0.
4709 ///
4710 #[inline]
4711 #[target_feature(enable = "msa")]
4712 #[cfg_attr(test, assert_instr(fseq.w))]
__msa_fseq_w(a: v4f32, b: v4f32) -> v4i324713 pub unsafe fn __msa_fseq_w(a: v4f32, b: v4f32) -> v4i32 {
4714     msa_fseq_w(a, mem::transmute(b))
4715 }
4716 
4717 /// Vector Floating-Point Signaling Compare Equal
4718 ///
4719 /// Set all bits to 1 in vector (two signed 64-bit integer numbers) elements
4720 /// if the corresponding `a` (two 64-bit floating point numbers)
4721 /// and `b` (two 64-bit floating point numbers) elements are equal, otherwise set all bits to 0.
4722 ///
4723 #[inline]
4724 #[target_feature(enable = "msa")]
4725 #[cfg_attr(test, assert_instr(fseq.d))]
__msa_fseq_d(a: v2f64, b: v2f64) -> v2i644726 pub unsafe fn __msa_fseq_d(a: v2f64, b: v2f64) -> v2i64 {
4727     msa_fseq_d(a, mem::transmute(b))
4728 }
4729 
4730 /// Vector Floating-Point Signaling Compare Less or Equal
4731 ///
4732 /// Set all bits to 1 in vector (four signed 32-bit integer numbers) elements
4733 /// if the corresponding `a` (four 32-bit floating point numbers) elements
4734 /// are less than or equal to `b` (four 32-bit floating point numbers) elements, otherwise set all bits to 0.
4735 ///
4736 #[inline]
4737 #[target_feature(enable = "msa")]
4738 #[cfg_attr(test, assert_instr(fsle.w))]
__msa_fsle_w(a: v4f32, b: v4f32) -> v4i324739 pub unsafe fn __msa_fsle_w(a: v4f32, b: v4f32) -> v4i32 {
4740     msa_fsle_w(a, mem::transmute(b))
4741 }
4742 
4743 /// Vector Floating-Point Signaling Compare Less or Equal
4744 ///
4745 /// Set all bits to 1 in vector (two signed 64-bit integer numbers) elements
4746 /// if the corresponding `a` (two 64-bit floating point numbers) elements
4747 /// are less than or equal to `b` (two 64-bit floating point numbers) elements, otherwise set all bits to 0.
4748 ///
4749 #[inline]
4750 #[target_feature(enable = "msa")]
4751 #[cfg_attr(test, assert_instr(fsle.d))]
__msa_fsle_d(a: v2f64, b: v2f64) -> v2i644752 pub unsafe fn __msa_fsle_d(a: v2f64, b: v2f64) -> v2i64 {
4753     msa_fsle_d(a, mem::transmute(b))
4754 }
4755 
4756 /// Vector Floating-Point Signaling Compare Less Than
4757 ///
4758 /// Set all bits to 1 in vector (four signed 32-bit integer numbers) elements
4759 /// if the corresponding `a` (four 32-bit floating point numbers) elements
4760 /// are less than `b` (four 32-bit floating point numbers) elements, otherwise set all bits to 0.
4761 ///
4762 #[inline]
4763 #[target_feature(enable = "msa")]
4764 #[cfg_attr(test, assert_instr(fslt.w))]
__msa_fslt_w(a: v4f32, b: v4f32) -> v4i324765 pub unsafe fn __msa_fslt_w(a: v4f32, b: v4f32) -> v4i32 {
4766     msa_fslt_w(a, mem::transmute(b))
4767 }
4768 
4769 /// Vector Floating-Point Signaling Compare Less Than
4770 ///
4771 /// Set all bits to 1 in vector (two signed 64-bit integer numbers) elements
4772 /// if the corresponding `a` (two 64-bit floating point numbers) elements
4773 /// are less than `b` (two 64-bit floating point numbers) elements, otherwise set all bits to 0.
4774 ///
4775 #[inline]
4776 #[target_feature(enable = "msa")]
4777 #[cfg_attr(test, assert_instr(fslt.d))]
__msa_fslt_d(a: v2f64, b: v2f64) -> v2i644778 pub unsafe fn __msa_fslt_d(a: v2f64, b: v2f64) -> v2i64 {
4779     msa_fslt_d(a, mem::transmute(b))
4780 }
4781 
4782 /// Vector Floating-Point Signaling Compare Not Equal
4783 ///
4784 /// Set all bits to 1 in vector (four signed 32-bit integer numbers) elements
4785 /// if the corresponding `a` (four 32-bit floating point numbers) and
4786 /// `b` (four 32-bit floating point numbers) elements are not equal, otherwise set all bits to 0.
4787 ///
4788 #[inline]
4789 #[target_feature(enable = "msa")]
4790 #[cfg_attr(test, assert_instr(fsne.w))]
__msa_fsne_w(a: v4f32, b: v4f32) -> v4i324791 pub unsafe fn __msa_fsne_w(a: v4f32, b: v4f32) -> v4i32 {
4792     msa_fsne_w(a, mem::transmute(b))
4793 }
4794 
4795 /// Vector Floating-Point Signaling Compare Not Equal
4796 ///
4797 /// Set all bits to 1 in vector (two signed 64-bit integer numbers) elements
4798 /// if the corresponding `a` (two 64-bit floating point numbers) and
4799 /// `b` (two 64-bit floating point numbers) elements are not equal, otherwise set all bits to 0.
4800 ///
4801 #[inline]
4802 #[target_feature(enable = "msa")]
4803 #[cfg_attr(test, assert_instr(fsne.d))]
__msa_fsne_d(a: v2f64, b: v2f64) -> v2i644804 pub unsafe fn __msa_fsne_d(a: v2f64, b: v2f64) -> v2i64 {
4805     msa_fsne_d(a, mem::transmute(b))
4806 }
4807 
4808 /// Vector Floating-Point Signaling Compare Ordered
4809 ///
4810 /// Set all bits to 1 in vector (four signed 32-bit integer numbers) elements
4811 /// if the corresponding `a` (four 32-bit floating point numbers) and
4812 /// `b` (four 32-bit floating point numbers) elements are ordered,
4813 /// i.e. both elements are not NaN values, otherwise set all bits to 0.
4814 ///
4815 #[inline]
4816 #[target_feature(enable = "msa")]
4817 #[cfg_attr(test, assert_instr(fsor.w))]
__msa_fsor_w(a: v4f32, b: v4f32) -> v4i324818 pub unsafe fn __msa_fsor_w(a: v4f32, b: v4f32) -> v4i32 {
4819     msa_fsor_w(a, mem::transmute(b))
4820 }
4821 
4822 /// Vector Floating-Point Signaling Compare Ordered
4823 ///
4824 /// Set all bits to 1 in vector (two signed 64-bit integer numbers) elements
4825 /// if the corresponding `a` (two 64-bit floating point numbers) and
4826 /// `b` (two 64-bit floating point numbers) elements are ordered,
4827 /// i.e. both elements are not NaN values, otherwise set all bits to 0.
4828 ///
4829 #[inline]
4830 #[target_feature(enable = "msa")]
4831 #[cfg_attr(test, assert_instr(fsor.d))]
__msa_fsor_d(a: v2f64, b: v2f64) -> v2i644832 pub unsafe fn __msa_fsor_d(a: v2f64, b: v2f64) -> v2i64 {
4833     msa_fsor_d(a, mem::transmute(b))
4834 }
4835 
4836 /// Vector Floating-Point Square Root
4837 ///
4838 /// The square roots of floating-point elements in vector `a`
4839 /// (four 32-bit floating point numbers) are written to vector
4840 /// (four 32-bit floating point numbers) elements are ordered,.
4841 ///
4842 #[inline]
4843 #[target_feature(enable = "msa")]
4844 #[cfg_attr(test, assert_instr(fsqrt.w))]
__msa_fsqrt_w(a: v4f32) -> v4f324845 pub unsafe fn __msa_fsqrt_w(a: v4f32) -> v4f32 {
4846     msa_fsqrt_w(a)
4847 }
4848 
4849 /// Vector Floating-Point Square Root
4850 ///
4851 /// The square roots of floating-point elements in vector `a`
4852 /// (two 64-bit floating point numbers) are written to vector
4853 /// (two 64-bit floating point numbers) elements are ordered,.
4854 ///
4855 #[inline]
4856 #[target_feature(enable = "msa")]
4857 #[cfg_attr(test, assert_instr(fsqrt.d))]
__msa_fsqrt_d(a: v2f64) -> v2f644858 pub unsafe fn __msa_fsqrt_d(a: v2f64) -> v2f64 {
4859     msa_fsqrt_d(a)
4860 }
4861 
4862 /// Vector Floating-Point Subtraction
4863 ///
4864 /// The floating-point elements in vector `b` (four 32-bit floating point numbers)
4865 /// are subtracted from the floating-point elements in vector `a`
4866 /// (four 32-bit floating point numbers).
4867 /// The result is written to vector (four 32-bit floating point numbers).
4868 ///
4869 #[inline]
4870 #[target_feature(enable = "msa")]
4871 #[cfg_attr(test, assert_instr(fsub.w))]
__msa_fsub_w(a: v4f32, b: v4f32) -> v4f324872 pub unsafe fn __msa_fsub_w(a: v4f32, b: v4f32) -> v4f32 {
4873     msa_fsub_w(a, mem::transmute(b))
4874 }
4875 
4876 /// Vector Floating-Point Subtraction
4877 ///
4878 /// The floating-point elements in vector `b` (two 64-bit floating point numbers)
4879 /// are subtracted from the floating-point elements in vector `a`
4880 /// (two 64-bit floating point numbers).
4881 /// The result is written to vector (two 64-bit floating point numbers).
4882 ///
4883 #[inline]
4884 #[target_feature(enable = "msa")]
4885 #[cfg_attr(test, assert_instr(fsub.d))]
__msa_fsub_d(a: v2f64, b: v2f64) -> v2f644886 pub unsafe fn __msa_fsub_d(a: v2f64, b: v2f64) -> v2f64 {
4887     msa_fsub_d(a, mem::transmute(b))
4888 }
4889 
4890 /// Vector Floating-Point Signaling Compare Ordered
4891 ///
4892 /// Set all bits to 1 in vector (four signed 32-bit integer numbers) elements
4893 /// if the corresponding `a` (four 32-bit floating point numbers) and
4894 /// `b` (four 32-bit floating point numbers) elements are unordered or equal,
4895 /// otherwise set all bits to 0.
4896 ///
4897 #[inline]
4898 #[target_feature(enable = "msa")]
4899 #[cfg_attr(test, assert_instr(fsueq.w))]
__msa_fsueq_w(a: v4f32, b: v4f32) -> v4i324900 pub unsafe fn __msa_fsueq_w(a: v4f32, b: v4f32) -> v4i32 {
4901     msa_fsueq_w(a, mem::transmute(b))
4902 }
4903 
4904 /// Vector Floating-Point Signaling Compare Ordered
4905 ///
4906 /// Set all bits to 1 in vector (two signed 64-bit integer numbers) elements
4907 /// if the corresponding `a` (two 64-bit floating point numbers) and
4908 /// `b` (two 64-bit floating point numbers) elements are unordered or equal,
4909 /// otherwise set all bits to 0.
4910 ///
4911 #[inline]
4912 #[target_feature(enable = "msa")]
4913 #[cfg_attr(test, assert_instr(fsueq.d))]
__msa_fsueq_d(a: v2f64, b: v2f64) -> v2i644914 pub unsafe fn __msa_fsueq_d(a: v2f64, b: v2f64) -> v2i64 {
4915     msa_fsueq_d(a, mem::transmute(b))
4916 }
4917 
4918 /// Vector Floating-Point Signaling Compare Unordered or Less or Equal
4919 ///
4920 /// Set all bits to 1 in vector (four signed 32-bit integer numbers) elements
4921 /// if the corresponding `a` (four 32-bit floating point numbers) elements are
4922 /// unordered or less than or equal to `b` (four 32-bit floating point numbers) elements,
4923 /// otherwise set all bits to 0.
4924 ///
4925 #[inline]
4926 #[target_feature(enable = "msa")]
4927 #[cfg_attr(test, assert_instr(fsule.w))]
__msa_fsule_w(a: v4f32, b: v4f32) -> v4i324928 pub unsafe fn __msa_fsule_w(a: v4f32, b: v4f32) -> v4i32 {
4929     msa_fsule_w(a, mem::transmute(b))
4930 }
4931 
4932 /// Vector Floating-Point Signaling Compare Unordered or Less or Equal
4933 ///
4934 /// Set all bits to 1 in vector (two signed 64-bit integer numbers) elements
4935 /// if the corresponding `a` (two 64-bit floating point numbers) elements are
4936 /// unordered or less than or equal to `b` (two 64-bit floating point numbers) elements,
4937 /// otherwise set all bits to 0.
4938 ///
4939 #[inline]
4940 #[target_feature(enable = "msa")]
4941 #[cfg_attr(test, assert_instr(fsule.d))]
__msa_fsule_d(a: v2f64, b: v2f64) -> v2i644942 pub unsafe fn __msa_fsule_d(a: v2f64, b: v2f64) -> v2i64 {
4943     msa_fsule_d(a, mem::transmute(b))
4944 }
4945 
4946 /// Vector Floating-Point Signaling Compare Unordered or Less Than
4947 ///
4948 /// Set all bits to 1 in vector (four signed 32-bit integer numbers) elements
4949 /// if the corresponding `a` (four 32-bit floating point numbers) elements
4950 /// are unordered or less than `b` (four 32-bit floating point numbers) elements,
4951 /// otherwise set all bits to 0.
4952 ///
4953 #[inline]
4954 #[target_feature(enable = "msa")]
4955 #[cfg_attr(test, assert_instr(fsult.w))]
__msa_fsult_w(a: v4f32, b: v4f32) -> v4i324956 pub unsafe fn __msa_fsult_w(a: v4f32, b: v4f32) -> v4i32 {
4957     msa_fsult_w(a, mem::transmute(b))
4958 }
4959 
4960 /// Vector Floating-Point Signaling Compare Unordered or Less Than
4961 ///
4962 /// Set all bits to 1 in vector (two signed 64-bit integer numbers) elements
4963 /// if the corresponding `a` (two 64-bit floating point numbers) elements
4964 /// are unordered or less than `b` (two 64-bit floating point numbers) elements,
4965 /// otherwise set all bits to 0.
4966 ///
4967 #[inline]
4968 #[target_feature(enable = "msa")]
4969 #[cfg_attr(test, assert_instr(fsult.d))]
__msa_fsult_d(a: v2f64, b: v2f64) -> v2i644970 pub unsafe fn __msa_fsult_d(a: v2f64, b: v2f64) -> v2i64 {
4971     msa_fsult_d(a, mem::transmute(b))
4972 }
4973 
4974 /// Vector Floating-Point Signaling Compare Unordered
4975 ///
4976 /// Set all bits to 1 in vector (four signed 32-bit integer numbers) elements
4977 /// if the corresponding `a` (four 32-bit floating point numbers) and
4978 /// `b` (four 32-bit floating point numbers) elements are unordered,
4979 /// i.e. at least one element is a NaN value, otherwise set all bits to 0.
4980 ///
4981 #[inline]
4982 #[target_feature(enable = "msa")]
4983 #[cfg_attr(test, assert_instr(fsun.w))]
__msa_fsun_w(a: v4f32, b: v4f32) -> v4i324984 pub unsafe fn __msa_fsun_w(a: v4f32, b: v4f32) -> v4i32 {
4985     msa_fsun_w(a, mem::transmute(b))
4986 }
4987 
4988 /// Vector Floating-Point Signaling Compare Unordered
4989 ///
4990 /// Set all bits to 1 in vector (two signed 64-bit integer numbers) elements
4991 /// if the corresponding `a` (two 64-bit floating point numbers) and
4992 /// `b` (two 64-bit floating point numbers) elements are unordered,
4993 /// i.e. at least one element is a NaN value, otherwise set all bits to 0.
4994 ///
4995 #[inline]
4996 #[target_feature(enable = "msa")]
4997 #[cfg_attr(test, assert_instr(fsun.d))]
__msa_fsun_d(a: v2f64, b: v2f64) -> v2i644998 pub unsafe fn __msa_fsun_d(a: v2f64, b: v2f64) -> v2i64 {
4999     msa_fsun_d(a, mem::transmute(b))
5000 }
5001 
5002 /// Vector Floating-Point Signaling Compare Unordered or Not Equal
5003 ///
5004 /// Set all bits to 1 in vector (four signed 32-bit integer numbers) elements
5005 /// if the corresponding `a` (four 32-bit floating point numbers) and
5006 /// `b` (four 32-bit floating point numbers) elements are unordered or not equal,
5007 /// otherwise set all bits to 0.
5008 ///
5009 #[inline]
5010 #[target_feature(enable = "msa")]
5011 #[cfg_attr(test, assert_instr(fsune.w))]
__msa_fsune_w(a: v4f32, b: v4f32) -> v4i325012 pub unsafe fn __msa_fsune_w(a: v4f32, b: v4f32) -> v4i32 {
5013     msa_fsune_w(a, mem::transmute(b))
5014 }
5015 
5016 /// Vector Floating-Point Signaling Compare Unordered or Not Equal
5017 ///
5018 /// Set all bits to 1 in vector (two signed 64-bit integer numbers) elements
5019 /// if the corresponding `a` (two 64-bit floating point numbers) and
5020 /// `b` (two 64-bit floating point numbers) elements are unordered or not equal,
5021 /// otherwise set all bits to 0.
5022 ///
5023 #[inline]
5024 #[target_feature(enable = "msa")]
5025 #[cfg_attr(test, assert_instr(fsune.d))]
__msa_fsune_d(a: v2f64, b: v2f64) -> v2i645026 pub unsafe fn __msa_fsune_d(a: v2f64, b: v2f64) -> v2i64 {
5027     msa_fsune_d(a, mem::transmute(b))
5028 }
5029 
5030 /// Vector Floating-Point Convert to Signed Integer
5031 ///
5032 ///The elements in vector `a` (four 32-bit floating point numbers)
5033 /// are rounded and converted to signed integer values based on the
5034 /// rounding mode bits RM in MSA Control and Status Register MSACSR.
5035 /// The result is written to vector (four signed 32-bit integer numbers).
5036 ///
5037 #[inline]
5038 #[target_feature(enable = "msa")]
5039 #[cfg_attr(test, assert_instr(ftint_s.w))]
__msa_ftint_s_w(a: v4f32) -> v4i325040 pub unsafe fn __msa_ftint_s_w(a: v4f32) -> v4i32 {
5041     msa_ftint_s_w(a)
5042 }
5043 
5044 /// Vector Floating-Point Convert to Signed Integer
5045 ///
5046 ///The elements in vector `a` (two 64-bit floating point numbers)
5047 /// are rounded and converted to signed integer values based on the
5048 /// rounding mode bits RM in MSA Control and Status Register MSACSR.
5049 /// The result is written to vector (two signed 64-bit integer numbers).
5050 ///
5051 #[inline]
5052 #[target_feature(enable = "msa")]
5053 #[cfg_attr(test, assert_instr(ftint_s.d))]
__msa_ftint_s_d(a: v2f64) -> v2i645054 pub unsafe fn __msa_ftint_s_d(a: v2f64) -> v2i64 {
5055     msa_ftint_s_d(a)
5056 }
5057 
5058 /// Vector Floating-Point Convert to Unsigned Integer
5059 ///
5060 /// The elements in vector `a` (four 32-bit floating point numbers)
5061 /// are rounded and converted to signed integer values based on the
5062 /// rounding mode bits RM in MSA Control and Status Register MSACSR.
5063 /// The result is written to vector (four unsigned 32-bit integer numbers).
5064 ///
5065 #[inline]
5066 #[target_feature(enable = "msa")]
5067 #[cfg_attr(test, assert_instr(ftint_u.w))]
__msa_ftint_u_w(a: v4f32) -> v4u325068 pub unsafe fn __msa_ftint_u_w(a: v4f32) -> v4u32 {
5069     msa_ftint_u_w(a)
5070 }
5071 
5072 /// Vector Floating-Point Convert to Unsigned Integer
5073 ///
5074 /// The elements in vector `a` (two 64-bit floating point numbers)
5075 /// are rounded and converted to signed integer values based on the
5076 /// rounding mode bits RM in MSA Control and Status Register MSACSR.
5077 /// The result is written to vector (two unsigned 64-bit integer numbers).
5078 ///
5079 #[inline]
5080 #[target_feature(enable = "msa")]
5081 #[cfg_attr(test, assert_instr(ftint_u.d))]
__msa_ftint_u_d(a: v2f64) -> v2u645082 pub unsafe fn __msa_ftint_u_d(a: v2f64) -> v2u64 {
5083     msa_ftint_u_d(a)
5084 }
5085 
5086 /// Vector Floating-Point Convert to Fixed-Point
5087 ///
5088 /// The elements in vector `a` (four 32-bit floating point numbers)
5089 /// and `b` (four 32-bit floating point numbers) are down-converted to a fixed-point
5090 /// representation, i.e. from 64-bit floating-point to 32-bit Q31 fixed-point
5091 /// representation, or from 32-bit floating-point to 16-bit Q15 fixed-point representation.
5092 /// The result is written to vector (eight signed 16-bit integer numbers).
5093 ///
5094 #[inline]
5095 #[target_feature(enable = "msa")]
5096 #[cfg_attr(test, assert_instr(ftq.h))]
__msa_ftq_h(a: v4f32, b: v4f32) -> v8i165097 pub unsafe fn __msa_ftq_h(a: v4f32, b: v4f32) -> v8i16 {
5098     msa_ftq_h(a, mem::transmute(b))
5099 }
5100 
5101 /// Vector Floating-Point Convert to Fixed-Point
5102 ///
5103 /// The elements in vector `a` (two 64-bit floating point numbers)
5104 /// and `b` (two 64-bit floating point numbers) are down-converted to a fixed-point
5105 /// representation, i.e. from 64-bit floating-point to 32-bit Q31 fixed-point
5106 /// representation, or from 32-bit floating-point to 16-bit Q15 fixed-point representation.
5107 /// The result is written to vector (four signed 32-bit integer numbers).
5108 ///
5109 #[inline]
5110 #[target_feature(enable = "msa")]
5111 #[cfg_attr(test, assert_instr(ftq.w))]
__msa_ftq_w(a: v2f64, b: v2f64) -> v4i325112 pub unsafe fn __msa_ftq_w(a: v2f64, b: v2f64) -> v4i32 {
5113     msa_ftq_w(a, mem::transmute(b))
5114 }
5115 
5116 /// Vector Floating-Point Truncate and Convert to Signed Integer
5117 ///
5118 /// The elements in vector `a` (four 32-bit floating point numbers)
5119 /// are truncated, i.e. rounded toward zero, to signed integer values.
5120 /// The result is written to vector (four signed 32-bit integer numbers).
5121 ///
5122 #[inline]
5123 #[target_feature(enable = "msa")]
5124 #[cfg_attr(test, assert_instr(ftrunc_s.w))]
__msa_ftrunc_s_w(a: v4f32) -> v4i325125 pub unsafe fn __msa_ftrunc_s_w(a: v4f32) -> v4i32 {
5126     msa_ftrunc_s_w(a)
5127 }
5128 
5129 /// Vector Floating-Point Truncate and Convert to Signed Integer
5130 ///
5131 /// The elements in vector `a` (two 64-bit floating point numbers)
5132 /// are truncated, i.e. rounded toward zero, to signed integer values.
5133 /// The result is written to vector (two signed 64-bit integer numbers).
5134 ///
5135 #[inline]
5136 #[target_feature(enable = "msa")]
5137 #[cfg_attr(test, assert_instr(ftrunc_s.d))]
__msa_ftrunc_s_d(a: v2f64) -> v2i645138 pub unsafe fn __msa_ftrunc_s_d(a: v2f64) -> v2i64 {
5139     msa_ftrunc_s_d(a)
5140 }
5141 
5142 /// Vector Floating-Point Truncate and Convert to Unsigned Integer
5143 ///
5144 /// The elements in vector `a` (four 32-bit floating point numbers)
5145 /// are truncated, i.e. rounded toward zero, to unsigned integer values.
5146 /// The result is written to vector (four unsigned 32-bit integer numbers).
5147 ///
5148 #[inline]
5149 #[target_feature(enable = "msa")]
5150 #[cfg_attr(test, assert_instr(ftrunc_u.w))]
__msa_ftrunc_u_w(a: v4f32) -> v4u325151 pub unsafe fn __msa_ftrunc_u_w(a: v4f32) -> v4u32 {
5152     msa_ftrunc_u_w(a)
5153 }
5154 
5155 /// Vector Floating-Point Truncate and Convert to Unsigned Integer
5156 ///
5157 /// The elements in vector `a` (two 64-bit floating point numbers)
5158 /// are truncated, i.e. rounded toward zero, to unsigned integer values.
5159 /// The result is written to vector (two unsigned 64-bit integer numbers).
5160 ///
5161 #[inline]
5162 #[target_feature(enable = "msa")]
5163 #[cfg_attr(test, assert_instr(ftrunc_u.d))]
__msa_ftrunc_u_d(a: v2f64) -> v2u645164 pub unsafe fn __msa_ftrunc_u_d(a: v2f64) -> v2u64 {
5165     msa_ftrunc_u_d(a)
5166 }
5167 
5168 /// Vector Signed Horizontal Add
5169 ///
5170 /// The sign-extended odd elements in vector `a` (sixteen signed 8-bit integer numbers)
5171 /// are added to the sign-extended even elements in vector `b` (sixteen signed 8-bit integer numbers)
5172 /// producing a result twice the size of the input operands.
5173 /// The result is written to vector (eight signed 16-bit integer numbers).
5174 ///
5175 #[inline]
5176 #[target_feature(enable = "msa")]
5177 #[cfg_attr(test, assert_instr(hadd_s.h))]
__msa_hadd_s_h(a: v16i8, b: v16i8) -> v8i165178 pub unsafe fn __msa_hadd_s_h(a: v16i8, b: v16i8) -> v8i16 {
5179     msa_hadd_s_h(a, mem::transmute(b))
5180 }
5181 
5182 /// Vector Signed Horizontal Add
5183 ///
5184 /// The sign-extended odd elements in vector `a` (eight signed 16-bit integer numbers)
5185 /// are added to the sign-extended even elements in vector `b` (eight signed 16-bit integer numbers)
5186 /// producing a result twice the size of the input operands.
5187 /// The result is written to vector (four signed 32-bit integer numbers).
5188 ///
5189 #[inline]
5190 #[target_feature(enable = "msa")]
5191 #[cfg_attr(test, assert_instr(hadd_s.w))]
__msa_hadd_s_w(a: v8i16, b: v8i16) -> v4i325192 pub unsafe fn __msa_hadd_s_w(a: v8i16, b: v8i16) -> v4i32 {
5193     msa_hadd_s_w(a, mem::transmute(b))
5194 }
5195 
5196 /// Vector Signed Horizontal Add
5197 ///
5198 /// The sign-extended odd elements in vector `a` (four signed 32-bit integer numbers)
5199 /// are added to the sign-extended even elements in vector `b` (four signed 32-bit integer numbers)
5200 /// producing a result twice the size of the input operands.
5201 /// The result is written to vector (two signed 64-bit integer numbers).
5202 ///
5203 #[inline]
5204 #[target_feature(enable = "msa")]
5205 #[cfg_attr(test, assert_instr(hadd_s.d))]
__msa_hadd_s_d(a: v4i32, b: v4i32) -> v2i645206 pub unsafe fn __msa_hadd_s_d(a: v4i32, b: v4i32) -> v2i64 {
5207     msa_hadd_s_d(a, mem::transmute(b))
5208 }
5209 
5210 /// Vector Unsigned Horizontal Add
5211 ///
5212 /// The zero-extended odd elements in vector `a` (sixteen unsigned 8-bit integer numbers)
5213 /// are added to the zero-extended even elements in vector `b` (sixteen unsigned 8-bit integer numbers)
5214 /// producing a result twice the size of the input operands.
5215 /// The result is written to vector (eight unsigned 16-bit integer numbers).
5216 ///
5217 #[inline]
5218 #[target_feature(enable = "msa")]
5219 #[cfg_attr(test, assert_instr(hadd_u.h))]
__msa_hadd_u_h(a: v16u8, b: v16u8) -> v8u165220 pub unsafe fn __msa_hadd_u_h(a: v16u8, b: v16u8) -> v8u16 {
5221     msa_hadd_u_h(a, mem::transmute(b))
5222 }
5223 
5224 /// Vector Unsigned Horizontal Add
5225 ///
5226 /// The zero-extended odd elements in vector `a` (eight unsigned 16-bit integer numbers)
5227 /// are added to the zero-extended even elements in vector `b` (eight unsigned 16-bit integer numbers)
5228 /// producing a result twice the size of the input operands.
5229 /// The result is written to vector (four unsigned 32-bit integer numbers).
5230 ///
5231 #[inline]
5232 #[target_feature(enable = "msa")]
5233 #[cfg_attr(test, assert_instr(hadd_u.w))]
__msa_hadd_u_w(a: v8u16, b: v8u16) -> v4u325234 pub unsafe fn __msa_hadd_u_w(a: v8u16, b: v8u16) -> v4u32 {
5235     msa_hadd_u_w(a, mem::transmute(b))
5236 }
5237 
5238 /// Vector Unsigned Horizontal Add
5239 ///
5240 /// The zero-extended odd elements in vector `a` (four unsigned 32-bit integer numbers)
5241 /// are added to the zero-extended even elements in vector `b` (four unsigned 32-bit integer numbers)
5242 /// producing a result twice the size of the input operands.
5243 /// The result is written to vector (two unsigned 64-bit integer numbers).
5244 ///
5245 #[inline]
5246 #[target_feature(enable = "msa")]
5247 #[cfg_attr(test, assert_instr(hadd_u.d))]
__msa_hadd_u_d(a: v4u32, b: v4u32) -> v2u645248 pub unsafe fn __msa_hadd_u_d(a: v4u32, b: v4u32) -> v2u64 {
5249     msa_hadd_u_d(a, mem::transmute(b))
5250 }
5251 
5252 /// Vector Signed Horizontal Subtract
5253 ///
5254 /// The sign-extended odd elements in vector `b` (sixteen signed 8-bit integer numbers)
5255 /// are subtracted from the sign-extended elements in vector `a` (sixteen signed 8-bit integer numbers)
5256 /// producing a result twice the size of the input operands.
5257 /// The result is written to vector (eight signed 16-bit integer numbers).
5258 ///
5259 #[inline]
5260 #[target_feature(enable = "msa")]
5261 #[cfg_attr(test, assert_instr(hsub_s.h))]
__msa_hsub_s_h(a: v16i8, b: v16i8) -> v8i165262 pub unsafe fn __msa_hsub_s_h(a: v16i8, b: v16i8) -> v8i16 {
5263     msa_hsub_s_h(a, mem::transmute(b))
5264 }
5265 
5266 /// Vector Signed Horizontal Subtract
5267 ///
5268 /// The sign-extended odd elements in vector `b` (eight signed 16-bit integer numbers)
5269 /// are subtracted from the sign-extended elements in vector `a` (eight signed 16-bit integer numbers)
5270 /// producing a result twice the size of the input operands.
5271 /// The result is written to vector (four signed 32-bit integer numbers).
5272 ///
5273 #[inline]
5274 #[target_feature(enable = "msa")]
5275 #[cfg_attr(test, assert_instr(hsub_s.w))]
__msa_hsub_s_w(a: v8i16, b: v8i16) -> v4i325276 pub unsafe fn __msa_hsub_s_w(a: v8i16, b: v8i16) -> v4i32 {
5277     msa_hsub_s_w(a, mem::transmute(b))
5278 }
5279 
5280 /// Vector Signed Horizontal Subtract
5281 ///
5282 /// The sign-extended odd elements in vector `b` (four signed 32-bit integer numbers)
5283 /// are subtracted from the sign-extended elements in vector `a` (four signed 32-bit integer numbers)
5284 /// producing a result twice the size of the input operands.
5285 /// The result is written to vector (two signed 64-bit integer numbers).
5286 ///
5287 #[inline]
5288 #[target_feature(enable = "msa")]
5289 #[cfg_attr(test, assert_instr(hsub_s.d))]
__msa_hsub_s_d(a: v4i32, b: v4i32) -> v2i645290 pub unsafe fn __msa_hsub_s_d(a: v4i32, b: v4i32) -> v2i64 {
5291     msa_hsub_s_d(a, mem::transmute(b))
5292 }
5293 
5294 /// Vector Unsigned Horizontal Subtract
5295 ///
5296 /// The zero-extended odd elements in vector `b` (sixteen unsigned 8-bit integer numbers)
5297 /// are subtracted from the zero-extended elements in vector `a` (sixteen unsigned 8-bit integer numbers)
5298 /// producing a result twice the size of the input operands.
5299 /// The result is written to vector (eight signed 16-bit integer numbers).
5300 ///
5301 #[inline]
5302 #[target_feature(enable = "msa")]
5303 #[cfg_attr(test, assert_instr(hsub_u.h))]
__msa_hsub_u_h(a: v16u8, b: v16u8) -> v8i165304 pub unsafe fn __msa_hsub_u_h(a: v16u8, b: v16u8) -> v8i16 {
5305     msa_hsub_u_h(a, mem::transmute(b))
5306 }
5307 
5308 /// Vector Unsigned Horizontal Subtract
5309 ///
5310 /// The zero-extended odd elements in vector `b` (eight unsigned 16-bit integer numbers)
5311 /// are subtracted from the zero-extended elements in vector `a` (eight unsigned 16-bit integer numbers)
5312 /// producing a result twice the size of the input operands.
5313 /// The result is written to vector (four signed 32-bit integer numbers).
5314 ///
5315 #[inline]
5316 #[target_feature(enable = "msa")]
5317 #[cfg_attr(test, assert_instr(hsub_u.w))]
__msa_hsub_u_w(a: v8u16, b: v8u16) -> v4i325318 pub unsafe fn __msa_hsub_u_w(a: v8u16, b: v8u16) -> v4i32 {
5319     msa_hsub_u_w(a, mem::transmute(b))
5320 }
5321 
5322 /// Vector Unsigned Horizontal Subtract
5323 ///
5324 /// The zero-extended odd elements in vector `b` (four unsigned 32-bit integer numbers)
5325 /// are subtracted from the zero-extended elements in vector `a` (four unsigned 32-bit integer numbers)
5326 /// producing a result twice the size of the input operands.
5327 /// The result is written to vector (two signed 64-bit integer numbers).
5328 ///
5329 #[inline]
5330 #[target_feature(enable = "msa")]
5331 #[cfg_attr(test, assert_instr(hsub_u.d))]
__msa_hsub_u_d(a: v4u32, b: v4u32) -> v2i645332 pub unsafe fn __msa_hsub_u_d(a: v4u32, b: v4u32) -> v2i64 {
5333     msa_hsub_u_d(a, mem::transmute(b))
5334 }
5335 
5336 /// Vector Interleave Even
5337 ///
5338 /// Even elements in vectors `a` (sixteen signed 8-bit integer numbers)
5339 /// and vector `b` (sixteen signed 8-bit integer numbers) are copied to the result
5340 /// (sixteen signed 8-bit integer numbers)
5341 /// alternating one element from `a` with one element from `b`.
5342 ///
5343 #[inline]
5344 #[target_feature(enable = "msa")]
5345 #[cfg_attr(test, assert_instr(ilvev.b))]
__msa_ilvev_b(a: v16i8, b: v16i8) -> v16i85346 pub unsafe fn __msa_ilvev_b(a: v16i8, b: v16i8) -> v16i8 {
5347     msa_ilvev_b(a, mem::transmute(b))
5348 }
5349 
5350 /// Vector Interleave Even
5351 ///
5352 /// Even elements in vectors `a` (eight signed 16-bit integer numbers)
5353 /// and vector `b` (eight signed 16-bit integer numbers) are copied to the result
5354 /// (eight signed 16-bit integer numbers)
5355 /// alternating one element from `a` with one element from `b`.
5356 ///
5357 #[inline]
5358 #[target_feature(enable = "msa")]
5359 #[cfg_attr(test, assert_instr(ilvev.h))]
__msa_ilvev_h(a: v8i16, b: v8i16) -> v8i165360 pub unsafe fn __msa_ilvev_h(a: v8i16, b: v8i16) -> v8i16 {
5361     msa_ilvev_h(a, mem::transmute(b))
5362 }
5363 
5364 /// Vector Interleave Even
5365 ///
5366 /// Even elements in vectors `a` (four signed 32-bit integer numbers)
5367 /// and vector `b` (four signed 32-bit integer numbers) are copied to the result
5368 /// (four signed 32-bit integer numbers)
5369 /// alternating one element from `a` with one element from `b`.
5370 ///
5371 #[inline]
5372 #[target_feature(enable = "msa")]
5373 #[cfg_attr(test, assert_instr(ilvev.w))]
__msa_ilvev_w(a: v4i32, b: v4i32) -> v4i325374 pub unsafe fn __msa_ilvev_w(a: v4i32, b: v4i32) -> v4i32 {
5375     msa_ilvev_w(a, mem::transmute(b))
5376 }
5377 
5378 /// Vector Interleave Even
5379 ///
5380 /// Even elements in vectors `a` (two signed 64-bit integer numbers)
5381 /// and vector `b` (two signed 64-bit integer numbers) are copied to the result
5382 /// (two signed 64-bit integer numbers)
5383 /// alternating one element from `a` with one element from `b`.
5384 ///
5385 #[inline]
5386 #[target_feature(enable = "msa")]
5387 #[cfg_attr(test, assert_instr(ilvev.d))]
__msa_ilvev_d(a: v2i64, b: v2i64) -> v2i645388 pub unsafe fn __msa_ilvev_d(a: v2i64, b: v2i64) -> v2i64 {
5389     msa_ilvev_d(a, mem::transmute(b))
5390 }
5391 
5392 /// Vector Interleave Left
5393 ///
5394 /// The left half elements in vectors `a` (sixteen signed 8-bit integer numbers)
5395 /// and vector `b` (sixteen signed 8-bit integer numbers) are copied to the result
5396 /// (sixteen signed 8-bit integer numbers)
5397 /// alternating one element from `a` with one element from `b`.
5398 ///
5399 #[inline]
5400 #[target_feature(enable = "msa")]
5401 #[cfg_attr(test, assert_instr(ilvl.b))]
__msa_ilvl_b(a: v16i8, b: v16i8) -> v16i85402 pub unsafe fn __msa_ilvl_b(a: v16i8, b: v16i8) -> v16i8 {
5403     msa_ilvl_b(a, mem::transmute(b))
5404 }
5405 
5406 /// Vector Interleave Left
5407 ///
5408 /// The left half elements in vectors `a` (eight signed 16-bit integer numbers)
5409 /// and vector `b` (eight signed 16-bit integer numbers) are copied to the result
5410 /// (eight signed 16-bit integer numbers)
5411 /// alternating one element from `a` with one element from `b`.
5412 ///
5413 #[inline]
5414 #[target_feature(enable = "msa")]
5415 #[cfg_attr(test, assert_instr(ilvl.h))]
__msa_ilvl_h(a: v8i16, b: v8i16) -> v8i165416 pub unsafe fn __msa_ilvl_h(a: v8i16, b: v8i16) -> v8i16 {
5417     msa_ilvl_h(a, mem::transmute(b))
5418 }
5419 
5420 /// Vector Interleave Left
5421 ///
5422 /// The left half elements in vectors `a` (four signed 32-bit integer numbers)
5423 /// and vector `b` (four signed 32-bit integer numbers) are copied to the result
5424 /// (four signed 32-bit integer numbers)
5425 /// alternating one element from `a` with one element from `b`.
5426 ///
5427 #[inline]
5428 #[target_feature(enable = "msa")]
5429 #[cfg_attr(test, assert_instr(ilvl.w))]
__msa_ilvl_w(a: v4i32, b: v4i32) -> v4i325430 pub unsafe fn __msa_ilvl_w(a: v4i32, b: v4i32) -> v4i32 {
5431     msa_ilvl_w(a, mem::transmute(b))
5432 }
5433 
5434 /// Vector Interleave Left
5435 ///
5436 /// The left half elements in vectors `a` (two signed 64-bit integer numbers)
5437 /// and vector `b` (two signed 64-bit integer numbers) are copied to the result
5438 /// (two signed 64-bit integer numbers)
5439 /// alternating one element from `a` with one element from `b`.
5440 ///
5441 #[inline]
5442 #[target_feature(enable = "msa")]
5443 #[cfg_attr(test, assert_instr(ilvl.d))]
__msa_ilvl_d(a: v2i64, b: v2i64) -> v2i645444 pub unsafe fn __msa_ilvl_d(a: v2i64, b: v2i64) -> v2i64 {
5445     msa_ilvl_d(a, mem::transmute(b))
5446 }
5447 
5448 /// Vector Interleave Odd
5449 ///
5450 /// Odd elements in vectors `a` (sixteen signed 8-bit integer numbers)
5451 /// and vector `b` (sixteen signed 8-bit integer numbers) are copied to the result
5452 /// (sixteen signed 8-bit integer numbers)
5453 /// alternating one element from `a` with one element from `b`.
5454 ///
5455 #[inline]
5456 #[target_feature(enable = "msa")]
5457 #[cfg_attr(test, assert_instr(ilvod.b))]
__msa_ilvod_b(a: v16i8, b: v16i8) -> v16i85458 pub unsafe fn __msa_ilvod_b(a: v16i8, b: v16i8) -> v16i8 {
5459     msa_ilvod_b(a, mem::transmute(b))
5460 }
5461 
5462 /// Vector Interleave Odd
5463 ///
5464 /// Odd elements in vectors `a` (eight signed 16-bit integer numbers)
5465 /// and vector `b` (eight signed 16-bit integer numbers) are copied to the result
5466 /// (eight signed 16-bit integer numbers)
5467 /// alternating one element from `a` with one element from `b`.
5468 ///
5469 #[inline]
5470 #[target_feature(enable = "msa")]
5471 #[cfg_attr(test, assert_instr(ilvod.h))]
__msa_ilvod_h(a: v8i16, b: v8i16) -> v8i165472 pub unsafe fn __msa_ilvod_h(a: v8i16, b: v8i16) -> v8i16 {
5473     msa_ilvod_h(a, mem::transmute(b))
5474 }
5475 
5476 /// Vector Interleave Odd
5477 ///
5478 /// Odd elements in vectors `a` (four signed 32-bit integer numbers)
5479 /// and vector `b` (four signed 32-bit integer numbers) are copied to the result
5480 /// (four signed 32-bit integer numbers)
5481 /// alternating one element from `a` with one element from `b`.
5482 ///
5483 #[inline]
5484 #[target_feature(enable = "msa")]
5485 #[cfg_attr(test, assert_instr(ilvod.w))]
__msa_ilvod_w(a: v4i32, b: v4i32) -> v4i325486 pub unsafe fn __msa_ilvod_w(a: v4i32, b: v4i32) -> v4i32 {
5487     msa_ilvod_w(a, mem::transmute(b))
5488 }
5489 
5490 /// Vector Interleave Odd
5491 ///
5492 /// Odd elements in vectors `a` (two signed 64-bit integer numbers)
5493 /// and vector `b` (two signed 64-bit integer numbers) are copied to the result
5494 /// (two signed 64-bit integer numbers)
5495 /// alternating one element from `a` with one element from `b`.
5496 ///
5497 #[inline]
5498 #[target_feature(enable = "msa")]
5499 #[cfg_attr(test, assert_instr(ilvod.d))]
__msa_ilvod_d(a: v2i64, b: v2i64) -> v2i645500 pub unsafe fn __msa_ilvod_d(a: v2i64, b: v2i64) -> v2i64 {
5501     msa_ilvod_d(a, mem::transmute(b))
5502 }
5503 
5504 /// Vector Interleave Right
5505 ///
5506 /// The right half elements in vectors `a` (sixteen signed 8-bit integer numbers)
5507 /// and vector `b` (sixteen signed 8-bit integer numbers) are copied to the result
5508 /// (sixteen signed 8-bit integer numbers)
5509 /// alternating one element from `a` with one element from `b`.
5510 ///
5511 #[inline]
5512 #[target_feature(enable = "msa")]
5513 #[cfg_attr(test, assert_instr(ilvr.b))]
__msa_ilvr_b(a: v16i8, b: v16i8) -> v16i85514 pub unsafe fn __msa_ilvr_b(a: v16i8, b: v16i8) -> v16i8 {
5515     msa_ilvr_b(a, mem::transmute(b))
5516 }
5517 
5518 /// Vector Interleave Right
5519 ///
5520 /// The right half elements in vectors `a` (eight signed 16-bit integer numbers)
5521 /// and vector `b` (eight signed 16-bit integer numbers) are copied to the result
5522 /// (eight signed 16-bit integer numbers)
5523 /// alternating one element from `a` with one element from `b`.
5524 ///
5525 #[inline]
5526 #[target_feature(enable = "msa")]
5527 #[cfg_attr(test, assert_instr(ilvr.h))]
__msa_ilvr_h(a: v8i16, b: v8i16) -> v8i165528 pub unsafe fn __msa_ilvr_h(a: v8i16, b: v8i16) -> v8i16 {
5529     msa_ilvr_h(a, mem::transmute(b))
5530 }
5531 
5532 /// Vector Interleave Right
5533 ///
5534 /// The right half elements in vectors `a` (four signed 32-bit integer numbers)
5535 /// and vector `b` (four signed 32-bit integer numbers) are copied to the result
5536 /// (four signed 32-bit integer numbers)
5537 /// alternating one element from `a` with one element from `b`.
5538 ///
5539 #[inline]
5540 #[target_feature(enable = "msa")]
5541 #[cfg_attr(test, assert_instr(ilvr.w))]
__msa_ilvr_w(a: v4i32, b: v4i32) -> v4i325542 pub unsafe fn __msa_ilvr_w(a: v4i32, b: v4i32) -> v4i32 {
5543     msa_ilvr_w(a, mem::transmute(b))
5544 }
5545 
5546 /// Vector Interleave Right
5547 ///
5548 /// The right half elements in vectors `a` (two signed 64-bit integer numbers)
5549 /// and vector `b` (two signed 64-bit integer numbers) are copied to the result
5550 /// (two signed 64-bit integer numbers)
5551 /// alternating one element from `a` with one element from `b`.
5552 ///
5553 #[inline]
5554 #[target_feature(enable = "msa")]
5555 #[cfg_attr(test, assert_instr(ilvr.d))]
__msa_ilvr_d(a: v2i64, b: v2i64) -> v2i645556 pub unsafe fn __msa_ilvr_d(a: v2i64, b: v2i64) -> v2i64 {
5557     msa_ilvr_d(a, mem::transmute(b))
5558 }
5559 
5560 /// GPR Insert Element
5561 ///
5562 /// Set element `imm4` in vector `a` (sixteen signed 8-bit integer numbers) to GPR `c` value.
5563 /// All other elements in vector `a` are unchanged. If the source GPR is wider than the
5564 /// destination data format, the destination's elements will be set to the least significant bits of the GPR.
5565 ///
5566 #[inline]
5567 #[target_feature(enable = "msa")]
5568 #[cfg_attr(test, assert_instr(insert.b, imm4 = 0b1111))]
5569 #[rustc_legacy_const_generics(1)]
__msa_insert_b<const IMM4: i32>(a: v16i8, c: i32) -> v16i85570 pub unsafe fn __msa_insert_b<const IMM4: i32>(a: v16i8, c: i32) -> v16i8 {
5571     static_assert_imm4!(IMM4);
5572     msa_insert_b(a, IMM4, c)
5573 }
5574 
5575 /// GPR Insert Element
5576 ///
5577 /// Set element `imm3` in vector `a` (eight signed 16-bit integer numbers) to GPR `c` value.
5578 /// All other elements in vector `a` are unchanged. If the source GPR is wider than the
5579 /// destination data format, the destination's elements will be set to the least significant bits of the GPR.
5580 ///
5581 #[inline]
5582 #[target_feature(enable = "msa")]
5583 #[cfg_attr(test, assert_instr(insert.h, imm3 = 0b111))]
5584 #[rustc_legacy_const_generics(1)]
__msa_insert_h<const IMM3: i32>(a: v8i16, c: i32) -> v8i165585 pub unsafe fn __msa_insert_h<const IMM3: i32>(a: v8i16, c: i32) -> v8i16 {
5586     static_assert_imm3!(IMM3);
5587     msa_insert_h(a, IMM3, c)
5588 }
5589 
5590 /// GPR Insert Element
5591 ///
5592 /// Set element `imm2` in vector `a` (four signed 32-bit integer numbers) to GPR `c` value.
5593 /// All other elements in vector `a` are unchanged. If the source GPR is wider than the
5594 /// destination data format, the destination's elements will be set to the least significant bits of the GPR.
5595 ///
5596 #[inline]
5597 #[target_feature(enable = "msa")]
5598 #[cfg_attr(test, assert_instr(insert.w, imm2 = 0b11))]
5599 #[rustc_legacy_const_generics(1)]
__msa_insert_w<const IMM2: i32>(a: v4i32, c: i32) -> v4i325600 pub unsafe fn __msa_insert_w<const IMM2: i32>(a: v4i32, c: i32) -> v4i32 {
5601     static_assert_imm2!(IMM2);
5602     msa_insert_w(a, IMM2, c)
5603 }
5604 
5605 /// GPR Insert Element
5606 ///
5607 /// Set element `imm1` in vector `a` (two signed 64-bit integer numbers) to GPR `c` value.
5608 /// All other elements in vector `a` are unchanged. If the source GPR is wider than the
5609 /// destination data format, the destination's elements will be set to the least significant bits of the GPR.
5610 ///
5611 #[inline]
5612 #[target_feature(enable = "msa")]
5613 #[cfg_attr(test, assert_instr(insert.d, imm1 = 0b1))]
5614 #[rustc_legacy_const_generics(1)]
__msa_insert_d<const IMM1: i32>(a: v2i64, c: i64) -> v2i645615 pub unsafe fn __msa_insert_d<const IMM1: i32>(a: v2i64, c: i64) -> v2i64 {
5616     static_assert_imm1!(IMM1);
5617     msa_insert_d(a, IMM1, c)
5618 }
5619 
5620 /// Element Insert Element
5621 ///
5622 /// Set element `imm1` in the result vector `a` (sixteen signed 8-bit integer numbers) to element 0
5623 /// in vector `c` (sixteen signed 8-bit integer numbers) value.
5624 /// All other elements in vector `a` are unchanged.
5625 ///
5626 #[inline]
5627 #[target_feature(enable = "msa")]
5628 #[cfg_attr(test, assert_instr(insve.b, imm4 = 0b1111))]
5629 #[rustc_legacy_const_generics(1)]
__msa_insve_b<const IMM4: i32>(a: v16i8, c: v16i8) -> v16i85630 pub unsafe fn __msa_insve_b<const IMM4: i32>(a: v16i8, c: v16i8) -> v16i8 {
5631     static_assert_imm4!(IMM4);
5632     msa_insve_b(a, IMM4, c)
5633 }
5634 
5635 /// Element Insert Element
5636 ///
5637 /// Set element `imm1` in the result vector `a` (eight signed 16-bit integer numbers) to element 0
5638 /// in vector `c` (eight signed 16-bit integer numbers) value.
5639 /// All other elements in vector `a` are unchanged.
5640 ///
5641 #[inline]
5642 #[target_feature(enable = "msa")]
5643 #[cfg_attr(test, assert_instr(insve.h, imm3 = 0b111))]
5644 #[rustc_legacy_const_generics(1)]
__msa_insve_h<const IMM3: i32>(a: v8i16, c: v8i16) -> v8i165645 pub unsafe fn __msa_insve_h<const IMM3: i32>(a: v8i16, c: v8i16) -> v8i16 {
5646     static_assert_imm3!(IMM3);
5647     msa_insve_h(a, IMM3, c)
5648 }
5649 
5650 /// Element Insert Element
5651 ///
5652 /// Set element `imm1` in the result vector `a` (four signed 32-bit integer numbers) to element 0
5653 /// in vector `c` (four signed 32-bit integer numbers) value.
5654 /// All other elements in vector `a` are unchanged.
5655 ///
5656 #[inline]
5657 #[target_feature(enable = "msa")]
5658 #[cfg_attr(test, assert_instr(insve.w, imm2 = 0b11))]
5659 #[rustc_legacy_const_generics(1)]
__msa_insve_w<const IMM2: i32>(a: v4i32, c: v4i32) -> v4i325660 pub unsafe fn __msa_insve_w<const IMM2: i32>(a: v4i32, c: v4i32) -> v4i32 {
5661     static_assert_imm2!(IMM2);
5662     msa_insve_w(a, IMM2, c)
5663 }
5664 
5665 /// Element Insert Element
5666 ///
5667 /// Set element `imm1` in the result vector `a` (two signed 64-bit integer numbers) to element 0
5668 /// in vector `c` (two signed 64-bit integer numbers) value.
5669 /// All other elements in vector `a` are unchanged.
5670 ///
5671 #[inline]
5672 #[target_feature(enable = "msa")]
5673 #[cfg_attr(test, assert_instr(insve.d, imm1 = 0b1))]
5674 #[rustc_legacy_const_generics(1)]
__msa_insve_d<const IMM1: i32>(a: v2i64, c: v2i64) -> v2i645675 pub unsafe fn __msa_insve_d<const IMM1: i32>(a: v2i64, c: v2i64) -> v2i64 {
5676     static_assert_imm1!(IMM1);
5677     msa_insve_d(a, IMM1, c)
5678 }
5679 
5680 /// Vector Load
5681 ///
5682 /// The WRLEN / 8 bytes at the effective memory location addressed by the base
5683 /// `mem_addr` and the 10-bit signed immediate offset `imm_s10` are fetched and placed in
5684 /// the vector (sixteen signed 8-bit integer numbers) value.
5685 ///
5686 #[inline]
5687 #[target_feature(enable = "msa")]
5688 #[cfg_attr(test, assert_instr(ld.b, imm_s10 = 0b1111111111))]
5689 #[rustc_legacy_const_generics(1)]
__msa_ld_b<const IMM_S10: i32>(mem_addr: *mut u8) -> v16i85690 pub unsafe fn __msa_ld_b<const IMM_S10: i32>(mem_addr: *mut u8) -> v16i8 {
5691     static_assert_imm_s10!(IMM_S10);
5692     msa_ld_b(mem_addr, IMM_S10)
5693 }
5694 
5695 /// Vector Load
5696 ///
5697 /// The WRLEN / 8 bytes at the effective memory location addressed by the base
5698 /// `mem_addr` and the 10-bit signed immediate offset `imm_s11` are fetched and placed in
5699 /// the vector (eight signed 16-bit integer numbers) value.
5700 ///
5701 #[inline]
5702 #[target_feature(enable = "msa")]
5703 #[cfg_attr(test, assert_instr(ld.h, imm_s11 = 0b11111111111))]
5704 #[rustc_legacy_const_generics(1)]
__msa_ld_h<const IMM_S11: i32>(mem_addr: *mut u8) -> v8i165705 pub unsafe fn __msa_ld_h<const IMM_S11: i32>(mem_addr: *mut u8) -> v8i16 {
5706     static_assert_imm_s11!(IMM_S11);
5707     static_assert!(IMM_S11: i32 where IMM_S11 % 2 == 0);
5708     msa_ld_h(mem_addr, IMM_S11)
5709 }
5710 
5711 /// Vector Load
5712 ///
5713 /// The WRLEN / 8 bytes at the effective memory location addressed by the base
5714 /// `mem_addr` and the 10-bit signed immediate offset `imm_s12` are fetched and placed in
5715 /// the vector (four signed 32-bit integer numbers) value.
5716 ///
5717 #[inline]
5718 #[target_feature(enable = "msa")]
5719 #[cfg_attr(test, assert_instr(ld.w, imm_s12 = 0b111111111111))]
5720 #[rustc_legacy_const_generics(1)]
__msa_ld_w<const IMM_S12: i32>(mem_addr: *mut u8) -> v4i325721 pub unsafe fn __msa_ld_w<const IMM_S12: i32>(mem_addr: *mut u8) -> v4i32 {
5722     static_assert_imm_s12!(IMM_S12);
5723     static_assert!(IMM_S12: i32 where IMM_S12 % 4 == 0);
5724     msa_ld_w(mem_addr, IMM_S12)
5725 }
5726 
5727 /// Vector Load
5728 ///
5729 /// The WRLEN / 8 bytes at the effective memory location addressed by the base
5730 /// `mem_addr` and the 10-bit signed immediate offset `imm_s13` are fetched and placed in
5731 /// the vector (two signed 64-bit integer numbers) value.
5732 ///
5733 #[inline]
5734 #[target_feature(enable = "msa")]
5735 #[cfg_attr(test, assert_instr(ld.d, imm_s13 = 0b1111111111111))]
5736 #[rustc_legacy_const_generics(1)]
__msa_ld_d<const IMM_S13: i32>(mem_addr: *mut u8) -> v2i645737 pub unsafe fn __msa_ld_d<const IMM_S13: i32>(mem_addr: *mut u8) -> v2i64 {
5738     static_assert_imm_s13!(IMM_S13);
5739     static_assert!(IMM_S13: i32 where IMM_S13 % 8 == 0);
5740     msa_ld_d(mem_addr, IMM_S13)
5741 }
5742 
5743 /// Immediate Load
5744 ///
5745 /// The signed immediate imm_s10 is replicated in all vector
5746 /// (sixteen signed 8-bit integer numbers) elements. For byte elements,
5747 /// only the least significant 8 bits of imm_s10 will be used.
5748 ///
5749 #[inline]
5750 #[target_feature(enable = "msa")]
5751 #[cfg_attr(test, assert_instr(ldi.b, imm_s10 = 0b1111111111))]
5752 #[rustc_legacy_const_generics(0)]
__msa_ldi_b<const IMM_S10: i32>() -> v16i85753 pub unsafe fn __msa_ldi_b<const IMM_S10: i32>() -> v16i8 {
5754     static_assert_imm_s10!(IMM_S10);
5755     msa_ldi_b(IMM_S10)
5756 }
5757 
5758 /// Immediate Load
5759 ///
5760 /// The signed immediate imm_s10 is replicated in all vector
5761 /// (eight signed 16-bit integer numbers) elements. For byte elements,
5762 /// only the least significant 8 bits of imm_s10 will be used.
5763 ///
5764 #[inline]
5765 #[target_feature(enable = "msa")]
5766 #[cfg_attr(test, assert_instr(ldi.h, imm_s10 = 0b1111111111))]
5767 #[rustc_legacy_const_generics(0)]
__msa_ldi_h<const IMM_S10: i32>() -> v8i165768 pub unsafe fn __msa_ldi_h<const IMM_S10: i32>() -> v8i16 {
5769     static_assert_imm_s10!(IMM_S10);
5770     msa_ldi_h(IMM_S10)
5771 }
5772 
5773 /// Immediate Load
5774 ///
5775 /// The signed immediate imm_s10 is replicated in all vector
5776 /// (four signed 32-bit integer numbers) elements. For byte elements,
5777 /// only the least significant 8 bits of imm_s10 will be used.
5778 ///
5779 #[inline]
5780 #[target_feature(enable = "msa")]
5781 #[cfg_attr(test, assert_instr(ldi.w, imm_s10 = 0b1111111111))]
5782 #[rustc_legacy_const_generics(0)]
__msa_ldi_w<const IMM_S10: i32>() -> v4i325783 pub unsafe fn __msa_ldi_w<const IMM_S10: i32>() -> v4i32 {
5784     static_assert_imm_s10!(IMM_S10);
5785     msa_ldi_w(IMM_S10)
5786 }
5787 
5788 /// Immediate Load
5789 ///
5790 /// The signed immediate imm_s10 is replicated in all vector
5791 /// (two signed 64-bit integer numbers) elements. For byte elements,
5792 /// only the least significant 8 bits of imm_s10 will be used.
5793 ///
5794 #[inline]
5795 #[target_feature(enable = "msa")]
5796 #[cfg_attr(test, assert_instr(ldi.d, imm_s10 = 0b1111111111))]
5797 #[rustc_legacy_const_generics(0)]
__msa_ldi_d<const IMM_S10: i32>() -> v2i645798 pub unsafe fn __msa_ldi_d<const IMM_S10: i32>() -> v2i64 {
5799     static_assert_imm_s10!(IMM_S10);
5800     msa_ldi_d(IMM_S10)
5801 }
5802 
5803 /// Vector Fixed-Point Multiply and Add
5804 ///
5805 /// The products of fixed-point elements in `b` (eight signed 16-bit integer numbers)
5806 /// by fixed-point elements in vector `c` (eight signed 16-bit integer numbers)
5807 /// are added to the fixed-point elements in vector `a` (eight signed 16-bit integer numbers).
5808 /// The multiplication result is not saturated, i.e. exact (-1) * (-1) = 1 is added to the destination.
5809 /// The saturated fixed-point results are stored to vector `a`.
5810 ///
5811 #[inline]
5812 #[target_feature(enable = "msa")]
5813 #[cfg_attr(test, assert_instr(madd_q.h))]
__msa_madd_q_h(a: v8i16, b: v8i16, c: v8i16) -> v8i165814 pub unsafe fn __msa_madd_q_h(a: v8i16, b: v8i16, c: v8i16) -> v8i16 {
5815     msa_madd_q_h(a, mem::transmute(b), c)
5816 }
5817 
5818 /// Vector Fixed-Point Multiply and Add
5819 ///
5820 /// The products of fixed-point elements in `b` (four signed 32-bit integer numbers)
5821 /// by fixed-point elements in vector `c` (four signed 32-bit integer numbers)
5822 /// are added to the fixed-point elements in vector `a` (four signed 32-bit integer numbers).
5823 /// The multiplication result is not saturated, i.e. exact (-1) * (-1) = 1 is added to the destination.
5824 /// The saturated fixed-point results are stored to vector `a`.
5825 ///
5826 #[inline]
5827 #[target_feature(enable = "msa")]
5828 #[cfg_attr(test, assert_instr(madd_q.w))]
__msa_madd_q_w(a: v4i32, b: v4i32, c: v4i32) -> v4i325829 pub unsafe fn __msa_madd_q_w(a: v4i32, b: v4i32, c: v4i32) -> v4i32 {
5830     msa_madd_q_w(a, mem::transmute(b), c)
5831 }
5832 
5833 /// Vector Fixed-Point Multiply and Add Rounded
5834 ///
5835 /// The products of fixed-point elements in `b` (eight signed 16-bit integer numbers)
5836 /// by fixed-point elements in vector `c` (eight signed 16-bit integer numbers)
5837 /// are added to the fixed-point elements in vector `a` (eight signed 16-bit integer numbers).
5838 /// The multiplication result is not saturated, i.e. exact (-1) * (-1) = 1 is added to the destination.
5839 /// The rounded and saturated fixed-point results are stored to vector `a`.
5840 ///
5841 #[inline]
5842 #[target_feature(enable = "msa")]
5843 #[cfg_attr(test, assert_instr(maddr_q.h))]
__msa_maddr_q_h(a: v8i16, b: v8i16, c: v8i16) -> v8i165844 pub unsafe fn __msa_maddr_q_h(a: v8i16, b: v8i16, c: v8i16) -> v8i16 {
5845     msa_maddr_q_h(a, mem::transmute(b), c)
5846 }
5847 
5848 /// Vector Fixed-Point Multiply and Add Rounded
5849 ///
5850 /// The products of fixed-point elements in `b` (four signed 32-bit integer numbers)
5851 /// by fixed-point elements in vector `c` (four signed 32-bit integer numbers)
5852 /// are added to the fixed-point elements in vector `a` (four signed 32-bit integer numbers).
5853 /// The multiplication result is not saturated, i.e. exact (-1) * (-1) = 1 is added to the destination.
5854 /// The rounded and saturated fixed-point results are stored to vector `a`.
5855 ///
5856 #[inline]
5857 #[target_feature(enable = "msa")]
5858 #[cfg_attr(test, assert_instr(maddr_q.w))]
__msa_maddr_q_w(a: v4i32, b: v4i32, c: v4i32) -> v4i325859 pub unsafe fn __msa_maddr_q_w(a: v4i32, b: v4i32, c: v4i32) -> v4i32 {
5860     msa_maddr_q_w(a, mem::transmute(b), c)
5861 }
5862 
5863 /// Vector Multiply and Add
5864 ///
5865 /// The integer elements in vector `b` (sixteen signed 8-bit integer numbers)
5866 /// are multiplied by integer elements in vector `c` (sixteen signed 8-bit integer numbers)
5867 /// and added to the integer elements in vector `a` (sixteen signed 8-bit integer numbers).
5868 /// The most significant half of the multiplication result is discarded.
5869 ///
5870 #[inline]
5871 #[target_feature(enable = "msa")]
5872 #[cfg_attr(test, assert_instr(maddv.b))]
__msa_maddv_b(a: v16i8, b: v16i8, c: v16i8) -> v16i85873 pub unsafe fn __msa_maddv_b(a: v16i8, b: v16i8, c: v16i8) -> v16i8 {
5874     msa_maddv_b(a, mem::transmute(b), c)
5875 }
5876 
5877 /// Vector Multiply and Add
5878 ///
5879 /// The integer elements in vector `b` (eight signed 16-bit integer numbers)
5880 /// are multiplied by integer elements in vector `c` (eight signed 16-bit integer numbers)
5881 /// and added to the integer elements in vector `a` (eight signed 16-bit integer numbers).
5882 /// The most significant half of the multiplication result is discarded.
5883 ///
5884 #[inline]
5885 #[target_feature(enable = "msa")]
5886 #[cfg_attr(test, assert_instr(maddv.h))]
__msa_maddv_h(a: v8i16, b: v8i16, c: v8i16) -> v8i165887 pub unsafe fn __msa_maddv_h(a: v8i16, b: v8i16, c: v8i16) -> v8i16 {
5888     msa_maddv_h(a, mem::transmute(b), c)
5889 }
5890 
5891 /// Vector Multiply and Add
5892 ///
5893 /// The integer elements in vector `b` (four signed 32-bit integer numbers)
5894 /// are multiplied by integer elements in vector `c` (four signed 32-bit integer numbers)
5895 /// and added to the integer elements in vector `a` (four signed 32-bit integer numbers).
5896 /// The most significant half of the multiplication result is discarded.
5897 ///
5898 #[inline]
5899 #[target_feature(enable = "msa")]
5900 #[cfg_attr(test, assert_instr(maddv.w))]
__msa_maddv_w(a: v4i32, b: v4i32, c: v4i32) -> v4i325901 pub unsafe fn __msa_maddv_w(a: v4i32, b: v4i32, c: v4i32) -> v4i32 {
5902     msa_maddv_w(a, mem::transmute(b), c)
5903 }
5904 
5905 /// Vector Multiply and Add
5906 ///
5907 /// The integer elements in vector `b` (two signed 64-bit integer numbers)
5908 /// are multiplied by integer elements in vector `c` (two signed 64-bit integer numbers)
5909 /// and added to the integer elements in vector `a` (two signed 64-bit integer numbers).
5910 /// The most significant half of the multiplication result is discarded.
5911 ///
5912 #[inline]
5913 #[target_feature(enable = "msa")]
5914 #[cfg_attr(test, assert_instr(maddv.d))]
__msa_maddv_d(a: v2i64, b: v2i64, c: v2i64) -> v2i645915 pub unsafe fn __msa_maddv_d(a: v2i64, b: v2i64, c: v2i64) -> v2i64 {
5916     msa_maddv_d(a, mem::transmute(b), c)
5917 }
5918 
5919 /// Vector Maximum Based on Absolute Values
5920 ///
5921 /// The value with the largest magnitude, i.e. absolute value, between corresponding
5922 /// signed elements in vector `a` (sixteen signed 8-bit integer numbers) and
5923 /// `b` (sixteen signed 8-bit integer numbers) are written to vector
5924 /// (sixteen signed 8-bit integer numbers).
5925 ///
5926 #[inline]
5927 #[target_feature(enable = "msa")]
5928 #[cfg_attr(test, assert_instr(max_a.b))]
__msa_max_a_b(a: v16i8, b: v16i8) -> v16i85929 pub unsafe fn __msa_max_a_b(a: v16i8, b: v16i8) -> v16i8 {
5930     msa_max_a_b(a, mem::transmute(b))
5931 }
5932 
5933 /// Vector Maximum Based on Absolute Values
5934 ///
5935 /// The value with the largest magnitude, i.e. absolute value, between corresponding
5936 /// signed elements in vector `a` (eight signed 16-bit integer numbers) and
5937 /// `b` (eight signed 16-bit integer numbers) are written to vector
5938 /// (eight signed 16-bit integer numbers).
5939 ///
5940 #[inline]
5941 #[target_feature(enable = "msa")]
5942 #[cfg_attr(test, assert_instr(max_a.h))]
__msa_max_a_h(a: v8i16, b: v8i16) -> v8i165943 pub unsafe fn __msa_max_a_h(a: v8i16, b: v8i16) -> v8i16 {
5944     msa_max_a_h(a, mem::transmute(b))
5945 }
5946 
5947 /// Vector Maximum Based on Absolute Values
5948 ///
5949 /// The value with the largest magnitude, i.e. absolute value, between corresponding
5950 /// signed elements in vector `a` (four signed 32-bit integer numbers) and
5951 /// `b` (four signed 32-bit integer numbers) are written to vector
5952 /// (four signed 32-bit integer numbers).
5953 ///
5954 #[inline]
5955 #[target_feature(enable = "msa")]
5956 #[cfg_attr(test, assert_instr(max_a.w))]
__msa_max_a_w(a: v4i32, b: v4i32) -> v4i325957 pub unsafe fn __msa_max_a_w(a: v4i32, b: v4i32) -> v4i32 {
5958     msa_max_a_w(a, mem::transmute(b))
5959 }
5960 
5961 /// Vector Maximum Based on Absolute Values
5962 ///
5963 /// The value with the largest magnitude, i.e. absolute value, between corresponding
5964 /// signed elements in vector `a` (two signed 64-bit integer numbers) and
5965 /// `b` (two signed 64-bit integer numbers) are written to vector
5966 /// (two signed 64-bit integer numbers).
5967 ///
5968 #[inline]
5969 #[target_feature(enable = "msa")]
5970 #[cfg_attr(test, assert_instr(max_a.d))]
__msa_max_a_d(a: v2i64, b: v2i64) -> v2i645971 pub unsafe fn __msa_max_a_d(a: v2i64, b: v2i64) -> v2i64 {
5972     msa_max_a_d(a, mem::transmute(b))
5973 }
5974 
5975 /// Vector Signed Maximum
5976 ///
5977 /// Maximum values between signed elements in vector `a` (sixteen signed 8-bit integer numbers)
5978 /// and signed elements in vector `b` (sixteen signed 8-bit integer numbers) are written to vector
5979 /// (sixteen signed 8-bit integer numbers).
5980 ///
5981 #[inline]
5982 #[target_feature(enable = "msa")]
5983 #[cfg_attr(test, assert_instr(max_s.b))]
__msa_max_s_b(a: v16i8, b: v16i8) -> v16i85984 pub unsafe fn __msa_max_s_b(a: v16i8, b: v16i8) -> v16i8 {
5985     msa_max_s_b(a, mem::transmute(b))
5986 }
5987 
5988 /// Vector Signed Maximum
5989 ///
5990 /// Maximum values between signed elements in vector `a` (eight signed 16-bit integer numbers)
5991 /// and signed elements in vector `b` (eight signed 16-bit integer numbers) are written to vector
5992 /// (eight signed 16-bit integer numbers).
5993 ///
5994 #[inline]
5995 #[target_feature(enable = "msa")]
5996 #[cfg_attr(test, assert_instr(max_s.h))]
__msa_max_s_h(a: v8i16, b: v8i16) -> v8i165997 pub unsafe fn __msa_max_s_h(a: v8i16, b: v8i16) -> v8i16 {
5998     msa_max_s_h(a, mem::transmute(b))
5999 }
6000 
6001 /// Vector Signed Maximum
6002 ///
6003 /// Maximum values between signed elements in vector `a` (four signed 32-bit integer numbers)
6004 /// and signed elements in vector `b` (four signed 32-bit integer numbers) are written to vector
6005 /// (four signed 32-bit integer numbers).
6006 ///
6007 #[inline]
6008 #[target_feature(enable = "msa")]
6009 #[cfg_attr(test, assert_instr(max_s.w))]
__msa_max_s_w(a: v4i32, b: v4i32) -> v4i326010 pub unsafe fn __msa_max_s_w(a: v4i32, b: v4i32) -> v4i32 {
6011     msa_max_s_w(a, mem::transmute(b))
6012 }
6013 
6014 /// Vector Signed Maximum
6015 ///
6016 /// Maximum values between signed elements in vector `a` (two signed 64-bit integer numbers)
6017 /// and signed elements in vector `b` (two signed 64-bit integer numbers) are written to vector
6018 /// (two signed 64-bit integer numbers).
6019 ///
6020 #[inline]
6021 #[target_feature(enable = "msa")]
6022 #[cfg_attr(test, assert_instr(max_s.d))]
__msa_max_s_d(a: v2i64, b: v2i64) -> v2i646023 pub unsafe fn __msa_max_s_d(a: v2i64, b: v2i64) -> v2i64 {
6024     msa_max_s_d(a, mem::transmute(b))
6025 }
6026 
6027 /// Vector Unsigned Maximum
6028 ///
6029 /// Maximum values between unsigned elements in vector `a` (sixteen unsigned 8-bit integer numbers)
6030 /// and unsigned elements in vector `b` (sixteen unsigned 8-bit integer numbers) are written to vector
6031 /// (sixteen unsigned 8-bit integer numbers).
6032 ///
6033 #[inline]
6034 #[target_feature(enable = "msa")]
6035 #[cfg_attr(test, assert_instr(max_u.b))]
__msa_max_u_b(a: v16u8, b: v16u8) -> v16u86036 pub unsafe fn __msa_max_u_b(a: v16u8, b: v16u8) -> v16u8 {
6037     msa_max_u_b(a, mem::transmute(b))
6038 }
6039 
6040 /// Vector Unsigned Maximum
6041 ///
6042 /// Maximum values between unsigned elements in vector `a` (eight unsigned 16-bit integer numbers)
6043 /// and unsigned elements in vector `b` (eight unsigned 16-bit integer numbers) are written to vector
6044 /// (eight unsigned 16-bit integer numbers).
6045 ///
6046 #[inline]
6047 #[target_feature(enable = "msa")]
6048 #[cfg_attr(test, assert_instr(max_u.h))]
__msa_max_u_h(a: v8u16, b: v8u16) -> v8u166049 pub unsafe fn __msa_max_u_h(a: v8u16, b: v8u16) -> v8u16 {
6050     msa_max_u_h(a, mem::transmute(b))
6051 }
6052 
6053 /// Vector Unsigned Maximum
6054 ///
6055 /// Maximum values between unsigned elements in vector `a` (four unsigned 32-bit integer numbers)
6056 /// and unsigned elements in vector `b` (four unsigned 32-bit integer numbers) are written to vector
6057 /// (four unsigned 32-bit integer numbers).
6058 ///
6059 #[inline]
6060 #[target_feature(enable = "msa")]
6061 #[cfg_attr(test, assert_instr(max_u.w))]
__msa_max_u_w(a: v4u32, b: v4u32) -> v4u326062 pub unsafe fn __msa_max_u_w(a: v4u32, b: v4u32) -> v4u32 {
6063     msa_max_u_w(a, mem::transmute(b))
6064 }
6065 
6066 /// Vector Unsigned Maximum
6067 ///
6068 /// Maximum values between unsigned elements in vector `a` (two unsigned 64-bit integer numbers)
6069 /// and unsigned elements in vector `b` (two unsigned 64-bit integer numbers) are written to vector
6070 /// (two unsigned 64-bit integer numbers).
6071 ///
6072 #[inline]
6073 #[target_feature(enable = "msa")]
6074 #[cfg_attr(test, assert_instr(max_u.d))]
__msa_max_u_d(a: v2u64, b: v2u64) -> v2u646075 pub unsafe fn __msa_max_u_d(a: v2u64, b: v2u64) -> v2u64 {
6076     msa_max_u_d(a, mem::transmute(b))
6077 }
6078 
6079 /// Immediate Signed Maximum
6080 ///
6081 /// Maximum values between signed elements in vector `a` (sixteen signed 8-bit integer numbers)
6082 /// and the 5-bit signed immediate imm_s5 are written to vector
6083 /// (sixteen signed 8-bit integer numbers).
6084 ///
6085 #[inline]
6086 #[target_feature(enable = "msa")]
6087 #[cfg_attr(test, assert_instr(maxi_s.b, imm5 = 0b11111))]
6088 #[rustc_legacy_const_generics(1)]
__msa_maxi_s_b<const IMM_S5: i32>(a: v16i8) -> v16i86089 pub unsafe fn __msa_maxi_s_b<const IMM_S5: i32>(a: v16i8) -> v16i8 {
6090     static_assert_imm_s5!(IMM_S5);
6091     msa_maxi_s_b(a, IMM_S5)
6092 }
6093 
6094 /// Immediate Signed Maximum
6095 ///
6096 /// Maximum values between signed elements in vector `a` (eight signed 16-bit integer numbers)
6097 /// and the 5-bit signed immediate imm_s5 are written to vector
6098 /// (eight signed 16-bit integer numbers).
6099 ///
6100 #[inline]
6101 #[target_feature(enable = "msa")]
6102 #[cfg_attr(test, assert_instr(maxi_s.h, imm_s5 = 0b11111))]
6103 #[rustc_legacy_const_generics(1)]
__msa_maxi_s_h<const IMM_S5: i32>(a: v8i16) -> v8i166104 pub unsafe fn __msa_maxi_s_h<const IMM_S5: i32>(a: v8i16) -> v8i16 {
6105     static_assert_imm_s5!(IMM_S5);
6106     msa_maxi_s_h(a, IMM_S5)
6107 }
6108 
6109 /// Immediate Signed Maximum
6110 ///
6111 /// Maximum values between signed elements in vector `a` (four signed 32-bit integer numbers)
6112 /// and the 5-bit signed immediate imm_s5 are written to vector
6113 /// (four signed 32-bit integer numbers).
6114 ///
6115 #[inline]
6116 #[target_feature(enable = "msa")]
6117 #[cfg_attr(test, assert_instr(maxi_s.w, imm_s5 = 0b11111))]
6118 #[rustc_legacy_const_generics(1)]
__msa_maxi_s_w<const IMM_S5: i32>(a: v4i32) -> v4i326119 pub unsafe fn __msa_maxi_s_w<const IMM_S5: i32>(a: v4i32) -> v4i32 {
6120     static_assert_imm_s5!(IMM_S5);
6121     msa_maxi_s_w(a, IMM_S5)
6122 }
6123 
6124 /// Immediate Signed Maximum
6125 ///
6126 /// Maximum values between signed elements in vector `a` (two signed 64-bit integer numbers)
6127 /// and the 5-bit signed immediate imm_s5 are written to vector
6128 /// (two signed 64-bit integer numbers).
6129 ///
6130 #[inline]
6131 #[target_feature(enable = "msa")]
6132 #[cfg_attr(test, assert_instr(maxi_s.d, imm_s5 = 0b11111))]
6133 #[rustc_legacy_const_generics(1)]
__msa_maxi_s_d<const IMM_S5: i32>(a: v2i64) -> v2i646134 pub unsafe fn __msa_maxi_s_d<const IMM_S5: i32>(a: v2i64) -> v2i64 {
6135     static_assert_imm_s5!(IMM_S5);
6136     msa_maxi_s_d(a, IMM_S5)
6137 }
6138 
6139 /// Immediate Unsigned Maximum
6140 ///
6141 /// Maximum values between unsigned elements in vector `a` (sixteen unsigned 8-bit integer numbers)
6142 /// and the 5-bit unsigned immediate `imm5` are written to vector
6143 /// (sixteen unsigned 8-bit integer numbers).
6144 ///
6145 #[inline]
6146 #[target_feature(enable = "msa")]
6147 #[cfg_attr(test, assert_instr(maxi_u.b, imm5 = 0b11111))]
6148 #[rustc_legacy_const_generics(1)]
__msa_maxi_u_b<const IMM5: i32>(a: v16u8) -> v16u86149 pub unsafe fn __msa_maxi_u_b<const IMM5: i32>(a: v16u8) -> v16u8 {
6150     static_assert_imm5!(IMM5);
6151     msa_maxi_u_b(a, IMM5)
6152 }
6153 
6154 /// Immediate Unsigned Maximum
6155 ///
6156 /// Maximum values between unsigned elements in vector `a` (eight unsigned 16-bit integer numbers)
6157 /// and the 5-bit unsigned immediate `imm5` are written to vector
6158 /// (eight unsigned 16-bit integer numbers).
6159 ///
6160 #[inline]
6161 #[target_feature(enable = "msa")]
6162 #[cfg_attr(test, assert_instr(maxi_u.h, imm5 = 0b11111))]
6163 #[rustc_legacy_const_generics(1)]
__msa_maxi_u_h<const IMM5: i32>(a: v8u16) -> v8u166164 pub unsafe fn __msa_maxi_u_h<const IMM5: i32>(a: v8u16) -> v8u16 {
6165     static_assert_imm5!(IMM5);
6166     msa_maxi_u_h(a, IMM5)
6167 }
6168 
6169 /// Immediate Unsigned Maximum
6170 ///
6171 /// Maximum values between unsigned elements in vector `a` (four unsigned 32-bit integer numbers)
6172 /// and the 5-bit unsigned immediate `imm5` are written to vector
6173 /// (four unsigned 32-bit integer numbers).
6174 ///
6175 #[inline]
6176 #[target_feature(enable = "msa")]
6177 #[cfg_attr(test, assert_instr(maxi_u.w, imm5 = 0b11111))]
6178 #[rustc_legacy_const_generics(1)]
__msa_maxi_u_w<const IMM5: i32>(a: v4u32) -> v4u326179 pub unsafe fn __msa_maxi_u_w<const IMM5: i32>(a: v4u32) -> v4u32 {
6180     static_assert_imm5!(IMM5);
6181     msa_maxi_u_w(a, IMM5)
6182 }
6183 
6184 /// Immediate Unsigned Maximum
6185 ///
6186 /// Maximum values between unsigned elements in vector `a` (two unsigned 64-bit integer numbers)
6187 /// and the 5-bit unsigned immediate `imm5` are written to vector
6188 /// (two unsigned 64-bit integer numbers).
6189 ///
6190 #[inline]
6191 #[target_feature(enable = "msa")]
6192 #[cfg_attr(test, assert_instr(maxi_u.d, imm5 = 0b11111))]
6193 #[rustc_legacy_const_generics(1)]
__msa_maxi_u_d<const IMM5: i32>(a: v2u64) -> v2u646194 pub unsafe fn __msa_maxi_u_d<const IMM5: i32>(a: v2u64) -> v2u64 {
6195     static_assert_imm5!(IMM5);
6196     msa_maxi_u_d(a, IMM5)
6197 }
6198 
6199 /// Vector Minimum Based on Absolute Value
6200 ///
6201 /// The value with the smallest magnitude, i.e. absolute value, between corresponding
6202 /// signed elements in vector `a` (sixteen signed 8-bit integer numbers) and
6203 /// `b` (sixteen signed 8-bit integer numbers) are written to vector
6204 /// (sixteen signed 8-bit integer numbers).
6205 ///
6206 #[inline]
6207 #[target_feature(enable = "msa")]
6208 #[cfg_attr(test, assert_instr(min_a.b))]
__msa_min_a_b(a: v16i8, b: v16i8) -> v16i86209 pub unsafe fn __msa_min_a_b(a: v16i8, b: v16i8) -> v16i8 {
6210     msa_min_a_b(a, mem::transmute(b))
6211 }
6212 
6213 /// Vector Minimum Based on Absolute Value
6214 ///
6215 /// The value with the smallest magnitude, i.e. absolute value, between corresponding
6216 /// signed elements in vector `a` (eight signed 16-bit integer numbers) and
6217 /// `b` (eight signed 16-bit integer numbers) are written to vector
6218 /// (eight signed 16-bit integer numbers).
6219 ///
6220 #[inline]
6221 #[target_feature(enable = "msa")]
6222 #[cfg_attr(test, assert_instr(min_a.h))]
__msa_min_a_h(a: v8i16, b: v8i16) -> v8i166223 pub unsafe fn __msa_min_a_h(a: v8i16, b: v8i16) -> v8i16 {
6224     msa_min_a_h(a, mem::transmute(b))
6225 }
6226 
6227 /// Vector Minimum Based on Absolute Value
6228 ///
6229 /// The value with the smallest magnitude, i.e. absolute value, between corresponding
6230 /// signed elements in vector `a` (four signed 32-bit integer numbers) and
6231 /// `b` (four signed 32-bit integer numbers) are written to vector
6232 /// (four signed 32-bit integer numbers).
6233 ///
6234 #[inline]
6235 #[target_feature(enable = "msa")]
6236 #[cfg_attr(test, assert_instr(min_a.w))]
__msa_min_a_w(a: v4i32, b: v4i32) -> v4i326237 pub unsafe fn __msa_min_a_w(a: v4i32, b: v4i32) -> v4i32 {
6238     msa_min_a_w(a, mem::transmute(b))
6239 }
6240 
6241 /// Vector Minimum Based on Absolute Value
6242 ///
6243 /// The value with the smallest magnitude, i.e. absolute value, between corresponding
6244 /// signed elements in vector `a` (two signed 64-bit integer numbers) and
6245 /// `b` (two signed 64-bit integer numbers) are written to vector
6246 /// (two signed 64-bit integer numbers).
6247 ///
6248 #[inline]
6249 #[target_feature(enable = "msa")]
6250 #[cfg_attr(test, assert_instr(min_a.d))]
__msa_min_a_d(a: v2i64, b: v2i64) -> v2i646251 pub unsafe fn __msa_min_a_d(a: v2i64, b: v2i64) -> v2i64 {
6252     msa_min_a_d(a, mem::transmute(b))
6253 }
6254 
6255 /// Vector Signed Minimum
6256 ///
6257 /// Minimum values between signed elements in vector `a` (sixteen signed 8-bit integer numbers)
6258 /// and signed elements in vector `b` (sixteen signed 8-bit integer numbers) are written to vector
6259 /// (sixteen signed 8-bit integer numbers).
6260 ///
6261 #[inline]
6262 #[target_feature(enable = "msa")]
6263 #[cfg_attr(test, assert_instr(min_s.b))]
__msa_min_s_b(a: v16i8, b: v16i8) -> v16i86264 pub unsafe fn __msa_min_s_b(a: v16i8, b: v16i8) -> v16i8 {
6265     msa_min_s_b(a, mem::transmute(b))
6266 }
6267 
6268 /// Vector Signed Minimum
6269 ///
6270 /// Minimum values between signed elements in vector `a` (eight signed 16-bit integer numbers)
6271 /// and signed elements in vector `b` (eight signed 16-bit integer numbers) are written to vector
6272 /// (eight signed 16-bit integer numbers).
6273 ///
6274 #[inline]
6275 #[target_feature(enable = "msa")]
6276 #[cfg_attr(test, assert_instr(min_s.h))]
__msa_min_s_h(a: v8i16, b: v8i16) -> v8i166277 pub unsafe fn __msa_min_s_h(a: v8i16, b: v8i16) -> v8i16 {
6278     msa_min_s_h(a, mem::transmute(b))
6279 }
6280 
6281 /// Vector Signed Minimum
6282 ///
6283 /// Minimum values between signed elements in vector `a` (four signed 32-bit integer numbers)
6284 /// and signed elements in vector `b` (four signed 32-bit integer numbers) are written to vector
6285 /// (four signed 32-bit integer numbers).
6286 ///
6287 #[inline]
6288 #[target_feature(enable = "msa")]
6289 #[cfg_attr(test, assert_instr(min_s.w))]
__msa_min_s_w(a: v4i32, b: v4i32) -> v4i326290 pub unsafe fn __msa_min_s_w(a: v4i32, b: v4i32) -> v4i32 {
6291     msa_min_s_w(a, mem::transmute(b))
6292 }
6293 
6294 /// Vector Signed Minimum
6295 ///
6296 /// Minimum values between signed elements in vector `a` (two signed 64-bit integer numbers)
6297 /// and signed elements in vector `b` (two signed 64-bit integer numbers) are written to vector
6298 /// (two signed 64-bit integer numbers).
6299 ///
6300 #[inline]
6301 #[target_feature(enable = "msa")]
6302 #[cfg_attr(test, assert_instr(min_s.d))]
__msa_min_s_d(a: v2i64, b: v2i64) -> v2i646303 pub unsafe fn __msa_min_s_d(a: v2i64, b: v2i64) -> v2i64 {
6304     msa_min_s_d(a, mem::transmute(b))
6305 }
6306 
6307 /// Immediate Signed Minimum
6308 ///
6309 /// Minimum values between signed elements in vector `a` (sixteen signed 8-bit integer numbers)
6310 /// and the 5-bit signed immediate imm_s5 are written to vector
6311 /// (sixteen signed 8-bit integer numbers).
6312 ///
6313 #[inline]
6314 #[target_feature(enable = "msa")]
6315 #[cfg_attr(test, assert_instr(mini_s.b, imm_s5 = 0b11111))]
6316 #[rustc_legacy_const_generics(1)]
__msa_mini_s_b<const IMM_S5: i32>(a: v16i8) -> v16i86317 pub unsafe fn __msa_mini_s_b<const IMM_S5: i32>(a: v16i8) -> v16i8 {
6318     static_assert_imm_s5!(IMM_S5);
6319     msa_mini_s_b(a, IMM_S5)
6320 }
6321 
6322 /// Immediate Signed Minimum
6323 ///
6324 /// Minimum values between signed elements in vector `a` (eight signed 16-bit integer numbers)
6325 /// and the 5-bit signed immediate imm_s5 are written to vector
6326 /// (eight signed 16-bit integer numbers).
6327 ///
6328 #[inline]
6329 #[target_feature(enable = "msa")]
6330 #[cfg_attr(test, assert_instr(mini_s.h, imm_s5 = 0b11111))]
6331 #[rustc_legacy_const_generics(1)]
__msa_mini_s_h<const IMM_S5: i32>(a: v8i16) -> v8i166332 pub unsafe fn __msa_mini_s_h<const IMM_S5: i32>(a: v8i16) -> v8i16 {
6333     static_assert_imm_s5!(IMM_S5);
6334     msa_mini_s_h(a, IMM_S5)
6335 }
6336 
6337 /// Immediate Signed Minimum
6338 ///
6339 /// Minimum values between signed elements in vector `a` (four signed 32-bit integer numbers)
6340 /// and the 5-bit signed immediate imm_s5 are written to vector
6341 /// (four signed 32-bit integer numbers).
6342 ///
6343 #[inline]
6344 #[target_feature(enable = "msa")]
6345 #[cfg_attr(test, assert_instr(mini_s.w, imm_s5 = 0b11111))]
6346 #[rustc_legacy_const_generics(1)]
__msa_mini_s_w<const IMM_S5: i32>(a: v4i32) -> v4i326347 pub unsafe fn __msa_mini_s_w<const IMM_S5: i32>(a: v4i32) -> v4i32 {
6348     static_assert_imm_s5!(IMM_S5);
6349     msa_mini_s_w(a, IMM_S5)
6350 }
6351 
6352 /// Immediate Signed Minimum
6353 ///
6354 /// Minimum values between signed elements in vector `a` (two signed 64-bit integer numbers)
6355 /// and the 5-bit signed immediate imm_s5 are written to vector
6356 /// (two signed 64-bit integer numbers).
6357 ///
6358 #[inline]
6359 #[target_feature(enable = "msa")]
6360 #[cfg_attr(test, assert_instr(mini_s.d, imm_s5 = 0b11111))]
6361 #[rustc_legacy_const_generics(1)]
__msa_mini_s_d<const IMM_S5: i32>(a: v2i64) -> v2i646362 pub unsafe fn __msa_mini_s_d<const IMM_S5: i32>(a: v2i64) -> v2i64 {
6363     static_assert_imm_s5!(IMM_S5);
6364     msa_mini_s_d(a, IMM_S5)
6365 }
6366 
6367 /// Vector Unsigned Minimum
6368 ///
6369 /// Minimum values between unsigned elements in vector `a` (sixteen unsigned 8-bit integer numbers)
6370 /// and unsigned elements in vector `b` (sixteen unsigned 8-bit integer numbers) are written to vector
6371 /// (sixteen unsigned 8-bit integer numbers).
6372 ///
6373 #[inline]
6374 #[target_feature(enable = "msa")]
6375 #[cfg_attr(test, assert_instr(min_u.b))]
__msa_min_u_b(a: v16u8, b: v16u8) -> v16u86376 pub unsafe fn __msa_min_u_b(a: v16u8, b: v16u8) -> v16u8 {
6377     msa_min_u_b(a, mem::transmute(b))
6378 }
6379 
6380 /// Vector Unsigned Minimum
6381 ///
6382 /// Minimum values between unsigned elements in vector `a` (eight unsigned 16-bit integer numbers)
6383 /// and unsigned elements in vector `b` (eight unsigned 16-bit integer numbers) are written to vector
6384 /// (eight unsigned 16-bit integer numbers).
6385 ///
6386 #[inline]
6387 #[target_feature(enable = "msa")]
6388 #[cfg_attr(test, assert_instr(min_u.h))]
__msa_min_u_h(a: v8u16, b: v8u16) -> v8u166389 pub unsafe fn __msa_min_u_h(a: v8u16, b: v8u16) -> v8u16 {
6390     msa_min_u_h(a, mem::transmute(b))
6391 }
6392 
6393 /// Vector Unsigned Minimum
6394 ///
6395 /// Minimum values between unsigned elements in vector `a` (four unsigned 32-bit integer numbers)
6396 /// and unsigned elements in vector `b` (four unsigned 32-bit integer numbers) are written to vector
6397 /// (four unsigned 32-bit integer numbers).
6398 ///
6399 #[inline]
6400 #[target_feature(enable = "msa")]
6401 #[cfg_attr(test, assert_instr(min_u.w))]
__msa_min_u_w(a: v4u32, b: v4u32) -> v4u326402 pub unsafe fn __msa_min_u_w(a: v4u32, b: v4u32) -> v4u32 {
6403     msa_min_u_w(a, mem::transmute(b))
6404 }
6405 
6406 /// Vector Unsigned Minimum
6407 ///
6408 /// Minimum values between unsigned elements in vector `a` (two unsigned 64-bit integer numbers)
6409 /// and unsigned elements in vector `b` (two unsigned 64-bit integer numbers) are written to vector
6410 /// (two unsigned 64-bit integer numbers).
6411 ///
6412 #[inline]
6413 #[target_feature(enable = "msa")]
6414 #[cfg_attr(test, assert_instr(min_u.d))]
__msa_min_u_d(a: v2u64, b: v2u64) -> v2u646415 pub unsafe fn __msa_min_u_d(a: v2u64, b: v2u64) -> v2u64 {
6416     msa_min_u_d(a, mem::transmute(b))
6417 }
6418 
6419 /// Immediate Unsigned Minimum
6420 ///
6421 /// Minimum values between unsigned elements in vector `a` (sixteen unsigned 8-bit integer numbers)
6422 /// and the 5-bit unsigned immediate `imm5` are written to vector
6423 /// (sixteen unsigned 8-bit integer numbers).
6424 ///
6425 #[inline]
6426 #[target_feature(enable = "msa")]
6427 #[cfg_attr(test, assert_instr(mini_u.b, imm5 = 0b11111))]
6428 #[rustc_legacy_const_generics(1)]
__msa_mini_u_b<const IMM5: i32>(a: v16u8) -> v16u86429 pub unsafe fn __msa_mini_u_b<const IMM5: i32>(a: v16u8) -> v16u8 {
6430     static_assert_imm5!(IMM5);
6431     msa_mini_u_b(a, IMM5)
6432 }
6433 
6434 /// Immediate Unsigned Minimum
6435 ///
6436 /// Minimum values between unsigned elements in vector `a` (eight unsigned 16-bit integer numbers)
6437 /// and the 5-bit unsigned immediate `imm5` are written to vector
6438 /// (eight unsigned 16-bit integer numbers).
6439 ///
6440 #[inline]
6441 #[target_feature(enable = "msa")]
6442 #[cfg_attr(test, assert_instr(mini_u.h, imm5 = 0b11111))]
6443 #[rustc_legacy_const_generics(1)]
__msa_mini_u_h<const IMM5: i32>(a: v8u16) -> v8u166444 pub unsafe fn __msa_mini_u_h<const IMM5: i32>(a: v8u16) -> v8u16 {
6445     static_assert_imm5!(IMM5);
6446     msa_mini_u_h(a, IMM5)
6447 }
6448 
6449 /// Immediate Unsigned Minimum
6450 ///
6451 /// Minimum values between unsigned elements in vector `a` (four unsigned 32-bit integer numbers)
6452 /// and the 5-bit unsigned immediate `imm5` are written to vector
6453 /// (four unsigned 32-bit integer numbers).
6454 ///
6455 #[inline]
6456 #[target_feature(enable = "msa")]
6457 #[cfg_attr(test, assert_instr(mini_u.w, imm5 = 0b11111))]
6458 #[rustc_legacy_const_generics(1)]
__msa_mini_u_w<const IMM5: i32>(a: v4u32) -> v4u326459 pub unsafe fn __msa_mini_u_w<const IMM5: i32>(a: v4u32) -> v4u32 {
6460     static_assert_imm5!(IMM5);
6461     msa_mini_u_w(a, IMM5)
6462 }
6463 
6464 /// Immediate Unsigned Minimum
6465 ///
6466 /// Minimum values between unsigned elements in vector `a` (two unsigned 64-bit integer numbers)
6467 /// and the 5-bit unsigned immediate `imm5` are written to vector
6468 /// (two unsigned 64-bit integer numbers).
6469 ///
6470 #[inline]
6471 #[target_feature(enable = "msa")]
6472 #[cfg_attr(test, assert_instr(mini_u.d, imm5 = 0b11111))]
6473 #[rustc_legacy_const_generics(1)]
__msa_mini_u_d<const IMM5: i32>(a: v2u64) -> v2u646474 pub unsafe fn __msa_mini_u_d<const IMM5: i32>(a: v2u64) -> v2u64 {
6475     static_assert_imm5!(IMM5);
6476     msa_mini_u_d(a, IMM5)
6477 }
6478 
6479 /// Vector Signed Modulo
6480 ///
6481 /// The signed integer elements in vector `a` (sixteen signed 8-bit integer numbers)
6482 /// are divided by signed integer elements in vector `b` (sixteen signed 8-bit integer numbers).
6483 /// The remainder of the same sign as the dividend is written to vector
6484 /// (sixteen signed 8-bit integer numbers). If a divisor element vector `b` is zero,
6485 /// the result value is UNPREDICTABLE.
6486 ///
6487 #[inline]
6488 #[target_feature(enable = "msa")]
6489 #[cfg_attr(test, assert_instr(mod_s.b))]
__msa_mod_s_b(a: v16i8, b: v16i8) -> v16i86490 pub unsafe fn __msa_mod_s_b(a: v16i8, b: v16i8) -> v16i8 {
6491     msa_mod_s_b(a, mem::transmute(b))
6492 }
6493 
6494 /// Vector Signed Modulo
6495 ///
6496 /// The signed integer elements in vector `a` (eight signed 16-bit integer numbers)
6497 /// are divided by signed integer elements in vector `b` (eight signed 16-bit integer numbers).
6498 /// The remainder of the same sign as the dividend is written to vector
6499 /// (eight signed 16-bit integer numbers). If a divisor element vector `b` is zero,
6500 /// the result value is UNPREDICTABLE.
6501 ///
6502 #[inline]
6503 #[target_feature(enable = "msa")]
6504 #[cfg_attr(test, assert_instr(mod_s.h))]
__msa_mod_s_h(a: v8i16, b: v8i16) -> v8i166505 pub unsafe fn __msa_mod_s_h(a: v8i16, b: v8i16) -> v8i16 {
6506     msa_mod_s_h(a, mem::transmute(b))
6507 }
6508 
6509 /// Vector Signed Modulo
6510 ///
6511 /// The signed integer elements in vector `a` (four signed 32-bit integer numbers)
6512 /// are divided by signed integer elements in vector `b` (four signed 32-bit integer numbers).
6513 /// The remainder of the same sign as the dividend is written to vector
6514 /// (four signed 32-bit integer numbers). If a divisor element vector `b` is zero,
6515 /// the result value is UNPREDICTABLE.
6516 ///
6517 #[inline]
6518 #[target_feature(enable = "msa")]
6519 #[cfg_attr(test, assert_instr(mod_s.w))]
__msa_mod_s_w(a: v4i32, b: v4i32) -> v4i326520 pub unsafe fn __msa_mod_s_w(a: v4i32, b: v4i32) -> v4i32 {
6521     msa_mod_s_w(a, mem::transmute(b))
6522 }
6523 
6524 /// Vector Signed Modulo
6525 ///
6526 /// The signed integer elements in vector `a` (two signed 64-bit integer numbers)
6527 /// are divided by signed integer elements in vector `b` (two signed 64-bit integer numbers).
6528 /// The remainder of the same sign as the dividend is written to vector
6529 /// (two signed 64-bit integer numbers). If a divisor element vector `b` is zero,
6530 /// the result value is UNPREDICTABLE.
6531 ///
6532 #[inline]
6533 #[target_feature(enable = "msa")]
6534 #[cfg_attr(test, assert_instr(mod_s.d))]
__msa_mod_s_d(a: v2i64, b: v2i64) -> v2i646535 pub unsafe fn __msa_mod_s_d(a: v2i64, b: v2i64) -> v2i64 {
6536     msa_mod_s_d(a, mem::transmute(b))
6537 }
6538 
6539 /// Vector Unsigned Modulo
6540 ///
6541 /// The unsigned integer elements in vector `a` (sixteen unsigned 8-bit integer numbers)
6542 /// are divided by unsigned integer elements in vector `b` (sixteen unsigned 8-bit integer numbers).
6543 /// The remainder of the same sign as the dividend is written to vector
6544 /// (sixteen unsigned 8-bit integer numbers). If a divisor element vector `b` is zero,
6545 /// the result value is UNPREDICTABLE.
6546 ///
6547 #[inline]
6548 #[target_feature(enable = "msa")]
6549 #[cfg_attr(test, assert_instr(mod_u.b))]
__msa_mod_u_b(a: v16u8, b: v16u8) -> v16u86550 pub unsafe fn __msa_mod_u_b(a: v16u8, b: v16u8) -> v16u8 {
6551     msa_mod_u_b(a, mem::transmute(b))
6552 }
6553 
6554 /// Vector Unsigned Modulo
6555 ///
6556 /// The unsigned integer elements in vector `a` (eight unsigned 16-bit integer numbers)
6557 /// are divided by unsigned integer elements in vector `b` (eight unsigned 16-bit integer numbers).
6558 /// The remainder of the same sign as the dividend is written to vector
6559 /// (eight unsigned 16-bit integer numbers). If a divisor element vector `b` is zero,
6560 /// the result value is UNPREDICTABLE.
6561 ///
6562 #[inline]
6563 #[target_feature(enable = "msa")]
6564 #[cfg_attr(test, assert_instr(mod_u.h))]
__msa_mod_u_h(a: v8u16, b: v8u16) -> v8u166565 pub unsafe fn __msa_mod_u_h(a: v8u16, b: v8u16) -> v8u16 {
6566     msa_mod_u_h(a, mem::transmute(b))
6567 }
6568 
6569 /// Vector Unsigned Modulo
6570 ///
6571 /// The unsigned integer elements in vector `a` (four unsigned 32-bit integer numbers)
6572 /// are divided by unsigned integer elements in vector `b` (four unsigned 32-bit integer numbers).
6573 /// The remainder of the same sign as the dividend is written to vector
6574 /// (four unsigned 32-bit integer numbers). If a divisor element vector `b` is zero,
6575 /// the result value is UNPREDICTABLE.
6576 ///
6577 #[inline]
6578 #[target_feature(enable = "msa")]
6579 #[cfg_attr(test, assert_instr(mod_u.w))]
__msa_mod_u_w(a: v4u32, b: v4u32) -> v4u326580 pub unsafe fn __msa_mod_u_w(a: v4u32, b: v4u32) -> v4u32 {
6581     msa_mod_u_w(a, mem::transmute(b))
6582 }
6583 
6584 /// Vector Unsigned Modulo
6585 ///
6586 /// The unsigned integer elements in vector `a` (two unsigned 64-bit integer numbers)
6587 /// are divided by unsigned integer elements in vector `b` (two unsigned 64-bit integer numbers).
6588 /// The remainder of the same sign as the dividend is written to vector
6589 /// (two unsigned 64-bit integer numbers). If a divisor element vector `b` is zero,
6590 /// the result value is UNPREDICTABLE.
6591 ///
6592 #[inline]
6593 #[target_feature(enable = "msa")]
6594 #[cfg_attr(test, assert_instr(mod_u.d))]
__msa_mod_u_d(a: v2u64, b: v2u64) -> v2u646595 pub unsafe fn __msa_mod_u_d(a: v2u64, b: v2u64) -> v2u64 {
6596     msa_mod_u_d(a, mem::transmute(b))
6597 }
6598 
6599 /// Vector Move
6600 ///
6601 /// Copy all WRLEN bits in vector `a` (eight signed 16-bit integer numbers)
6602 /// to vector (eight signed 16-bit integer numbers).
6603 ///
6604 #[inline]
6605 #[target_feature(enable = "msa")]
6606 #[cfg_attr(test, assert_instr(move.v))]
__msa_move_v(a: v16i8) -> v16i86607 pub unsafe fn __msa_move_v(a: v16i8) -> v16i8 {
6608     msa_move_v(a)
6609 }
6610 
6611 /// Vector Fixed-Point Multiply and Subtract
6612 ///
6613 /// The product of fixed-point elements in vector `c` (eight signed 16-bit integer numbers)
6614 /// by fixed-point elements in vector `b` (eight signed 16-bit integer numbers)
6615 /// are subtracted from the fixed-point elements in vector `a`
6616 /// (eight signed 16-bit integer numbers). The multiplication result is not saturated,
6617 /// i.e. exact (-1) * (-1) = 1 is subtracted from the destination.
6618 /// The saturated fixed-point results are stored back to vector `a`.
6619 ///
6620 #[inline]
6621 #[target_feature(enable = "msa")]
6622 #[cfg_attr(test, assert_instr(msub_q.h))]
__msa_msub_q_h(a: v8i16, b: v8i16, c: v8i16) -> v8i166623 pub unsafe fn __msa_msub_q_h(a: v8i16, b: v8i16, c: v8i16) -> v8i16 {
6624     msa_msub_q_h(a, mem::transmute(b), c)
6625 }
6626 
6627 /// Vector Fixed-Point Multiply and Subtract
6628 ///
6629 /// The product of fixed-point elements in vector `c` (four signed 32-bit integer numbers)
6630 /// by fixed-point elements in vector `b` (four signed 32-bit integer numbers)
6631 /// are subtracted from the fixed-point elements in vector `a`
6632 /// (four signed 32-bit integer numbers). The multiplication result is not saturated,
6633 /// i.e. exact (-1) * (-1) = 1 is subtracted from the destination.
6634 /// The saturated fixed-point results are stored back to vector `a`.
6635 ///
6636 #[inline]
6637 #[target_feature(enable = "msa")]
6638 #[cfg_attr(test, assert_instr(msub_q.w))]
__msa_msub_q_w(a: v4i32, b: v4i32, c: v4i32) -> v4i326639 pub unsafe fn __msa_msub_q_w(a: v4i32, b: v4i32, c: v4i32) -> v4i32 {
6640     msa_msub_q_w(a, mem::transmute(b), c)
6641 }
6642 
6643 /// Vector Fixed-Point Multiply and Subtract Rounded
6644 ///
6645 /// The product of fixed-point elements in vector `c` (eight signed 16-bit integer numbers)
6646 /// by fixed-point elements in vector `b` (eight signed 16-bit integer numbers)
6647 /// are subtracted from the fixed-point elements in vector `a`
6648 /// (eight signed 16-bit integer numbers). The multiplication result is not saturated,
6649 /// i.e. exact (-1) * (-1) = 1 is subtracted from the destination.
6650 /// The rounded and saturated fixed-point results are stored back to vector `a`.
6651 ///
6652 #[inline]
6653 #[target_feature(enable = "msa")]
6654 #[cfg_attr(test, assert_instr(msubr_q.h))]
__msa_msubr_q_h(a: v8i16, b: v8i16, c: v8i16) -> v8i166655 pub unsafe fn __msa_msubr_q_h(a: v8i16, b: v8i16, c: v8i16) -> v8i16 {
6656     msa_msubr_q_h(a, mem::transmute(b), c)
6657 }
6658 
6659 /// Vector Fixed-Point Multiply and Subtract Rounded
6660 ///
6661 /// The product of fixed-point elements in vector `c` (four signed 32-bit integer numbers)
6662 /// by fixed-point elements in vector `b` (four signed 32-bit integer numbers)
6663 /// are subtracted from the fixed-point elements in vector `a`
6664 /// (four signed 32-bit integer numbers). The multiplication result is not saturated,
6665 /// i.e. exact (-1) * (-1) = 1 is subtracted from the destination.
6666 /// The rounded and saturated fixed-point results are stored back to vector `a`.
6667 ///
6668 #[inline]
6669 #[target_feature(enable = "msa")]
6670 #[cfg_attr(test, assert_instr(msubr_q.w))]
__msa_msubr_q_w(a: v4i32, b: v4i32, c: v4i32) -> v4i326671 pub unsafe fn __msa_msubr_q_w(a: v4i32, b: v4i32, c: v4i32) -> v4i32 {
6672     msa_msubr_q_w(a, mem::transmute(b), c)
6673 }
6674 
6675 /// Vector Multiply and Subtract
6676 ///
6677 /// The integer elements in vector `c` (sixteen signed 8-bit integer numbers)
6678 /// are multiplied by integer elements in vector `b` (sixteen signed 8-bit integer numbers)
6679 /// and subtracted from the integer elements in vector `a` (sixteen signed 8-bit integer numbers).
6680 /// The most significant half of the multiplication result is discarded.
6681 ///
6682 #[inline]
6683 #[target_feature(enable = "msa")]
6684 #[cfg_attr(test, assert_instr(msubv.b))]
__msa_msubv_b(a: v16i8, b: v16i8, c: v16i8) -> v16i86685 pub unsafe fn __msa_msubv_b(a: v16i8, b: v16i8, c: v16i8) -> v16i8 {
6686     msa_msubv_b(a, mem::transmute(b), c)
6687 }
6688 
6689 /// Vector Multiply and Subtract
6690 ///
6691 /// The integer elements in vector `c` (eight signed 16-bit integer numbers)
6692 /// are multiplied by integer elements in vector `b` (eight signed 16-bit integer numbers)
6693 /// and subtracted from the integer elements in vector `a` (eight signed 16-bit integer numbers).
6694 /// The most significant half of the multiplication result is discarded.
6695 ///
6696 #[inline]
6697 #[target_feature(enable = "msa")]
6698 #[cfg_attr(test, assert_instr(msubv.h))]
__msa_msubv_h(a: v8i16, b: v8i16, c: v8i16) -> v8i166699 pub unsafe fn __msa_msubv_h(a: v8i16, b: v8i16, c: v8i16) -> v8i16 {
6700     msa_msubv_h(a, mem::transmute(b), c)
6701 }
6702 
6703 /// Vector Multiply and Subtract
6704 ///
6705 /// The integer elements in vector `c` (four signed 32-bit integer numbers)
6706 /// are multiplied by integer elements in vector `b` (four signed 32-bit integer numbers)
6707 /// and subtracted from the integer elements in vector `a` (four signed 32-bit integer numbers).
6708 /// The most significant half of the multiplication result is discarded.
6709 ///
6710 #[inline]
6711 #[target_feature(enable = "msa")]
6712 #[cfg_attr(test, assert_instr(msubv.w))]
__msa_msubv_w(a: v4i32, b: v4i32, c: v4i32) -> v4i326713 pub unsafe fn __msa_msubv_w(a: v4i32, b: v4i32, c: v4i32) -> v4i32 {
6714     msa_msubv_w(a, mem::transmute(b), c)
6715 }
6716 
6717 /// Vector Multiply and Subtract
6718 ///
6719 /// The integer elements in vector `c` (two signed 64-bit integer numbers)
6720 /// are multiplied by integer elements in vector `b` (two signed 64-bit integer numbers)
6721 /// and subtracted from the integer elements in vector `a` (two signed 64-bit integer numbers).
6722 /// The most significant half of the multiplication result is discarded.
6723 ///
6724 #[inline]
6725 #[target_feature(enable = "msa")]
6726 #[cfg_attr(test, assert_instr(msubv.d))]
__msa_msubv_d(a: v2i64, b: v2i64, c: v2i64) -> v2i646727 pub unsafe fn __msa_msubv_d(a: v2i64, b: v2i64, c: v2i64) -> v2i64 {
6728     msa_msubv_d(a, mem::transmute(b), c)
6729 }
6730 
6731 /// Vector Fixed-Point Multiply
6732 ///
6733 /// The fixed-point elements in vector `a` (eight signed 16-bit integer numbers)
6734 /// multiplied by fixed-point elements in vector `b` (eight signed 16-bit integer numbers).
6735 /// The result is written to vector (eight signed 16-bit integer numbers).
6736 ///
6737 #[inline]
6738 #[target_feature(enable = "msa")]
6739 #[cfg_attr(test, assert_instr(mul_q.h))]
__msa_mul_q_h(a: v8i16, b: v8i16) -> v8i166740 pub unsafe fn __msa_mul_q_h(a: v8i16, b: v8i16) -> v8i16 {
6741     msa_mul_q_h(a, mem::transmute(b))
6742 }
6743 
6744 /// Vector Fixed-Point Multiply
6745 ///
6746 /// The fixed-point elements in vector `a` (four signed 32-bit integer numbers)
6747 /// multiplied by fixed-point elements in vector `b` (four signed 32-bit integer numbers).
6748 /// The result is written to vector (four signed 32-bit integer numbers).
6749 ///
6750 #[inline]
6751 #[target_feature(enable = "msa")]
6752 #[cfg_attr(test, assert_instr(mul_q.w))]
__msa_mul_q_w(a: v4i32, b: v4i32) -> v4i326753 pub unsafe fn __msa_mul_q_w(a: v4i32, b: v4i32) -> v4i32 {
6754     msa_mul_q_w(a, mem::transmute(b))
6755 }
6756 
6757 /// Vector Fixed-Point Multiply Rounded
6758 ///
6759 /// The fixed-point elements in vector `a` (eight signed 16-bit integer numbers)
6760 /// multiplied by fixed-point elements in vector `b` (eight signed 16-bit integer numbers).
6761 /// The rounded result is written to vector (eight signed 16-bit integer numbers).
6762 ///
6763 #[inline]
6764 #[target_feature(enable = "msa")]
6765 #[cfg_attr(test, assert_instr(mulr_q.h))]
__msa_mulr_q_h(a: v8i16, b: v8i16) -> v8i166766 pub unsafe fn __msa_mulr_q_h(a: v8i16, b: v8i16) -> v8i16 {
6767     msa_mulr_q_h(a, mem::transmute(b))
6768 }
6769 
6770 /// Vector Fixed-Point Multiply Rounded
6771 ///
6772 /// The fixed-point elements in vector `a` (four signed 32-bit integer numbers)
6773 /// multiplied by fixed-point elements in vector `b` (four signed 32-bit integer numbers).
6774 /// The rounded result is written to vector (four signed 32-bit integer numbers).
6775 ///
6776 #[inline]
6777 #[target_feature(enable = "msa")]
6778 #[cfg_attr(test, assert_instr(mulr_q.w))]
__msa_mulr_q_w(a: v4i32, b: v4i32) -> v4i326779 pub unsafe fn __msa_mulr_q_w(a: v4i32, b: v4i32) -> v4i32 {
6780     msa_mulr_q_w(a, mem::transmute(b))
6781 }
6782 
6783 /// Vector Multiply
6784 ///
6785 /// The integer elements in vector `a` (sixteen signed 8-bit integer numbers)
6786 /// are multiplied by integer elements in vector `b` (sixteen signed 8-bit integer numbers).
6787 /// The result is written to vector (sixteen signed 8-bit integer numbers).
6788 /// The most significant half of the multiplication result is discarded.
6789 ///
6790 #[inline]
6791 #[target_feature(enable = "msa")]
6792 #[cfg_attr(test, assert_instr(mulv.b))]
__msa_mulv_b(a: v16i8, b: v16i8) -> v16i86793 pub unsafe fn __msa_mulv_b(a: v16i8, b: v16i8) -> v16i8 {
6794     msa_mulv_b(a, mem::transmute(b))
6795 }
6796 
6797 /// Vector Multiply
6798 ///
6799 /// The integer elements in vector `a` (eight signed 16-bit integer numbers)
6800 /// are multiplied by integer elements in vector `b` (eight signed 16-bit integer numbers).
6801 /// The result is written to vector (eight signed 16-bit integer numbers).
6802 /// The most significant half of the multiplication result is discarded.
6803 ///
6804 #[inline]
6805 #[target_feature(enable = "msa")]
6806 #[cfg_attr(test, assert_instr(mulv.h))]
__msa_mulv_h(a: v8i16, b: v8i16) -> v8i166807 pub unsafe fn __msa_mulv_h(a: v8i16, b: v8i16) -> v8i16 {
6808     msa_mulv_h(a, mem::transmute(b))
6809 }
6810 
6811 /// Vector Multiply
6812 ///
6813 /// The integer elements in vector `a` (four signed 32-bit integer numbers)
6814 /// are multiplied by integer elements in vector `b` (four signed 32-bit integer numbers).
6815 /// The result is written to vector (four signed 32-bit integer numbers).
6816 /// The most significant half of the multiplication result is discarded.
6817 ///
6818 #[inline]
6819 #[target_feature(enable = "msa")]
6820 #[cfg_attr(test, assert_instr(mulv.w))]
__msa_mulv_w(a: v4i32, b: v4i32) -> v4i326821 pub unsafe fn __msa_mulv_w(a: v4i32, b: v4i32) -> v4i32 {
6822     msa_mulv_w(a, mem::transmute(b))
6823 }
6824 
6825 /// Vector Multiply
6826 ///
6827 /// The integer elements in vector `a` (two signed 64-bit integer numbers)
6828 /// are multiplied by integer elements in vector `b` (two signed 64-bit integer numbers).
6829 /// The result is written to vector (two signed 64-bit integer numbers).
6830 /// The most significant half of the multiplication result is discarded.
6831 ///
6832 #[inline]
6833 #[target_feature(enable = "msa")]
6834 #[cfg_attr(test, assert_instr(mulv.d))]
__msa_mulv_d(a: v2i64, b: v2i64) -> v2i646835 pub unsafe fn __msa_mulv_d(a: v2i64, b: v2i64) -> v2i64 {
6836     msa_mulv_d(a, mem::transmute(b))
6837 }
6838 
6839 /// Vector Leading Ones Count
6840 ///
6841 /// The number of leading ones for elements in vector `a` (sixteen signed 8-bit integer numbers)
6842 /// is stored to the elements in vector (sixteen signed 8-bit integer numbers).
6843 ///
6844 #[inline]
6845 #[target_feature(enable = "msa")]
6846 #[cfg_attr(test, assert_instr(nloc.b))]
__msa_nloc_b(a: v16i8) -> v16i86847 pub unsafe fn __msa_nloc_b(a: v16i8) -> v16i8 {
6848     msa_nloc_b(a)
6849 }
6850 
6851 /// Vector Leading Ones Count
6852 ///
6853 /// The number of leading ones for elements in vector `a` (eight signed 16-bit integer numbers)
6854 /// is stored to the elements in vector (eight signed 16-bit integer numbers).
6855 ///
6856 #[inline]
6857 #[target_feature(enable = "msa")]
6858 #[cfg_attr(test, assert_instr(nloc.h))]
__msa_nloc_h(a: v8i16) -> v8i166859 pub unsafe fn __msa_nloc_h(a: v8i16) -> v8i16 {
6860     msa_nloc_h(a)
6861 }
6862 
6863 /// Vector Leading Ones Count
6864 ///
6865 /// The number of leading ones for elements in vector `a` (four signed 32-bit integer numbers)
6866 /// is stored to the elements in vector (four signed 32-bit integer numbers).
6867 ///
6868 #[inline]
6869 #[target_feature(enable = "msa")]
6870 #[cfg_attr(test, assert_instr(nloc.w))]
__msa_nloc_w(a: v4i32) -> v4i326871 pub unsafe fn __msa_nloc_w(a: v4i32) -> v4i32 {
6872     msa_nloc_w(a)
6873 }
6874 
6875 /// Vector Leading Ones Count
6876 ///
6877 /// The number of leading ones for elements in vector `a` (two signed 64-bit integer numbers)
6878 /// is stored to the elements in vector (two signed 64-bit integer numbers).
6879 ///
6880 #[inline]
6881 #[target_feature(enable = "msa")]
6882 #[cfg_attr(test, assert_instr(nloc.d))]
__msa_nloc_d(a: v2i64) -> v2i646883 pub unsafe fn __msa_nloc_d(a: v2i64) -> v2i64 {
6884     msa_nloc_d(a)
6885 }
6886 
6887 /// Vector Leading Zeros Count
6888 ///
6889 /// The number of leading zeros for elements in vector `a` (sixteen signed 8-bit integer numbers)
6890 /// is stored to the elements in vector (sixteen signed 8-bit integer numbers).
6891 ///
6892 #[inline]
6893 #[target_feature(enable = "msa")]
6894 #[cfg_attr(test, assert_instr(nlzc.b))]
__msa_nlzc_b(a: v16i8) -> v16i86895 pub unsafe fn __msa_nlzc_b(a: v16i8) -> v16i8 {
6896     msa_nlzc_b(a)
6897 }
6898 
6899 /// Vector Leading Zeros Count
6900 ///
6901 /// The number of leading zeros for elements in vector `a` (eight signed 16-bit integer numbers)
6902 /// is stored to the elements in vector (eight signed 16-bit integer numbers).
6903 ///
6904 #[inline]
6905 #[target_feature(enable = "msa")]
6906 #[cfg_attr(test, assert_instr(nlzc.h))]
__msa_nlzc_h(a: v8i16) -> v8i166907 pub unsafe fn __msa_nlzc_h(a: v8i16) -> v8i16 {
6908     msa_nlzc_h(a)
6909 }
6910 
6911 /// Vector Leading Zeros Count
6912 ///
6913 /// The number of leading zeros for elements in vector `a` (four signed 32-bit integer numbers)
6914 /// is stored to the elements in vector (four signed 32-bit integer numbers).
6915 ///
6916 #[inline]
6917 #[target_feature(enable = "msa")]
6918 #[cfg_attr(test, assert_instr(nlzc.w))]
__msa_nlzc_w(a: v4i32) -> v4i326919 pub unsafe fn __msa_nlzc_w(a: v4i32) -> v4i32 {
6920     msa_nlzc_w(a)
6921 }
6922 
6923 /// Vector Leading Zeros Count
6924 ///
6925 /// The number of leading zeros for elements in vector `a` (two signed 64-bit integer numbers)
6926 /// is stored to the elements in vector (two signed 64-bit integer numbers).
6927 ///
6928 #[inline]
6929 #[target_feature(enable = "msa")]
6930 #[cfg_attr(test, assert_instr(nlzc.d))]
__msa_nlzc_d(a: v2i64) -> v2i646931 pub unsafe fn __msa_nlzc_d(a: v2i64) -> v2i64 {
6932     msa_nlzc_d(a)
6933 }
6934 
6935 /// Vector Logical Negated Or
6936 ///
6937 /// Each bit of vector `a` (sixteen unsigned 8-bit integer numbers)
6938 /// is combined with the corresponding bit of vector `b` (sixteen unsigned 8-bit integer numbers)
6939 /// in a bitwise logical NOR operation. The result is written to vector
6940 /// (sixteen unsigned 8-bit integer numbers).
6941 ///
6942 #[inline]
6943 #[target_feature(enable = "msa")]
6944 #[cfg_attr(test, assert_instr(nor.v))]
__msa_nor_v(a: v16u8, b: v16u8) -> v16u86945 pub unsafe fn __msa_nor_v(a: v16u8, b: v16u8) -> v16u8 {
6946     msa_nor_v(a, mem::transmute(b))
6947 }
6948 
6949 /// Immediate Logical Negated Or
6950 ///
6951 /// Each bit of vector `a` (sixteen unsigned 8-bit integer numbers)
6952 /// is combined with the 8-bit immediate `imm8`
6953 /// in a bitwise logical NOR operation. The result is written to vector
6954 /// (sixteen unsigned 8-bit integer numbers).
6955 ///
6956 #[inline]
6957 #[target_feature(enable = "msa")]
6958 #[cfg_attr(test, assert_instr(nori.b, imm8 = 0b11111111))]
6959 #[rustc_legacy_const_generics(1)]
__msa_nori_b<const IMM8: i32>(a: v16u8) -> v16u86960 pub unsafe fn __msa_nori_b<const IMM8: i32>(a: v16u8) -> v16u8 {
6961     static_assert_imm8!(IMM8);
6962     msa_nori_b(a, IMM8)
6963 }
6964 
6965 /// Vector Logical Or
6966 ///
6967 /// Each bit of vector `a` (sixteen unsigned 8-bit integer numbers)
6968 /// is combined with the corresponding bit of vector `b` (sixteen unsigned 8-bit integer numbers)
6969 /// in a bitwise logical OR operation. The result is written to vector
6970 /// (sixteen unsigned 8-bit integer numbers).
6971 ///
6972 #[inline]
6973 #[target_feature(enable = "msa")]
6974 #[cfg_attr(test, assert_instr(or.v))]
__msa_or_v(a: v16u8, b: v16u8) -> v16u86975 pub unsafe fn __msa_or_v(a: v16u8, b: v16u8) -> v16u8 {
6976     msa_or_v(a, mem::transmute(b))
6977 }
6978 
6979 /// Immediate Logical Or
6980 ///
6981 /// Each bit of vector `a` (sixteen unsigned 8-bit integer numbers)
6982 /// is combined with the 8-bit immediate `imm8`
6983 /// in a bitwise logical OR operation. The result is written to vector
6984 /// (sixteen unsigned 8-bit integer numbers).
6985 ///
6986 #[inline]
6987 #[target_feature(enable = "msa")]
6988 #[cfg_attr(test, assert_instr(ori.b, imm8 = 0b11111111))]
6989 #[rustc_legacy_const_generics(1)]
__msa_ori_b<const IMM8: i32>(a: v16u8) -> v16u86990 pub unsafe fn __msa_ori_b<const IMM8: i32>(a: v16u8) -> v16u8 {
6991     static_assert_imm8!(IMM8);
6992     msa_ori_b(a, IMM8)
6993 }
6994 
6995 /// Vector Pack Even
6996 ///
6997 /// Even elements in vectors `a` (sixteen signed 8-bit integer numbers)
6998 /// are copied to the left half of the result vector and even elements in vector `b`
6999 /// (sixteen signed 8-bit integer numbers) are copied to the right half of the result vector.
7000 ///
7001 #[inline]
7002 #[target_feature(enable = "msa")]
7003 #[cfg_attr(test, assert_instr(pckev.b))]
__msa_pckev_b(a: v16i8, b: v16i8) -> v16i87004 pub unsafe fn __msa_pckev_b(a: v16i8, b: v16i8) -> v16i8 {
7005     msa_pckev_b(a, mem::transmute(b))
7006 }
7007 
7008 /// Vector Pack Even
7009 ///
7010 /// Even elements in vectors `a` (eight signed 16-bit integer numbers)
7011 /// are copied to the left half of the result vector and even elements in vector `b`
7012 /// (eight signed 16-bit integer numbers) are copied to the right half of the result vector.
7013 ///
7014 #[inline]
7015 #[target_feature(enable = "msa")]
7016 #[cfg_attr(test, assert_instr(pckev.h))]
__msa_pckev_h(a: v8i16, b: v8i16) -> v8i167017 pub unsafe fn __msa_pckev_h(a: v8i16, b: v8i16) -> v8i16 {
7018     msa_pckev_h(a, mem::transmute(b))
7019 }
7020 
7021 /// Vector Pack Even
7022 ///
7023 /// Even elements in vectors `a` (four signed 32-bit integer numbers)
7024 /// are copied to the left half of the result vector and even elements in vector `b`
7025 /// (four signed 32-bit integer numbers) are copied to the right half of the result vector.
7026 ///
7027 #[inline]
7028 #[target_feature(enable = "msa")]
7029 #[cfg_attr(test, assert_instr(pckev.w))]
__msa_pckev_w(a: v4i32, b: v4i32) -> v4i327030 pub unsafe fn __msa_pckev_w(a: v4i32, b: v4i32) -> v4i32 {
7031     msa_pckev_w(a, mem::transmute(b))
7032 }
7033 
7034 /// Vector Pack Even
7035 ///
7036 /// Even elements in vectors `a` (two signed 64-bit integer numbers)
7037 /// are copied to the left half of the result vector and even elements in vector `b`
7038 /// (two signed 64-bit integer numbers) are copied to the right half of the result vector.
7039 ///
7040 #[inline]
7041 #[target_feature(enable = "msa")]
7042 #[cfg_attr(test, assert_instr(pckev.d))]
__msa_pckev_d(a: v2i64, b: v2i64) -> v2i647043 pub unsafe fn __msa_pckev_d(a: v2i64, b: v2i64) -> v2i64 {
7044     msa_pckev_d(a, mem::transmute(b))
7045 }
7046 
7047 /// Vector Pack Odd
7048 ///
7049 /// Odd elements in vectors `a` (sixteen signed 8-bit integer numbers)
7050 /// are copied to the left half of the result vector and odd elements in vector `b`
7051 /// (sixteen signed 8-bit integer numbers) are copied to the right half of the result vector.
7052 ///
7053 #[inline]
7054 #[target_feature(enable = "msa")]
7055 #[cfg_attr(test, assert_instr(pckod.b))]
__msa_pckod_b(a: v16i8, b: v16i8) -> v16i87056 pub unsafe fn __msa_pckod_b(a: v16i8, b: v16i8) -> v16i8 {
7057     msa_pckod_b(a, mem::transmute(b))
7058 }
7059 
7060 /// Vector Pack Odd
7061 ///
7062 /// Odd elements in vectors `a` (eight signed 16-bit integer numbers)
7063 /// are copied to the left half of the result vector and odd elements in vector `b`
7064 /// (eight signed 16-bit integer numbers) are copied to the right half of the result vector.
7065 ///
7066 #[inline]
7067 #[target_feature(enable = "msa")]
7068 #[cfg_attr(test, assert_instr(pckod.h))]
__msa_pckod_h(a: v8i16, b: v8i16) -> v8i167069 pub unsafe fn __msa_pckod_h(a: v8i16, b: v8i16) -> v8i16 {
7070     msa_pckod_h(a, mem::transmute(b))
7071 }
7072 
7073 /// Vector Pack Odd
7074 ///
7075 /// Odd elements in vectors `a` (four signed 32-bit integer numbers)
7076 /// are copied to the left half of the result vector and odd elements in vector `b`
7077 /// (four signed 32-bit integer numbers) are copied to the right half of the result vector.
7078 ///
7079 #[inline]
7080 #[target_feature(enable = "msa")]
7081 #[cfg_attr(test, assert_instr(pckod.w))]
__msa_pckod_w(a: v4i32, b: v4i32) -> v4i327082 pub unsafe fn __msa_pckod_w(a: v4i32, b: v4i32) -> v4i32 {
7083     msa_pckod_w(a, mem::transmute(b))
7084 }
7085 
7086 /// Vector Pack Odd
7087 ///
7088 /// Odd elements in vectors `a` (two signed 64-bit integer numbers)
7089 /// are copied to the left half of the result vector and odd elements in vector `b`
7090 /// (two signed 64-bit integer numbers) are copied to the right half of the result vector.
7091 ///
7092 #[inline]
7093 #[target_feature(enable = "msa")]
7094 #[cfg_attr(test, assert_instr(pckod.d))]
__msa_pckod_d(a: v2i64, b: v2i64) -> v2i647095 pub unsafe fn __msa_pckod_d(a: v2i64, b: v2i64) -> v2i64 {
7096     msa_pckod_d(a, mem::transmute(b))
7097 }
7098 
7099 /// Vector Population Count
7100 ///
7101 /// The number of bits set to 1 for elements in vector `a` (sixteen signed 8-bit integer numbers)
7102 /// is stored to the elements in the result vector (sixteen signed 8-bit integer numbers).
7103 ///
7104 #[inline]
7105 #[target_feature(enable = "msa")]
7106 #[cfg_attr(test, assert_instr(pcnt.b))]
__msa_pcnt_b(a: v16i8) -> v16i87107 pub unsafe fn __msa_pcnt_b(a: v16i8) -> v16i8 {
7108     msa_pcnt_b(a)
7109 }
7110 
7111 /// Vector Population Count
7112 ///
7113 /// The number of bits set to 1 for elements in vector `a` (eight signed 16-bit integer numbers)
7114 /// is stored to the elements in the result vector (eight signed 16-bit integer numbers).
7115 ///
7116 #[inline]
7117 #[target_feature(enable = "msa")]
7118 #[cfg_attr(test, assert_instr(pcnt.h))]
__msa_pcnt_h(a: v8i16) -> v8i167119 pub unsafe fn __msa_pcnt_h(a: v8i16) -> v8i16 {
7120     msa_pcnt_h(a)
7121 }
7122 
7123 /// Vector Population Count
7124 ///
7125 /// The number of bits set to 1 for elements in vector `a` (four signed 32-bit integer numbers)
7126 /// is stored to the elements in the result vector (four signed 32-bit integer numbers).
7127 ///
7128 #[inline]
7129 #[target_feature(enable = "msa")]
7130 #[cfg_attr(test, assert_instr(pcnt.w))]
__msa_pcnt_w(a: v4i32) -> v4i327131 pub unsafe fn __msa_pcnt_w(a: v4i32) -> v4i32 {
7132     msa_pcnt_w(a)
7133 }
7134 
7135 /// Vector Population Count
7136 ///
7137 /// The number of bits set to 1 for elements in vector `a` (two signed 64-bit integer numbers)
7138 /// is stored to the elements in the result vector (two signed 64-bit integer numbers).
7139 ///
7140 #[inline]
7141 #[target_feature(enable = "msa")]
7142 #[cfg_attr(test, assert_instr(pcnt.d))]
__msa_pcnt_d(a: v2i64) -> v2i647143 pub unsafe fn __msa_pcnt_d(a: v2i64) -> v2i64 {
7144     msa_pcnt_d(a)
7145 }
7146 
7147 /// Immediate Signed Saturate
7148 ///
7149 /// Signed elements in vector `a` (sixteen signed 8-bit integer numbers)
7150 /// are saturated to signed values of `imm3+1` bits without changing the data width.
7151 /// The result is stored in the vector (sixteen signed 8-bit integer numbers).
7152 ///
7153 #[inline]
7154 #[target_feature(enable = "msa")]
7155 #[cfg_attr(test, assert_instr(sat_s.b, imm4 = 0b111))]
7156 #[rustc_legacy_const_generics(1)]
__msa_sat_s_b<const IMM3: i32>(a: v16i8) -> v16i87157 pub unsafe fn __msa_sat_s_b<const IMM3: i32>(a: v16i8) -> v16i8 {
7158     static_assert_imm3!(IMM3);
7159     msa_sat_s_b(a, IMM3)
7160 }
7161 
7162 /// Immediate Signed Saturate
7163 ///
7164 /// Signed elements in vector `a` (eight signed 16-bit integer numbers)
7165 /// are saturated to signed values of `imm4+1` bits without changing the data width.
7166 /// The result is stored in the vector (eight signed 16-bit integer numbers).
7167 ///
7168 #[inline]
7169 #[target_feature(enable = "msa")]
7170 #[cfg_attr(test, assert_instr(sat_s.h, imm3 = 0b1111))]
7171 #[rustc_legacy_const_generics(1)]
__msa_sat_s_h<const IMM4: i32>(a: v8i16) -> v8i167172 pub unsafe fn __msa_sat_s_h<const IMM4: i32>(a: v8i16) -> v8i16 {
7173     static_assert_imm4!(IMM4);
7174     msa_sat_s_h(a, IMM4)
7175 }
7176 
7177 /// Immediate Signed Saturate
7178 ///
7179 /// Signed elements in vector `a` (four signed 32-bit integer numbers)
7180 /// are saturated to signed values of `imm5+1` bits without changing the data width.
7181 /// The result is stored in the vector (four signed 32-bit integer numbers).
7182 ///
7183 #[inline]
7184 #[target_feature(enable = "msa")]
7185 #[cfg_attr(test, assert_instr(sat_s.w, imm2 = 0b11111))]
7186 #[rustc_legacy_const_generics(1)]
__msa_sat_s_w<const IMM5: i32>(a: v4i32) -> v4i327187 pub unsafe fn __msa_sat_s_w<const IMM5: i32>(a: v4i32) -> v4i32 {
7188     static_assert_imm5!(IMM5);
7189     msa_sat_s_w(a, IMM5)
7190 }
7191 
7192 /// Immediate Signed Saturate
7193 ///
7194 /// Signed elements in vector `a` (two signed 64-bit integer numbers)
7195 /// are saturated to signed values of `imm6+1` bits without changing the data width.
7196 /// The result is stored in the vector (two signed 64-bit integer numbers).
7197 ///
7198 #[inline]
7199 #[target_feature(enable = "msa")]
7200 #[cfg_attr(test, assert_instr(sat_s.d, imm1 = 0b111111))]
7201 #[rustc_legacy_const_generics(1)]
__msa_sat_s_d<const IMM6: i32>(a: v2i64) -> v2i647202 pub unsafe fn __msa_sat_s_d<const IMM6: i32>(a: v2i64) -> v2i64 {
7203     static_assert_imm6!(IMM6);
7204     msa_sat_s_d(a, IMM6)
7205 }
7206 
7207 /// Immediate Unsigned Saturate
7208 ///
7209 /// Unsigned elements in vector `a` (sixteen unsigned 8-bit integer numbers)
7210 /// are saturated to unsigned values of `imm3+1` bits without changing the data width.
7211 /// The result is stored in the vector (sixteen unsigned 8-bit integer numbers).
7212 ///
7213 #[inline]
7214 #[target_feature(enable = "msa")]
7215 #[cfg_attr(test, assert_instr(sat_u.b, imm4 = 0b111))]
7216 #[rustc_legacy_const_generics(1)]
__msa_sat_u_b<const IMM3: i32>(a: v16u8) -> v16u87217 pub unsafe fn __msa_sat_u_b<const IMM3: i32>(a: v16u8) -> v16u8 {
7218     static_assert_imm3!(IMM3);
7219     msa_sat_u_b(a, IMM3)
7220 }
7221 
7222 /// Immediate Unsigned Saturate
7223 ///
7224 /// Unsigned elements in vector `a` (eight unsigned 16-bit integer numbers)
7225 /// are saturated to unsigned values of `imm4+1` bits without changing the data width.
7226 /// The result is stored in the vector (eight unsigned 16-bit integer numbers).
7227 ///
7228 #[inline]
7229 #[target_feature(enable = "msa")]
7230 #[cfg_attr(test, assert_instr(sat_u.h, imm3 = 0b1111))]
7231 #[rustc_legacy_const_generics(1)]
__msa_sat_u_h<const IMM4: i32>(a: v8u16) -> v8u167232 pub unsafe fn __msa_sat_u_h<const IMM4: i32>(a: v8u16) -> v8u16 {
7233     static_assert_imm4!(IMM4);
7234     msa_sat_u_h(a, IMM4)
7235 }
7236 
7237 /// Immediate Unsigned Saturate
7238 ///
7239 /// Unsigned elements in vector `a` (four unsigned 32-bit integer numbers)
7240 /// are saturated to unsigned values of `imm5+1` bits without changing the data width.
7241 /// The result is stored in the vector (four unsigned 32-bit integer numbers).
7242 ///
7243 #[inline]
7244 #[target_feature(enable = "msa")]
7245 #[cfg_attr(test, assert_instr(sat_u.w, imm2 = 0b11111))]
7246 #[rustc_legacy_const_generics(1)]
__msa_sat_u_w<const IMM5: i32>(a: v4u32) -> v4u327247 pub unsafe fn __msa_sat_u_w<const IMM5: i32>(a: v4u32) -> v4u32 {
7248     static_assert_imm5!(IMM5);
7249     msa_sat_u_w(a, IMM5)
7250 }
7251 
7252 /// Immediate Unsigned Saturate
7253 ///
7254 /// Unsigned elements in vector `a` (two unsigned 64-bit integer numbers)
7255 /// are saturated to unsigned values of `imm6+1` bits without changing the data width.
7256 /// The result is stored in the vector (two unsigned 64-bit integer numbers).
7257 ///
7258 #[inline]
7259 #[target_feature(enable = "msa")]
7260 #[cfg_attr(test, assert_instr(sat_u.d, imm1 = 0b111111))]
7261 #[rustc_legacy_const_generics(1)]
__msa_sat_u_d<const IMM6: i32>(a: v2u64) -> v2u647262 pub unsafe fn __msa_sat_u_d<const IMM6: i32>(a: v2u64) -> v2u64 {
7263     static_assert_imm6!(IMM6);
7264     msa_sat_u_d(a, IMM6)
7265 }
7266 
7267 /// Immediate Set Shuffle Elements
7268 ///
7269 /// The set shuffle instruction works on 4-element sets.
7270 /// All sets are shuffled in the same way: the element i82i+1..2i in `a`
7271 /// (sixteen signed 8-bit integer numbers) is copied over the element i in result vector
7272 /// (sixteen signed 8-bit integer numbers), where i is 0, 1, 2, 3.
7273 ///
7274 #[inline]
7275 #[target_feature(enable = "msa")]
7276 #[cfg_attr(test, assert_instr(shf.b, imm8 = 0b11111111))]
7277 #[rustc_legacy_const_generics(1)]
__msa_shf_b<const IMM8: i32>(a: v16i8) -> v16i87278 pub unsafe fn __msa_shf_b<const IMM8: i32>(a: v16i8) -> v16i8 {
7279     static_assert_imm8!(IMM8);
7280     msa_shf_b(a, IMM8)
7281 }
7282 
7283 /// Immediate Set Shuffle Elements
7284 ///
7285 /// The set shuffle instruction works on 4-element sets.
7286 /// All sets are shuffled in the same way: the element i82i+1..2i in `a`
7287 /// (eight signed 16-bit integer numbers) is copied over the element i in result vector
7288 /// (eight signed 16-bit integer numbers), where i is 0, 1, 2, 3.
7289 ///
7290 #[inline]
7291 #[target_feature(enable = "msa")]
7292 #[cfg_attr(test, assert_instr(shf.h, imm8 = 0b11111111))]
7293 #[rustc_legacy_const_generics(1)]
__msa_shf_h<const IMM8: i32>(a: v8i16) -> v8i167294 pub unsafe fn __msa_shf_h<const IMM8: i32>(a: v8i16) -> v8i16 {
7295     static_assert_imm8!(IMM8);
7296     msa_shf_h(a, IMM8)
7297 }
7298 
7299 /// Immediate Set Shuffle Elements
7300 ///
7301 /// The set shuffle instruction works on 4-element sets.
7302 /// All sets are shuffled in the same way: the element i82i+1..2i in `a`
7303 /// (four signed 32-bit integer numbers) is copied over the element i in result vector
7304 /// (four signed 32-bit integer numbers), where i is 0, 1, 2, 3.
7305 ///
7306 #[inline]
7307 #[target_feature(enable = "msa")]
7308 #[cfg_attr(test, assert_instr(shf.w, imm8 = 0b11111111))]
7309 #[rustc_legacy_const_generics(1)]
__msa_shf_w<const IMM8: i32>(a: v4i32) -> v4i327310 pub unsafe fn __msa_shf_w<const IMM8: i32>(a: v4i32) -> v4i32 {
7311     static_assert_imm8!(IMM8);
7312     msa_shf_w(a, IMM8)
7313 }
7314 
7315 /// GPR Columns Slide
7316 ///
7317 /// Vector registers `a` (sixteen signed 8-bit integer numbers) and `b`
7318 /// (sixteen signed 8-bit integer numbers) contain 2-dimensional byte arrays (rectangles)
7319 /// stored row-wise with as many rows as bytes in integer data format df.
7320 /// The two source rectangles `b` and `a` are concatenated horizontally in the order
7321 /// they appear in the syntax, i.e. first `a` and then `b`. Place a new destination
7322 /// rectangle over `b` and then slide it to the left over the concatenation of `a` and `b`
7323 /// by the number of columns given in GPR `c`.
7324 /// The result is written to vector (sixteen signed 8-bit integer numbers).
7325 /// GPR `c` value is interpreted modulo the number of columns in destination rectangle,
7326 /// or equivalently, the number of data format df elements in the destination vector.
7327 ///
7328 #[inline]
7329 #[target_feature(enable = "msa")]
7330 #[cfg_attr(test, assert_instr(sld.b))]
__msa_sld_b(a: v16i8, b: v16i8, c: i32) -> v16i87331 pub unsafe fn __msa_sld_b(a: v16i8, b: v16i8, c: i32) -> v16i8 {
7332     msa_sld_b(a, mem::transmute(b), c)
7333 }
7334 
7335 /// GPR Columns Slide
7336 ///
7337 /// Vector registers `a` (eight signed 16-bit integer numbers) and `b`
7338 /// (eight signed 16-bit integer numbers) contain 2-dimensional byte arrays (rectangles)
7339 /// stored row-wise with as many rows as bytes in integer data format df.
7340 /// The two source rectangles `b` and `a` are concatenated horizontally in the order
7341 /// they appear in the syntax, i.e. first `a` and then `b`. Place a new destination
7342 /// rectangle over `b` and then slide it to the left over the concatenation of `a` and `b`
7343 /// by the number of columns given in GPR `c`.
7344 /// The result is written to vector (eight signed 16-bit integer numbers).
7345 /// GPR `c` value is interpreted modulo the number of columns in destination rectangle,
7346 /// or equivalently, the number of data format df elements in the destination vector.
7347 ///
7348 #[inline]
7349 #[target_feature(enable = "msa")]
7350 #[cfg_attr(test, assert_instr(sld.h))]
__msa_sld_h(a: v8i16, b: v8i16, c: i32) -> v8i167351 pub unsafe fn __msa_sld_h(a: v8i16, b: v8i16, c: i32) -> v8i16 {
7352     msa_sld_h(a, mem::transmute(b), c)
7353 }
7354 
7355 /// GPR Columns Slide
7356 ///
7357 /// Vector registers `a` (four signed 32-bit integer numbers) and `b`
7358 /// (four signed 32-bit integer numbers) contain 2-dimensional byte arrays (rectangles)
7359 /// stored row-wise with as many rows as bytes in integer data format df.
7360 /// The two source rectangles `b` and `a` are concatenated horizontally in the order
7361 /// they appear in the syntax, i.e. first `a` and then `b`. Place a new destination
7362 /// rectangle over `b` and then slide it to the left over the concatenation of `a` and `b`
7363 /// by the number of columns given in GPR `c`.
7364 /// The result is written to vector (four signed 32-bit integer numbers).
7365 /// GPR `c` value is interpreted modulo the number of columns in destination rectangle,
7366 /// or equivalently, the number of data format df elements in the destination vector.
7367 ///
7368 #[inline]
7369 #[target_feature(enable = "msa")]
7370 #[cfg_attr(test, assert_instr(sld.w))]
__msa_sld_w(a: v4i32, b: v4i32, c: i32) -> v4i327371 pub unsafe fn __msa_sld_w(a: v4i32, b: v4i32, c: i32) -> v4i32 {
7372     msa_sld_w(a, mem::transmute(b), c)
7373 }
7374 
7375 /// GPR Columns Slide
7376 ///
7377 /// Vector registers `a` (two signed 64-bit integer numbers) and `b`
7378 /// (two signed 64-bit integer numbers) contain 2-dimensional byte arrays (rectangles)
7379 /// stored row-wise with as many rows as bytes in integer data format df.
7380 /// The two source rectangles `b` and `a` are concatenated horizontally in the order
7381 /// they appear in the syntax, i.e. first `a` and then `b`. Place a new destination
7382 /// rectangle over `b` and then slide it to the left over the concatenation of `a` and `b`
7383 /// by the number of columns given in GPR `c`.
7384 /// The result is written to vector (two signed 64-bit integer numbers).
7385 /// GPR `c` value is interpreted modulo the number of columns in destination rectangle,
7386 /// or equivalently, the number of data format df elements in the destination vector.
7387 ///
7388 #[inline]
7389 #[target_feature(enable = "msa")]
7390 #[cfg_attr(test, assert_instr(sld.d))]
__msa_sld_d(a: v2i64, b: v2i64, c: i32) -> v2i647391 pub unsafe fn __msa_sld_d(a: v2i64, b: v2i64, c: i32) -> v2i64 {
7392     msa_sld_d(a, mem::transmute(b), c)
7393 }
7394 
7395 /// Immediate Columns Slide
7396 ///
7397 /// Vector registers `a` (sixteen signed 8-bit integer numbers) and `b`
7398 /// (sixteen signed 8-bit integer numbers) contain 2-dimensional byte arrays (rectangles)
7399 /// stored row-wise with as many rows as bytes in integer data format df.
7400 /// The two source rectangles `b` and `a` are concatenated horizontally in the order
7401 /// they appear in the syntax, i.e. first `a` and then `b`. Place a new destination
7402 /// rectangle over `b` and then slide it to the left over the concatenation of `a` and `b`
7403 /// by `imm1` columns.
7404 /// The result is written to vector (sixteen signed 8-bit integer numbers).
7405 ///
7406 #[inline]
7407 #[target_feature(enable = "msa")]
7408 #[cfg_attr(test, assert_instr(sldi.b, imm4 = 0b1111))]
7409 #[rustc_legacy_const_generics(2)]
__msa_sldi_b<const IMM4: i32>(a: v16i8, b: v16i8) -> v16i87410 pub unsafe fn __msa_sldi_b<const IMM4: i32>(a: v16i8, b: v16i8) -> v16i8 {
7411     static_assert_imm4!(IMM4);
7412     msa_sldi_b(a, mem::transmute(b), IMM4)
7413 }
7414 
7415 /// Immediate Columns Slide
7416 ///
7417 /// Vector registers `a` (eight signed 16-bit integer numbers) and `b`
7418 /// (eight signed 16-bit integer numbers) contain 2-dimensional byte arrays (rectangles)
7419 /// stored row-wise with as many rows as bytes in integer data format df.
7420 /// The two source rectangles `b` and `a` are concatenated horizontally in the order
7421 /// they appear in the syntax, i.e. first `a` and then `b`. Place a new destination
7422 /// rectangle over `b` and then slide it to the left over the concatenation of `a` and `b`
7423 /// by `imm1` columns.
7424 /// The result is written to vector (eight signed 16-bit integer numbers).
7425 ///
7426 #[inline]
7427 #[target_feature(enable = "msa")]
7428 #[cfg_attr(test, assert_instr(sldi.h, imm3 = 0b111))]
7429 #[rustc_legacy_const_generics(2)]
__msa_sldi_h<const IMM3: i32>(a: v8i16, b: v8i16) -> v8i167430 pub unsafe fn __msa_sldi_h<const IMM3: i32>(a: v8i16, b: v8i16) -> v8i16 {
7431     static_assert_imm3!(IMM3);
7432     msa_sldi_h(a, mem::transmute(b), IMM3)
7433 }
7434 
7435 /// Immediate Columns Slide
7436 ///
7437 /// Vector registers `a` (four signed 32-bit integer numbers) and `b`
7438 /// (four signed 32-bit integer numbers) contain 2-dimensional byte arrays (rectangles)
7439 /// stored row-wise with as many rows as bytes in integer data format df.
7440 /// The two source rectangles `b` and `a` are concatenated horizontally in the order
7441 /// they appear in the syntax, i.e. first `a` and then `b`. Place a new destination
7442 /// rectangle over `b` and then slide it to the left over the concatenation of `a` and `b`
7443 /// by `imm1` columns.
7444 /// The result is written to vector (four signed 32-bit integer numbers).
7445 ///
7446 #[inline]
7447 #[target_feature(enable = "msa")]
7448 #[cfg_attr(test, assert_instr(sldi.w, imm2 = 0b11))]
7449 #[rustc_legacy_const_generics(2)]
__msa_sldi_w<const IMM2: i32>(a: v4i32, b: v4i32) -> v4i327450 pub unsafe fn __msa_sldi_w<const IMM2: i32>(a: v4i32, b: v4i32) -> v4i32 {
7451     static_assert_imm2!(IMM2);
7452     msa_sldi_w(a, mem::transmute(b), IMM2)
7453 }
7454 
7455 /// Immediate Columns Slide
7456 ///
7457 /// Vector registers `a` (two signed 64-bit integer numbers) and `b`
7458 /// (two signed 64-bit integer numbers) contain 2-dimensional byte arrays (rectangles)
7459 /// stored row-wise with as many rows as bytes in integer data format df.
7460 /// The two source rectangles `b` and `a` are concatenated horizontally in the order
7461 /// they appear in the syntax, i.e. first `a` and then `b`. Place a new destination
7462 /// rectangle over `b` and then slide it to the left over the concatenation of `a` and `b`
7463 /// by `imm1` columns.
7464 /// The result is written to vector (two signed 64-bit integer numbers).
7465 ///
7466 #[inline]
7467 #[target_feature(enable = "msa")]
7468 #[cfg_attr(test, assert_instr(sldi.d, imm1 = 0b1))]
7469 #[rustc_legacy_const_generics(2)]
__msa_sldi_d<const IMM1: i32>(a: v2i64, b: v2i64) -> v2i647470 pub unsafe fn __msa_sldi_d<const IMM1: i32>(a: v2i64, b: v2i64) -> v2i64 {
7471     static_assert_imm1!(IMM1);
7472     msa_sldi_d(a, mem::transmute(b), IMM1)
7473 }
7474 
7475 /// Vector Shift Left
7476 ///
7477 /// The elements in vector `a` (sixteen signed 8-bit integer numbers)
7478 /// are shifted left by the number of bits the elements in vector `b`
7479 /// (sixteen signed 8-bit integer numbers) specify modulo the size of the
7480 /// element in bits. The result is written to vector (sixteen signed 8-bit integer numbers).
7481 ///
7482 #[inline]
7483 #[target_feature(enable = "msa")]
7484 #[cfg_attr(test, assert_instr(sll.b))]
__msa_sll_b(a: v16i8, b: v16i8) -> v16i87485 pub unsafe fn __msa_sll_b(a: v16i8, b: v16i8) -> v16i8 {
7486     msa_sll_b(a, mem::transmute(b))
7487 }
7488 
7489 /// Vector Shift Left
7490 ///
7491 /// The elements in vector `a` (eight signed 16-bit integer numbers)
7492 /// are shifted left by the number of bits the elements in vector `b`
7493 /// (eight signed 16-bit integer numbers) specify modulo the size of the
7494 /// element in bits. The result is written to vector (eight signed 16-bit integer numbers).
7495 ///
7496 #[inline]
7497 #[target_feature(enable = "msa")]
7498 #[cfg_attr(test, assert_instr(sll.h))]
__msa_sll_h(a: v8i16, b: v8i16) -> v8i167499 pub unsafe fn __msa_sll_h(a: v8i16, b: v8i16) -> v8i16 {
7500     msa_sll_h(a, mem::transmute(b))
7501 }
7502 
7503 /// Vector Shift Left
7504 ///
7505 /// The elements in vector `a` (four signed 32-bit integer numbers)
7506 /// are shifted left by the number of bits the elements in vector `b`
7507 /// (four signed 32-bit integer numbers) specify modulo the size of the
7508 /// element in bits. The result is written to vector (four signed 32-bit integer numbers).
7509 ///
7510 #[inline]
7511 #[target_feature(enable = "msa")]
7512 #[cfg_attr(test, assert_instr(sll.w))]
__msa_sll_w(a: v4i32, b: v4i32) -> v4i327513 pub unsafe fn __msa_sll_w(a: v4i32, b: v4i32) -> v4i32 {
7514     msa_sll_w(a, mem::transmute(b))
7515 }
7516 
7517 /// Vector Shift Left
7518 ///
7519 /// The elements in vector `a` (two signed 64-bit integer numbers)
7520 /// are shifted left by the number of bits the elements in vector `b`
7521 /// (two signed 64-bit integer numbers) specify modulo the size of the
7522 /// element in bits. The result is written to vector (two signed 64-bit integer numbers).
7523 ///
7524 #[inline]
7525 #[target_feature(enable = "msa")]
7526 #[cfg_attr(test, assert_instr(sll.d))]
__msa_sll_d(a: v2i64, b: v2i64) -> v2i647527 pub unsafe fn __msa_sll_d(a: v2i64, b: v2i64) -> v2i64 {
7528     msa_sll_d(a, mem::transmute(b))
7529 }
7530 
7531 /// Immediate Shift Left
7532 ///
7533 /// The elements in vector `a` (sixteen signed 8-bit integer numbers)
7534 /// are shifted left by `imm4` bits.
7535 /// The result is written to vector (sixteen signed 8-bit integer numbers).
7536 ///
7537 #[inline]
7538 #[target_feature(enable = "msa")]
7539 #[cfg_attr(test, assert_instr(slli.b, imm4 = 0b1111))]
7540 #[rustc_legacy_const_generics(1)]
__msa_slli_b<const IMM4: i32>(a: v16i8) -> v16i87541 pub unsafe fn __msa_slli_b<const IMM4: i32>(a: v16i8) -> v16i8 {
7542     static_assert_imm4!(IMM4);
7543     msa_slli_b(a, IMM4)
7544 }
7545 
7546 /// Immediate Shift Left
7547 ///
7548 /// The elements in vector `a` (eight signed 16-bit integer numbers)
7549 /// are shifted left by `imm3` bits.
7550 /// The result is written to vector (eight signed 16-bit integer numbers).
7551 ///
7552 #[inline]
7553 #[target_feature(enable = "msa")]
7554 #[cfg_attr(test, assert_instr(slli.h, imm3 = 0b111))]
7555 #[rustc_legacy_const_generics(1)]
__msa_slli_h<const IMM3: i32>(a: v8i16) -> v8i167556 pub unsafe fn __msa_slli_h<const IMM3: i32>(a: v8i16) -> v8i16 {
7557     static_assert_imm3!(IMM3);
7558     msa_slli_h(a, IMM3)
7559 }
7560 
7561 /// Immediate Shift Left
7562 ///
7563 /// The elements in vector `a` (four signed 32-bit integer numbers)
7564 /// are shifted left by `imm2` bits.
7565 /// The result is written to vector (four signed 32-bit integer numbers).
7566 ///
7567 #[inline]
7568 #[target_feature(enable = "msa")]
7569 #[cfg_attr(test, assert_instr(slli.w, imm2 = 0b11))]
7570 #[rustc_legacy_const_generics(1)]
__msa_slli_w<const IMM2: i32>(a: v4i32) -> v4i327571 pub unsafe fn __msa_slli_w<const IMM2: i32>(a: v4i32) -> v4i32 {
7572     static_assert_imm2!(IMM2);
7573     msa_slli_w(a, IMM2)
7574 }
7575 
7576 /// Immediate Shift Left
7577 ///
7578 /// The elements in vector `a` (two signed 64-bit integer numbers)
7579 /// are shifted left by `imm1` bits.
7580 /// The result is written to vector (two signed 64-bit integer numbers).
7581 ///
7582 #[inline]
7583 #[target_feature(enable = "msa")]
7584 #[cfg_attr(test, assert_instr(slli.d, imm1 = 0b1))]
7585 #[rustc_legacy_const_generics(1)]
__msa_slli_d<const IMM1: i32>(a: v2i64) -> v2i647586 pub unsafe fn __msa_slli_d<const IMM1: i32>(a: v2i64) -> v2i64 {
7587     static_assert_imm1!(IMM1);
7588     msa_slli_d(a, IMM1)
7589 }
7590 
7591 /// GPR Element Splat
7592 ///
7593 /// Replicate vector `a` (sixteen signed 8-bit integer numbers)
7594 /// element with index given by GPR `b` to all elements in vector
7595 /// (sixteen signed 8-bit integer numbers) GPR `b` value is interpreted
7596 /// modulo the number of data format df elements in the destination vector.
7597 ///
7598 #[inline]
7599 #[target_feature(enable = "msa")]
7600 #[cfg_attr(test, assert_instr(splat.b))]
__msa_splat_b(a: v16i8, b: i32) -> v16i87601 pub unsafe fn __msa_splat_b(a: v16i8, b: i32) -> v16i8 {
7602     msa_splat_b(a, mem::transmute(b))
7603 }
7604 
7605 /// GPR Element Splat
7606 ///
7607 /// Replicate vector `a` (eight signed 16-bit integer numbers)
7608 /// element with index given by GPR `b` to all elements in vector
7609 /// (eight signed 16-bit integer numbers) GPR `b` value is interpreted
7610 /// modulo the number of data format df elements in the destination vector.
7611 ///
7612 #[inline]
7613 #[target_feature(enable = "msa")]
7614 #[cfg_attr(test, assert_instr(splat.h))]
__msa_splat_h(a: v8i16, b: i32) -> v8i167615 pub unsafe fn __msa_splat_h(a: v8i16, b: i32) -> v8i16 {
7616     msa_splat_h(a, mem::transmute(b))
7617 }
7618 
7619 /// GPR Element Splat
7620 ///
7621 /// Replicate vector `a` (four signed 32-bit integer numbers)
7622 /// element with index given by GPR `b` to all elements in vector
7623 /// (four signed 32-bit integer numbers) GPR `b` value is interpreted
7624 /// modulo the number of data format df elements in the destination vector.
7625 ///
7626 #[inline]
7627 #[target_feature(enable = "msa")]
7628 #[cfg_attr(test, assert_instr(splat.w))]
__msa_splat_w(a: v4i32, b: i32) -> v4i327629 pub unsafe fn __msa_splat_w(a: v4i32, b: i32) -> v4i32 {
7630     msa_splat_w(a, mem::transmute(b))
7631 }
7632 
7633 /// GPR Element Splat
7634 ///
7635 /// Replicate vector `a` (two signed 64-bit integer numbers)
7636 /// element with index given by GPR `b` to all elements in vector
7637 /// (two signed 64-bit integer numbers) GPR `b` value is interpreted
7638 /// modulo the number of data format df elements in the destination vector.
7639 ///
7640 #[inline]
7641 #[target_feature(enable = "msa")]
7642 #[cfg_attr(test, assert_instr(splat.d))]
__msa_splat_d(a: v2i64, b: i32) -> v2i647643 pub unsafe fn __msa_splat_d(a: v2i64, b: i32) -> v2i64 {
7644     msa_splat_d(a, mem::transmute(b))
7645 }
7646 
7647 /// Immediate Element Splat
7648 ///
7649 /// Replicate element `imm4` in vector `a` (sixteen signed 8-bit integer numbers)
7650 /// to all elements in vector (sixteen signed 8-bit integer numbers).
7651 ///
7652 #[inline]
7653 #[target_feature(enable = "msa")]
7654 #[cfg_attr(test, assert_instr(splati.b, imm4 = 0b1111))]
7655 #[rustc_legacy_const_generics(1)]
__msa_splati_b<const IMM4: i32>(a: v16i8) -> v16i87656 pub unsafe fn __msa_splati_b<const IMM4: i32>(a: v16i8) -> v16i8 {
7657     static_assert_imm4!(IMM4);
7658     msa_splati_b(a, IMM4)
7659 }
7660 
7661 /// Immediate Element Splat
7662 ///
7663 /// Replicate element `imm3` in vector `a` (eight signed 16-bit integer numbers)
7664 /// to all elements in vector (eight signed 16-bit integer numbers).
7665 ///
7666 #[inline]
7667 #[target_feature(enable = "msa")]
7668 #[cfg_attr(test, assert_instr(splati.h, imm3 = 0b111))]
7669 #[rustc_legacy_const_generics(1)]
__msa_splati_h<const IMM3: i32>(a: v8i16) -> v8i167670 pub unsafe fn __msa_splati_h<const IMM3: i32>(a: v8i16) -> v8i16 {
7671     static_assert_imm3!(IMM3);
7672     msa_splati_h(a, IMM3)
7673 }
7674 
7675 /// Immediate Element Splat
7676 ///
7677 /// Replicate element `imm2` in vector `a` (four signed 32-bit integer numbers)
7678 /// to all elements in vector (four signed 32-bit integer numbers).
7679 ///
7680 #[inline]
7681 #[target_feature(enable = "msa")]
7682 #[cfg_attr(test, assert_instr(splati.w, imm2 = 0b11))]
7683 #[rustc_legacy_const_generics(1)]
__msa_splati_w<const IMM2: i32>(a: v4i32) -> v4i327684 pub unsafe fn __msa_splati_w<const IMM2: i32>(a: v4i32) -> v4i32 {
7685     static_assert_imm2!(IMM2);
7686     msa_splati_w(a, IMM2)
7687 }
7688 
7689 /// Immediate Element Splat
7690 ///
7691 /// Replicate element `imm1` in vector `a` (two signed 64-bit integer numbers)
7692 /// to all elements in vector (two signed 64-bit integer numbers).
7693 ///
7694 #[inline]
7695 #[target_feature(enable = "msa")]
7696 #[cfg_attr(test, assert_instr(splati.d, imm1 = 0b1))]
7697 #[rustc_legacy_const_generics(1)]
__msa_splati_d<const IMM1: i32>(a: v2i64) -> v2i647698 pub unsafe fn __msa_splati_d<const IMM1: i32>(a: v2i64) -> v2i64 {
7699     static_assert_imm1!(IMM1);
7700     msa_splati_d(a, IMM1)
7701 }
7702 
7703 /// Vector Shift Right Arithmetic
7704 ///
7705 /// The elements in vector `a` (sixteen signed 8-bit integer numbers)
7706 /// are shifted right arithmetic by the number of bits the elements in vector `b`
7707 /// (sixteen signed 8-bit integer numbers) specify modulo the size of the
7708 /// element in bits.The result is written to vector (sixteen signed 8-bit integer numbers).
7709 ///
7710 #[inline]
7711 #[target_feature(enable = "msa")]
7712 #[cfg_attr(test, assert_instr(sra.b))]
__msa_sra_b(a: v16i8, b: v16i8) -> v16i87713 pub unsafe fn __msa_sra_b(a: v16i8, b: v16i8) -> v16i8 {
7714     msa_sra_b(a, mem::transmute(b))
7715 }
7716 
7717 /// Vector Shift Right Arithmetic
7718 ///
7719 /// The elements in vector `a` (eight signed 16-bit integer numbers)
7720 /// are shifted right arithmetic by the number of bits the elements in vector `b`
7721 /// (eight signed 16-bit integer numbers) specify modulo the size of the
7722 /// element in bits.The result is written to vector (eight signed 16-bit integer numbers).
7723 ///
7724 #[inline]
7725 #[target_feature(enable = "msa")]
7726 #[cfg_attr(test, assert_instr(sra.h))]
__msa_sra_h(a: v8i16, b: v8i16) -> v8i167727 pub unsafe fn __msa_sra_h(a: v8i16, b: v8i16) -> v8i16 {
7728     msa_sra_h(a, mem::transmute(b))
7729 }
7730 
7731 /// Vector Shift Right Arithmetic
7732 ///
7733 /// The elements in vector `a` (four signed 32-bit integer numbers)
7734 /// are shifted right arithmetic by the number of bits the elements in vector `b`
7735 /// (four signed 32-bit integer numbers) specify modulo the size of the
7736 /// element in bits.The result is written to vector (four signed 32-bit integer numbers).
7737 ///
7738 #[inline]
7739 #[target_feature(enable = "msa")]
7740 #[cfg_attr(test, assert_instr(sra.w))]
__msa_sra_w(a: v4i32, b: v4i32) -> v4i327741 pub unsafe fn __msa_sra_w(a: v4i32, b: v4i32) -> v4i32 {
7742     msa_sra_w(a, mem::transmute(b))
7743 }
7744 
7745 /// Vector Shift Right Arithmetic
7746 ///
7747 /// The elements in vector `a` (two signed 64-bit integer numbers)
7748 /// are shifted right arithmetic by the number of bits the elements in vector `b`
7749 /// (two signed 64-bit integer numbers) specify modulo the size of the
7750 /// element in bits.The result is written to vector (two signed 64-bit integer numbers).
7751 ///
7752 #[inline]
7753 #[target_feature(enable = "msa")]
7754 #[cfg_attr(test, assert_instr(sra.d))]
__msa_sra_d(a: v2i64, b: v2i64) -> v2i647755 pub unsafe fn __msa_sra_d(a: v2i64, b: v2i64) -> v2i64 {
7756     msa_sra_d(a, mem::transmute(b))
7757 }
7758 
7759 /// Immediate Shift Right Arithmetic
7760 ///
7761 /// The elements in vector `a` (sixteen signed 8-bit integer numbers)
7762 /// are shifted right arithmetic by `imm3` bits.
7763 /// The result is written to vector (sixteen signed 8-bit integer numbers).
7764 ///
7765 #[inline]
7766 #[target_feature(enable = "msa")]
7767 #[cfg_attr(test, assert_instr(srai.b, imm3 = 0b111))]
7768 #[rustc_legacy_const_generics(1)]
__msa_srai_b<const IMM3: i32>(a: v16i8) -> v16i87769 pub unsafe fn __msa_srai_b<const IMM3: i32>(a: v16i8) -> v16i8 {
7770     static_assert_imm3!(IMM3);
7771     msa_srai_b(a, IMM3)
7772 }
7773 
7774 /// Immediate Shift Right Arithmetic
7775 ///
7776 /// The elements in vector `a` (eight signed 16-bit integer numbers)
7777 /// are shifted right arithmetic by `imm4` bits.
7778 /// The result is written to vector (eight signed 16-bit integer numbers).
7779 ///
7780 #[inline]
7781 #[target_feature(enable = "msa")]
7782 #[cfg_attr(test, assert_instr(srai.h, imm4 = 0b1111))]
7783 #[rustc_legacy_const_generics(1)]
__msa_srai_h<const IMM4: i32>(a: v8i16) -> v8i167784 pub unsafe fn __msa_srai_h<const IMM4: i32>(a: v8i16) -> v8i16 {
7785     static_assert_imm4!(IMM4);
7786     msa_srai_h(a, IMM4)
7787 }
7788 
7789 /// Immediate Shift Right Arithmetic
7790 ///
7791 /// The elements in vector `a` (four signed 32-bit integer numbers)
7792 /// are shifted right arithmetic by `imm5` bits.
7793 /// The result is written to vector (four signed 32-bit integer numbers).
7794 ///
7795 #[inline]
7796 #[target_feature(enable = "msa")]
7797 #[cfg_attr(test, assert_instr(srai.w, imm5 = 0b11111))]
7798 #[rustc_legacy_const_generics(1)]
__msa_srai_w<const IMM5: i32>(a: v4i32) -> v4i327799 pub unsafe fn __msa_srai_w<const IMM5: i32>(a: v4i32) -> v4i32 {
7800     static_assert_imm5!(IMM5);
7801     msa_srai_w(a, IMM5)
7802 }
7803 
7804 /// Immediate Shift Right Arithmetic
7805 ///
7806 /// The elements in vector `a` (two signed 64-bit integer numbers)
7807 /// are shifted right arithmetic by `imm6` bits.
7808 /// The result is written to vector (two signed 64-bit integer numbers).
7809 ///
7810 #[inline]
7811 #[target_feature(enable = "msa")]
7812 #[cfg_attr(test, assert_instr(srai.d, imm6 = 0b111111))]
7813 #[rustc_legacy_const_generics(1)]
__msa_srai_d<const IMM6: i32>(a: v2i64) -> v2i647814 pub unsafe fn __msa_srai_d<const IMM6: i32>(a: v2i64) -> v2i64 {
7815     static_assert_imm6!(IMM6);
7816     msa_srai_d(a, IMM6)
7817 }
7818 
7819 /// Vector Shift Right Arithmetic Rounded
7820 ///
7821 /// The elements in vector `a` (sixteen signed 8-bit integer numbers)
7822 /// are shifted right arithmetic by the number of bits the elements in vector `b`
7823 /// (sixteen signed 8-bit integer numbers) specify modulo the size of the
7824 /// element in bits.The most significant discarded bit is added to the shifted
7825 /// value (for rounding) and the result is written to vector (sixteen signed 8-bit integer numbers).
7826 ///
7827 #[inline]
7828 #[target_feature(enable = "msa")]
7829 #[cfg_attr(test, assert_instr(srar.b))]
__msa_srar_b(a: v16i8, b: v16i8) -> v16i87830 pub unsafe fn __msa_srar_b(a: v16i8, b: v16i8) -> v16i8 {
7831     msa_srar_b(a, mem::transmute(b))
7832 }
7833 
7834 /// Vector Shift Right Arithmetic Rounded
7835 ///
7836 /// The elements in vector `a` (eight signed 16-bit integer numbers)
7837 /// are shifted right arithmetic by the number of bits the elements in vector `b`
7838 /// (eight signed 16-bit integer numbers) specify modulo the size of the
7839 /// element in bits.The most significant discarded bit is added to the shifted
7840 /// value (for rounding) and the result is written to vector (eight signed 16-bit integer numbers).
7841 ///
7842 #[inline]
7843 #[target_feature(enable = "msa")]
7844 #[cfg_attr(test, assert_instr(srar.h))]
__msa_srar_h(a: v8i16, b: v8i16) -> v8i167845 pub unsafe fn __msa_srar_h(a: v8i16, b: v8i16) -> v8i16 {
7846     msa_srar_h(a, mem::transmute(b))
7847 }
7848 
7849 /// Vector Shift Right Arithmetic Rounded
7850 ///
7851 /// The elements in vector `a` (four signed 32-bit integer numbers)
7852 /// are shifted right arithmetic by the number of bits the elements in vector `b`
7853 /// (four signed 32-bit integer numbers) specify modulo the size of the
7854 /// element in bits.The most significant discarded bit is added to the shifted
7855 /// value (for rounding) and the result is written to vector (four signed 32-bit integer numbers).
7856 ///
7857 #[inline]
7858 #[target_feature(enable = "msa")]
7859 #[cfg_attr(test, assert_instr(srar.w))]
__msa_srar_w(a: v4i32, b: v4i32) -> v4i327860 pub unsafe fn __msa_srar_w(a: v4i32, b: v4i32) -> v4i32 {
7861     msa_srar_w(a, mem::transmute(b))
7862 }
7863 
7864 /// Vector Shift Right Arithmetic Rounded
7865 ///
7866 /// The elements in vector `a` (two signed 64-bit integer numbers)
7867 /// are shifted right arithmetic by the number of bits the elements in vector `b`
7868 /// (two signed 64-bit integer numbers) specify modulo the size of the
7869 /// element in bits.The most significant discarded bit is added to the shifted
7870 /// value (for rounding) and the result is written to vector (two signed 64-bit integer numbers).
7871 ///
7872 #[inline]
7873 #[target_feature(enable = "msa")]
7874 #[cfg_attr(test, assert_instr(srar.d))]
__msa_srar_d(a: v2i64, b: v2i64) -> v2i647875 pub unsafe fn __msa_srar_d(a: v2i64, b: v2i64) -> v2i64 {
7876     msa_srar_d(a, mem::transmute(b))
7877 }
7878 
7879 /// Immediate Shift Right Arithmetic Rounded
7880 ///
7881 /// The elements in vector `a` (sixteen signed 8-bit integer numbers)
7882 /// are shifted right arithmetic by `imm3` bits.The most significant
7883 /// discarded bit is added to the shifted value (for rounding) and
7884 /// the result is written to vector (sixteen signed 8-bit integer numbers).
7885 ///
7886 #[inline]
7887 #[target_feature(enable = "msa")]
7888 #[cfg_attr(test, assert_instr(srari.b, imm3 = 0b111))]
7889 #[rustc_legacy_const_generics(1)]
__msa_srari_b<const IMM3: i32>(a: v16i8) -> v16i87890 pub unsafe fn __msa_srari_b<const IMM3: i32>(a: v16i8) -> v16i8 {
7891     static_assert_imm3!(IMM3);
7892     msa_srari_b(a, IMM3)
7893 }
7894 
7895 /// Immediate Shift Right Arithmetic Rounded
7896 ///
7897 /// The elements in vector `a` (eight signed 16-bit integer numbers)
7898 /// are shifted right arithmetic by `imm4` bits.The most significant
7899 /// discarded bit is added to the shifted value (for rounding) and
7900 /// the result is written to vector (eight signed 16-bit integer numbers).
7901 ///
7902 #[inline]
7903 #[target_feature(enable = "msa")]
7904 #[cfg_attr(test, assert_instr(srari.h, imm4 = 0b1111))]
7905 #[rustc_legacy_const_generics(1)]
__msa_srari_h<const IMM4: i32>(a: v8i16) -> v8i167906 pub unsafe fn __msa_srari_h<const IMM4: i32>(a: v8i16) -> v8i16 {
7907     static_assert_imm4!(IMM4);
7908     msa_srari_h(a, IMM4)
7909 }
7910 
7911 /// Immediate Shift Right Arithmetic Rounded
7912 ///
7913 /// The elements in vector `a` (four signed 32-bit integer numbers)
7914 /// are shifted right arithmetic by `imm5` bits.The most significant
7915 /// discarded bit is added to the shifted value (for rounding) and
7916 /// the result is written to vector (four signed 32-bit integer numbers).
7917 ///
7918 #[inline]
7919 #[target_feature(enable = "msa")]
7920 #[cfg_attr(test, assert_instr(srari.w, imm5 = 0b11111))]
7921 #[rustc_legacy_const_generics(1)]
__msa_srari_w<const IMM5: i32>(a: v4i32) -> v4i327922 pub unsafe fn __msa_srari_w<const IMM5: i32>(a: v4i32) -> v4i32 {
7923     static_assert_imm5!(IMM5);
7924     msa_srari_w(a, IMM5)
7925 }
7926 
7927 /// Immediate Shift Right Arithmetic Rounded
7928 ///
7929 /// The elements in vector `a` (two signed 64-bit integer numbers)
7930 /// are shifted right arithmetic by `imm6` bits.The most significant
7931 /// discarded bit is added to the shifted value (for rounding) and
7932 /// the result is written to vector (two signed 64-bit integer numbers).
7933 ///
7934 #[inline]
7935 #[target_feature(enable = "msa")]
7936 #[cfg_attr(test, assert_instr(srari.d, imm6 = 0b111111))]
7937 #[rustc_legacy_const_generics(1)]
__msa_srari_d<const IMM6: i32>(a: v2i64) -> v2i647938 pub unsafe fn __msa_srari_d<const IMM6: i32>(a: v2i64) -> v2i64 {
7939     static_assert_imm6!(IMM6);
7940     msa_srari_d(a, IMM6)
7941 }
7942 
7943 /// Vector Shift Right Logical
7944 ///
7945 /// The elements in vector `a` (sixteen signed 8-bit integer numbers)
7946 /// are shifted right logical by the number of bits the elements in vector `b`
7947 /// (sixteen signed 8-bit integer numbers) specify modulo the size of the
7948 /// element in bits.The result is written to vector (sixteen signed 8-bit integer numbers).
7949 ///
7950 #[inline]
7951 #[target_feature(enable = "msa")]
7952 #[cfg_attr(test, assert_instr(srl.b))]
__msa_srl_b(a: v16i8, b: v16i8) -> v16i87953 pub unsafe fn __msa_srl_b(a: v16i8, b: v16i8) -> v16i8 {
7954     msa_srl_b(a, mem::transmute(b))
7955 }
7956 
7957 /// Vector Shift Right Logical
7958 ///
7959 /// The elements in vector `a` (eight signed 16-bit integer numbers)
7960 /// are shifted right logical by the number of bits the elements in vector `b`
7961 /// (eight signed 16-bit integer numbers) specify modulo the size of the
7962 /// element in bits.The result is written to vector (eight signed 16-bit integer numbers).
7963 ///
7964 #[inline]
7965 #[target_feature(enable = "msa")]
7966 #[cfg_attr(test, assert_instr(srl.h))]
__msa_srl_h(a: v8i16, b: v8i16) -> v8i167967 pub unsafe fn __msa_srl_h(a: v8i16, b: v8i16) -> v8i16 {
7968     msa_srl_h(a, mem::transmute(b))
7969 }
7970 
7971 /// Vector Shift Right Logical
7972 ///
7973 /// The elements in vector `a` (four signed 32-bit integer numbers)
7974 /// are shifted right logical by the number of bits the elements in vector `b`
7975 /// (four signed 32-bit integer numbers) specify modulo the size of the
7976 /// element in bits.The result is written to vector (four signed 32-bit integer numbers).
7977 ///
7978 #[inline]
7979 #[target_feature(enable = "msa")]
7980 #[cfg_attr(test, assert_instr(srl.w))]
__msa_srl_w(a: v4i32, b: v4i32) -> v4i327981 pub unsafe fn __msa_srl_w(a: v4i32, b: v4i32) -> v4i32 {
7982     msa_srl_w(a, mem::transmute(b))
7983 }
7984 
7985 /// Vector Shift Right Logical
7986 ///
7987 /// The elements in vector `a` (two signed 64-bit integer numbers)
7988 /// are shifted right logical by the number of bits the elements in vector `b`
7989 /// (two signed 64-bit integer numbers) specify modulo the size of the
7990 /// element in bits.The result is written to vector (two signed 64-bit integer numbers).
7991 ///
7992 #[inline]
7993 #[target_feature(enable = "msa")]
7994 #[cfg_attr(test, assert_instr(srl.d))]
__msa_srl_d(a: v2i64, b: v2i64) -> v2i647995 pub unsafe fn __msa_srl_d(a: v2i64, b: v2i64) -> v2i64 {
7996     msa_srl_d(a, mem::transmute(b))
7997 }
7998 
7999 /// Immediate Shift Right Logical
8000 ///
8001 /// The elements in vector `a` (sixteen signed 8-bit integer numbers)
8002 /// are shifted right logical by `imm4` bits.
8003 /// The result is written to vector (sixteen signed 8-bit integer numbers).
8004 ///
8005 #[inline]
8006 #[target_feature(enable = "msa")]
8007 #[cfg_attr(test, assert_instr(srli.b, imm4 = 0b1111))]
8008 #[rustc_legacy_const_generics(1)]
__msa_srli_b<const IMM4: i32>(a: v16i8) -> v16i88009 pub unsafe fn __msa_srli_b<const IMM4: i32>(a: v16i8) -> v16i8 {
8010     static_assert_imm4!(IMM4);
8011     msa_srli_b(a, IMM4)
8012 }
8013 
8014 /// Immediate Shift Right Logical
8015 ///
8016 /// The elements in vector `a` (eight signed 16-bit integer numbers)
8017 /// are shifted right logical by `imm3` bits.
8018 /// The result is written to vector (eight signed 16-bit integer numbers).
8019 ///
8020 #[inline]
8021 #[target_feature(enable = "msa")]
8022 #[cfg_attr(test, assert_instr(srli.h, imm3 = 0b111))]
8023 #[rustc_legacy_const_generics(1)]
__msa_srli_h<const IMM3: i32>(a: v8i16) -> v8i168024 pub unsafe fn __msa_srli_h<const IMM3: i32>(a: v8i16) -> v8i16 {
8025     static_assert_imm3!(IMM3);
8026     msa_srli_h(a, IMM3)
8027 }
8028 
8029 /// Immediate Shift Right Logical
8030 ///
8031 /// The elements in vector `a` (four signed 32-bit integer numbers)
8032 /// are shifted right logical by `imm2` bits.
8033 /// The result is written to vector (four signed 32-bit integer numbers).
8034 ///
8035 #[inline]
8036 #[target_feature(enable = "msa")]
8037 #[cfg_attr(test, assert_instr(srli.w, imm2 = 0b11))]
8038 #[rustc_legacy_const_generics(1)]
__msa_srli_w<const IMM2: i32>(a: v4i32) -> v4i328039 pub unsafe fn __msa_srli_w<const IMM2: i32>(a: v4i32) -> v4i32 {
8040     static_assert_imm2!(IMM2);
8041     msa_srli_w(a, IMM2)
8042 }
8043 
8044 /// Immediate Shift Right Logical
8045 ///
8046 /// The elements in vector `a` (two signed 64-bit integer numbers)
8047 /// are shifted right logical by `imm1` bits.
8048 /// The result is written to vector (two signed 64-bit integer numbers).
8049 ///
8050 #[inline]
8051 #[target_feature(enable = "msa")]
8052 #[cfg_attr(test, assert_instr(srli.d, imm1 = 0b1))]
8053 #[rustc_legacy_const_generics(1)]
__msa_srli_d<const IMM1: i32>(a: v2i64) -> v2i648054 pub unsafe fn __msa_srli_d<const IMM1: i32>(a: v2i64) -> v2i64 {
8055     static_assert_imm1!(IMM1);
8056     msa_srli_d(a, IMM1)
8057 }
8058 
8059 /// Vector Shift Right Logical Rounded
8060 ///
8061 /// The elements in vector `a` (sixteen signed 8-bit integer numbers)
8062 /// are shifted right logical by the number of bits the elements in vector `b`
8063 /// (sixteen signed 8-bit integer numbers) specify modulo the size of the
8064 /// element in bits.The most significant discarded bit is added to the shifted
8065 /// value (for rounding) and the result is written to vector (sixteen signed 8-bit integer numbers).
8066 ///
8067 #[inline]
8068 #[target_feature(enable = "msa")]
8069 #[cfg_attr(test, assert_instr(srlr.b))]
__msa_srlr_b(a: v16i8, b: v16i8) -> v16i88070 pub unsafe fn __msa_srlr_b(a: v16i8, b: v16i8) -> v16i8 {
8071     msa_srlr_b(a, mem::transmute(b))
8072 }
8073 
8074 /// Vector Shift Right Logical Rounded
8075 ///
8076 /// The elements in vector `a` (eight signed 16-bit integer numbers)
8077 /// are shifted right logical by the number of bits the elements in vector `b`
8078 /// (eight signed 16-bit integer numbers) specify modulo the size of the
8079 /// element in bits.The most significant discarded bit is added to the shifted
8080 /// value (for rounding) and the result is written to vector (eight signed 16-bit integer numbers).
8081 ///
8082 #[inline]
8083 #[target_feature(enable = "msa")]
8084 #[cfg_attr(test, assert_instr(srlr.h))]
__msa_srlr_h(a: v8i16, b: v8i16) -> v8i168085 pub unsafe fn __msa_srlr_h(a: v8i16, b: v8i16) -> v8i16 {
8086     msa_srlr_h(a, mem::transmute(b))
8087 }
8088 
8089 /// Vector Shift Right Logical Rounded
8090 ///
8091 /// The elements in vector `a` (four signed 32-bit integer numbers)
8092 /// are shifted right logical by the number of bits the elements in vector `b`
8093 /// (four signed 32-bit integer numbers) specify modulo the size of the
8094 /// element in bits.The most significant discarded bit is added to the shifted
8095 /// value (for rounding) and the result is written to vector (four signed 32-bit integer numbers).
8096 ///
8097 #[inline]
8098 #[target_feature(enable = "msa")]
8099 #[cfg_attr(test, assert_instr(srlr.w))]
__msa_srlr_w(a: v4i32, b: v4i32) -> v4i328100 pub unsafe fn __msa_srlr_w(a: v4i32, b: v4i32) -> v4i32 {
8101     msa_srlr_w(a, mem::transmute(b))
8102 }
8103 
8104 /// Vector Shift Right Logical Rounded
8105 ///
8106 /// The elements in vector `a` (two signed 64-bit integer numbers)
8107 /// are shifted right logical by the number of bits the elements in vector `b`
8108 /// (two signed 64-bit integer numbers) specify modulo the size of the
8109 /// element in bits.The most significant discarded bit is added to the shifted
8110 /// value (for rounding) and the result is written to vector (two signed 64-bit integer numbers).
8111 ///
8112 #[inline]
8113 #[target_feature(enable = "msa")]
8114 #[cfg_attr(test, assert_instr(srlr.d))]
__msa_srlr_d(a: v2i64, b: v2i64) -> v2i648115 pub unsafe fn __msa_srlr_d(a: v2i64, b: v2i64) -> v2i64 {
8116     msa_srlr_d(a, mem::transmute(b))
8117 }
8118 
8119 /// Immediate Shift Right Logical Rounded
8120 ///
8121 /// The elements in vector `a` (sixteen signed 8-bit integer numbers)
8122 /// are shifted right logical by `imm6` bits.The most significant
8123 /// discarded bit is added to the shifted value (for rounding) and
8124 /// the result is written to vector (sixteen signed 8-bit integer numbers).
8125 ///
8126 #[inline]
8127 #[target_feature(enable = "msa")]
8128 #[cfg_attr(test, assert_instr(srlri.b, imm3 = 0b111))]
8129 #[rustc_legacy_const_generics(1)]
__msa_srlri_b<const IMM3: i32>(a: v16i8) -> v16i88130 pub unsafe fn __msa_srlri_b<const IMM3: i32>(a: v16i8) -> v16i8 {
8131     static_assert_imm3!(IMM3);
8132     msa_srlri_b(a, IMM3)
8133 }
8134 
8135 /// Immediate Shift Right Logical Rounded
8136 ///
8137 /// The elements in vector `a` (eight signed 16-bit integer numbers)
8138 /// are shifted right logical by `imm6` bits.The most significant
8139 /// discarded bit is added to the shifted value (for rounding) and
8140 /// the result is written to vector (eight signed 16-bit integer numbers).
8141 ///
8142 #[inline]
8143 #[target_feature(enable = "msa")]
8144 #[cfg_attr(test, assert_instr(srlri.h, imm4 = 0b1111))]
8145 #[rustc_legacy_const_generics(1)]
__msa_srlri_h<const IMM4: i32>(a: v8i16) -> v8i168146 pub unsafe fn __msa_srlri_h<const IMM4: i32>(a: v8i16) -> v8i16 {
8147     static_assert_imm4!(IMM4);
8148     msa_srlri_h(a, IMM4)
8149 }
8150 
8151 /// Immediate Shift Right Logical Rounded
8152 ///
8153 /// The elements in vector `a` (four signed 32-bit integer numbers)
8154 /// are shifted right logical by `imm6` bits.The most significant
8155 /// discarded bit is added to the shifted value (for rounding) and
8156 /// the result is written to vector (four signed 32-bit integer numbers).
8157 ///
8158 #[inline]
8159 #[target_feature(enable = "msa")]
8160 #[cfg_attr(test, assert_instr(srlri.w, imm5 = 0b11111))]
8161 #[rustc_legacy_const_generics(1)]
__msa_srlri_w<const IMM5: i32>(a: v4i32) -> v4i328162 pub unsafe fn __msa_srlri_w<const IMM5: i32>(a: v4i32) -> v4i32 {
8163     static_assert_imm5!(IMM5);
8164     msa_srlri_w(a, IMM5)
8165 }
8166 
8167 /// Immediate Shift Right Logical Rounded
8168 ///
8169 /// The elements in vector `a` (two signed 64-bit integer numbers)
8170 /// are shifted right logical by `imm6` bits.The most significant
8171 /// discarded bit is added to the shifted value (for rounding) and
8172 /// the result is written to vector (two signed 64-bit integer numbers).
8173 ///
8174 #[inline]
8175 #[target_feature(enable = "msa")]
8176 #[cfg_attr(test, assert_instr(srlri.d, imm6 = 0b111111))]
8177 #[rustc_legacy_const_generics(1)]
__msa_srlri_d<const IMM6: i32>(a: v2i64) -> v2i648178 pub unsafe fn __msa_srlri_d<const IMM6: i32>(a: v2i64) -> v2i64 {
8179     static_assert_imm6!(IMM6);
8180     msa_srlri_d(a, IMM6)
8181 }
8182 
8183 /// Vector Store
8184 ///
8185 /// The WRLEN / 8 bytes in vector `a` (sixteen signed 8-bit integer numbers)
8186 /// are stored as elements of data format df at the effective memory location
8187 /// addressed by the base `mem_addr` and the 10-bit signed immediate offset `imm_s10`.
8188 ///
8189 #[inline]
8190 #[target_feature(enable = "msa")]
8191 #[cfg_attr(test, assert_instr(st.b, imm_s10 = 0b1111111111))]
8192 #[rustc_legacy_const_generics(2)]
__msa_st_b<const IMM_S10: i32>(a: v16i8, mem_addr: *mut u8) -> ()8193 pub unsafe fn __msa_st_b<const IMM_S10: i32>(a: v16i8, mem_addr: *mut u8) -> () {
8194     static_assert_imm_s10!(IMM_S10);
8195     msa_st_b(a, mem_addr, IMM_S10)
8196 }
8197 
8198 /// Vector Store
8199 ///
8200 /// The WRLEN / 8 bytes in vector `a` (eight signed 16-bit integer numbers)
8201 /// are stored as elements of data format df at the effective memory location
8202 /// addressed by the base `mem_addr` and the 11-bit signed immediate offset `imm_s11`.
8203 ///
8204 #[inline]
8205 #[target_feature(enable = "msa")]
8206 #[cfg_attr(test, assert_instr(st.h, imm_s11 = 0b11111111111))]
8207 #[rustc_legacy_const_generics(2)]
__msa_st_h<const IMM_S11: i32>(a: v8i16, mem_addr: *mut u8) -> ()8208 pub unsafe fn __msa_st_h<const IMM_S11: i32>(a: v8i16, mem_addr: *mut u8) -> () {
8209     static_assert_imm_s11!(IMM_S11);
8210     static_assert!(IMM_S11: i32 where IMM_S11 % 2 == 0);
8211     msa_st_h(a, mem_addr, IMM_S11)
8212 }
8213 
8214 /// Vector Store
8215 ///
8216 /// The WRLEN / 8 bytes in vector `a` (four signed 32-bit integer numbers)
8217 /// are stored as elements of data format df at the effective memory location
8218 /// addressed by the base `mem_addr` and the 12-bit signed immediate offset `imm_s12`.
8219 ///
8220 #[inline]
8221 #[target_feature(enable = "msa")]
8222 #[cfg_attr(test, assert_instr(st.w, imm_s12 = 0b111111111111))]
8223 #[rustc_legacy_const_generics(2)]
__msa_st_w<const IMM_S12: i32>(a: v4i32, mem_addr: *mut u8) -> ()8224 pub unsafe fn __msa_st_w<const IMM_S12: i32>(a: v4i32, mem_addr: *mut u8) -> () {
8225     static_assert_imm_s12!(IMM_S12);
8226     static_assert!(IMM_S12: i32 where IMM_S12 % 4 == 0);
8227     msa_st_w(a, mem_addr, IMM_S12)
8228 }
8229 
8230 /// Vector Store
8231 ///
8232 /// The WRLEN / 8 bytes in vector `a` (two signed 64-bit integer numbers)
8233 /// are stored as elements of data format df at the effective memory location
8234 /// addressed by the base `mem_addr` and the 13-bit signed immediate offset `imm_s13`.
8235 ///
8236 #[inline]
8237 #[target_feature(enable = "msa")]
8238 #[cfg_attr(test, assert_instr(st.d, imm_s13 = 0b1111111111111))]
8239 #[rustc_legacy_const_generics(2)]
__msa_st_d<const IMM_S13: i32>(a: v2i64, mem_addr: *mut u8) -> ()8240 pub unsafe fn __msa_st_d<const IMM_S13: i32>(a: v2i64, mem_addr: *mut u8) -> () {
8241     static_assert_imm_s13!(IMM_S13);
8242     static_assert!(IMM_S13: i32 where IMM_S13 % 8 == 0);
8243     msa_st_d(a, mem_addr, IMM_S13)
8244 }
8245 
8246 /// Vector Signed Saturated Subtract of Signed Values
8247 ///
8248 /// The elements in vector `b` (sixteen signed 8-bit integer numbers)
8249 /// are subtracted from the elements in vector `a` (sixteen signed 8-bit integer numbers).
8250 /// Signed arithmetic is performed and overflows clamp to the largest and/or smallest
8251 /// representable signed values before writing the result to vector (sixteen signed 8-bit integer numbers).
8252 ///
8253 #[inline]
8254 #[target_feature(enable = "msa")]
8255 #[cfg_attr(test, assert_instr(subs_s.b))]
__msa_subs_s_b(a: v16i8, b: v16i8) -> v16i88256 pub unsafe fn __msa_subs_s_b(a: v16i8, b: v16i8) -> v16i8 {
8257     msa_subs_s_b(a, mem::transmute(b))
8258 }
8259 
8260 /// Vector Signed Saturated Subtract of Signed Values
8261 ///
8262 /// The elements in vector `b` (eight signed 16-bit integer numbers)
8263 /// are subtracted from the elements in vector `a` (eight signed 16-bit integer numbers).
8264 /// Signed arithmetic is performed and overflows clamp to the largest and/or smallest
8265 /// representable signed values before writing the result to vector (eight signed 16-bit integer numbers).
8266 ///
8267 #[inline]
8268 #[target_feature(enable = "msa")]
8269 #[cfg_attr(test, assert_instr(subs_s.h))]
__msa_subs_s_h(a: v8i16, b: v8i16) -> v8i168270 pub unsafe fn __msa_subs_s_h(a: v8i16, b: v8i16) -> v8i16 {
8271     msa_subs_s_h(a, mem::transmute(b))
8272 }
8273 
8274 /// Vector Signed Saturated Subtract of Signed Values
8275 ///
8276 /// The elements in vector `b` (four signed 32-bit integer numbers)
8277 /// are subtracted from the elements in vector `a` (four signed 32-bit integer numbers).
8278 /// Signed arithmetic is performed and overflows clamp to the largest and/or smallest
8279 /// representable signed values before writing the result to vector (four signed 32-bit integer numbers).
8280 ///
8281 #[inline]
8282 #[target_feature(enable = "msa")]
8283 #[cfg_attr(test, assert_instr(subs_s.w))]
__msa_subs_s_w(a: v4i32, b: v4i32) -> v4i328284 pub unsafe fn __msa_subs_s_w(a: v4i32, b: v4i32) -> v4i32 {
8285     msa_subs_s_w(a, mem::transmute(b))
8286 }
8287 
8288 /// Vector Signed Saturated Subtract of Signed Values
8289 ///
8290 /// The elements in vector `b` (two signed 64-bit integer numbers)
8291 /// are subtracted from the elements in vector `a` (two signed 64-bit integer numbers).
8292 /// Signed arithmetic is performed and overflows clamp to the largest and/or smallest
8293 /// representable signed values before writing the result to vector (two signed 64-bit integer numbers).
8294 ///
8295 #[inline]
8296 #[target_feature(enable = "msa")]
8297 #[cfg_attr(test, assert_instr(subs_s.d))]
__msa_subs_s_d(a: v2i64, b: v2i64) -> v2i648298 pub unsafe fn __msa_subs_s_d(a: v2i64, b: v2i64) -> v2i64 {
8299     msa_subs_s_d(a, mem::transmute(b))
8300 }
8301 
8302 /// Vector Unsigned Saturated Subtract of Unsigned Values
8303 ///
8304 /// The elements in vector `b` (sixteen unsigned 8-bit integer numbers)
8305 /// are subtracted from the elements in vector `a` (sixteen unsigned 8-bit integer numbers).
8306 /// Unsigned arithmetic is performed and under-flows clamp to 0 before writing
8307 /// the result to vector (sixteen unsigned 8-bit integer numbers).
8308 ///
8309 #[inline]
8310 #[target_feature(enable = "msa")]
8311 #[cfg_attr(test, assert_instr(subs_u.b))]
__msa_subs_u_b(a: v16u8, b: v16u8) -> v16u88312 pub unsafe fn __msa_subs_u_b(a: v16u8, b: v16u8) -> v16u8 {
8313     msa_subs_u_b(a, mem::transmute(b))
8314 }
8315 
8316 /// Vector Unsigned Saturated Subtract of Unsigned Values
8317 ///
8318 /// The elements in vector `b` (eight unsigned 16-bit integer numbers)
8319 /// are subtracted from the elements in vector `a` (eight unsigned 16-bit integer numbers).
8320 /// Unsigned arithmetic is performed and under-flows clamp to 0 before writing
8321 /// the result to vector (eight unsigned 16-bit integer numbers).
8322 ///
8323 #[inline]
8324 #[target_feature(enable = "msa")]
8325 #[cfg_attr(test, assert_instr(subs_u.h))]
__msa_subs_u_h(a: v8u16, b: v8u16) -> v8u168326 pub unsafe fn __msa_subs_u_h(a: v8u16, b: v8u16) -> v8u16 {
8327     msa_subs_u_h(a, mem::transmute(b))
8328 }
8329 
8330 /// Vector Unsigned Saturated Subtract of Unsigned Values
8331 ///
8332 /// The elements in vector `b` (four unsigned 32-bit integer numbers)
8333 /// are subtracted from the elements in vector `a` (four unsigned 32-bit integer numbers).
8334 /// Unsigned arithmetic is performed and under-flows clamp to 0 before writing
8335 /// the result to vector (four unsigned 32-bit integer numbers).
8336 ///
8337 #[inline]
8338 #[target_feature(enable = "msa")]
8339 #[cfg_attr(test, assert_instr(subs_u.w))]
__msa_subs_u_w(a: v4u32, b: v4u32) -> v4u328340 pub unsafe fn __msa_subs_u_w(a: v4u32, b: v4u32) -> v4u32 {
8341     msa_subs_u_w(a, mem::transmute(b))
8342 }
8343 
8344 /// Vector Unsigned Saturated Subtract of Unsigned Values
8345 ///
8346 /// The elements in vector `b` (two unsigned 64-bit integer numbers)
8347 /// are subtracted from the elements in vector `a` (two unsigned 64-bit integer numbers).
8348 /// Unsigned arithmetic is performed and under-flows clamp to 0 before writing
8349 /// the result to vector (two unsigned 64-bit integer numbers).
8350 ///
8351 #[inline]
8352 #[target_feature(enable = "msa")]
8353 #[cfg_attr(test, assert_instr(subs_u.d))]
__msa_subs_u_d(a: v2u64, b: v2u64) -> v2u648354 pub unsafe fn __msa_subs_u_d(a: v2u64, b: v2u64) -> v2u64 {
8355     msa_subs_u_d(a, mem::transmute(b))
8356 }
8357 
8358 /// Vector Unsigned Saturated Subtract of Signed from Unsigned
8359 ///
8360 /// The signed elements in vector `b` (sixteen signed 8-bit integer numbers)
8361 /// are subtracted from the unsigned elements in vector `a` (sixteen unsigned 8-bit integer numbers).
8362 /// The signed result is unsigned saturated and written to
8363 /// to vector (sixteen unsigned 8-bit integer numbers).
8364 ///
8365 #[inline]
8366 #[target_feature(enable = "msa")]
8367 #[cfg_attr(test, assert_instr(subsus_u.b))]
__msa_subsus_u_b(a: v16u8, b: v16i8) -> v16u88368 pub unsafe fn __msa_subsus_u_b(a: v16u8, b: v16i8) -> v16u8 {
8369     msa_subsus_u_b(a, mem::transmute(b))
8370 }
8371 
8372 /// Vector Unsigned Saturated Subtract of Signed from Unsigned
8373 ///
8374 /// The signed elements in vector `b` (eight signed 16-bit integer numbers)
8375 /// are subtracted from the unsigned elements in vector `a` (eight unsigned 16-bit integer numbers).
8376 /// The signed result is unsigned saturated and written to
8377 /// to vector (eight unsigned 16-bit integer numbers).
8378 ///
8379 #[inline]
8380 #[target_feature(enable = "msa")]
8381 #[cfg_attr(test, assert_instr(subsus_u.h))]
__msa_subsus_u_h(a: v8u16, b: v8i16) -> v8u168382 pub unsafe fn __msa_subsus_u_h(a: v8u16, b: v8i16) -> v8u16 {
8383     msa_subsus_u_h(a, mem::transmute(b))
8384 }
8385 
8386 /// Vector Unsigned Saturated Subtract of Signed from Unsigned
8387 ///
8388 /// The signed elements in vector `b` (four signed 6432it integer numbers)
8389 /// are subtracted from the unsigned elements in vector `a` (four unsigned 32-bit integer numbers).
8390 /// The signed result is unsigned saturated and written to
8391 /// to vector (four unsigned 32-bit integer numbers).
8392 ///
8393 #[inline]
8394 #[target_feature(enable = "msa")]
8395 #[cfg_attr(test, assert_instr(subsus_u.w))]
__msa_subsus_u_w(a: v4u32, b: v4i32) -> v4u328396 pub unsafe fn __msa_subsus_u_w(a: v4u32, b: v4i32) -> v4u32 {
8397     msa_subsus_u_w(a, mem::transmute(b))
8398 }
8399 
8400 /// Vector Unsigned Saturated Subtract of Signed from Unsigned
8401 ///
8402 /// The signed elements in vector `b` (two signed 64-bit integer numbers)
8403 /// are subtracted from the unsigned elements in vector `a` (two unsigned 64-bit integer numbers).
8404 /// The signed result is unsigned saturated and written to
8405 /// to vector (two unsigned 64-bit integer numbers).
8406 ///
8407 #[inline]
8408 #[target_feature(enable = "msa")]
8409 #[cfg_attr(test, assert_instr(subsus_u.d))]
__msa_subsus_u_d(a: v2u64, b: v2i64) -> v2u648410 pub unsafe fn __msa_subsus_u_d(a: v2u64, b: v2i64) -> v2u64 {
8411     msa_subsus_u_d(a, mem::transmute(b))
8412 }
8413 
8414 /// Vector Signed Saturated Subtract of Unsigned Values
8415 ///
8416 /// The unsigned elements in vector `b` (sixteen unsigned 8-bit integer numbers)
8417 /// are subtracted from the unsigned elements in vector `a` (sixteen unsigned 8-bit integer numbers).
8418 /// The signed result is signed saturated and written to
8419 /// to vector (sixteen unsigned 8-bit integer numbers).
8420 ///
8421 #[inline]
8422 #[target_feature(enable = "msa")]
8423 #[cfg_attr(test, assert_instr(subsuu_s.b))]
__msa_subsuu_s_b(a: v16u8, b: v16u8) -> v16i88424 pub unsafe fn __msa_subsuu_s_b(a: v16u8, b: v16u8) -> v16i8 {
8425     msa_subsuu_s_b(a, mem::transmute(b))
8426 }
8427 
8428 /// Vector Signed Saturated Subtract of Unsigned Values
8429 ///
8430 /// The unsigned elements in vector `b` (eight unsigned 16-bit integer numbers)
8431 /// are subtracted from the unsigned elements in vector `a` (eight unsigned 16-bit integer numbers).
8432 /// The signed result is signed saturated and written to
8433 /// to vector (eight unsigned 16-bit integer numbers).
8434 ///
8435 #[inline]
8436 #[target_feature(enable = "msa")]
8437 #[cfg_attr(test, assert_instr(subsuu_s.h))]
__msa_subsuu_s_h(a: v8u16, b: v8u16) -> v8i168438 pub unsafe fn __msa_subsuu_s_h(a: v8u16, b: v8u16) -> v8i16 {
8439     msa_subsuu_s_h(a, mem::transmute(b))
8440 }
8441 
8442 /// Vector Signed Saturated Subtract of Unsigned Values
8443 ///
8444 /// The unsigned elements in vector `b` (four unsigned 32-bit integer numbers)
8445 /// are subtracted from the unsigned elements in vector `a` (four unsigned 32-bit integer numbers).
8446 /// The signed result is signed saturated and written to
8447 /// to vector (four unsigned 32-bit integer numbers).
8448 ///
8449 #[inline]
8450 #[target_feature(enable = "msa")]
8451 #[cfg_attr(test, assert_instr(subsuu_s.w))]
__msa_subsuu_s_w(a: v4u32, b: v4u32) -> v4i328452 pub unsafe fn __msa_subsuu_s_w(a: v4u32, b: v4u32) -> v4i32 {
8453     msa_subsuu_s_w(a, mem::transmute(b))
8454 }
8455 
8456 /// Vector Signed Saturated Subtract of Unsigned Values
8457 ///
8458 /// The unsigned elements in vector `b` (two unsigned 64-bit integer numbers)
8459 /// are subtracted from the unsigned elements in vector `a` (two unsigned 64-bit integer numbers).
8460 /// The signed result is signed saturated and written to
8461 /// to vector (two unsigned 64-bit integer numbers).
8462 ///
8463 #[inline]
8464 #[target_feature(enable = "msa")]
8465 #[cfg_attr(test, assert_instr(subsuu_s.d))]
__msa_subsuu_s_d(a: v2u64, b: v2u64) -> v2i648466 pub unsafe fn __msa_subsuu_s_d(a: v2u64, b: v2u64) -> v2i64 {
8467     msa_subsuu_s_d(a, mem::transmute(b))
8468 }
8469 
8470 /// Vector Subtract
8471 ///
8472 /// The elements in vector `b` (sixteen signed 8-bit integer numbers)
8473 /// are subtracted from the elements in vector `a` (sixteen signed 8-bit integer numbers).
8474 /// The result is written to vector (sixteen signed 8-bit integer numbers).
8475 ///
8476 #[inline]
8477 #[target_feature(enable = "msa")]
8478 #[cfg_attr(test, assert_instr(subv.b))]
__msa_subv_b(a: v16i8, b: v16i8) -> v16i88479 pub unsafe fn __msa_subv_b(a: v16i8, b: v16i8) -> v16i8 {
8480     msa_subv_b(a, mem::transmute(b))
8481 }
8482 
8483 /// Vector Subtract
8484 ///
8485 /// The elements in vector `b` (eight signed 16-bit integer numbers)
8486 /// are subtracted from the elements in vector `a` (eight signed 16-bit integer numbers).
8487 /// The result is written to vector (eight signed 16-bit integer numbers).
8488 ///
8489 #[inline]
8490 #[target_feature(enable = "msa")]
8491 #[cfg_attr(test, assert_instr(subv.h))]
__msa_subv_h(a: v8i16, b: v8i16) -> v8i168492 pub unsafe fn __msa_subv_h(a: v8i16, b: v8i16) -> v8i16 {
8493     msa_subv_h(a, mem::transmute(b))
8494 }
8495 
8496 /// Vector Subtract
8497 ///
8498 /// The elements in vector `b` (four signed 32-bit integer numbers)
8499 /// are subtracted from the elements in vector `a` (four signed 32-bit integer numbers).
8500 /// The result is written to vector (four signed 32-bit integer numbers).
8501 ///
8502 #[inline]
8503 #[target_feature(enable = "msa")]
8504 #[cfg_attr(test, assert_instr(subv.w))]
__msa_subv_w(a: v4i32, b: v4i32) -> v4i328505 pub unsafe fn __msa_subv_w(a: v4i32, b: v4i32) -> v4i32 {
8506     msa_subv_w(a, mem::transmute(b))
8507 }
8508 
8509 /// Vector Subtract
8510 ///
8511 /// The elements in vector `b` (two signed 64-bit integer numbers)
8512 /// are subtracted from the elements in vector `a` (two signed 64-bit integer numbers).
8513 /// The result is written to vector (two signed 64-bit integer numbers).
8514 ///
8515 #[inline]
8516 #[target_feature(enable = "msa")]
8517 #[cfg_attr(test, assert_instr(subv.d))]
__msa_subv_d(a: v2i64, b: v2i64) -> v2i648518 pub unsafe fn __msa_subv_d(a: v2i64, b: v2i64) -> v2i64 {
8519     msa_subv_d(a, mem::transmute(b))
8520 }
8521 
8522 /// Immediate Subtract
8523 ///
8524 /// The 5-bit immediate unsigned value `imm5`
8525 /// are subtracted from the elements in vector `a` (sixteen signed 8-bit integer numbers).
8526 /// The result is written to vector (sixteen signed 8-bit integer numbers).
8527 ///
8528 #[inline]
8529 #[target_feature(enable = "msa")]
8530 #[cfg_attr(test, assert_instr(subvi.b, imm5 = 0b10111))]
8531 #[rustc_legacy_const_generics(1)]
__msa_subvi_b<const IMM5: i32>(a: v16i8) -> v16i88532 pub unsafe fn __msa_subvi_b<const IMM5: i32>(a: v16i8) -> v16i8 {
8533     static_assert_imm5!(IMM5);
8534     msa_subvi_b(a, IMM5)
8535 }
8536 
8537 /// Immediate Subtract
8538 ///
8539 /// The 5-bit immediate unsigned value `imm5`
8540 /// are subtracted from the elements in vector `a` (eight signed 16-bit integer numbers).
8541 /// The result is written to vector (eight signed 16-bit integer numbers).
8542 ///
8543 #[inline]
8544 #[target_feature(enable = "msa")]
8545 #[cfg_attr(test, assert_instr(subvi.h, imm5 = 0b10111))]
8546 #[rustc_legacy_const_generics(1)]
__msa_subvi_h<const IMM5: i32>(a: v8i16) -> v8i168547 pub unsafe fn __msa_subvi_h<const IMM5: i32>(a: v8i16) -> v8i16 {
8548     static_assert_imm5!(IMM5);
8549     msa_subvi_h(a, IMM5)
8550 }
8551 
8552 /// Immediate Subtract
8553 ///
8554 /// The 5-bit immediate unsigned value `imm5`
8555 /// are subtracted from the elements in vector `a` (four signed 32-bit integer numbers).
8556 /// The result is written to vector (four signed 32-bit integer numbers).
8557 ///
8558 #[inline]
8559 #[target_feature(enable = "msa")]
8560 #[cfg_attr(test, assert_instr(subvi.w, imm5 = 0b10111))]
8561 #[rustc_legacy_const_generics(1)]
__msa_subvi_w<const IMM5: i32>(a: v4i32) -> v4i328562 pub unsafe fn __msa_subvi_w<const IMM5: i32>(a: v4i32) -> v4i32 {
8563     static_assert_imm5!(IMM5);
8564     msa_subvi_w(a, IMM5)
8565 }
8566 
8567 /// Immediate Subtract
8568 ///
8569 /// The 5-bit immediate unsigned value `imm5`
8570 /// are subtracted from the elements in vector `a` (two signed 64-bit integer numbers).
8571 /// The result is written to vector (two signed 64-bit integer numbers).
8572 ///
8573 #[inline]
8574 #[target_feature(enable = "msa")]
8575 #[cfg_attr(test, assert_instr(subvi.d, imm5 = 0b10111))]
8576 #[rustc_legacy_const_generics(1)]
__msa_subvi_d<const IMM5: i32>(a: v2i64) -> v2i648577 pub unsafe fn __msa_subvi_d<const IMM5: i32>(a: v2i64) -> v2i64 {
8578     static_assert_imm5!(IMM5);
8579     msa_subvi_d(a, IMM5)
8580 }
8581 
8582 /// Vector Data Preserving Shuffle
8583 ///
8584 /// The vector shuffle instructions selectively copy data elements from the
8585 /// concatenation of vectors `b` (sixteen signed 8-bit integer numbers)
8586 /// and `c` (sixteen signed 8-bit integer numbers) in to vector `a`
8587 /// (sixteen signed 8-bit integer numbers) based on the corresponding control element in `a`.
8588 /// The least significant 6 bits in `a` control elements modulo the number of elements in
8589 /// the concatenated vectors `b`, `a` specify the index of the source element.
8590 /// If bit 6 or bit 7 is 1, there will be no copy, but rather the destination element is set to 0.
8591 ///
8592 #[inline]
8593 #[target_feature(enable = "msa")]
8594 #[cfg_attr(test, assert_instr(vshf.b))]
__msa_vshf_b(a: v16i8, b: v16i8, c: v16i8) -> v16i88595 pub unsafe fn __msa_vshf_b(a: v16i8, b: v16i8, c: v16i8) -> v16i8 {
8596     msa_vshf_b(a, mem::transmute(b), c)
8597 }
8598 
8599 /// Vector Data Preserving Shuffle
8600 ///
8601 /// The vector shuffle instructions selectively copy data elements from the
8602 /// concatenation of vectors `b` (eight signed 16-bit integer numbers)
8603 /// and `c` (eight signed 16-bit integer numbers) in to vector `a`
8604 /// (eight signed 16-bit integer numbers) based on the corresponding control element in `a`.
8605 /// The least significant 6 bits in `a` control elements modulo the number of elements in
8606 /// the concatenated vectors `b`, `a` specify the index of the source element.
8607 /// If bit 6 or bit 7 is 1, there will be no copy, but rather the destination element is set to 0.
8608 ///
8609 #[inline]
8610 #[target_feature(enable = "msa")]
8611 #[cfg_attr(test, assert_instr(vshf.h))]
__msa_vshf_h(a: v8i16, b: v8i16, c: v8i16) -> v8i168612 pub unsafe fn __msa_vshf_h(a: v8i16, b: v8i16, c: v8i16) -> v8i16 {
8613     msa_vshf_h(a, mem::transmute(b), c)
8614 }
8615 
8616 /// Vector Data Preserving Shuffle
8617 ///
8618 /// The vector shuffle instructions selectively copy data elements from the
8619 /// concatenation of vectors `b` (four signed 32-bit integer numbers)
8620 /// and `c` (four signed 32-bit integer numbers) in to vector `a`
8621 /// (four signed 32-bit integer numbers) based on the corresponding control element in `a`.
8622 /// The least significant 6 bits in `a` control elements modulo the number of elements in
8623 /// the concatenated vectors `b`, `a` specify the index of the source element.
8624 /// If bit 6 or bit 7 is 1, there will be no copy, but rather the destination element is set to 0.
8625 ///
8626 #[inline]
8627 #[target_feature(enable = "msa")]
8628 #[cfg_attr(test, assert_instr(vshf.w))]
__msa_vshf_w(a: v4i32, b: v4i32, c: v4i32) -> v4i328629 pub unsafe fn __msa_vshf_w(a: v4i32, b: v4i32, c: v4i32) -> v4i32 {
8630     msa_vshf_w(a, mem::transmute(b), c)
8631 }
8632 
8633 /// Vector Data Preserving Shuffle
8634 ///
8635 /// The vector shuffle instructions selectively copy data elements from the
8636 /// concatenation of vectors `b` (two signed 64-bit integer numbers)
8637 /// and `c` (two signed 64-bit integer numbers) in to vector `a`
8638 /// (two signed 64-bit integer numbers) based on the corresponding control element in `a`.
8639 /// The least significant 6 bits in `a` control elements modulo the number of elements in
8640 /// the concatenated vectors `b`, `a` specify the index of the source element.
8641 /// If bit 6 or bit 7 is 1, there will be no copy, but rather the destination element is set to 0.
8642 ///
8643 #[inline]
8644 #[target_feature(enable = "msa")]
8645 #[cfg_attr(test, assert_instr(vshf.d))]
__msa_vshf_d(a: v2i64, b: v2i64, c: v2i64) -> v2i648646 pub unsafe fn __msa_vshf_d(a: v2i64, b: v2i64, c: v2i64) -> v2i64 {
8647     msa_vshf_d(a, mem::transmute(b), c)
8648 }
8649 
8650 /// Vector Logical Exclusive Or
8651 ///
8652 /// Each bit of vector `a` (sixteen unsigned 8-bit integer numbers)
8653 /// is combined with the corresponding bit of vector `b` (sixteen unsigned 8-bit integer numbers)
8654 /// in a bitwise logical XOR operation. The result is written to vector
8655 /// (sixteen unsigned 8-bit integer numbers).
8656 ///
8657 #[inline]
8658 #[target_feature(enable = "msa")]
8659 #[cfg_attr(test, assert_instr(xor.v))]
__msa_xor_v(a: v16u8, b: v16u8) -> v16u88660 pub unsafe fn __msa_xor_v(a: v16u8, b: v16u8) -> v16u8 {
8661     msa_xor_v(a, mem::transmute(b))
8662 }
8663 
8664 /// Immediate Logical Exclusive Or
8665 ///
8666 /// Each byte of vector `a` (sixteen unsigned 8-bit integer numbers)
8667 /// is combined with the 8-bit immediate `imm8`
8668 /// in a bitwise logical XOR operation. The result is written to vector
8669 /// (sixteen unsigned 8-bit integer numbers).
8670 ///
8671 #[inline]
8672 #[target_feature(enable = "msa")]
8673 #[cfg_attr(test, assert_instr(xori.b, imm8 = 0b11111111))]
8674 #[rustc_legacy_const_generics(1)]
__msa_xori_b<const IMM8: i32>(a: v16u8) -> v16u88675 pub unsafe fn __msa_xori_b<const IMM8: i32>(a: v16u8) -> v16u8 {
8676     static_assert_imm8!(IMM8);
8677     msa_xori_b(a, IMM8)
8678 }
8679 
8680 #[cfg(test)]
8681 mod tests {
8682     use crate::{
8683         core_arch::{mips::msa::*, simd::*},
8684         mem,
8685     };
8686     use std::{f32, f64};
8687     use stdarch_test::simd_test;
8688 
8689     #[simd_test(enable = "msa")]
test_msa_add_a_b()8690     unsafe fn test_msa_add_a_b() {
8691         #[rustfmt::skip]
8692         let a = i8x16::new(
8693             1, 2, 3, 4,
8694             1, 2, 3, 4,
8695             1, 2, 3, 4,
8696             1, 2, 3, 4
8697         );
8698         #[rustfmt::skip]
8699         let b = i8x16::new(
8700             -4, -3, -2, -1,
8701             -4, -3, -2, -1,
8702             -4, -3, -2, -1,
8703             -4, -3, -2, -1
8704         );
8705         #[rustfmt::skip]
8706         let r = i8x16::new(
8707             5, 5, 5, 5,
8708             5, 5, 5, 5,
8709             5, 5, 5, 5,
8710             5, 5, 5, 5
8711         );
8712 
8713         assert_eq!(
8714             r,
8715             mem::transmute(__msa_add_a_b(mem::transmute(a), mem::transmute(b)))
8716         );
8717     }
8718 
8719     #[simd_test(enable = "msa")]
test_msa_add_a_h()8720     unsafe fn test_msa_add_a_h() {
8721         #[rustfmt::skip]
8722         let a = i16x8::new(1, 2, 3, 4, 1, 2, 3, 4);
8723         #[rustfmt::skip]
8724         let b = i16x8::new(-4, -3, -2, -1, -4, -3, -2, -1);
8725         #[rustfmt::skip]
8726         let r = i16x8::new(5, 5, 5, 5, 5, 5, 5, 5);
8727 
8728         assert_eq!(
8729             r,
8730             mem::transmute(__msa_add_a_h(mem::transmute(a), mem::transmute(b)))
8731         );
8732     }
8733 
8734     #[simd_test(enable = "msa")]
test_msa_add_a_w()8735     unsafe fn test_msa_add_a_w() {
8736         #[rustfmt::skip]
8737         let a = i32x4::new(1, 2, 3, 4);
8738         #[rustfmt::skip]
8739         let b = i32x4::new(-4, -3, -2, -1);
8740         #[rustfmt::skip]
8741         let r = i32x4::new(5, 5, 5, 5);
8742 
8743         assert_eq!(
8744             r,
8745             mem::transmute(__msa_add_a_w(mem::transmute(a), mem::transmute(b)))
8746         );
8747     }
8748 
8749     #[simd_test(enable = "msa")]
test_msa_add_a_d()8750     unsafe fn test_msa_add_a_d() {
8751         #[rustfmt::skip]
8752         let a = i64x2::new(1, 2);
8753         #[rustfmt::skip]
8754         let b = i64x2::new(-4, -3);
8755         #[rustfmt::skip]
8756         let r = i64x2::new(5, 5);
8757 
8758         assert_eq!(
8759             r,
8760             mem::transmute(__msa_add_a_d(mem::transmute(a), mem::transmute(b)))
8761         );
8762     }
8763 
8764     #[simd_test(enable = "msa")]
test_msa_adds_a_b()8765     unsafe fn test_msa_adds_a_b() {
8766         #[rustfmt::skip]
8767         let a = i8x16::new(
8768             100, i8::MAX, 100, i8::MAX,
8769             100, i8::MAX, 100, i8::MAX,
8770             100, i8::MAX, 100, i8::MAX,
8771             100, i8::MAX, 100, i8::MAX
8772         );
8773         #[rustfmt::skip]
8774         let b = i8x16::new(
8775             -4, -3, -2, -100,
8776             -4, -3, -2, -100,
8777             -4, -3, -2, -100,
8778             -4, -3, -2, -100
8779         );
8780         #[rustfmt::skip]
8781         let r = i8x16::new(
8782             104, 127, 102, 127,
8783             104, 127, 102, 127,
8784             104, 127, 102, 127,
8785             104, 127, 102, 127
8786         );
8787 
8788         assert_eq!(
8789             r,
8790             mem::transmute(__msa_adds_a_b(mem::transmute(a), mem::transmute(b)))
8791         );
8792     }
8793 
8794     #[simd_test(enable = "msa")]
test_msa_adds_a_h()8795     unsafe fn test_msa_adds_a_h() {
8796         #[rustfmt::skip]
8797         let a = i16x8::new(
8798             100, i16::MAX, 100, i16::MAX,
8799             100, i16::MAX, 100, i16::MAX
8800         );
8801         #[rustfmt::skip]
8802         let b = i16x8::new(-4, -3, -2, -1, -4, -3, -2, -1);
8803         #[rustfmt::skip]
8804         let r = i16x8::new(
8805             104, i16::MAX, 102, i16::MAX,
8806             104, i16::MAX, 102, i16::MAX
8807         );
8808 
8809         assert_eq!(
8810             r,
8811             mem::transmute(__msa_adds_a_h(mem::transmute(a), mem::transmute(b)))
8812         );
8813     }
8814 
8815     #[simd_test(enable = "msa")]
test_msa_adds_a_w()8816     unsafe fn test_msa_adds_a_w() {
8817         #[rustfmt::skip]
8818         let a = i32x4::new(100, i32::MAX, 100, i32::MAX);
8819         #[rustfmt::skip]
8820         let b = i32x4::new(-4, -3, -2, -1);
8821         #[rustfmt::skip]
8822         let r = i32x4::new(104, i32::MAX, 102, i32::MAX);
8823 
8824         assert_eq!(
8825             r,
8826             mem::transmute(__msa_adds_a_w(mem::transmute(a), mem::transmute(b)))
8827         );
8828     }
8829 
8830     #[simd_test(enable = "msa")]
test_msa_adds_a_d()8831     unsafe fn test_msa_adds_a_d() {
8832         #[rustfmt::skip]
8833         let a = i64x2::new(100, i64::MAX);
8834         #[rustfmt::skip]
8835         let b = i64x2::new(-4, -3);
8836         #[rustfmt::skip]
8837         let r = i64x2::new(104, i64::MAX);
8838 
8839         assert_eq!(
8840             r,
8841             mem::transmute(__msa_adds_a_d(mem::transmute(a), mem::transmute(b)))
8842         );
8843     }
8844 
8845     #[simd_test(enable = "msa")]
test_msa_adds_s_b()8846     unsafe fn test_msa_adds_s_b() {
8847         #[rustfmt::skip]
8848         let a = i8x16::new(
8849             100, i8::MIN, 100, i8::MAX,
8850             100, i8::MIN, 100, i8::MAX,
8851             100, i8::MIN, 100, i8::MAX,
8852             100, i8::MIN, 100, i8::MAX
8853         );
8854         #[rustfmt::skip]
8855         let b = i8x16::new(
8856             -4, -3, -2, 100,
8857             -4, -3, -2, 100,
8858             -4, -3, -2, 100,
8859             -4, -3, -2, 100
8860         );
8861         #[rustfmt::skip]
8862         let r = i8x16::new(
8863             96, i8::MIN, 98, i8::MAX,
8864             96, i8::MIN, 98, i8::MAX,
8865             96, i8::MIN, 98, i8::MAX,
8866             96, i8::MIN, 98, i8::MAX
8867         );
8868 
8869         assert_eq!(
8870             r,
8871             mem::transmute(__msa_adds_s_b(mem::transmute(a), mem::transmute(b)))
8872         );
8873     }
8874 
8875     #[simd_test(enable = "msa")]
test_msa_adds_s_h()8876     unsafe fn test_msa_adds_s_h() {
8877         #[rustfmt::skip]
8878         let a = i16x8::new(
8879             100, i16::MIN, 100, i16::MAX,
8880             100, i16::MIN, 100, i16::MAX
8881         );
8882         #[rustfmt::skip]
8883         let b = i16x8::new(-4, -3, -2, 1, -4, -3, -2, 1);
8884         #[rustfmt::skip]
8885         let r = i16x8::new(
8886             96, i16::MIN, 98, i16::MAX,
8887             96, i16::MIN, 98, i16::MAX
8888         );
8889 
8890         assert_eq!(
8891             r,
8892             mem::transmute(__msa_adds_s_h(mem::transmute(a), mem::transmute(b)))
8893         );
8894     }
8895 
8896     #[simd_test(enable = "msa")]
test_msa_adds_s_w()8897     unsafe fn test_msa_adds_s_w() {
8898         #[rustfmt::skip]
8899         let a = i32x4::new(100, i32::MAX, 100, i32::MIN);
8900         #[rustfmt::skip]
8901         let b = i32x4::new(-4, 3, -2, -1);
8902         #[rustfmt::skip]
8903         let r = i32x4::new(96, i32::MAX, 98, i32::MIN);
8904 
8905         assert_eq!(
8906             r,
8907             mem::transmute(__msa_adds_s_w(mem::transmute(a), mem::transmute(b)))
8908         );
8909     }
8910 
8911     #[simd_test(enable = "msa")]
test_msa_adds_s_d()8912     unsafe fn test_msa_adds_s_d() {
8913         #[rustfmt::skip]
8914         let a = i64x2::new(100, i64::MIN);
8915         #[rustfmt::skip]
8916         let b = i64x2::new(-4, -3);
8917         #[rustfmt::skip]
8918         let r = i64x2::new(96, i64::MIN);
8919 
8920         assert_eq!(
8921             r,
8922             mem::transmute(__msa_adds_s_d(mem::transmute(a), mem::transmute(b)))
8923         );
8924     }
8925 
8926     #[simd_test(enable = "msa")]
test_msa_adds_u_b()8927     unsafe fn test_msa_adds_u_b() {
8928         #[rustfmt::skip]
8929         let a = u8x16::new(
8930             100, u8::MAX, 100, u8::MAX,
8931             100, u8::MAX, 100, u8::MAX,
8932             100, u8::MAX, 100, u8::MAX,
8933             100, u8::MAX, 100, u8::MAX
8934         );
8935         #[rustfmt::skip]
8936         let b = u8x16::new(
8937             4, 3, 2, 100,
8938             4, 3, 2, 100,
8939             4, 3, 2, 100,
8940             4, 3, 2, 100
8941         );
8942         #[rustfmt::skip]
8943         let r = u8x16::new(
8944             104, u8::MAX, 102, u8::MAX,
8945             104, u8::MAX, 102, u8::MAX,
8946             104, u8::MAX, 102, u8::MAX,
8947             104, u8::MAX, 102, u8::MAX
8948         );
8949 
8950         assert_eq!(
8951             r,
8952             mem::transmute(__msa_adds_u_b(mem::transmute(a), mem::transmute(b)))
8953         );
8954     }
8955 
8956     #[simd_test(enable = "msa")]
test_msa_adds_u_h()8957     unsafe fn test_msa_adds_u_h() {
8958         #[rustfmt::skip]
8959         let a = u16x8::new(
8960             100, u16::MAX, 100, u16::MAX,
8961             100, u16::MAX, 100, u16::MAX
8962         );
8963         #[rustfmt::skip]
8964         let b = u16x8::new(4, 3, 2, 1, 4, 3, 2, 1);
8965         #[rustfmt::skip]
8966         let r = u16x8::new(
8967             104, u16::MAX, 102, u16::MAX,
8968             104, u16::MAX, 102, u16::MAX
8969         );
8970 
8971         assert_eq!(
8972             r,
8973             mem::transmute(__msa_adds_u_h(mem::transmute(a), mem::transmute(b)))
8974         );
8975     }
8976 
8977     #[simd_test(enable = "msa")]
test_msa_adds_u_w()8978     unsafe fn test_msa_adds_u_w() {
8979         #[rustfmt::skip]
8980         let a = u32x4::new(100, u32::MAX, 100, u32::MAX);
8981         #[rustfmt::skip]
8982         let b = u32x4::new(4, 3, 2, 1);
8983         #[rustfmt::skip]
8984         let r = u32x4::new(104, u32::MAX, 102, u32::MAX);
8985 
8986         assert_eq!(
8987             r,
8988             mem::transmute(__msa_adds_u_w(mem::transmute(a), mem::transmute(b)))
8989         );
8990     }
8991 
8992     #[simd_test(enable = "msa")]
test_msa_adds_u_d()8993     unsafe fn test_msa_adds_u_d() {
8994         #[rustfmt::skip]
8995         let a = u64x2::new(100, u64::MAX);
8996         #[rustfmt::skip]
8997         let b = u64x2::new(4, 3);
8998         #[rustfmt::skip]
8999         let r = u64x2::new(104, u64::MAX);
9000 
9001         assert_eq!(
9002             r,
9003             mem::transmute(__msa_adds_u_d(mem::transmute(a), mem::transmute(b)))
9004         );
9005     }
9006 
9007     #[simd_test(enable = "msa")]
test_msa_addv_b()9008     unsafe fn test_msa_addv_b() {
9009         #[rustfmt::skip]
9010         let a = i8x16::new(
9011             100, i8::MIN, 100, i8::MAX,
9012             100, i8::MIN, 100, i8::MAX,
9013             100, i8::MIN, 100, i8::MAX,
9014             100, i8::MIN, 100, i8::MAX
9015         );
9016         #[rustfmt::skip]
9017         let b = i8x16::new(
9018             -4, -3, -2, 100,
9019             -4, -3, -2, 100,
9020             -4, -3, -2, 100,
9021             -4, -3, -2, 100
9022         );
9023         #[rustfmt::skip]
9024         let r = i8x16::new(
9025             96, 125, 98, -29,
9026             96, 125, 98, -29,
9027             96, 125, 98, -29,
9028             96, 125, 98, -29
9029         );
9030 
9031         assert_eq!(
9032             r,
9033             mem::transmute(__msa_addv_b(mem::transmute(a), mem::transmute(b)))
9034         );
9035     }
9036 
9037     #[simd_test(enable = "msa")]
test_msa_addv_h()9038     unsafe fn test_msa_addv_h() {
9039         #[rustfmt::skip]
9040         let a = i16x8::new(
9041             100, i16::MIN, 100, i16::MAX,
9042             100, i16::MIN, 100, i16::MAX
9043         );
9044         #[rustfmt::skip]
9045         let b = i16x8::new(-4, -3, -2, 1, -4, -3, -2, 1);
9046         #[rustfmt::skip]
9047         let r = i16x8::new(96, 32765, 98, -32768, 96, 32765, 98, -32768);
9048 
9049         assert_eq!(
9050             r,
9051             mem::transmute(__msa_addv_h(mem::transmute(a), mem::transmute(b)))
9052         );
9053     }
9054 
9055     #[simd_test(enable = "msa")]
test_msa_addv_w()9056     unsafe fn test_msa_addv_w() {
9057         #[rustfmt::skip]
9058         let a = i32x4::new(100, i32::MAX, 100, i32::MIN);
9059         #[rustfmt::skip]
9060         let b = i32x4::new(-4, 3, -2, -1);
9061         #[rustfmt::skip]
9062         let r = i32x4::new(96, -2147483646, 98, 2147483647);
9063 
9064         assert_eq!(
9065             r,
9066             mem::transmute(__msa_addv_w(mem::transmute(a), mem::transmute(b)))
9067         );
9068     }
9069 
9070     #[simd_test(enable = "msa")]
test_msa_addv_d()9071     unsafe fn test_msa_addv_d() {
9072         #[rustfmt::skip]
9073         let a = i64x2::new(100, i64::MIN);
9074         #[rustfmt::skip]
9075         let b = i64x2::new(-4, -3);
9076         #[rustfmt::skip]
9077         let r = i64x2::new(96, 9223372036854775805);
9078 
9079         assert_eq!(
9080             r,
9081             mem::transmute(__msa_addv_d(mem::transmute(a), mem::transmute(b)))
9082         );
9083     }
9084 
9085     #[simd_test(enable = "msa")]
test_msa_addvi_b()9086     unsafe fn test_msa_addvi_b() {
9087         #[rustfmt::skip]
9088         let a = i8x16::new(
9089             100, i8::MAX, 100, i8::MAX,
9090             100, i8::MAX, 100, i8::MAX,
9091             100, i8::MAX, 100, i8::MAX,
9092             100, i8::MAX, 100, i8::MAX
9093         );
9094         #[rustfmt::skip]
9095         let r = i8x16::new(
9096             103, -126, 103, -126,
9097             103, -126, 103, -126,
9098             103, -126, 103, -126,
9099             103, -126, 103, -126
9100         );
9101 
9102         assert_eq!(r, mem::transmute(__msa_addvi_b(mem::transmute(a), 67)));
9103     }
9104 
9105     #[simd_test(enable = "msa")]
test_msa_addvi_h()9106     unsafe fn test_msa_addvi_h() {
9107         #[rustfmt::skip]
9108         let a = i16x8::new(
9109             i16::MAX, 3276, -100, -127,
9110             i16::MAX, 3276, -100, -127
9111         );
9112         #[rustfmt::skip]
9113         let r = i16x8::new(
9114             -32766, 3279, -97, -124,
9115             -32766, 3279, -97, -124
9116         );
9117 
9118         assert_eq!(r, mem::transmute(__msa_addvi_h(mem::transmute(a), 67)));
9119     }
9120 
9121     #[simd_test(enable = "msa")]
test_msa_addvi_w()9122     unsafe fn test_msa_addvi_w() {
9123         #[rustfmt::skip]
9124         let a = i32x4::new(100, i32::MAX, 100, i32::MIN);
9125         #[rustfmt::skip]
9126         let r = i32x4::new(103, -2147483646, 103, -2147483645);
9127 
9128         assert_eq!(r, mem::transmute(__msa_addvi_w(mem::transmute(a), 67)));
9129     }
9130 
9131     #[simd_test(enable = "msa")]
test_msa_addvi_d()9132     unsafe fn test_msa_addvi_d() {
9133         #[rustfmt::skip]
9134         let a = i64x2::new(100, i64::MIN);
9135         #[rustfmt::skip]
9136         let r = i64x2::new(117, -9223372036854775791);
9137 
9138         assert_eq!(r, mem::transmute(__msa_addvi_d(mem::transmute(a), 17)));
9139     }
9140 
9141     #[simd_test(enable = "msa")]
test_msa_and_v()9142     unsafe fn test_msa_and_v() {
9143         #[rustfmt::skip]
9144         let a = u8x16::new(
9145             100, u8::MAX, 100, u8::MAX,
9146             100, u8::MAX, 100, u8::MAX,
9147             100, u8::MAX, 100, u8::MAX,
9148             100, u8::MAX, 100, u8::MAX
9149     );
9150         #[rustfmt::skip]
9151         let b = u8x16::new(
9152             4, 3, 2, 100,
9153             4, 3, 2, 100,
9154             4, 3, 2, 100,
9155             4, 3, 2, 100
9156         );
9157         #[rustfmt::skip]
9158         let r = u8x16::new(
9159             4, 3, 0, 100,
9160             4, 3, 0, 100,
9161             4, 3, 0, 100,
9162             4, 3, 0, 100
9163         );
9164 
9165         assert_eq!(
9166             r,
9167             mem::transmute(__msa_and_v(mem::transmute(a), mem::transmute(b)))
9168         );
9169     }
9170 
9171     #[simd_test(enable = "msa")]
test_msa_andi_b()9172     unsafe fn test_msa_andi_b() {
9173         #[rustfmt::skip]
9174         let a = u8x16::new(
9175             100, u8::MAX, 100, u8::MAX,
9176             100, u8::MAX, 100, u8::MAX,
9177             100, u8::MAX, 100, u8::MAX,
9178             100, u8::MAX, 100, u8::MAX
9179         );
9180         #[rustfmt::skip]
9181         let r = u8x16::new(
9182             4, 5, 4, 5,
9183             4, 5, 4, 5,
9184             4, 5, 4, 5,
9185             4, 5, 4, 5
9186         );
9187 
9188         assert_eq!(r, mem::transmute(__msa_andi_b(mem::transmute(a), 5)));
9189     }
9190 
9191     #[simd_test(enable = "msa")]
test_msa_asub_s_b()9192     unsafe fn test_msa_asub_s_b() {
9193         #[rustfmt::skip]
9194         let a = i8x16::new(
9195             -1, -2, -3, -4,
9196             -1, -2, -3, -4,
9197             -1, -2, -3, -4,
9198             -1, -2, -3, -4
9199         );
9200         #[rustfmt::skip]
9201         let b = i8x16::new(
9202             -6, -7, -8, -9,
9203             -6, -7, -8, -9,
9204             -6, -7, -8, -9,
9205             -6, -7, -8, -9
9206         );
9207         #[rustfmt::skip]
9208         let r = i8x16::new(
9209             5, 5, 5, 5,
9210             5, 5, 5, 5,
9211             5, 5, 5, 5,
9212             5, 5, 5, 5
9213         );
9214 
9215         assert_eq!(
9216             r,
9217             mem::transmute(__msa_asub_s_b(mem::transmute(a), mem::transmute(b)))
9218         );
9219     }
9220 
9221     #[simd_test(enable = "msa")]
test_msa_asub_s_h()9222     unsafe fn test_msa_asub_s_h() {
9223         #[rustfmt::skip]
9224         let a = i16x8::new(-1, -2, -3, -4, -1, -2, -3, -4);
9225         #[rustfmt::skip]
9226         let b = i16x8::new(-6, -7, -8, -9, -6, -7, -8, -9);
9227         #[rustfmt::skip]
9228         let r = i16x8::new(5, 5, 5, 5, 5, 5, 5, 5);
9229 
9230         assert_eq!(
9231             r,
9232             mem::transmute(__msa_asub_s_h(mem::transmute(a), mem::transmute(b)))
9233         );
9234     }
9235 
9236     #[simd_test(enable = "msa")]
test_msa_asub_s_w()9237     unsafe fn test_msa_asub_s_w() {
9238         #[rustfmt::skip]
9239         let a = i32x4::new(-1, -2, -3, -4);
9240         #[rustfmt::skip]
9241         let b = i32x4::new(-6, -7, -8, -9);
9242         #[rustfmt::skip]
9243         let r = i32x4::new(5, 5, 5, 5);
9244 
9245         assert_eq!(
9246             r,
9247             mem::transmute(__msa_asub_s_w(mem::transmute(a), mem::transmute(b)))
9248         );
9249     }
9250 
9251     #[simd_test(enable = "msa")]
test_msa_asub_s_d()9252     unsafe fn test_msa_asub_s_d() {
9253         #[rustfmt::skip]
9254         let a = i64x2::new(-1, -2);
9255         #[rustfmt::skip]
9256         let b = i64x2::new(-6, -7);
9257         #[rustfmt::skip]
9258         let r = i64x2::new(5, 5);
9259 
9260         assert_eq!(
9261             r,
9262             mem::transmute(__msa_asub_s_d(mem::transmute(a), mem::transmute(b)))
9263         );
9264     }
9265 
9266     #[simd_test(enable = "msa")]
test_msa_asub_u_b()9267     unsafe fn test_msa_asub_u_b() {
9268         #[rustfmt::skip]
9269         let a = u8x16::new(
9270             1, 2, 3, 4,
9271             1, 2, 3, 4,
9272             1, 2, 3, 4,
9273             1, 2, 3, 4
9274         );
9275         #[rustfmt::skip]
9276         let b = u8x16::new(
9277             6, 7, 8, 9,
9278             6, 7, 8, 9,
9279             6, 7, 8, 9,
9280             6, 7, 8, 9
9281         );
9282         #[rustfmt::skip]
9283         let r = u8x16::new(
9284             5, 5, 5, 5,
9285             5, 5, 5, 5,
9286             5, 5, 5, 5,
9287             5, 5, 5, 5
9288         );
9289 
9290         assert_eq!(
9291             r,
9292             mem::transmute(__msa_asub_u_b(mem::transmute(a), mem::transmute(b)))
9293         );
9294     }
9295 
9296     #[simd_test(enable = "msa")]
test_msa_asub_u_h()9297     unsafe fn test_msa_asub_u_h() {
9298         #[rustfmt::skip]
9299         let a = u16x8::new(1, 2, 3, 4, 1, 2, 3, 4);
9300         #[rustfmt::skip]
9301         let b = u16x8::new(6, 7, 8, 9, 6, 7, 8, 9);
9302         #[rustfmt::skip]
9303         let r = u16x8::new(5, 5, 5, 5, 5, 5, 5, 5);
9304 
9305         assert_eq!(
9306             r,
9307             mem::transmute(__msa_asub_u_h(mem::transmute(a), mem::transmute(b)))
9308         );
9309     }
9310 
9311     #[simd_test(enable = "msa")]
test_msa_asub_u_w()9312     unsafe fn test_msa_asub_u_w() {
9313         #[rustfmt::skip]
9314         let a = u32x4::new(1, 2, 3, 4);
9315         #[rustfmt::skip]
9316         let b = u32x4::new(6, 7, 8, 9);
9317         #[rustfmt::skip]
9318         let r = u32x4::new(5, 5, 5, 5);
9319 
9320         assert_eq!(
9321             r,
9322             mem::transmute(__msa_asub_u_w(mem::transmute(a), mem::transmute(b)))
9323         );
9324     }
9325 
9326     #[simd_test(enable = "msa")]
test_msa_asub_u_d()9327     unsafe fn test_msa_asub_u_d() {
9328         #[rustfmt::skip]
9329         let a = u64x2::new(1, 2);
9330         #[rustfmt::skip]
9331         let b = u64x2::new(6, 7);
9332         #[rustfmt::skip]
9333         let r = u64x2::new(5, 5);
9334 
9335         assert_eq!(
9336             r,
9337             mem::transmute(__msa_asub_u_d(mem::transmute(a), mem::transmute(b)))
9338         );
9339     }
9340 
9341     #[simd_test(enable = "msa")]
test_msa_ave_s_b()9342     unsafe fn test_msa_ave_s_b() {
9343         #[rustfmt::skip]
9344         let a = i8x16::new(
9345             -1, -2, -3, -4,
9346             -1, -2, -3, -4,
9347             -1, -2, -3, -4,
9348             -1, -2, -3, -4
9349         );
9350         #[rustfmt::skip]
9351         let b = i8x16::new(
9352             6, -7, 8, -9,
9353             6, -7, 8, -9,
9354             6, -7, 8, -9,
9355             6, -7, 8, -9
9356         );
9357         #[rustfmt::skip]
9358         let r = i8x16::new(
9359             2, -5, 2, -7,
9360             2, -5, 2, -7,
9361             2, -5, 2, -7,
9362             2, -5, 2, -7
9363         );
9364 
9365         assert_eq!(
9366             r,
9367             mem::transmute(__msa_ave_s_b(mem::transmute(a), mem::transmute(b)))
9368         );
9369     }
9370 
9371     #[simd_test(enable = "msa")]
test_msa_ave_s_h()9372     unsafe fn test_msa_ave_s_h() {
9373         #[rustfmt::skip]
9374         let a = i16x8::new(-1, -2, -3, -4, -1, -2, -3, -4);
9375         #[rustfmt::skip]
9376         let b = i16x8::new(6, -7, 8, -9, 6, -7, 8, -9);
9377         #[rustfmt::skip]
9378         let r = i16x8::new(2, -5, 2, -7, 2, -5, 2, -7);
9379 
9380         assert_eq!(
9381             r,
9382             mem::transmute(__msa_ave_s_h(mem::transmute(a), mem::transmute(b)))
9383         );
9384     }
9385 
9386     #[simd_test(enable = "msa")]
test_msa_ave_s_w()9387     unsafe fn test_msa_ave_s_w() {
9388         #[rustfmt::skip]
9389         let a = i32x4::new(-1, -2, -3, -4);
9390         #[rustfmt::skip]
9391         let b = i32x4::new(6, -7, 8, -9);
9392         #[rustfmt::skip]
9393         let r = i32x4::new(2, -5, 2, -7);
9394 
9395         assert_eq!(
9396             r,
9397             mem::transmute(__msa_ave_s_w(mem::transmute(a), mem::transmute(b)))
9398         );
9399     }
9400 
9401     #[simd_test(enable = "msa")]
test_msa_ave_s_d()9402     unsafe fn test_msa_ave_s_d() {
9403         #[rustfmt::skip]
9404         let a = i64x2::new(-1, -2);
9405         #[rustfmt::skip]
9406         let b = i64x2::new(-6, -7);
9407         #[rustfmt::skip]
9408         let r = i64x2::new(-4, -5);
9409 
9410         assert_eq!(
9411             r,
9412             mem::transmute(__msa_ave_s_d(mem::transmute(a), mem::transmute(b)))
9413         );
9414     }
9415 
9416     #[simd_test(enable = "msa")]
test_msa_ave_u_b()9417     unsafe fn test_msa_ave_u_b() {
9418         #[rustfmt::skip]
9419         let a = u8x16::new(
9420             1, 2, 3, 4,
9421             1, 2, 3, 4,
9422             1, 2, 3, 4,
9423             1, 2, 3, 4
9424         );
9425         #[rustfmt::skip]
9426         let b = u8x16::new(
9427             6, 7, 8, 9,
9428             6, 7, 8, 9,
9429             6, 7, 8, 9,
9430             6, 7, 8, 9
9431         );
9432         #[rustfmt::skip]
9433         let r = u8x16::new(
9434             3, 4, 5, 6,
9435             3, 4, 5, 6,
9436             3, 4, 5, 6,
9437             3, 4, 5, 6
9438         );
9439 
9440         assert_eq!(
9441             r,
9442             mem::transmute(__msa_ave_u_b(mem::transmute(a), mem::transmute(b)))
9443         );
9444     }
9445 
9446     #[simd_test(enable = "msa")]
test_msa_ave_u_h()9447     unsafe fn test_msa_ave_u_h() {
9448         #[rustfmt::skip]
9449         let a = u16x8::new(1, 2, 3, 4, 1, 2, 3, 4);
9450         #[rustfmt::skip]
9451         let b = u16x8::new(6, 7, 8, 9, 6, 7, 8, 9);
9452         #[rustfmt::skip]
9453         let r = u16x8::new(3, 4, 5, 6, 3, 4, 5, 6);
9454 
9455         assert_eq!(
9456             r,
9457             mem::transmute(__msa_ave_u_h(mem::transmute(a), mem::transmute(b)))
9458         );
9459     }
9460 
9461     #[simd_test(enable = "msa")]
test_msa_ave_u_w()9462     unsafe fn test_msa_ave_u_w() {
9463         #[rustfmt::skip]
9464         let a = u32x4::new(1, 2, 3, 4);
9465         #[rustfmt::skip]
9466         let b = u32x4::new(6, 7, 8, 9);
9467         #[rustfmt::skip]
9468         let r = u32x4::new(3, 4, 5, 6);
9469 
9470         assert_eq!(
9471             r,
9472             mem::transmute(__msa_ave_u_w(mem::transmute(a), mem::transmute(b)))
9473         );
9474     }
9475 
9476     #[simd_test(enable = "msa")]
test_msa_ave_u_d()9477     unsafe fn test_msa_ave_u_d() {
9478         #[rustfmt::skip]
9479         let a = u64x2::new(1, 2);
9480         #[rustfmt::skip]
9481         let b = u64x2::new(6, 7);
9482         #[rustfmt::skip]
9483         let r = u64x2::new(3, 4);
9484 
9485         assert_eq!(
9486             r,
9487             mem::transmute(__msa_ave_u_d(mem::transmute(a), mem::transmute(b)))
9488         );
9489     }
9490 
9491     #[simd_test(enable = "msa")]
test_msa_aver_s_b()9492     unsafe fn test_msa_aver_s_b() {
9493         #[rustfmt::skip]
9494         let a = i8x16::new(
9495             -1, -2, 3, -4,
9496             -1, -2, 3, -4,
9497             -1, -2, 3, -4,
9498             -1, -2, 3, -4
9499         );
9500         #[rustfmt::skip]
9501         let b = i8x16::new(
9502             -6, 7, -8, -9,
9503             -6, 7, -8, -9,
9504             -6, 7, -8, -9,
9505             -6, 7, -8, -9
9506         );
9507         #[rustfmt::skip]
9508         let r = i8x16::new(
9509             -3, 3, -2, -6,
9510             -3, 3, -2, -6,
9511             -3, 3, -2, -6,
9512             -3, 3, -2, -6
9513         );
9514 
9515         assert_eq!(
9516             r,
9517             mem::transmute(__msa_aver_s_b(mem::transmute(a), mem::transmute(b)))
9518         );
9519     }
9520 
9521     #[simd_test(enable = "msa")]
test_msa_aver_s_h()9522     unsafe fn test_msa_aver_s_h() {
9523         #[rustfmt::skip]
9524         let a = i16x8::new(-1, -2, 3, -4, -1, -2, 3, -4);
9525         #[rustfmt::skip]
9526         let b = i16x8::new(-6, 7, -8, -9, -6, 7, -8, -9);
9527         #[rustfmt::skip]
9528         let r = i16x8::new(-3, 3, -2, -6, -3, 3, -2, -6);
9529 
9530         assert_eq!(
9531             r,
9532             mem::transmute(__msa_aver_s_h(mem::transmute(a), mem::transmute(b)))
9533         );
9534     }
9535 
9536     #[simd_test(enable = "msa")]
test_msa_aver_s_w()9537     unsafe fn test_msa_aver_s_w() {
9538         #[rustfmt::skip]
9539         let a = i32x4::new(-1, -2, 3, -4);
9540         #[rustfmt::skip]
9541         let b = i32x4::new(-6, 7, -8, -9);
9542         #[rustfmt::skip]
9543         let r = i32x4::new(-3, 3, -2, -6);
9544 
9545         assert_eq!(
9546             r,
9547             mem::transmute(__msa_aver_s_w(mem::transmute(a), mem::transmute(b)))
9548         );
9549     }
9550 
9551     #[simd_test(enable = "msa")]
test_msa_aver_s_d()9552     unsafe fn test_msa_aver_s_d() {
9553         #[rustfmt::skip]
9554         let a = i64x2::new(-1, -2);
9555         #[rustfmt::skip]
9556         let b = i64x2::new(-6, -7);
9557         #[rustfmt::skip]
9558         let r = i64x2::new(-3, -4);
9559 
9560         assert_eq!(
9561             r,
9562             mem::transmute(__msa_aver_s_d(mem::transmute(a), mem::transmute(b)))
9563         );
9564     }
9565 
9566     #[simd_test(enable = "msa")]
test_msa_aver_u_b()9567     unsafe fn test_msa_aver_u_b() {
9568         #[rustfmt::skip]
9569         let a = u8x16::new(
9570             1, 2, 3, 4,
9571             1, 2, 3, 4,
9572             1, 2, 3, 4,
9573             1, 2, 3, 4
9574         );
9575         #[rustfmt::skip]
9576         let b = u8x16::new(
9577             6, 7, 8, 9,
9578             6, 7, 8, 9,
9579             6, 7, 8, 9,
9580             6, 7, 8, 9
9581         );
9582         #[rustfmt::skip]
9583         let r = u8x16::new(
9584             4, 5, 6, 7,
9585             4, 5, 6, 7,
9586             4, 5, 6, 7,
9587             4, 5, 6, 7
9588         );
9589 
9590         assert_eq!(
9591             r,
9592             mem::transmute(__msa_aver_u_b(mem::transmute(a), mem::transmute(b)))
9593         );
9594     }
9595 
9596     #[simd_test(enable = "msa")]
test_msa_aver_u_h()9597     unsafe fn test_msa_aver_u_h() {
9598         #[rustfmt::skip]
9599         let a = u16x8::new(1, 2, 3, 4, 1, 2, 3, 4);
9600         #[rustfmt::skip]
9601         let b = u16x8::new(6, 7, 8, 9, 6, 7, 8, 9);
9602         #[rustfmt::skip]
9603         let r = u16x8::new(4, 5, 6, 7, 4, 5, 6, 7);
9604 
9605         assert_eq!(
9606             r,
9607             mem::transmute(__msa_aver_u_h(mem::transmute(a), mem::transmute(b)))
9608         );
9609     }
9610 
9611     #[simd_test(enable = "msa")]
test_msa_aver_u_w()9612     unsafe fn test_msa_aver_u_w() {
9613         #[rustfmt::skip]
9614         let a = u32x4::new(1, 2, 3, 4);
9615         #[rustfmt::skip]
9616         let b = u32x4::new(6, 7, 8, 9);
9617         #[rustfmt::skip]
9618         let r = u32x4::new(4, 5, 6, 7);
9619 
9620         assert_eq!(
9621             r,
9622             mem::transmute(__msa_aver_u_w(mem::transmute(a), mem::transmute(b)))
9623         );
9624     }
9625 
9626     #[simd_test(enable = "msa")]
test_msa_aver_u_d()9627     unsafe fn test_msa_aver_u_d() {
9628         #[rustfmt::skip]
9629         let a = u64x2::new(1, 2);
9630         #[rustfmt::skip]
9631         let b = u64x2::new(6, 7);
9632         #[rustfmt::skip]
9633         let r = u64x2::new(4, 5);
9634 
9635         assert_eq!(
9636             r,
9637             mem::transmute(__msa_aver_u_d(mem::transmute(a), mem::transmute(b)))
9638         );
9639     }
9640 
9641     #[simd_test(enable = "msa")]
test_msa_bclr_b()9642     unsafe fn test_msa_bclr_b() {
9643         #[rustfmt::skip]
9644         let a = u8x16::new(
9645             255, 155, 55, 1,
9646             255, 155, 55, 1,
9647             255, 155, 55, 1,
9648             255, 155, 55, 1
9649         );
9650         #[rustfmt::skip]
9651         let b = u8x16::new(
9652             6, 7, 8, 9,
9653             6, 7, 8, 9,
9654             6, 7, 8, 9,
9655             6, 7, 8, 9
9656         );
9657         #[rustfmt::skip]
9658         let r = u8x16::new(
9659             191, 27, 54, 1,
9660             191, 27, 54, 1,
9661             191, 27, 54, 1,
9662             191, 27, 54, 1
9663         );
9664 
9665         assert_eq!(
9666             r,
9667             mem::transmute(__msa_bclr_b(mem::transmute(a), mem::transmute(b)))
9668         );
9669     }
9670 
9671     #[simd_test(enable = "msa")]
test_msa_bclr_h()9672     unsafe fn test_msa_bclr_h() {
9673         #[rustfmt::skip]
9674         let a = u16x8::new(255, 155, 55, 1, 255, 155, 55, 1);
9675         #[rustfmt::skip]
9676         let b = u16x8::new(6, 7, 8, 9, 6, 7, 8, 9);
9677         #[rustfmt::skip]
9678         let r = u16x8::new(191, 27, 55, 1, 191, 27, 55, 1);
9679 
9680         assert_eq!(
9681             r,
9682             mem::transmute(__msa_bclr_h(mem::transmute(a), mem::transmute(b)))
9683         );
9684     }
9685 
9686     #[simd_test(enable = "msa")]
test_msa_bclr_w()9687     unsafe fn test_msa_bclr_w() {
9688         #[rustfmt::skip]
9689         let a = u32x4::new(255, 155, 55, 1);
9690         #[rustfmt::skip]
9691         let b = u32x4::new(6, 7, 8, 9);
9692         #[rustfmt::skip]
9693         let r = u32x4::new(191, 27, 55, 1);
9694 
9695         assert_eq!(
9696             r,
9697             mem::transmute(__msa_bclr_w(mem::transmute(a), mem::transmute(b)))
9698         );
9699     }
9700 
9701     #[simd_test(enable = "msa")]
test_msa_bclr_d()9702     unsafe fn test_msa_bclr_d() {
9703         #[rustfmt::skip]
9704         let a = u64x2::new(255, 155);
9705         #[rustfmt::skip]
9706         let b = u64x2::new(6, 7);
9707         #[rustfmt::skip]
9708         let r = u64x2::new(191, 27);
9709 
9710         assert_eq!(
9711             r,
9712             mem::transmute(__msa_bclr_d(mem::transmute(a), mem::transmute(b)))
9713         );
9714     }
9715 
9716     #[simd_test(enable = "msa")]
test_msa_bclri_b()9717     unsafe fn test_msa_bclri_b() {
9718         #[rustfmt::skip]
9719         let a = u8x16::new(
9720             255, 155, 55, 1,
9721             255, 155, 55, 1,
9722             255, 155, 55, 1,
9723             255, 155, 55, 1
9724         );
9725         #[rustfmt::skip]
9726         let r = u8x16::new(
9727             247, 147, 55, 1,
9728             247, 147, 55, 1,
9729             247, 147, 55, 1,
9730             247, 147, 55, 1
9731         );
9732 
9733         assert_eq!(r, mem::transmute(__msa_bclri_b(mem::transmute(a), 3)));
9734     }
9735 
9736     #[simd_test(enable = "msa")]
test_msa_bclri_h()9737     unsafe fn test_msa_bclri_h() {
9738         #[rustfmt::skip]
9739         let a = u16x8::new(2155, 1155, 155, 1, 2155, 1155, 155, 1);
9740         #[rustfmt::skip]
9741         let r = u16x8::new(107, 1155, 155, 1, 107, 1155, 155, 1);
9742 
9743         assert_eq!(r, mem::transmute(__msa_bclri_h(mem::transmute(a), 11)));
9744     }
9745 
9746     #[simd_test(enable = "msa")]
test_msa_bclri_w()9747     unsafe fn test_msa_bclri_w() {
9748         #[rustfmt::skip]
9749         let a = u32x4::new(211111155, 111111155, 11111155, 1);
9750         #[rustfmt::skip]
9751         let r = u32x4::new(202722547, 102722547, 2722547, 1);
9752 
9753         assert_eq!(r, mem::transmute(__msa_bclri_w(mem::transmute(a), 23)));
9754     }
9755 
9756     #[simd_test(enable = "msa")]
test_msa_bclri_d()9757     unsafe fn test_msa_bclri_d() {
9758         #[rustfmt::skip]
9759         let a = u64x2::new(211111111155, 11111111111111155);
9760         #[rustfmt::skip]
9761         let r = u64x2::new(73672157683, 11110973672157683);
9762 
9763         assert_eq!(r, mem::transmute(__msa_bclri_d(mem::transmute(a), 37)));
9764     }
9765 
9766     #[simd_test(enable = "msa")]
test_msa_binsl_b()9767     unsafe fn test_msa_binsl_b() {
9768         #[rustfmt::skip]
9769         let a = u8x16::new(
9770             255, 155, 55, 1,
9771             255, 155, 55, 1,
9772             255, 155, 55, 1,
9773             255, 155, 55, 1
9774         );
9775         #[rustfmt::skip]
9776         let b = u8x16::new(
9777             6, 7, 8, 9,
9778             6, 7, 8, 9,
9779             6, 7, 8, 9,
9780             6, 7, 8, 9
9781         );
9782         #[rustfmt::skip]
9783         let c = u8x16::new(
9784             1, 3, 5, 9,
9785             1, 3, 5, 9,
9786             1, 3, 5, 9,
9787             1, 3, 5, 9
9788         );
9789         #[rustfmt::skip]
9790         let r = u8x16::new(
9791             63, 11, 11, 1,
9792             63, 11, 11, 1,
9793             63, 11, 11, 1,
9794             63, 11, 11, 1
9795         );
9796 
9797         assert_eq!(
9798             r,
9799             mem::transmute(__msa_binsl_b(
9800                 mem::transmute(a),
9801                 mem::transmute(b),
9802                 mem::transmute(c)
9803             ))
9804         );
9805     }
9806 
9807     #[simd_test(enable = "msa")]
test_msa_binsl_h()9808     unsafe fn test_msa_binsl_h() {
9809         #[rustfmt::skip]
9810         let a = u16x8::new(
9811             32767, 16384, 8192, 4096,
9812             32767, 16384, 8192, 4096
9813         );
9814         #[rustfmt::skip]
9815         let b = u16x8::new(
9816             21656, 5273, 7081, 2985,
9817             21656, 5273, 7081, 2985
9818         );
9819         #[rustfmt::skip]
9820         let c = u16x8::new(
9821             3, 7, 9, 13,
9822             15, 17, 21, 23
9823         );
9824         #[rustfmt::skip]
9825         let r = u16x8::new(
9826             24575, 5120, 7040, 2984,
9827             21656, 0, 6144, 2816
9828         );
9829 
9830         assert_eq!(
9831             r,
9832             mem::transmute(__msa_binsl_h(
9833                 mem::transmute(a),
9834                 mem::transmute(b),
9835                 mem::transmute(c)
9836             ))
9837         );
9838     }
9839 
9840     #[simd_test(enable = "msa")]
test_msa_binsl_w()9841     unsafe fn test_msa_binsl_w() {
9842         #[rustfmt::skip]
9843         let a = u32x4::new(2147483647, 536870912, 67108864, 8388608);
9844         #[rustfmt::skip]
9845         let b = u32x4::new(1036372536, 259093134, 78219975, 1119499719);
9846         #[rustfmt::skip]
9847         let c = u32x4::new(11, 15, 31, 37);
9848         #[rustfmt::skip]
9849         let r = u32x4::new(1037041663, 259063808, 78219975, 1082130432);
9850 
9851         assert_eq!(
9852             r,
9853             mem::transmute(__msa_binsl_w(
9854                 mem::transmute(a),
9855                 mem::transmute(b),
9856                 mem::transmute(c)
9857             ))
9858         );
9859     }
9860 
9861     #[simd_test(enable = "msa")]
test_msa_binsl_d()9862     unsafe fn test_msa_binsl_d() {
9863         #[rustfmt::skip]
9864         let a = u64x2::new(8006399338, 2882303762);
9865         #[rustfmt::skip]
9866         let b = u64x2::new(9223372036854775805, 536870912);
9867         #[rustfmt::skip]
9868         let c = u64x2::new(12, 48);
9869         #[rustfmt::skip]
9870         let r = u64x2::new(9221120245047489898, 536901394);
9871 
9872         assert_eq!(
9873             r,
9874             mem::transmute(__msa_binsl_d(
9875                 mem::transmute(a),
9876                 mem::transmute(b),
9877                 mem::transmute(c)
9878             ))
9879         );
9880     }
9881 
9882     #[simd_test(enable = "msa")]
test_msa_binsli_b()9883     unsafe fn test_msa_binsli_b() {
9884         #[rustfmt::skip]
9885         let a = u8x16::new(
9886             u8::MAX, 155, 55, 1,
9887             u8::MAX, 155, 55, 1,
9888             u8::MAX, 155, 55, 1,
9889             u8::MAX, 155, 55, 1
9890         );
9891         #[rustfmt::skip]
9892         let b = u8x16::new(
9893             6, 7, 8, 9,
9894             6, 7, 8, 9,
9895             6, 7, 8, 9,
9896             6, 7, 8, 9
9897         );
9898         #[rustfmt::skip]
9899         let r = u8x16::new(
9900             7, 7, 11, 9,
9901             7, 7, 11, 9,
9902             7, 7, 11, 9,
9903             7, 7, 11, 9
9904         );
9905 
9906         assert_eq!(
9907             r,
9908             mem::transmute(__msa_binsli_b(mem::transmute(a), mem::transmute(b), 5))
9909         );
9910     }
9911 
9912     #[simd_test(enable = "msa")]
test_msa_binsli_h()9913     unsafe fn test_msa_binsli_h() {
9914         #[rustfmt::skip]
9915         let a = u16x8::new(
9916             32767, 16384, 8192, 4096,
9917             32767, 16384, 8192, 4096
9918         );
9919         #[rustfmt::skip]
9920         let b = u16x8::new(
9921             21656, 5273, 7081, 2985,
9922             21656, 5273, 7081, 2985
9923         );
9924         #[rustfmt::skip]
9925         let r = u16x8::new(
9926             21659, 5272, 7080, 2984,
9927             21659, 5272, 7080, 2984
9928         );
9929 
9930         assert_eq!(
9931             r,
9932             mem::transmute(__msa_binsli_h(mem::transmute(a), mem::transmute(b), 13))
9933         );
9934     }
9935 
9936     #[simd_test(enable = "msa")]
test_msa_binsli_w()9937     unsafe fn test_msa_binsli_w() {
9938         #[rustfmt::skip]
9939         let a = u32x4::new(2147483647, 536870912, 67108864, 8388608);
9940         #[rustfmt::skip]
9941         let b = u32x4::new(1036372536, 259093134, 78219975, 1119499719);
9942         #[rustfmt::skip]
9943         let r = u32x4::new(1036386303, 259080192, 78217216, 1119485952);
9944 
9945         assert_eq!(
9946             r,
9947             mem::transmute(__msa_binsli_w(mem::transmute(a), mem::transmute(b), 17))
9948         );
9949     }
9950 
9951     #[simd_test(enable = "msa")]
test_msa_binsli_d()9952     unsafe fn test_msa_binsli_d() {
9953         #[rustfmt::skip]
9954         let a = u64x2::new(8006399338, 2882303762);
9955         #[rustfmt::skip]
9956         let b = u64x2::new(9223372036854775805, 536870912);
9957         #[rustfmt::skip]
9958         let r = u64x2::new(9223372036854773098, 536901394);
9959 
9960         assert_eq!(
9961             r,
9962             mem::transmute(__msa_binsli_d(mem::transmute(a), mem::transmute(b), 48))
9963         );
9964     }
9965 
9966     #[simd_test(enable = "msa")]
test_msa_binsr_b()9967     unsafe fn test_msa_binsr_b() {
9968         #[rustfmt::skip]
9969         let a = u8x16::new(
9970             255, 155, 55, 1,
9971             255, 155, 55, 1,
9972             255, 155, 55, 1,
9973             255, 155, 55, 1
9974         );
9975         #[rustfmt::skip]
9976         let b = u8x16::new(
9977             6, 7, 8, 9,
9978             6, 7, 8, 9,
9979             6, 7, 8, 9,
9980             6, 7, 8, 9
9981         );
9982         #[rustfmt::skip]
9983         let c = u8x16::new(
9984             1, 3, 5, 9,
9985             1, 3, 5, 9,
9986             1, 3, 5, 9,
9987             1, 3, 5, 9
9988         );
9989         #[rustfmt::skip]
9990         let r = u8x16::new(
9991             254, 151, 8, 1,
9992             254, 151, 8, 1,
9993             254, 151, 8, 1,
9994             254, 151, 8, 1
9995         );
9996 
9997         assert_eq!(
9998             r,
9999             mem::transmute(__msa_binsr_b(
10000                 mem::transmute(a),
10001                 mem::transmute(b),
10002                 mem::transmute(c)
10003             ))
10004         );
10005     }
10006 
10007     #[simd_test(enable = "msa")]
test_msa_binsr_h()10008     unsafe fn test_msa_binsr_h() {
10009         #[rustfmt::skip]
10010         let a = u16x8::new(
10011             32767, 16384, 8192, 4096,
10012             32767, 16384, 8192, 4096
10013         );
10014         #[rustfmt::skip]
10015         let b = u16x8::new(
10016             21656, 5273, 7081, 2985,
10017             21656, 5273, 7081, 2985
10018         );
10019         #[rustfmt::skip]
10020         let c = u16x8::new(
10021             3, 7, 9, 13,
10022             15, 17, 21, 23
10023         );
10024         #[rustfmt::skip]
10025         let r = u16x8::new(
10026             32760, 16537, 9129, 2985,
10027             21656, 16385, 8233, 4265
10028         );
10029 
10030         assert_eq!(
10031             r,
10032             mem::transmute(__msa_binsr_h(
10033                 mem::transmute(a),
10034                 mem::transmute(b),
10035                 mem::transmute(c)
10036             ))
10037         );
10038     }
10039 
10040     #[simd_test(enable = "msa")]
test_msa_binsr_w()10041     unsafe fn test_msa_binsr_w() {
10042         #[rustfmt::skip]
10043         let a = u32x4::new(2147483647, 536870912, 67108864, 8388608);
10044         #[rustfmt::skip]
10045         let b = u32x4::new(1036372536, 259093134, 78219975, 1119499719);
10046         #[rustfmt::skip]
10047         let c = u32x4::new(11, 15, 31, 37);
10048         #[rustfmt::skip]
10049         let r = u32x4::new(2147482168, 536900238, 78219975, 8388615);
10050 
10051         assert_eq!(
10052             r,
10053             mem::transmute(__msa_binsr_w(
10054                 mem::transmute(a),
10055                 mem::transmute(b),
10056                 mem::transmute(c)
10057             ))
10058         );
10059     }
10060 
10061     #[simd_test(enable = "msa")]
test_msa_binsr_d()10062     unsafe fn test_msa_binsr_d() {
10063         #[rustfmt::skip]
10064         let a = u64x2::new(8006399338, 2882303762);
10065         #[rustfmt::skip]
10066         let b = u64x2::new(9223372036854775805, 536870912);
10067         #[rustfmt::skip]
10068         let c = u64x2::new(12, 48);
10069         #[rustfmt::skip]
10070         let r = u64x2::new(8006402045, 536870912);
10071 
10072         assert_eq!(
10073             r,
10074             mem::transmute(__msa_binsr_d(
10075                 mem::transmute(a),
10076                 mem::transmute(b),
10077                 mem::transmute(c)
10078             ))
10079         );
10080     }
10081 
10082     #[simd_test(enable = "msa")]
test_msa_binsri_b()10083     unsafe fn test_msa_binsri_b() {
10084         #[rustfmt::skip]
10085         let a = u8x16::new(
10086             255, 155, 55, 1,
10087             255, 155, 55, 1,
10088             255, 155, 55, 1,
10089             255, 155, 55, 1
10090         );
10091         #[rustfmt::skip]
10092         let b = u8x16::new(
10093             6, 7, 8, 9,
10094             6, 7, 8, 9,
10095             6, 7, 8, 9,
10096             6, 7, 8, 9
10097         );
10098         #[rustfmt::skip]
10099         let r = u8x16::new(
10100             198, 135, 8, 9,
10101             198, 135, 8, 9,
10102             198, 135, 8, 9,
10103             198, 135, 8, 9
10104         );
10105 
10106         assert_eq!(
10107             r,
10108             mem::transmute(__msa_binsri_b(mem::transmute(a), mem::transmute(b), 5))
10109         );
10110     }
10111 
10112     #[simd_test(enable = "msa")]
test_msa_binsri_h()10113     unsafe fn test_msa_binsri_h() {
10114         #[rustfmt::skip]
10115         let a = u16x8::new(
10116             32767, 16384, 8192, 4096,
10117             32767, 16384, 8192, 4096
10118         );
10119         #[rustfmt::skip]
10120         let b = u16x8::new(
10121             21656, 5273, 7081, 2985,
10122             21656, 5273, 7081, 2985
10123         );
10124         #[rustfmt::skip]
10125         let r = u16x8::new(
10126             21656, 21657, 7081, 2985,
10127             21656, 21657, 7081, 2985
10128         );
10129 
10130         assert_eq!(
10131             r,
10132             mem::transmute(__msa_binsri_h(mem::transmute(a), mem::transmute(b), 13))
10133         );
10134     }
10135 
10136     #[simd_test(enable = "msa")]
test_msa_binsri_w()10137     unsafe fn test_msa_binsri_w() {
10138         #[rustfmt::skip]
10139         let a = u32x4::new(2147483647, 536870912, 67108864, 8388608);
10140         #[rustfmt::skip]
10141         let b = u32x4::new(1036372536, 259093134, 78219975, 1119499719);
10142         #[rustfmt::skip]
10143         let r = u32x4::new(2147338808, 536965774, 67209927, 8533447);
10144 
10145         assert_eq!(
10146             r,
10147             mem::transmute(__msa_binsri_w(mem::transmute(a), mem::transmute(b), 17))
10148         );
10149     }
10150 
10151     #[simd_test(enable = "msa")]
test_msa_binsri_d()10152     unsafe fn test_msa_binsri_d() {
10153         #[rustfmt::skip]
10154         let a = u64x2::new(8006399338, 2882303762);
10155         #[rustfmt::skip]
10156         let b = u64x2::new(9223372036854775805, 536870912);
10157         #[rustfmt::skip]
10158         let r = u64x2::new(562949953421309, 536870912);
10159 
10160         assert_eq!(
10161             r,
10162             mem::transmute(__msa_binsri_d(mem::transmute(a), mem::transmute(b), 48))
10163         );
10164     }
10165 
10166     #[simd_test(enable = "msa")]
test_msa_bmnz_v()10167     unsafe fn test_msa_bmnz_v() {
10168         #[rustfmt::skip]
10169         let a = u8x16::new(
10170             u8::MAX, 155, 55, 1,
10171             u8::MAX, 155, 55, 1,
10172             u8::MAX, 155, 55, 1,
10173             u8::MAX, 155, 55, 1
10174         );
10175         #[rustfmt::skip]
10176         let b = u8x16::new(
10177             6, 7, 8, 9,
10178             6, 7, 8, 9,
10179             6, 7, 8, 9,
10180             6, 7, 8, 9,
10181         );
10182         #[rustfmt::skip]
10183         let c = u8x16::new(
10184             3, 5, 7, 1,
10185             3, 5, 7, 1,
10186             3, 5, 7, 1,
10187             3, 5, 7, 1
10188         );
10189         #[rustfmt::skip]
10190         let r = u8x16::new(
10191             254, 159, 48, 1,
10192             254, 159, 48, 1,
10193             254, 159, 48, 1,
10194             254, 159, 48, 1
10195         );
10196 
10197         assert_eq!(
10198             r,
10199             mem::transmute(__msa_bmnz_v(
10200                 mem::transmute(a),
10201                 mem::transmute(b),
10202                 mem::transmute(c)
10203             ))
10204         );
10205     }
10206 
10207     #[simd_test(enable = "msa")]
test_msa_bmnzi_b()10208     unsafe fn test_msa_bmnzi_b() {
10209         #[rustfmt::skip]
10210         let a = u8x16::new(
10211             u8::MAX, 155, 55, 1,
10212             u8::MAX, 155, 55, 1,
10213             u8::MAX, 155, 55, 1,
10214             u8::MAX, 155, 55, 1
10215         );
10216         #[rustfmt::skip]
10217         let b = u8x16::new(
10218             1, u8::MAX, 155, 55,
10219             1, u8::MAX, 155, 55,
10220             1, u8::MAX, 155, 55,
10221             1, u8::MAX, 155, 55
10222         );
10223         #[rustfmt::skip]
10224         let r = u8x16::new(
10225             249, 159, 51, 7,
10226             249, 159, 51, 7,
10227             249, 159, 51, 7,
10228             249, 159, 51, 7
10229         );
10230 
10231         assert_eq!(
10232             r,
10233             mem::transmute(__msa_bmnzi_b(mem::transmute(a), mem::transmute(b), 7))
10234         );
10235     }
10236 
10237     #[simd_test(enable = "msa")]
test_msa_bmz_v()10238     unsafe fn test_msa_bmz_v() {
10239         #[rustfmt::skip]
10240         let a = u8x16::new(
10241             u8::MAX, 155, 55, 1,
10242             u8::MAX, 155, 55, 1,
10243             u8::MAX, 155, 55, 1,
10244             u8::MAX, 155, 55, 1
10245         );
10246         #[rustfmt::skip]
10247         let b = u8x16::new(
10248             6, 7, 8, 9,
10249             6, 7, 8, 9,
10250             6, 7, 8, 9,
10251             6, 7, 8, 9
10252         );
10253         #[rustfmt::skip]
10254         let c = u8x16::new(
10255             3, 5, 7, 1,
10256             3, 5, 7, 1,
10257             3, 5, 7, 1,
10258             3, 5, 7, 1
10259         );
10260         #[rustfmt::skip]
10261         let r = u8x16::new(
10262             7, 3, 15, 9,
10263             7, 3, 15, 9,
10264             7, 3, 15, 9,
10265             7, 3, 15, 9
10266         );
10267 
10268         assert_eq!(
10269             r,
10270             mem::transmute(__msa_bmz_v(
10271                 mem::transmute(a),
10272                 mem::transmute(b),
10273                 mem::transmute(c)
10274             ))
10275         );
10276     }
10277 
10278     #[simd_test(enable = "msa")]
test_msa_bmzi_b()10279     unsafe fn test_msa_bmzi_b() {
10280         #[rustfmt::skip]
10281         let a = u8x16::new(
10282             u8::MAX, 155, 55, 1,
10283             u8::MAX, 155, 55, 1,
10284             u8::MAX, 155, 55, 1,
10285             u8::MAX, 155, 55, 1
10286         );
10287         #[rustfmt::skip]
10288         let b = u8x16::new(
10289             1, 255, 155, 55,
10290             1, 255, 155, 55,
10291             1, 255, 155, 55,
10292             1, 255, 155, 55
10293         );
10294         #[rustfmt::skip]
10295         let r = u8x16::new(
10296             7, 251, 159, 49,
10297             7, 251, 159, 49,
10298             7, 251, 159, 49,
10299             7, 251, 159, 49
10300         );
10301 
10302         assert_eq!(
10303             r,
10304             mem::transmute(__msa_bmzi_b(mem::transmute(a), mem::transmute(b), 7))
10305         );
10306     }
10307 
10308     #[simd_test(enable = "msa")]
test_msa_bneg_b()10309     unsafe fn test_msa_bneg_b() {
10310         #[rustfmt::skip]
10311         let a = u8x16::new(
10312             255, 155, 55, 1,
10313             255, 155, 55, 1,
10314             255, 155, 55, 1,
10315             255, 155, 55, 1
10316         );
10317         #[rustfmt::skip]
10318         let b = u8x16::new(
10319             6, 7, 8, 9,
10320             6, 7, 8, 9,
10321             6, 7, 8, 9,
10322             6, 7, 8, 9
10323         );
10324         #[rustfmt::skip]
10325         let r = u8x16::new(
10326             191, 27, 54, 3,
10327             191, 27, 54, 3,
10328             191, 27, 54, 3,
10329             191, 27, 54, 3
10330         );
10331 
10332         assert_eq!(
10333             r,
10334             mem::transmute(__msa_bneg_b(mem::transmute(a), mem::transmute(b)))
10335         );
10336     }
10337 
10338     #[simd_test(enable = "msa")]
test_msa_bneg_h()10339     unsafe fn test_msa_bneg_h() {
10340         #[rustfmt::skip]
10341         let a = u16x8::new(255, 155, 55, 1, 255, 155, 55, 1);
10342         #[rustfmt::skip]
10343         let b = u16x8::new(6, 7, 8, 9, 6, 7, 8, 9);
10344         #[rustfmt::skip]
10345         let r = u16x8::new(191, 27, 311, 513, 191, 27, 311, 513);
10346 
10347         assert_eq!(
10348             r,
10349             mem::transmute(__msa_bneg_h(mem::transmute(a), mem::transmute(b)))
10350         );
10351     }
10352 
10353     #[simd_test(enable = "msa")]
test_msa_bneg_w()10354     unsafe fn test_msa_bneg_w() {
10355         #[rustfmt::skip]
10356         let a = u32x4::new(255, 155, 55, 1);
10357         #[rustfmt::skip]
10358         let b = u32x4::new(6, 7, 8, 9);
10359         #[rustfmt::skip]
10360         let r = u32x4::new(191, 27, 311, 513);
10361 
10362         assert_eq!(
10363             r,
10364             mem::transmute(__msa_bneg_w(mem::transmute(a), mem::transmute(b)))
10365         );
10366     }
10367 
10368     #[simd_test(enable = "msa")]
test_msa_bneg_d()10369     unsafe fn test_msa_bneg_d() {
10370         #[rustfmt::skip]
10371         let a = u64x2::new(255, 155);
10372         #[rustfmt::skip]
10373         let b = u64x2::new(6, 7);
10374         #[rustfmt::skip]
10375         let r = u64x2::new(191, 27);
10376 
10377         assert_eq!(
10378             r,
10379             mem::transmute(__msa_bneg_d(mem::transmute(a), mem::transmute(b)))
10380         );
10381     }
10382 
10383     #[simd_test(enable = "msa")]
test_msa_bnegi_b()10384     unsafe fn test_msa_bnegi_b() {
10385         #[rustfmt::skip]
10386         let a = u8x16::new(
10387             50, 100, 127, u8::MAX,
10388             50, 100, 127, u8::MAX,
10389             50, 100, 127, u8::MAX,
10390             50, 100, 127, u8::MAX
10391         );
10392         #[rustfmt::skip]
10393         let r = u8x16::new(
10394             34, 116, 111, 239,
10395             34, 116, 111, 239,
10396             34, 116, 111, 239,
10397             34, 116, 111, 239
10398         );
10399 
10400         assert_eq!(r, mem::transmute(__msa_bnegi_b(mem::transmute(a), 4)));
10401     }
10402 
10403     #[simd_test(enable = "msa")]
test_msa_bnegi_h()10404     unsafe fn test_msa_bnegi_h() {
10405         #[rustfmt::skip]
10406         let a = u16x8::new(
10407             32767, 3276, 100, 127,
10408             32767, 3276, 100, 127
10409         );
10410         #[rustfmt::skip]
10411         let r = u16x8::new(
10412             30719, 1228, 2148, 2175,
10413             30719, 1228, 2148, 2175
10414         );
10415 
10416         assert_eq!(r, mem::transmute(__msa_bnegi_h(mem::transmute(a), 11)));
10417     }
10418 
10419     #[simd_test(enable = "msa")]
test_msa_bnegi_w()10420     unsafe fn test_msa_bnegi_w() {
10421         #[rustfmt::skip]
10422         let a = u32x4::new(100, 2147483647, 100, 2147483648);
10423         #[rustfmt::skip]
10424         let r = u32x4::new(16777316, 2130706431, 16777316, 2164260864);
10425 
10426         assert_eq!(r, mem::transmute(__msa_bnegi_w(mem::transmute(a), 24)));
10427     }
10428 
10429     #[simd_test(enable = "msa")]
test_msa_bnegi_d()10430     unsafe fn test_msa_bnegi_d() {
10431         #[rustfmt::skip]
10432         let a = u64x2::new(100, 9223372036854775808);
10433         #[rustfmt::skip]
10434         let r = u64x2::new(4398046511204, 9223376434901286912);
10435 
10436         assert_eq!(r, mem::transmute(__msa_bnegi_d(mem::transmute(a), 42)));
10437     }
10438 
10439     #[simd_test(enable = "msa")]
test_msa_bnz_b()10440     unsafe fn test_msa_bnz_b() {
10441         #[rustfmt::skip]
10442         let a = u8x16::new(
10443             1, 1, 1, 1,
10444             1, 1, 1, 1,
10445             2, 2, 2, 2,
10446             4, 4, 0, 4,
10447         );
10448         let r = 0 as i32;
10449 
10450         assert_eq!(r, mem::transmute(__msa_bnz_b(mem::transmute(a))));
10451     }
10452 
10453     #[simd_test(enable = "msa")]
test_msa_bnz_h()10454     unsafe fn test_msa_bnz_h() {
10455         #[rustfmt::skip]
10456         let a = u16x8::new(
10457             32767, 3276, 100, 127,
10458             32767, 0, 100, 127
10459         );
10460         let r = 0 as i32;
10461 
10462         assert_eq!(r, mem::transmute(__msa_bnz_h(mem::transmute(a))));
10463     }
10464 
10465     #[simd_test(enable = "msa")]
test_msa_bnz_w()10466     unsafe fn test_msa_bnz_w() {
10467         #[rustfmt::skip]
10468         let a = u32x4::new(100, 2147483647, 0, 2147483648);
10469         let r = 0 as i32;
10470 
10471         assert_eq!(r, mem::transmute(__msa_bnz_w(mem::transmute(a))));
10472     }
10473 
10474     #[simd_test(enable = "msa")]
test_msa_bnz_d()10475     unsafe fn test_msa_bnz_d() {
10476         #[rustfmt::skip]
10477         let a = u64x2::new(100, 9223372036854775808);
10478         #[rustfmt::skip]
10479         let r = 1 as i32;
10480 
10481         assert_eq!(r, mem::transmute(__msa_bnz_d(mem::transmute(a))));
10482     }
10483 
10484     #[simd_test(enable = "msa")]
test_msa_bnz_v()10485     unsafe fn test_msa_bnz_v() {
10486         #[rustfmt::skip]
10487         let a = u8x16::new(
10488             0, 0, 0, 1,
10489             0, 0, 0, 0,
10490             0, 0, 0, 0,
10491             0, 0, 0, 0,
10492         );
10493         let r = 1 as i32;
10494 
10495         assert_eq!(r, mem::transmute(__msa_bnz_v(mem::transmute(a))));
10496     }
10497 
10498     #[simd_test(enable = "msa")]
test_msa_bsel_v()10499     unsafe fn test_msa_bsel_v() {
10500         #[rustfmt::skip]
10501         let a = u8x16::new(
10502             3, 5, 7, 1,
10503             3, 5, 7, 1,
10504             3, 5, 7, 1,
10505             3, 5, 7, 1
10506         );
10507         #[rustfmt::skip]
10508         let b = u8x16::new(
10509             6, 7, 8, 9,
10510             6, 7, 8, 9,
10511             6, 7, 8, 9,
10512             6, 7, 8, 9
10513         );
10514         #[rustfmt::skip]
10515         let c = u8x16::new(
10516             255, 155, 55, 1,
10517             255, 155, 55, 1,
10518             255, 155, 55, 1,
10519             255, 155, 55, 1
10520         );
10521         #[rustfmt::skip]
10522         let r = u8x16::new(
10523             7, 3, 15, 9,
10524             7, 3, 15, 9,
10525             7, 3, 15, 9,
10526             7, 3, 15, 9
10527         );
10528 
10529         assert_eq!(
10530             r,
10531             mem::transmute(__msa_bsel_v(
10532                 mem::transmute(a),
10533                 mem::transmute(b),
10534                 mem::transmute(c)
10535             ))
10536         );
10537     }
10538 
10539     #[simd_test(enable = "msa")]
test_msa_bseli_b()10540     unsafe fn test_msa_bseli_b() {
10541         #[rustfmt::skip]
10542         let a = u8x16::new(
10543             255, 155, 55, 1,
10544             255, 155, 55, 1,
10545             255, 155, 55, 1,
10546             255, 155, 55, 1
10547         );
10548         #[rustfmt::skip]
10549         let b = u8x16::new(
10550             6, 7, 8, 9,
10551             6, 7, 8, 9,
10552             6, 7, 8, 9,
10553             6, 7, 8, 9
10554         );
10555         #[rustfmt::skip]
10556         let r = u8x16::new(
10557             121, 29, 57, 9,
10558             121, 29, 57, 9,
10559             121, 29, 57, 9,
10560             121, 29, 57, 9
10561         );
10562 
10563         assert_eq!(
10564             r,
10565             mem::transmute(__msa_bseli_b(mem::transmute(a), mem::transmute(b), 121))
10566         );
10567     }
10568 
10569     #[simd_test(enable = "msa")]
test_msa_bset_b()10570     unsafe fn test_msa_bset_b() {
10571         #[rustfmt::skip]
10572         let a = u8x16::new(
10573             255, 155, 55, 1,
10574             255, 155, 55, 1,
10575             255, 155, 55, 1,
10576             255, 155, 55, 1
10577         );
10578         #[rustfmt::skip]
10579         let b = u8x16::new(
10580             6, 7, 8, 9,
10581             6, 7, 8, 9,
10582             6, 7, 8, 9,
10583             6, 7, 8, 9
10584         );
10585         #[rustfmt::skip]
10586         let r = u8x16::new(
10587             255, 155, 55, 3,
10588             255, 155, 55, 3,
10589             255, 155, 55, 3,
10590             255, 155, 55, 3
10591         );
10592 
10593         assert_eq!(
10594             r,
10595             mem::transmute(__msa_bset_b(mem::transmute(a), mem::transmute(b)))
10596         );
10597     }
10598 
10599     #[simd_test(enable = "msa")]
test_msa_bset_h()10600     unsafe fn test_msa_bset_h() {
10601         #[rustfmt::skip]
10602         let a = u16x8::new(255, 155, 55, 1, 255, 155, 55, 1);
10603         #[rustfmt::skip]
10604         let b = u16x8::new(6, 7, 8, 9, 6, 7, 8, 9);
10605         #[rustfmt::skip]
10606         let r = u16x8::new(255, 155, 311, 513, 255, 155, 311, 513);
10607 
10608         assert_eq!(
10609             r,
10610             mem::transmute(__msa_bset_h(mem::transmute(a), mem::transmute(b)))
10611         );
10612     }
10613 
10614     #[simd_test(enable = "msa")]
test_msa_bset_w()10615     unsafe fn test_msa_bset_w() {
10616         #[rustfmt::skip]
10617         let a = u32x4::new(255, 155, 55, 1);
10618         #[rustfmt::skip]
10619         let b = u32x4::new(6, 7, 8, 9);
10620         #[rustfmt::skip]
10621         let r = u32x4::new(255, 155, 311, 513);
10622 
10623         assert_eq!(
10624             r,
10625             mem::transmute(__msa_bset_w(mem::transmute(a), mem::transmute(b)))
10626         );
10627     }
10628 
10629     #[simd_test(enable = "msa")]
test_msa_bset_d()10630     unsafe fn test_msa_bset_d() {
10631         #[rustfmt::skip]
10632         let a = u64x2::new(255, 155);
10633         #[rustfmt::skip]
10634         let b = u64x2::new(6, 7);
10635         #[rustfmt::skip]
10636         let r = u64x2::new(255, 155);
10637 
10638         assert_eq!(
10639             r,
10640             mem::transmute(__msa_bset_d(mem::transmute(a), mem::transmute(b)))
10641         );
10642     }
10643 
10644     #[simd_test(enable = "msa")]
test_msa_bseti_b()10645     unsafe fn test_msa_bseti_b() {
10646         #[rustfmt::skip]
10647         let a = u8x16::new(
10648             255, 155, 55, 1,
10649             255, 155, 55, 1,
10650             255, 155, 55, 1,
10651             255, 155, 55, 1
10652         );
10653         #[rustfmt::skip]
10654         let r = u8x16::new(
10655             255, 159, 55, 5,
10656             255, 159, 55, 5,
10657             255, 159, 55, 5,
10658             255, 159, 55, 5
10659         );
10660 
10661         assert_eq!(r, mem::transmute(__msa_bseti_b(mem::transmute(a), 2)));
10662     }
10663 
10664     #[simd_test(enable = "msa")]
test_msa_bseti_h()10665     unsafe fn test_msa_bseti_h() {
10666         #[rustfmt::skip]
10667         let a = u16x8::new(255, 155, 55, 1, 255, 155, 55, 1);
10668         #[rustfmt::skip]
10669         let r = u16x8::new(255, 159, 55, 5, 255, 159, 55, 5);
10670 
10671         assert_eq!(r, mem::transmute(__msa_bseti_h(mem::transmute(a), 2)));
10672     }
10673 
10674     #[simd_test(enable = "msa")]
test_msa_bseti_w()10675     unsafe fn test_msa_bseti_w() {
10676         #[rustfmt::skip]
10677         let a = u32x4::new(255, 155, 55, 1);
10678         #[rustfmt::skip]
10679         let r = u32x4::new(255, 159, 55, 5);
10680 
10681         assert_eq!(r, mem::transmute(__msa_bseti_w(mem::transmute(a), 2)));
10682     }
10683 
10684     #[simd_test(enable = "msa")]
test_msa_bseti_d()10685     unsafe fn test_msa_bseti_d() {
10686         #[rustfmt::skip]
10687         let a = u64x2::new(255, 155);
10688         #[rustfmt::skip]
10689         let r = u64x2::new(255, 159);
10690 
10691         assert_eq!(r, mem::transmute(__msa_bseti_d(mem::transmute(a), 2)));
10692     }
10693 
10694     #[simd_test(enable = "msa")]
test_msa_bz_b()10695     unsafe fn test_msa_bz_b() {
10696         #[rustfmt::skip]
10697         let a = u8x16::new(
10698             255, 155, 55, 1,
10699             255, 155, 55, 1,
10700             255, 155, 55, 1,
10701             255, 155, 55, 1
10702         );
10703         let r = 0 as i32;
10704 
10705         assert_eq!(r, mem::transmute(__msa_bz_b(mem::transmute(a))));
10706     }
10707 
10708     #[simd_test(enable = "msa")]
test_msa_bz_h()10709     unsafe fn test_msa_bz_h() {
10710         #[rustfmt::skip]
10711         let a = u16x8::new(0, 0, 0, 0, 0, 0, 0, 0);
10712         let r = 1 as i32;
10713 
10714         assert_eq!(r, mem::transmute(__msa_bz_h(mem::transmute(a))));
10715     }
10716 
10717     #[simd_test(enable = "msa")]
test_msa_bz_w()10718     unsafe fn test_msa_bz_w() {
10719         #[rustfmt::skip]
10720         let a = u32x4::new(255, 0, 55, 1);
10721         let r = 1 as i32;
10722 
10723         assert_eq!(r, mem::transmute(__msa_bz_w(mem::transmute(a))));
10724     }
10725 
10726     #[simd_test(enable = "msa")]
test_msa_bz_d()10727     unsafe fn test_msa_bz_d() {
10728         #[rustfmt::skip]
10729         let a = u64x2::new(255, 0);
10730         let r = 1 as i32;
10731 
10732         assert_eq!(r, mem::transmute(__msa_bz_d(mem::transmute(a))));
10733     }
10734 
10735     #[simd_test(enable = "msa")]
test_msa_bz_v()10736     unsafe fn test_msa_bz_v() {
10737         #[rustfmt::skip]
10738         let a = u8x16::new(
10739             0, 0, 0, 0,
10740             0, 0, 0, 0,
10741             0, 0, 0, 0,
10742             0, 0, 0, 0
10743         );
10744         let r = 1 as i32;
10745 
10746         assert_eq!(r, mem::transmute(__msa_bz_v(mem::transmute(a))));
10747     }
10748 
10749     #[simd_test(enable = "msa")]
test_msa_ceq_b()10750     unsafe fn test_msa_ceq_b() {
10751         #[rustfmt::skip]
10752         let a = i8x16::new(
10753             -128, 127, 55, 1,
10754             -128, 127, 55, 1,
10755             -128, 127, 55, 1,
10756             -128, 127, 55, 1
10757         );
10758         #[rustfmt::skip]
10759         let b = i8x16::new(
10760             -128, 126, 55, 1,
10761             -128, 126, 55, 1,
10762             -128, 126, 55, 1,
10763             -128, 126, 55, 1
10764         );
10765         #[rustfmt::skip]
10766         let r = i8x16::new(
10767             -1, 0, -1, -1,
10768             -1, 0, -1, -1,
10769             -1, 0, -1, -1,
10770             -1, 0, -1, -1
10771         );
10772 
10773         assert_eq!(
10774             r,
10775             mem::transmute(__msa_ceq_b(mem::transmute(a), mem::transmute(b)))
10776         );
10777     }
10778 
10779     #[simd_test(enable = "msa")]
test_msa_ceq_h()10780     unsafe fn test_msa_ceq_h() {
10781         #[rustfmt::skip]
10782         let a = i16x8::new(255, 155, 55, 1, 255, 155, 55, 1);
10783         #[rustfmt::skip]
10784         let b = i16x8::new(255, 155, 56, 1, 255, 155, 56, 1);
10785         #[rustfmt::skip]
10786         let r = i16x8::new(-1, -1, 0, -1, -1, -1, 0, -1);
10787 
10788         assert_eq!(
10789             r,
10790             mem::transmute(__msa_ceq_h(mem::transmute(a), mem::transmute(b)))
10791         );
10792     }
10793 
10794     #[simd_test(enable = "msa")]
test_msa_ceq_w()10795     unsafe fn test_msa_ceq_w() {
10796         #[rustfmt::skip]
10797         let a = i32x4::new(255, 155, 55, 1);
10798         #[rustfmt::skip]
10799         let b = i32x4::new(255, 156, 55, 1);
10800         #[rustfmt::skip]
10801         let r = i32x4::new(-1, 0, -1, -1);
10802 
10803         assert_eq!(
10804             r,
10805             mem::transmute(__msa_ceq_w(mem::transmute(a), mem::transmute(b)))
10806         );
10807     }
10808 
10809     #[simd_test(enable = "msa")]
test_msa_ceq_d()10810     unsafe fn test_msa_ceq_d() {
10811         #[rustfmt::skip]
10812         let a = i64x2::new(255, 155);
10813         #[rustfmt::skip]
10814         let b = i64x2::new(255, 156);
10815         #[rustfmt::skip]
10816         let r = i64x2::new(-1, 0);
10817 
10818         assert_eq!(
10819             r,
10820             mem::transmute(__msa_ceq_d(mem::transmute(a), mem::transmute(b)))
10821         );
10822     }
10823 
10824     #[simd_test(enable = "msa")]
test_msa_ceqi_b()10825     unsafe fn test_msa_ceqi_b() {
10826         #[rustfmt::skip]
10827         let a = i8x16::new(
10828             100, -1, -4, 15,
10829             100, -1, -4, 15,
10830             100, -1, -4, 15,
10831             100, -1, -4, 15
10832         );
10833         #[rustfmt::skip]
10834         let r = i8x16::new(
10835             0, 0, -1, 0,
10836             0, 0, -1, 0,
10837             0, 0, -1, 0,
10838             0, 0, -1, 0
10839         );
10840 
10841         assert_eq!(r, mem::transmute(__msa_ceqi_b(mem::transmute(a), -4)));
10842     }
10843 
10844     #[simd_test(enable = "msa")]
test_msa_ceqi_h()10845     unsafe fn test_msa_ceqi_h() {
10846         #[rustfmt::skip]
10847         let a = i16x8::new(
10848             32767, 3276, 100, -11,
10849             32767, 3276, 100, -11
10850         );
10851         #[rustfmt::skip]
10852         let r = i16x8::new(0, 0, 0, -1, 0, 0, 0, -1);
10853 
10854         assert_eq!(r, mem::transmute(__msa_ceqi_h(mem::transmute(a), -11)));
10855     }
10856 
10857     #[simd_test(enable = "msa")]
test_msa_ceqi_w()10858     unsafe fn test_msa_ceqi_w() {
10859         #[rustfmt::skip]
10860         let a = i32x4::new(1, 3, 5, -3);
10861         #[rustfmt::skip]
10862         let r = i32x4::new(0, 0, -1, 0);
10863 
10864         assert_eq!(r, mem::transmute(__msa_ceqi_w(mem::transmute(a), 5)));
10865     }
10866 
10867     // FIXME: https://reviews.llvm.org/D59884
10868     // If target type is i64, negative immediate loses the sign
10869     // Test passes if 4294967293 is used instead -3 in vector `a`
10870     // #[simd_test(enable = "msa")]
10871     // unsafe fn test_msa_ceqi_d() {
10872     //     #[rustfmt::skip]
10873     //     let a = i64x2::new(-3, 2);
10874     //     #[rustfmt::skip]
10875     //     let r = i64x2::new(-1, 0);
10876 
10877     //     assert_eq!(r, mem::transmute(__msa_ceqi_d(mem::transmute(a), -3)));
10878     // }
10879 
10880     // Can not be tested in user mode
10881     // #[simd_test(enable = "msa")]
10882     // unsafe fn test_msa_cfcmsa() {
10883     //     let r = 5;
10884 
10885     //     assert_eq!(r, mem::transmute(__msa_cfcmsa(5));
10886     // }
10887 
10888     #[simd_test(enable = "msa")]
test_msa_cle_s_b()10889     unsafe fn test_msa_cle_s_b() {
10890         #[rustfmt::skip]
10891         let a = i8x16::new(
10892             -128, 127, 55, 2,
10893             -128, 127, 55, 2,
10894             -128, 127, 55, 2,
10895             -128, 127, 55, 2
10896         );
10897         #[rustfmt::skip]
10898         let b = i8x16::new(
10899             -128, 126, 55, 1,
10900             -128, 126, 55, 1,
10901             -128, 126, 55, 1,
10902             -128, 126, 55, 1
10903         );
10904         #[rustfmt::skip]
10905         let r = i8x16::new(
10906             -1, 0, -1, 0,
10907             -1, 0, -1, 0,
10908             -1, 0, -1, 0,
10909             -1, 0, -1, 0
10910         );
10911 
10912         assert_eq!(
10913             r,
10914             mem::transmute(__msa_cle_s_b(mem::transmute(a), mem::transmute(b)))
10915         );
10916     }
10917 
10918     #[simd_test(enable = "msa")]
test_msa_cle_s_h()10919     unsafe fn test_msa_cle_s_h() {
10920         #[rustfmt::skip]
10921         let a = i16x8::new(255, 155, 55, 2, 255, 155, 55, 2);
10922         #[rustfmt::skip]
10923         let b = i16x8::new(255, 155, 56, 1, 255, 155, 56, 1);
10924         #[rustfmt::skip]
10925         let r = i16x8::new(-1, -1, -1, 0, -1, -1, -1, 0);
10926 
10927         assert_eq!(
10928             r,
10929             mem::transmute(__msa_cle_s_h(mem::transmute(a), mem::transmute(b)))
10930         );
10931     }
10932 
10933     #[simd_test(enable = "msa")]
test_msa_cle_s_w()10934     unsafe fn test_msa_cle_s_w() {
10935         #[rustfmt::skip]
10936         let a = i32x4::new(255, 155, 55, 2);
10937         #[rustfmt::skip]
10938         let b = i32x4::new(255, 156, 55, 1);
10939         #[rustfmt::skip]
10940         let r = i32x4::new(-1, -1, -1, 0);
10941 
10942         assert_eq!(
10943             r,
10944             mem::transmute(__msa_cle_s_w(mem::transmute(a), mem::transmute(b)))
10945         );
10946     }
10947 
10948     #[simd_test(enable = "msa")]
test_msa_cle_s_d()10949     unsafe fn test_msa_cle_s_d() {
10950         #[rustfmt::skip]
10951         let a = i64x2::new(255, 155);
10952         #[rustfmt::skip]
10953         let b = i64x2::new(255, 156);
10954         #[rustfmt::skip]
10955         let r = i64x2::new(-1, -1);
10956 
10957         assert_eq!(
10958             r,
10959             mem::transmute(__msa_cle_s_d(mem::transmute(a), mem::transmute(b)))
10960         );
10961     }
10962 
10963     #[simd_test(enable = "msa")]
test_msa_cle_u_b()10964     unsafe fn test_msa_cle_u_b() {
10965         #[rustfmt::skip]
10966         let a = u8x16::new(
10967             u8::MAX, 127, 55, 2,
10968             u8::MAX, 127, 55, 2,
10969             u8::MAX, 127, 55, 2,
10970             u8::MAX, 127, 55, 2
10971         );
10972         #[rustfmt::skip]
10973         let b = u8x16::new(
10974             u8::MAX, 126, 55, 1,
10975             u8::MAX, 126, 55, 1,
10976             u8::MAX, 126, 55, 1,
10977             u8::MAX, 126, 55, 1
10978         );
10979         #[rustfmt::skip]
10980         let r = i8x16::new(-1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0);
10981 
10982         assert_eq!(
10983             r,
10984             mem::transmute(__msa_cle_u_b(mem::transmute(a), mem::transmute(b)))
10985         );
10986     }
10987 
10988     #[simd_test(enable = "msa")]
test_msa_cle_u_h()10989     unsafe fn test_msa_cle_u_h() {
10990         #[rustfmt::skip]
10991         let a = u16x8::new(
10992             u16::MAX, 155, 55, 2,
10993             u16::MAX, 155, 55, 2
10994         );
10995         #[rustfmt::skip]
10996         let b = u16x8::new(
10997             u16::MAX, 155, 56, 1,
10998             u16::MAX, 155, 56, 1
10999         );
11000         #[rustfmt::skip]
11001         let r = i16x8::new(-1, -1, -1, 0, -1, -1, -1, 0);
11002 
11003         assert_eq!(
11004             r,
11005             mem::transmute(__msa_cle_u_h(mem::transmute(a), mem::transmute(b)))
11006         );
11007     }
11008 
11009     #[simd_test(enable = "msa")]
test_msa_cle_u_w()11010     unsafe fn test_msa_cle_u_w() {
11011         #[rustfmt::skip]
11012         let a = u32x4::new(u32::MAX, 155, 55, 2);
11013         #[rustfmt::skip]
11014         let b = u32x4::new(u32::MAX, 156, 55, 1);
11015         #[rustfmt::skip]
11016         let r = i32x4::new(-1, -1, -1, 0);
11017 
11018         assert_eq!(
11019             r,
11020             mem::transmute(__msa_cle_u_w(mem::transmute(a), mem::transmute(b)))
11021         );
11022     }
11023 
11024     #[simd_test(enable = "msa")]
test_msa_cle_u_d()11025     unsafe fn test_msa_cle_u_d() {
11026         #[rustfmt::skip]
11027         let a = u64x2::new(u64::MAX, 155);
11028         #[rustfmt::skip]
11029         let b = u64x2::new(u64::MAX, 156);
11030         #[rustfmt::skip]
11031         let r = i64x2::new(-1, -1);
11032 
11033         assert_eq!(
11034             r,
11035             mem::transmute(__msa_cle_u_d(mem::transmute(a), mem::transmute(b)))
11036         );
11037     }
11038 
11039     #[simd_test(enable = "msa")]
test_msa_clei_s_b()11040     unsafe fn test_msa_clei_s_b() {
11041         #[rustfmt::skip]
11042         let a = i8x16::new(
11043             -2, -127, 100, -127,
11044             -2, -127, 100, -127,
11045             -2, -127, 100, -127,
11046             -2, -127, 100, -127
11047         );
11048         #[rustfmt::skip]
11049         let r = i8x16::new(-1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1);
11050 
11051         assert_eq!(r, mem::transmute(__msa_clei_s_b(mem::transmute(a), -2)));
11052     }
11053 
11054     #[simd_test(enable = "msa")]
test_msa_clei_s_h()11055     unsafe fn test_msa_clei_s_h() {
11056         #[rustfmt::skip]
11057         let a = i16x8::new(
11058             32767, 3276, 10, -1,
11059             32767, 3276, 10, -1,
11060         );
11061         #[rustfmt::skip]
11062         let r = i16x8::new(0, 0, 0, -1, 0, 0, 0, -1);
11063 
11064         assert_eq!(r, mem::transmute(__msa_clei_s_h(mem::transmute(a), -1)));
11065     }
11066 
11067     #[simd_test(enable = "msa")]
test_msa_clei_s_w()11068     unsafe fn test_msa_clei_s_w() {
11069         #[rustfmt::skip]
11070         let a = i32x4::new(100, 2147483647, 6, 2147483647);
11071         #[rustfmt::skip]
11072         let r = i32x4::new(0, 0, -1, 0);
11073 
11074         assert_eq!(r, mem::transmute(__msa_clei_s_w(mem::transmute(a), 6)));
11075     }
11076 
11077     // FIXME: https://reviews.llvm.org/D59884
11078     // If target type is i64, negative immediate loses the sign
11079     // -3 is represented as 4294967293
11080     // #[simd_test(enable = "msa")]
11081     // unsafe fn test_msa_clei_s_d() {
11082     //     #[rustfmt::skip]
11083     //     let a = i64x2::new(-3, 11);
11084     //     #[rustfmt::skip]
11085     //     let r = i64x2::new(-1, 0);
11086 
11087     //     assert_eq!(r, mem::transmute(__msa_clei_s_d(mem::transmute(a), -3)));
11088     // }
11089 
11090     #[simd_test(enable = "msa")]
test_msa_clei_u_b()11091     unsafe fn test_msa_clei_u_b() {
11092         #[rustfmt::skip]
11093         let a = u8x16::new(
11094             2, 127, 100, 127,
11095             2, 127, 100, 127,
11096             2, 127, 100, 127,
11097             2, 127, 100, 127,
11098         );
11099         #[rustfmt::skip]
11100         let r = i8x16::new(
11101             -1, 0, 0, 0,
11102             -1, 0, 0, 0,
11103             -1, 0, 0, 0,
11104             -1, 0, 0, 0
11105         );
11106 
11107         assert_eq!(r, mem::transmute(__msa_clei_u_b(mem::transmute(a), 25)));
11108     }
11109 
11110     #[simd_test(enable = "msa")]
test_msa_clei_u_h()11111     unsafe fn test_msa_clei_u_h() {
11112         #[rustfmt::skip]
11113         let a = u16x8::new(
11114             1, 26, 15, 36,
11115             1, 26, 15, 36
11116         );
11117         #[rustfmt::skip]
11118         let r = i16x8::new(-1, 0, -1, 0, -1, 0, -1, 0);
11119 
11120         assert_eq!(r, mem::transmute(__msa_clei_u_h(mem::transmute(a), 25)));
11121     }
11122 
11123     #[simd_test(enable = "msa")]
test_msa_clei_u_w()11124     unsafe fn test_msa_clei_u_w() {
11125         #[rustfmt::skip]
11126         let a = u32x4::new(25, 32, 25, 32);
11127         #[rustfmt::skip]
11128         let r = i32x4::new(-1, 0, -1, 0);
11129 
11130         assert_eq!(r, mem::transmute(__msa_clei_u_w(mem::transmute(a), 31)));
11131     }
11132 
11133     #[simd_test(enable = "msa")]
test_msa_clei_u_d()11134     unsafe fn test_msa_clei_u_d() {
11135         #[rustfmt::skip]
11136         let a = u64x2::new(10, 26);
11137         #[rustfmt::skip]
11138         let r = i64x2::new(-1, 0);
11139 
11140         assert_eq!(r, mem::transmute(__msa_clei_u_d(mem::transmute(a), 25)));
11141     }
11142 
11143     #[simd_test(enable = "msa")]
test_msa_clt_s_b()11144     unsafe fn test_msa_clt_s_b() {
11145         #[rustfmt::skip]
11146         let a = i8x16::new(
11147             -128, 127, 55, 2,
11148             -128, 127, 55, 2,
11149             -128, 127, 55, 2,
11150             -128, 127, 55, 2
11151         );
11152         #[rustfmt::skip]
11153         let b = i8x16::new(
11154             -127, 126, 56, 1,
11155             -127, 126, 56, 1,
11156             -127, 126, 56, 1,
11157             -127, 126, 56, 1
11158         );
11159         #[rustfmt::skip]
11160         let r = i8x16::new(
11161             -1, 0, -1, 0,
11162             -1, 0, -1, 0,
11163             -1, 0, -1, 0,
11164             -1, 0, -1, 0
11165         );
11166 
11167         assert_eq!(
11168             r,
11169             mem::transmute(__msa_clt_s_b(mem::transmute(a), mem::transmute(b)))
11170         );
11171     }
11172 
11173     #[simd_test(enable = "msa")]
test_msa_clt_s_h()11174     unsafe fn test_msa_clt_s_h() {
11175         #[rustfmt::skip]
11176         let a = i16x8::new(-255, 155, 55, 2, -255, 155, 55, 2);
11177         #[rustfmt::skip]
11178         let b = i16x8::new(255, 156, 56, 1, 255, 156, 56, 1);
11179         #[rustfmt::skip]
11180         let r = i16x8::new(-1, -1, -1, 0, -1, -1, -1, 0);
11181 
11182         assert_eq!(
11183             r,
11184             mem::transmute(__msa_clt_s_h(mem::transmute(a), mem::transmute(b)))
11185         );
11186     }
11187 
11188     #[simd_test(enable = "msa")]
test_msa_clt_s_w()11189     unsafe fn test_msa_clt_s_w() {
11190         #[rustfmt::skip]
11191         let a = i32x4::new(-255, 155, 55, 2);
11192         #[rustfmt::skip]
11193         let b = i32x4::new(255, 156, 55, 1);
11194         #[rustfmt::skip]
11195         let r = i32x4::new(-1, -1, 0, 0);
11196 
11197         assert_eq!(
11198             r,
11199             mem::transmute(__msa_clt_s_w(mem::transmute(a), mem::transmute(b)))
11200         );
11201     }
11202 
11203     #[simd_test(enable = "msa")]
test_msa_clt_s_d()11204     unsafe fn test_msa_clt_s_d() {
11205         #[rustfmt::skip]
11206         let a = i64x2::new(-255, 155);
11207         #[rustfmt::skip]
11208         let b = i64x2::new(255, 156);
11209         #[rustfmt::skip]
11210         let r = i64x2::new(-1, -1);
11211 
11212         assert_eq!(
11213             r,
11214             mem::transmute(__msa_clt_s_d(mem::transmute(a), mem::transmute(b)))
11215         );
11216     }
11217 
11218     #[simd_test(enable = "msa")]
test_msa_clt_u_b()11219     unsafe fn test_msa_clt_u_b() {
11220         #[rustfmt::skip]
11221         let a = u8x16::new(
11222             128, 127, 55, 2,
11223             128, 127, 55, 2,
11224             128, 127, 55, 2,
11225             128, 127, 55, 2
11226         );
11227         #[rustfmt::skip]
11228         let b = u8x16::new(
11229             127, 126, 56, 1,
11230             127, 126, 56, 1,
11231             127, 126, 56, 1,
11232             127, 126, 56, 1
11233         );
11234         #[rustfmt::skip]
11235         let r = i8x16::new(
11236             0, 0, -1, 0,
11237             0, 0, -1, 0,
11238             0, 0, -1, 0,
11239             0, 0, -1, 0
11240         );
11241 
11242         assert_eq!(
11243             r,
11244             mem::transmute(__msa_clt_u_b(mem::transmute(a), mem::transmute(b)))
11245         );
11246     }
11247 
11248     #[simd_test(enable = "msa")]
test_msa_clt_u_h()11249     unsafe fn test_msa_clt_u_h() {
11250         #[rustfmt::skip]
11251         let a = u16x8::new(255, 155, 55, 2, 255, 155, 55, 2);
11252         #[rustfmt::skip]
11253         let b = u16x8::new(255, 156, 56, 1, 255, 156, 56, 1);
11254         #[rustfmt::skip]
11255         let r = i16x8::new(0, -1, -1, 0, 0, -1, -1, 0);
11256 
11257         assert_eq!(
11258             r,
11259             mem::transmute(__msa_clt_u_h(mem::transmute(a), mem::transmute(b)))
11260         );
11261     }
11262 
11263     #[simd_test(enable = "msa")]
test_msa_clt_u_w()11264     unsafe fn test_msa_clt_u_w() {
11265         #[rustfmt::skip]
11266         let a = u32x4::new(255, 155, 55, 2);
11267         #[rustfmt::skip]
11268         let b = u32x4::new(255, 156, 55, 1);
11269         #[rustfmt::skip]
11270         let r = i32x4::new(0, -1, 0, 0);
11271 
11272         assert_eq!(
11273             r,
11274             mem::transmute(__msa_clt_u_w(mem::transmute(a), mem::transmute(b)))
11275         );
11276     }
11277 
11278     #[simd_test(enable = "msa")]
test_msa_clt_u_d()11279     unsafe fn test_msa_clt_u_d() {
11280         #[rustfmt::skip]
11281         let a = u64x2::new(255, 155);
11282         #[rustfmt::skip]
11283         let b = u64x2::new(255, 156);
11284         #[rustfmt::skip]
11285         let r = i64x2::new(0, -1);
11286 
11287         assert_eq!(
11288             r,
11289             mem::transmute(__msa_clt_u_d(mem::transmute(a), mem::transmute(b)))
11290         );
11291     }
11292 
11293     #[simd_test(enable = "msa")]
test_msa_clti_s_b()11294     unsafe fn test_msa_clti_s_b() {
11295         #[rustfmt::skip]
11296         let a = i8x16::new(
11297             2, -127, -5, 127,
11298             2, -127, -5, 127,
11299             2, -127, -5, 127,
11300             2, -127, -5, 127
11301         );
11302         #[rustfmt::skip]
11303         let r = i8x16::new(
11304             0, -1, 0, 0,
11305             0, -1, 0, 0,
11306             0, -1, 0, 0,
11307             0, -1, 0, 0
11308         );
11309 
11310         assert_eq!(r, mem::transmute(__msa_clti_s_b(mem::transmute(a), -5)));
11311     }
11312 
11313     #[simd_test(enable = "msa")]
test_msa_clti_s_h()11314     unsafe fn test_msa_clti_s_h() {
11315         #[rustfmt::skip]
11316         let a = i16x8::new(
11317             -1024, 3276, 15, 127,
11318             -1024, 3276, 15, 127
11319         );
11320         #[rustfmt::skip]
11321         let r = i16x8::new(-1, 0, 0, 0, -1, 0, 0, 0);
11322 
11323         assert_eq!(r, mem::transmute(__msa_clti_s_h(mem::transmute(a), 15)));
11324     }
11325 
11326     #[simd_test(enable = "msa")]
test_msa_clti_s_w()11327     unsafe fn test_msa_clti_s_w() {
11328         #[rustfmt::skip]
11329         let a = i32x4::new(-15, 2147483647, -15, 2147483647);
11330         #[rustfmt::skip]
11331         let r = i32x4::new(-1, 0, -1, 0);
11332 
11333         assert_eq!(r, mem::transmute(__msa_clti_s_w(mem::transmute(a), -10)));
11334     }
11335 
11336     // FIXME: https://reviews.llvm.org/D59884
11337     // If target type is i64, negative immediate loses the sign
11338     // -3 is represented as 4294967293
11339     // #[simd_test(enable = "msa")]
11340     // unsafe fn test_msa_clti_s_d() {
11341     //     #[rustfmt::skip]
11342     //     let a = i64x2::new(-5, -2);
11343     //     #[rustfmt::skip]
11344     //     let r = i64x2::new(-1, 0);
11345 
11346     //     assert_eq!(r, mem::transmute(__msa_clti_s_d(mem::transmute(a), -3)));
11347     // }
11348 
11349     #[simd_test(enable = "msa")]
test_msa_clti_u_b()11350     unsafe fn test_msa_clti_u_b() {
11351         #[rustfmt::skip]
11352         let a = u8x16::new(
11353             2, 127, 49, 127,
11354             2, 127, 49, 127,
11355             2, 127, 49, 127,
11356             2, 127, 49, 127,
11357         );
11358         #[rustfmt::skip]
11359         let r = i8x16::new(
11360             -1, 0, 0, 0,
11361             -1, 0, 0, 0,
11362             -1, 0, 0, 0,
11363             -1, 0, 0, 0
11364         );
11365 
11366         assert_eq!(r, mem::transmute(__msa_clti_u_b(mem::transmute(a), 50)));
11367     }
11368 
11369     #[simd_test(enable = "msa")]
test_msa_clti_u_h()11370     unsafe fn test_msa_clti_u_h() {
11371         #[rustfmt::skip]
11372         let a = u16x8::new(
11373             327, 3276, 100, 127,
11374             327, 3276, 100, 127
11375         );
11376         #[rustfmt::skip]
11377         let r = i16x8::new(0, 0, 0, 0, 0, 0, 0, 0);
11378 
11379         assert_eq!(r, mem::transmute(__msa_clti_u_h(mem::transmute(a), 30)));
11380     }
11381 
11382     #[simd_test(enable = "msa")]
test_msa_clti_u_w()11383     unsafe fn test_msa_clti_u_w() {
11384         #[rustfmt::skip]
11385         let a = u32x4::new(100, 2147483647, 100, 2147483647);
11386         #[rustfmt::skip]
11387         let r = i32x4::new(0, 0, 0, 0);
11388 
11389         assert_eq!(r, mem::transmute(__msa_clti_u_w(mem::transmute(a), 10)));
11390     }
11391 
11392     #[simd_test(enable = "msa")]
test_msa_clti_u_d()11393     unsafe fn test_msa_clti_u_d() {
11394         #[rustfmt::skip]
11395         let a = u64x2::new(1, 9223372036854775807);
11396         #[rustfmt::skip]
11397         let r = i64x2::new(-1, 0);
11398 
11399         assert_eq!(r, mem::transmute(__msa_clti_u_d(mem::transmute(a), 10)));
11400     }
11401 
11402     #[simd_test(enable = "msa")]
test_msa_copy_s_b()11403     unsafe fn test_msa_copy_s_b() {
11404         #[rustfmt::skip]
11405         let a = i8x16::new(
11406             -100, 127, 4, 127,
11407             -100, 127, 4, 127,
11408             -100, 127, 4, 127,
11409             -100, 127, 4, 127
11410         );
11411         #[rustfmt::skip]
11412         let r = -100 as i32;
11413 
11414         assert_eq!(r, mem::transmute(__msa_copy_s_b(mem::transmute(a), 12)));
11415     }
11416 
11417     #[simd_test(enable = "msa")]
test_msa_copy_s_h()11418     unsafe fn test_msa_copy_s_h() {
11419         #[rustfmt::skip]
11420         let a = i16x8::new(
11421             32767, 3276, 100, 11,
11422             32767, 3276, 100, 11
11423         );
11424         #[rustfmt::skip]
11425         let r = 32767 as i32;
11426 
11427         assert_eq!(r, mem::transmute(__msa_copy_s_h(mem::transmute(a), 4)));
11428     }
11429 
11430     #[simd_test(enable = "msa")]
test_msa_copy_s_w()11431     unsafe fn test_msa_copy_s_w() {
11432         #[rustfmt::skip]
11433         let a = i32x4::new(100, 2147483647, 5, -2147483647);
11434         let r = 2147483647 as i32;
11435 
11436         assert_eq!(r, mem::transmute(__msa_copy_s_w(mem::transmute(a), 1)));
11437     }
11438 
11439     #[simd_test(enable = "msa")]
test_msa_copy_s_d()11440     unsafe fn test_msa_copy_s_d() {
11441         #[rustfmt::skip]
11442         let a = i64x2::new(3, 9223372036854775807);
11443         #[rustfmt::skip]
11444         let r = 9223372036854775807 as i64;
11445 
11446         assert_eq!(r, mem::transmute(__msa_copy_s_d(mem::transmute(a), 1)));
11447     }
11448 
11449     #[simd_test(enable = "msa")]
test_msa_copy_u_b()11450     unsafe fn test_msa_copy_u_b() {
11451         #[rustfmt::skip]
11452         let a = i8x16::new(
11453             100, 127, 4, 127,
11454             100, 127, 4, 127,
11455             100, 127, 4, 127,
11456             100, 127, 4, 127
11457         );
11458         #[rustfmt::skip]
11459         let r = 100 as u32;
11460 
11461         assert_eq!(r, mem::transmute(__msa_copy_u_b(mem::transmute(a), 12)));
11462     }
11463 
11464     #[simd_test(enable = "msa")]
test_msa_copy_u_h()11465     unsafe fn test_msa_copy_u_h() {
11466         #[rustfmt::skip]
11467         let a = i16x8::new(
11468             32767, 3276, 100, 11,
11469             32767, 3276, 100, 11
11470         );
11471         #[rustfmt::skip]
11472         let r = 32767 as u32;
11473 
11474         assert_eq!(r, mem::transmute(__msa_copy_u_h(mem::transmute(a), 4)));
11475     }
11476 
11477     #[simd_test(enable = "msa")]
test_msa_copy_u_w()11478     unsafe fn test_msa_copy_u_w() {
11479         #[rustfmt::skip]
11480         let a = i32x4::new(100, 2147483647, 5, 2147483647);
11481         #[rustfmt::skip]
11482         let r = 2147483647 as u32;
11483 
11484         assert_eq!(r, mem::transmute(__msa_copy_u_w(mem::transmute(a), 1)));
11485     }
11486 
11487     #[simd_test(enable = "msa")]
test_msa_copy_u_d()11488     unsafe fn test_msa_copy_u_d() {
11489         #[rustfmt::skip]
11490         let a = i64x2::new(3, i64::MAX);
11491         #[rustfmt::skip]
11492         let r = 9223372036854775807 as u64;
11493 
11494         assert_eq!(r, mem::transmute(__msa_copy_u_d(mem::transmute(a), 1)));
11495     }
11496 
11497     // Can not be tested in user mode
11498     // #[simd_test(enable = "msa")]
11499     // unsafe fn test_msa_ctcmsa() {
11500     // }
11501 
11502     #[simd_test(enable = "msa")]
test_msa_div_s_b()11503     unsafe fn test_msa_div_s_b() {
11504         #[rustfmt::skip]
11505         let a = i8x16::new(
11506             -6, -7, -8, -9,
11507             -6, -7, -8, -9,
11508             -6, -7, -8, -9,
11509             -6, -7, -8, -9
11510         );
11511         #[rustfmt::skip]
11512         let b = i8x16::new(
11513             -1, -2, -3, -4,
11514             -1, -2, -3, -4,
11515             -1, -2, -3, -4,
11516             -1, -2, -3, -4
11517         );
11518         #[rustfmt::skip]
11519         let r = i8x16::new(
11520             6, 3, 2, 2,
11521             6, 3, 2, 2,
11522             6, 3, 2, 2,
11523             6, 3, 2, 2
11524         );
11525 
11526         assert_eq!(
11527             r,
11528             mem::transmute(__msa_div_s_b(mem::transmute(a), mem::transmute(b)))
11529         );
11530     }
11531 
11532     #[simd_test(enable = "msa")]
test_msa_div_s_h()11533     unsafe fn test_msa_div_s_h() {
11534         #[rustfmt::skip]
11535         let a = i16x8::new(-6, -7, -8, -9, 6, 7, 8, 9);
11536         #[rustfmt::skip]
11537         let b = i16x8::new(-1, -2, -3, -4, -1, -2, -3, -4);
11538         #[rustfmt::skip]
11539         let r = i16x8::new(6, 3, 2, 2, -6, -3, -2, -2);
11540 
11541         assert_eq!(
11542             r,
11543             mem::transmute(__msa_div_s_h(mem::transmute(a), mem::transmute(b)))
11544         );
11545     }
11546 
11547     #[simd_test(enable = "msa")]
test_msa_div_s_w()11548     unsafe fn test_msa_div_s_w() {
11549         #[rustfmt::skip]
11550         let a = i32x4::new(-6, -7, 8, 9);
11551         #[rustfmt::skip]
11552         let b = i32x4::new(-1, -2, -3, -4);
11553         #[rustfmt::skip]
11554         let r = i32x4::new(6, 3, -2, -2);
11555 
11556         assert_eq!(
11557             r,
11558             mem::transmute(__msa_div_s_w(mem::transmute(a), mem::transmute(b)))
11559         );
11560     }
11561 
11562     #[simd_test(enable = "msa")]
test_msa_div_s_d()11563     unsafe fn test_msa_div_s_d() {
11564         #[rustfmt::skip]
11565         let a = i64x2::new(-6, 7);
11566         #[rustfmt::skip]
11567         let b = i64x2::new(-1, -2);
11568         #[rustfmt::skip]
11569         let r = i64x2::new(6, -3);
11570 
11571         assert_eq!(
11572             r,
11573             mem::transmute(__msa_div_s_d(mem::transmute(a), mem::transmute(b)))
11574         );
11575     }
11576 
11577     #[simd_test(enable = "msa")]
test_msa_div_u_b()11578     unsafe fn test_msa_div_u_b() {
11579         #[rustfmt::skip]
11580         let a = u8x16::new(
11581             6, 7, 8, 9,
11582             6, 7, 8, 9,
11583             6, 7, 8, 9,
11584             6, 7, 8, 9
11585         );
11586         #[rustfmt::skip]
11587         let b = u8x16::new(
11588             1, 2, 3, 4,
11589             1, 2, 3, 4,
11590             1, 2, 3, 4,
11591             1, 2, 3, 4
11592         );
11593         #[rustfmt::skip]
11594         let r = u8x16::new(
11595             6, 3, 2, 2,
11596             6, 3, 2, 2,
11597             6, 3, 2, 2,
11598             6, 3, 2, 2
11599         );
11600 
11601         assert_eq!(
11602             r,
11603             mem::transmute(__msa_div_u_b(mem::transmute(a), mem::transmute(b)))
11604         );
11605     }
11606 
11607     #[simd_test(enable = "msa")]
test_msa_div_u_h()11608     unsafe fn test_msa_div_u_h() {
11609         #[rustfmt::skip]
11610         let a = u16x8::new(6, 7, 8, 9, 6, 7, 8, 9);
11611         #[rustfmt::skip]
11612         let b = u16x8::new(1, 2, 3, 4, 1, 2, 3, 4);
11613         #[rustfmt::skip]
11614         let r = u16x8::new(6, 3, 2, 2, 6, 3, 2, 2);
11615 
11616         assert_eq!(
11617             r,
11618             mem::transmute(__msa_div_u_h(mem::transmute(a), mem::transmute(b)))
11619         );
11620     }
11621 
11622     #[simd_test(enable = "msa")]
test_msa_div_u_w()11623     unsafe fn test_msa_div_u_w() {
11624         #[rustfmt::skip]
11625         let a = u32x4::new(6, 7, 8, 9);
11626         #[rustfmt::skip]
11627         let b = u32x4::new(1, 2, 3, 4);
11628         #[rustfmt::skip]
11629         let r = u32x4::new(6, 3, 2, 2);
11630 
11631         assert_eq!(
11632             r,
11633             mem::transmute(__msa_div_u_w(mem::transmute(a), mem::transmute(b)))
11634         );
11635     }
11636 
11637     #[simd_test(enable = "msa")]
test_msa_div_u_d()11638     unsafe fn test_msa_div_u_d() {
11639         #[rustfmt::skip]
11640         let a = u64x2::new(6, 7);
11641         #[rustfmt::skip]
11642         let b = u64x2::new(1, 2);
11643         #[rustfmt::skip]
11644         let r = u64x2::new(6, 3);
11645 
11646         assert_eq!(
11647             r,
11648             mem::transmute(__msa_div_u_d(mem::transmute(a), mem::transmute(b)))
11649         );
11650     }
11651 
11652     #[simd_test(enable = "msa")]
test_msa_dotp_s_h()11653     unsafe fn test_msa_dotp_s_h() {
11654         #[rustfmt::skip]
11655         let a = i8x16::new(
11656             -1, -2, -3, 4,
11657             -1, -2, -3, -4,
11658             -1, -2, -3, 4,
11659             -1, -2, -3, -4
11660         );
11661         #[rustfmt::skip]
11662         let b = i8x16::new(
11663             -6, -7, -8, -9,
11664             -6, -7, -8, -9,
11665             -6, -7, -8, -9,
11666             -6, -7, -8, -9
11667         );
11668         #[rustfmt::skip]
11669         let r = i16x8::new(20, -12, 20, 60, 20, -12, 20, 60);
11670 
11671         assert_eq!(
11672             r,
11673             mem::transmute(__msa_dotp_s_h(mem::transmute(a), mem::transmute(b)))
11674         );
11675     }
11676 
11677     #[simd_test(enable = "msa")]
test_msa_dotp_s_w()11678     unsafe fn test_msa_dotp_s_w() {
11679         #[rustfmt::skip]
11680         let a = i16x8::new(-1, -2, -3, -4, -1, -2, -3, 4);
11681         #[rustfmt::skip]
11682         let b = i16x8::new(-6, -7, -8, -9, -6, -7, -8, -9);
11683         #[rustfmt::skip]
11684         let r = i32x4::new(20, 60, 20, -12);
11685 
11686         assert_eq!(
11687             r,
11688             mem::transmute(__msa_dotp_s_w(mem::transmute(a), mem::transmute(b)))
11689         );
11690     }
11691 
11692     #[simd_test(enable = "msa")]
test_msa_dotp_s_d()11693     unsafe fn test_msa_dotp_s_d() {
11694         #[rustfmt::skip]
11695         let a = i32x4::new(-1, -2, -3, 4);
11696         #[rustfmt::skip]
11697         let b = i32x4::new(-6, -7, -8, -9);
11698         #[rustfmt::skip]
11699         let r = i64x2::new(20, -12);
11700 
11701         assert_eq!(
11702             r,
11703             mem::transmute(__msa_dotp_s_d(mem::transmute(a), mem::transmute(b)))
11704         );
11705     }
11706 
11707     #[simd_test(enable = "msa")]
test_msa_dotp_u_h()11708     unsafe fn test_msa_dotp_u_h() {
11709         #[rustfmt::skip]
11710         let a = u8x16::new(
11711             1, 2, 3, 4,
11712             1, 2, 3, 4,
11713             1, 2, 3, 4,
11714             1, 2, 3, 4
11715         );
11716         #[rustfmt::skip]
11717         let b = u8x16::new(
11718             6, 7, 8, 9,
11719             6, 7, 8, 9,
11720             6, 7, 8, 9,
11721             6, 7, 8, 9
11722         );
11723         #[rustfmt::skip]
11724         let r = u16x8::new(20, 60, 20, 60, 20, 60, 20, 60);
11725 
11726         assert_eq!(
11727             r,
11728             mem::transmute(__msa_dotp_u_h(mem::transmute(a), mem::transmute(b)))
11729         );
11730     }
11731 
11732     #[simd_test(enable = "msa")]
test_msa_dotp_u_w()11733     unsafe fn test_msa_dotp_u_w() {
11734         #[rustfmt::skip]
11735         let a = u16x8::new(1, 2, 3, 4, 1, 2, 3, 4);
11736         #[rustfmt::skip]
11737         let b = u16x8::new(6, 7, 8, 9, 6, 7, 8, 9);
11738         #[rustfmt::skip]
11739         let r = u32x4::new(20, 60, 20, 60);
11740 
11741         assert_eq!(
11742             r,
11743             mem::transmute(__msa_dotp_u_w(mem::transmute(a), mem::transmute(b)))
11744         );
11745     }
11746 
11747     #[simd_test(enable = "msa")]
test_msa_dotp_u_d()11748     unsafe fn test_msa_dotp_u_d() {
11749         #[rustfmt::skip]
11750         let a = u32x4::new(1, 2, 3, 4);
11751         #[rustfmt::skip]
11752         let b = u32x4::new(6, 7, 8, 9);
11753         #[rustfmt::skip]
11754         let r = u64x2::new(20, 60);
11755 
11756         assert_eq!(
11757             r,
11758             mem::transmute(__msa_dotp_u_d(mem::transmute(a), mem::transmute(b)))
11759         );
11760     }
11761 
11762     #[simd_test(enable = "msa")]
test_msa_dpadd_s_h()11763     unsafe fn test_msa_dpadd_s_h() {
11764         #[rustfmt::skip]
11765         let a = i16x8::new(-1, -2, -3, -4, -1, -2, -3, 4);
11766         #[rustfmt::skip]
11767         let b = i8x16::new(
11768             -1, -2, -3, 4,
11769             -1, -2, -3, -4,
11770             -1, -2, -3, 4,
11771             -1, -2, -3, -4
11772         );
11773         #[rustfmt::skip]
11774         let c = i8x16::new(
11775             -6, -7, -8, -9,
11776             -6, -7, -8, -9,
11777             -6, -7, -8, -9,
11778             -6, -7, -8, -9
11779         );
11780         #[rustfmt::skip]
11781         let r = i16x8::new(19, -14, 17, 56, 19, -14, 17, 64);
11782 
11783         assert_eq!(
11784             r,
11785             mem::transmute(__msa_dpadd_s_h(
11786                 mem::transmute(a),
11787                 mem::transmute(b),
11788                 mem::transmute(c)
11789             ))
11790         );
11791     }
11792 
11793     #[simd_test(enable = "msa")]
test_msa_dpadd_s_w()11794     unsafe fn test_msa_dpadd_s_w() {
11795         #[rustfmt::skip]
11796         let a = i32x4::new(-1, -2, -3, -4);
11797         #[rustfmt::skip]
11798         let b = i16x8::new(
11799             -1, -2, -3, 4,
11800             -1, -2, -3, -4
11801         );
11802         #[rustfmt::skip]
11803         let c = i16x8::new(
11804             -6, -7, -8, -9,
11805             -6, -7, -8, -9
11806         );
11807         #[rustfmt::skip]
11808         let r = i32x4::new(19, -14, 17, 56);
11809 
11810         assert_eq!(
11811             r,
11812             mem::transmute(__msa_dpadd_s_w(
11813                 mem::transmute(a),
11814                 mem::transmute(b),
11815                 mem::transmute(c)
11816             ))
11817         );
11818     }
11819 
11820     #[simd_test(enable = "msa")]
test_msa_dpadd_s_d()11821     unsafe fn test_msa_dpadd_s_d() {
11822         #[rustfmt::skip]
11823         let a = i64x2::new(-1, -2);
11824         #[rustfmt::skip]
11825         let b = i32x4::new(-1, -2, -3, 4);
11826         #[rustfmt::skip]
11827         let c = i32x4::new(-6, -7, -8, -9);
11828         #[rustfmt::skip]
11829         let r = i64x2::new(19, -14);
11830 
11831         assert_eq!(
11832             r,
11833             mem::transmute(__msa_dpadd_s_d(
11834                 mem::transmute(a),
11835                 mem::transmute(b),
11836                 mem::transmute(c)
11837             ))
11838         );
11839     }
11840 
11841     #[simd_test(enable = "msa")]
test_msa_dpadd_u_h()11842     unsafe fn test_msa_dpadd_u_h() {
11843         #[rustfmt::skip]
11844         let a = u16x8::new(1, 2, 3, 4, 1, 2, 3, 4);
11845         #[rustfmt::skip]
11846         let b = u8x16::new(
11847             1, 2, 3, 4,
11848             1, 2, 3, 4,
11849             1, 2, 3, 4,
11850             1, 2, 3, 4
11851         );
11852         #[rustfmt::skip]
11853         let c = u8x16::new(
11854             6, 7, 8, 9,
11855             6, 7, 8, 9,
11856             6, 7, 8, 9,
11857             6, 7, 8, 9
11858         );
11859         #[rustfmt::skip]
11860         let r = u16x8::new(21, 62, 23, 64, 21, 62, 23, 64);
11861 
11862         assert_eq!(
11863             r,
11864             mem::transmute(__msa_dpadd_u_h(
11865                 mem::transmute(a),
11866                 mem::transmute(b),
11867                 mem::transmute(c)
11868             ))
11869         );
11870     }
11871 
11872     #[simd_test(enable = "msa")]
test_msa_dpadd_u_w()11873     unsafe fn test_msa_dpadd_u_w() {
11874         #[rustfmt::skip]
11875         let a = u32x4::new(1, 2, 3, 4);
11876         #[rustfmt::skip]
11877         let b = u16x8::new(
11878             1, 2, 3, 4,
11879             1, 2, 3, 4
11880         );
11881         #[rustfmt::skip]
11882         let c = u16x8::new(
11883             6, 7, 8, 9,
11884             6, 7, 8, 9
11885         );
11886         #[rustfmt::skip]
11887         let r = u32x4::new(21, 62, 23, 64);
11888 
11889         assert_eq!(
11890             r,
11891             mem::transmute(__msa_dpadd_u_w(
11892                 mem::transmute(a),
11893                 mem::transmute(b),
11894                 mem::transmute(c)
11895             ))
11896         );
11897     }
11898 
11899     #[simd_test(enable = "msa")]
test_msa_dpadd_u_d()11900     unsafe fn test_msa_dpadd_u_d() {
11901         #[rustfmt::skip]
11902         let a = u64x2::new(1, 2);
11903         #[rustfmt::skip]
11904         let b = u32x4::new(1, 2, 3, 4);
11905         #[rustfmt::skip]
11906         let c = u32x4::new(6, 7, 8, 9);
11907         #[rustfmt::skip]
11908         let r = u64x2::new(21, 62);
11909 
11910         assert_eq!(
11911             r,
11912             mem::transmute(__msa_dpadd_u_d(
11913                 mem::transmute(a),
11914                 mem::transmute(b),
11915                 mem::transmute(c)
11916             ))
11917         );
11918     }
11919 
11920     #[simd_test(enable = "msa")]
test_msa_dpsub_s_h()11921     unsafe fn test_msa_dpsub_s_h() {
11922         #[rustfmt::skip]
11923         let a = i16x8::new(-1, -2, -3, -4, -1, -2, -3, 4);
11924         #[rustfmt::skip]
11925         let b = i8x16::new(
11926             -1, -2, -3, 4,
11927             -1, -2, -3, -4,
11928             -1, -2, -3, 4,
11929             -1, -2, -3, -4
11930         );
11931         #[rustfmt::skip]
11932         let c = i8x16::new(
11933             -6, -7, -8, -9,
11934             -6, -7, -8, -9,
11935             -6, -7, -8, -9,
11936             -6, -7, -8, -9
11937         );
11938         #[rustfmt::skip]
11939         let r = i16x8::new(-21, 10, -23, -64, -21, 10, -23, -56);
11940 
11941         assert_eq!(
11942             r,
11943             mem::transmute(__msa_dpsub_s_h(
11944                 mem::transmute(a),
11945                 mem::transmute(b),
11946                 mem::transmute(c)
11947             ))
11948         );
11949     }
11950 
11951     #[simd_test(enable = "msa")]
test_msa_dpsub_s_w()11952     unsafe fn test_msa_dpsub_s_w() {
11953         #[rustfmt::skip]
11954         let a = i32x4::new(-1, -2, -3, -4);
11955         #[rustfmt::skip]
11956         let b = i16x8::new(
11957             -1, -2, -3, 4,
11958             -1, -2, -3, -4
11959         );
11960         #[rustfmt::skip]
11961         let c = i16x8::new(
11962             -6, -7, -8, -9,
11963             -6, -7, -8, -9
11964         );
11965         #[rustfmt::skip]
11966         let r = i32x4::new(-21, 10, -23, -64);
11967 
11968         assert_eq!(
11969             r,
11970             mem::transmute(__msa_dpsub_s_w(
11971                 mem::transmute(a),
11972                 mem::transmute(b),
11973                 mem::transmute(c)
11974             ))
11975         );
11976     }
11977 
11978     #[simd_test(enable = "msa")]
test_msa_dpsub_s_d()11979     unsafe fn test_msa_dpsub_s_d() {
11980         #[rustfmt::skip]
11981         let a = i64x2::new(-1, -2);
11982         #[rustfmt::skip]
11983         let b = i32x4::new(-1, -2, -3, 4);
11984         #[rustfmt::skip]
11985         let c = i32x4::new(-6, -7, -8, -9);
11986         #[rustfmt::skip]
11987         let r = i64x2::new(-21, 10);
11988 
11989         assert_eq!(
11990             r,
11991             mem::transmute(__msa_dpsub_s_d(
11992                 mem::transmute(a),
11993                 mem::transmute(b),
11994                 mem::transmute(c)
11995             ))
11996         );
11997     }
11998 
11999     #[simd_test(enable = "msa")]
test_msa_dpsub_u_h()12000     unsafe fn test_msa_dpsub_u_h() {
12001         #[rustfmt::skip]
12002         let a = i16x8::new(1, -2, 3, -4, -1, 2,-3, 4);
12003         #[rustfmt::skip]
12004         let b = u8x16::new(
12005             1, 2, 3, 4,
12006             1, 2, 3, 4,
12007             1, 2, 3, 4,
12008             1, 2, 3, 4
12009         );
12010         #[rustfmt::skip]
12011         let c = u8x16::new(
12012             6, 7, 8, 9,
12013             6, 7, 8, 9,
12014             6, 7, 8, 9,
12015             6, 7, 8, 9
12016         );
12017         #[rustfmt::skip]
12018         let r = i16x8::new(-19, -62, -17, -64, -21, -58, -23, -56);
12019 
12020         assert_eq!(
12021             r,
12022             mem::transmute(__msa_dpsub_u_h(
12023                 mem::transmute(a),
12024                 mem::transmute(b),
12025                 mem::transmute(c)
12026             ))
12027         );
12028     }
12029 
12030     #[simd_test(enable = "msa")]
test_msa_dpsub_u_w()12031     unsafe fn test_msa_dpsub_u_w() {
12032         #[rustfmt::skip]
12033         let a = i32x4::new(1, -2, 3, -4);
12034         #[rustfmt::skip]
12035         let b = u16x8::new(
12036             1, 2, 3, 4,
12037             1, 2, 3, 4
12038         );
12039         #[rustfmt::skip]
12040         let c = u16x8::new(
12041             6, 7, 8, 9,
12042             6, 7, 8, 9
12043         );
12044         #[rustfmt::skip]
12045         let r = i32x4::new(-19, -62, -17, -64);
12046 
12047         assert_eq!(
12048             r,
12049             mem::transmute(__msa_dpsub_u_w(
12050                 mem::transmute(a),
12051                 mem::transmute(b),
12052                 mem::transmute(c)
12053             ))
12054         );
12055     }
12056 
12057     #[simd_test(enable = "msa")]
test_msa_dpsub_u_d()12058     unsafe fn test_msa_dpsub_u_d() {
12059         #[rustfmt::skip]
12060         let a = i64x2::new(1, -2);
12061         #[rustfmt::skip]
12062         let b = u32x4::new(1, 2, 3, 4);
12063         #[rustfmt::skip]
12064         let c = u32x4::new(6, 7, 8, 9);
12065         #[rustfmt::skip]
12066         let r = i64x2::new(-19, -62);
12067 
12068         assert_eq!(
12069             r,
12070             mem::transmute(__msa_dpsub_u_d(
12071                 mem::transmute(a),
12072                 mem::transmute(b),
12073                 mem::transmute(c)
12074             ))
12075         );
12076     }
12077 
12078     #[simd_test(enable = "msa")]
test_msa_fadd_w()12079     unsafe fn test_msa_fadd_w() {
12080         #[rustfmt::skip]
12081         let a = f32x4::new(1.1, -2.2, 3.3, -4.4);
12082         #[rustfmt::skip]
12083         let b = f32x4::new(4.4, -3.3, 2.2, -1.1);
12084         #[rustfmt::skip]
12085         let r = f32x4::new(5.5, -5.5, 5.5, -5.5);
12086 
12087         assert_eq!(
12088             r,
12089             mem::transmute(__msa_fadd_w(mem::transmute(a), mem::transmute(b)))
12090         );
12091     }
12092 
12093     #[simd_test(enable = "msa")]
test_msa_fadd_d()12094     unsafe fn test_msa_fadd_d() {
12095         #[rustfmt::skip]
12096         let a = f64x2::new(1.1, -2.2);
12097         #[rustfmt::skip]
12098         let b = f64x2::new(4.4, -3.3);
12099         #[rustfmt::skip]
12100         let r = f64x2::new(5.5, -5.5);
12101 
12102         assert_eq!(
12103             r,
12104             mem::transmute(__msa_fadd_d(mem::transmute(a), mem::transmute(b)))
12105         );
12106     }
12107 
12108     // Only observed beahiour should be SIGFPE signal
12109     // Can not be tested
12110     #[simd_test(enable = "msa")]
test_msa_fcaf_w()12111     unsafe fn test_msa_fcaf_w() {
12112         #[rustfmt::skip]
12113         let a = f32x4::new(1.1, -2.2, 3.3, -4.4);
12114         #[rustfmt::skip]
12115         let b = f32x4::new(0.0, -1.2, 3.3, f32::NAN);
12116         #[rustfmt::skip]
12117         let r = i32x4::new(0, 0, 0, 0);
12118 
12119         assert_eq!(
12120             r,
12121             mem::transmute(__msa_fcaf_w(mem::transmute(a), mem::transmute(b)))
12122         );
12123     }
12124 
12125     // Only observed beahiour should be SIGFPE signal
12126     // Can not be tested
12127     #[simd_test(enable = "msa")]
test_msa_fcaf_d()12128     unsafe fn test_msa_fcaf_d() {
12129         #[rustfmt::skip]
12130         let a = f64x2::new(1.1, -2.2);
12131         #[rustfmt::skip]
12132         let b = f64x2::new(-2.2, 1.1);
12133         #[rustfmt::skip]
12134         let r = i64x2::new(0, 0);
12135 
12136         assert_eq!(
12137             r,
12138             mem::transmute(__msa_fcaf_d(mem::transmute(a), mem::transmute(b)))
12139         );
12140     }
12141 
12142     #[simd_test(enable = "msa")]
test_msa_fceq_w()12143     unsafe fn test_msa_fceq_w() {
12144         #[rustfmt::skip]
12145         let a = f32x4::new(1.1, -2.2, 3.3, f32::NAN);
12146         #[rustfmt::skip]
12147         let b = f32x4::new(-4.4, -2.2, 3.3, f32::NAN);
12148         #[rustfmt::skip]
12149         let r = i32x4::new(0, -1, -1, 0);
12150 
12151         assert_eq!(
12152             r,
12153             mem::transmute(__msa_fceq_w(mem::transmute(a), mem::transmute(b)))
12154         );
12155     }
12156 
12157     #[simd_test(enable = "msa")]
test_msa_fceq_d()12158     unsafe fn test_msa_fceq_d() {
12159         #[rustfmt::skip]
12160         let a = f64x2::new(1.1, -2.2);
12161         #[rustfmt::skip]
12162         let b = f64x2::new(1.1, 1.1);
12163         #[rustfmt::skip]
12164         let r = i64x2::new(-1, 0);
12165 
12166         assert_eq!(
12167             r,
12168             mem::transmute(__msa_fceq_d(mem::transmute(a), mem::transmute(b)))
12169         );
12170     }
12171 
12172     #[simd_test(enable = "msa")]
test_msa_fclass_w()12173     unsafe fn test_msa_fclass_w() {
12174         #[rustfmt::skip]
12175         let a = f32x4::new(1.1, -2.2, 3.3, f32::NAN);
12176         #[rustfmt::skip]
12177         let r = i32x4::new(128, 8, 128, 2);
12178 
12179         assert_eq!(r, mem::transmute(__msa_fclass_w(mem::transmute(a))));
12180     }
12181 
12182     #[simd_test(enable = "msa")]
test_msa_fclass_d()12183     unsafe fn test_msa_fclass_d() {
12184         #[rustfmt::skip]
12185         let a = f64x2::new(1.1, -2.2);
12186         #[rustfmt::skip]
12187         let r = i64x2::new(128, 8);
12188 
12189         assert_eq!(r, mem::transmute(__msa_fclass_d(mem::transmute(a))));
12190     }
12191 
12192     #[simd_test(enable = "msa")]
test_msa_fcle_w()12193     unsafe fn test_msa_fcle_w() {
12194         #[rustfmt::skip]
12195         let a = f32x4::new(1.1, -2.2, 3.3, f32::NAN);
12196         #[rustfmt::skip]
12197         let b = f32x4::new(-4.4, -1.2, 3.3, f32::NAN);
12198         #[rustfmt::skip]
12199         let r = i32x4::new(0, -1, -1, 0);
12200 
12201         assert_eq!(
12202             r,
12203             mem::transmute(__msa_fcle_w(mem::transmute(a), mem::transmute(b)))
12204         );
12205     }
12206 
12207     #[simd_test(enable = "msa")]
test_msa_fcle_d()12208     unsafe fn test_msa_fcle_d() {
12209         #[rustfmt::skip]
12210         let a = f64x2::new(1.1, -2.2);
12211         #[rustfmt::skip]
12212         let b = f64x2::new(1.1, 1.1);
12213         #[rustfmt::skip]
12214         let r = i64x2::new(-1, -1);
12215 
12216         assert_eq!(
12217             r,
12218             mem::transmute(__msa_fcle_d(mem::transmute(a), mem::transmute(b)))
12219         );
12220     }
12221 
12222     #[simd_test(enable = "msa")]
test_msa_fclt_w()12223     unsafe fn test_msa_fclt_w() {
12224         #[rustfmt::skip]
12225         let a = f32x4::new(1.1, -2.2, 3.3, f32::NAN);
12226         #[rustfmt::skip]
12227         let b = f32x4::new(-4.4, -1.2, 3.3, f32::NAN);
12228         #[rustfmt::skip]
12229         let r = i32x4::new(0, -1, 0, 0);
12230 
12231         assert_eq!(
12232             r,
12233             mem::transmute(__msa_fclt_w(mem::transmute(a), mem::transmute(b)))
12234         );
12235     }
12236 
12237     #[simd_test(enable = "msa")]
test_msa_fclt_d()12238     unsafe fn test_msa_fclt_d() {
12239         #[rustfmt::skip]
12240         let a = f64x2::new(1.1, -2.2);
12241         #[rustfmt::skip]
12242         let b = f64x2::new(1.1, 1.1);
12243         #[rustfmt::skip]
12244         let r = i64x2::new(0, -1);
12245 
12246         assert_eq!(
12247             r,
12248             mem::transmute(__msa_fclt_d(mem::transmute(a), mem::transmute(b)))
12249         );
12250     }
12251 
12252     #[simd_test(enable = "msa")]
test_msa_fcne_w()12253     unsafe fn test_msa_fcne_w() {
12254         #[rustfmt::skip]
12255         let a = f32x4::new(1.1, -2.2, 3.3, f32::NAN);
12256         #[rustfmt::skip]
12257         let b = f32x4::new(-4.4, -1.2, 3.3, f32::NAN);
12258         #[rustfmt::skip]
12259         let r = i32x4::new(-1, -1, 0, 0);
12260 
12261         assert_eq!(
12262             r,
12263             mem::transmute(__msa_fcne_w(mem::transmute(a), mem::transmute(b)))
12264         );
12265     }
12266 
12267     #[simd_test(enable = "msa")]
test_msa_fcne_d()12268     unsafe fn test_msa_fcne_d() {
12269         #[rustfmt::skip]
12270         let a = f64x2::new(1.1, -2.2);
12271         #[rustfmt::skip]
12272         let b = f64x2::new(1.1, 1.1);
12273         #[rustfmt::skip]
12274         let r = i64x2::new(0, -1);
12275 
12276         assert_eq!(
12277             r,
12278             mem::transmute(__msa_fcne_d(mem::transmute(a), mem::transmute(b)))
12279         );
12280     }
12281 
12282     #[simd_test(enable = "msa")]
test_msa_fcor_w()12283     unsafe fn test_msa_fcor_w() {
12284         #[rustfmt::skip]
12285         let a = f32x4::new(1.1, -2.2, 3.3, f32::NAN);
12286         #[rustfmt::skip]
12287         let b = f32x4::new(f32::NAN, -1.2, 3.3, f32::NAN);
12288         #[rustfmt::skip]
12289         let r = i32x4::new(0, -1, -1, 0);
12290 
12291         assert_eq!(
12292             r,
12293             mem::transmute(__msa_fcor_w(mem::transmute(a), mem::transmute(b)))
12294         );
12295     }
12296 
12297     #[simd_test(enable = "msa")]
test_msa_fcor_d()12298     unsafe fn test_msa_fcor_d() {
12299         #[rustfmt::skip]
12300         let a = f64x2::new(1.1, f64::NAN);
12301         #[rustfmt::skip]
12302         let b = f64x2::new(1.1, 1.1);
12303         #[rustfmt::skip]
12304         let r = i64x2::new(-1, 0);
12305 
12306         assert_eq!(
12307             r,
12308             mem::transmute(__msa_fcor_d(mem::transmute(a), mem::transmute(b)))
12309         );
12310     }
12311 
12312     #[simd_test(enable = "msa")]
test_msa_fcueq_w()12313     unsafe fn test_msa_fcueq_w() {
12314         #[rustfmt::skip]
12315         let a = f32x4::new(1.1, -2.2, 3.3, f32::NAN);
12316         #[rustfmt::skip]
12317         let b = f32x4::new(f32::NAN, -1.2, 3.3, f32::NAN);
12318         #[rustfmt::skip]
12319         let r = i32x4::new(-1, 0, -1, -1);
12320 
12321         assert_eq!(
12322             r,
12323             mem::transmute(__msa_fcueq_w(mem::transmute(a), mem::transmute(b)))
12324         );
12325     }
12326 
12327     #[simd_test(enable = "msa")]
test_msa_fcueq_d()12328     unsafe fn test_msa_fcueq_d() {
12329         #[rustfmt::skip]
12330         let a = f64x2::new(1.1, f64::NAN);
12331         #[rustfmt::skip]
12332         let b = f64x2::new(1.1, 1.1);
12333         #[rustfmt::skip]
12334         let r = i64x2::new(-1, -1);
12335 
12336         assert_eq!(
12337             r,
12338             mem::transmute(__msa_fcueq_d(mem::transmute(a), mem::transmute(b)))
12339         );
12340     }
12341 
12342     #[simd_test(enable = "msa")]
test_msa_fcule_w()12343     unsafe fn test_msa_fcule_w() {
12344         #[rustfmt::skip]
12345         let a = f32x4::new(1.1, -2.2, 3.3, f32::NAN);
12346         #[rustfmt::skip]
12347         let b = f32x4::new(f32::NAN, -1.2, 3.3, f32::NAN);
12348         #[rustfmt::skip]
12349         let r = i32x4::new(-1, -1, -1, -1);
12350 
12351         assert_eq!(
12352             r,
12353             mem::transmute(__msa_fcule_w(mem::transmute(a), mem::transmute(b)))
12354         );
12355     }
12356 
12357     #[simd_test(enable = "msa")]
test_msa_fcule_d()12358     unsafe fn test_msa_fcule_d() {
12359         #[rustfmt::skip]
12360         let a = f64x2::new(1.1, f64::NAN);
12361         #[rustfmt::skip]
12362         let b = f64x2::new(1.1, 1.1);
12363         #[rustfmt::skip]
12364         let r = i64x2::new(-1, -1);
12365 
12366         assert_eq!(
12367             r,
12368             mem::transmute(__msa_fcule_d(mem::transmute(a), mem::transmute(b)))
12369         );
12370     }
12371 
12372     #[simd_test(enable = "msa")]
test_msa_fcult_w()12373     unsafe fn test_msa_fcult_w() {
12374         #[rustfmt::skip]
12375         let a = f32x4::new(1.1, -2.2, 3.3, f32::NAN);
12376         #[rustfmt::skip]
12377         let b = f32x4::new(f32::NAN, -1.2, 3.3, f32::NAN);
12378         #[rustfmt::skip]
12379         let r = i32x4::new(-1, -1, 0, -1);
12380 
12381         assert_eq!(
12382             r,
12383             mem::transmute(__msa_fcult_w(mem::transmute(a), mem::transmute(b)))
12384         );
12385     }
12386 
12387     #[simd_test(enable = "msa")]
test_msa_fcult_d()12388     unsafe fn test_msa_fcult_d() {
12389         #[rustfmt::skip]
12390         let a = f64x2::new(1.1, f64::NAN);
12391         #[rustfmt::skip]
12392         let b = f64x2::new(1.1, 1.1);
12393         #[rustfmt::skip]
12394         let r = i64x2::new(0, -1);
12395 
12396         assert_eq!(
12397             r,
12398             mem::transmute(__msa_fcult_d(mem::transmute(a), mem::transmute(b)))
12399         );
12400     }
12401 
12402     #[simd_test(enable = "msa")]
test_msa_fcun_w()12403     unsafe fn test_msa_fcun_w() {
12404         #[rustfmt::skip]
12405         let a = f32x4::new(1.1, -2.2, 3.3, f32::NAN);
12406         #[rustfmt::skip]
12407         let b = f32x4::new(f32::NAN, -1.2, 3.3, f32::NAN);
12408         #[rustfmt::skip]
12409         let r = i32x4::new(-1, 0, 0, -1);
12410 
12411         assert_eq!(
12412             r,
12413             mem::transmute(__msa_fcun_w(mem::transmute(a), mem::transmute(b)))
12414         );
12415     }
12416 
12417     #[simd_test(enable = "msa")]
test_msa_fcun_d()12418     unsafe fn test_msa_fcun_d() {
12419         #[rustfmt::skip]
12420         let a = f64x2::new(1.1, f64::NAN);
12421         #[rustfmt::skip]
12422         let b = f64x2::new(1.1, 1.1);
12423         #[rustfmt::skip]
12424         let r = i64x2::new(0, -1);
12425 
12426         assert_eq!(
12427             r,
12428             mem::transmute(__msa_fcun_d(mem::transmute(a), mem::transmute(b)))
12429         );
12430     }
12431 
12432     #[simd_test(enable = "msa")]
test_msa_fcune_w()12433     unsafe fn test_msa_fcune_w() {
12434         #[rustfmt::skip]
12435         let a = f32x4::new(1.1, -2.2, 3.3, f32::NAN);
12436         #[rustfmt::skip]
12437         let b = f32x4::new(f32::NAN, -1.2, 3.3, f32::NAN);
12438         #[rustfmt::skip]
12439         let r = i32x4::new(-1, -1, 0, -1);
12440 
12441         assert_eq!(
12442             r,
12443             mem::transmute(__msa_fcune_w(mem::transmute(a), mem::transmute(b)))
12444         );
12445     }
12446 
12447     #[simd_test(enable = "msa")]
test_msa_fcune_d()12448     unsafe fn test_msa_fcune_d() {
12449         #[rustfmt::skip]
12450         let a = f64x2::new(1.1, f64::NAN);
12451         #[rustfmt::skip]
12452         let b = f64x2::new(1.1, 1.1);
12453         #[rustfmt::skip]
12454         let r = i64x2::new(0, -1);
12455 
12456         assert_eq!(
12457             r,
12458             mem::transmute(__msa_fcune_d(mem::transmute(a), mem::transmute(b)))
12459         );
12460     }
12461 
12462     #[simd_test(enable = "msa")]
test_msa_fdiv_w()12463     unsafe fn test_msa_fdiv_w() {
12464         #[rustfmt::skip]
12465         let a = f32x4::new(5.25, -20.2, 333.333, -425.0);
12466         #[rustfmt::skip]
12467         let b = f32x4::new(4.0, -2.1, 11.11, 8.2);
12468         #[rustfmt::skip]
12469         let r = f32x4::new(1.3125, 9.619048, 30.002972, -51.82927);
12470 
12471         assert_eq!(
12472             r,
12473             mem::transmute(__msa_fdiv_w(mem::transmute(a), mem::transmute(b)))
12474         );
12475     }
12476 
12477     #[simd_test(enable = "msa")]
test_msa_fdiv_d()12478     unsafe fn test_msa_fdiv_d() {
12479         #[rustfmt::skip]
12480         let a = f64x2::new(1111.11, -222222.2);
12481         #[rustfmt::skip]
12482         let b = f64x2::new(-4.85, 3.33);
12483         #[rustfmt::skip]
12484         let r = f64x2::new(-229.09484536082473, -66733.3933933934);
12485 
12486         assert_eq!(
12487             r,
12488             mem::transmute(__msa_fdiv_d(mem::transmute(a), mem::transmute(b)))
12489         );
12490     }
12491 
12492     /*// FIXME: 16-bit floats
12493     #[simd_test(enable = "msa")]
12494     unsafe fn test_msa_fexdo_h() {
12495         #[rustfmt::skip]
12496         let a = f32x4::new(20.5, 2.3, 4.5, 5.4);
12497         #[rustfmt::skip]
12498         let b = f32x4::new(1.1, 1.0, 1.0, 1.0);
12499         let r = i16x8::new(1, 9, 30, 51, 1, 9, 30, 51);
12500 
12501         assert_eq!(r, mem::transmute(__msa_fexdo_h(mem::transmute(a), mem::transmute(b))));
12502     }*/
12503 
12504     #[simd_test(enable = "msa")]
test_msa_fexdo_w()12505     unsafe fn test_msa_fexdo_w() {
12506         #[rustfmt::skip]
12507         let a = f64x2::new(2000005.5, 2.3);
12508         #[rustfmt::skip]
12509         let b = f64x2::new(1235689784512.1, 2147483649998.5);
12510         #[rustfmt::skip]
12511         let r = f32x4::new(
12512             1235689800000.0, 2147483600000.0,
12513             2000005.5, 2.3
12514         );
12515 
12516         assert_eq!(
12517             r,
12518             mem::transmute(__msa_fexdo_w(mem::transmute(a), mem::transmute(b)))
12519         );
12520     }
12521 
12522     #[simd_test(enable = "msa")]
test_msa_fexp2_w()12523     unsafe fn test_msa_fexp2_w() {
12524         #[rustfmt::skip]
12525         let a = f32x4::new(1.1, -2.2, 3.3, -4.4);
12526         #[rustfmt::skip]
12527         let b = i32x4::new(4, -3, 2, 1);
12528         #[rustfmt::skip]
12529         let r = f32x4::new(17.6, -0.275, 13.2, -8.8);
12530 
12531         assert_eq!(
12532             r,
12533             mem::transmute(__msa_fexp2_w(mem::transmute(a), mem::transmute(b)))
12534         );
12535     }
12536 
12537     #[simd_test(enable = "msa")]
test_msa_fexp2_d()12538     unsafe fn test_msa_fexp2_d() {
12539         #[rustfmt::skip]
12540         let a = f64x2::new(1.1, -2.2);
12541         #[rustfmt::skip]
12542         let b = i64x2::new(-4, 3);
12543         #[rustfmt::skip]
12544         let r = f64x2::new(0.06875, -17.6);
12545 
12546         assert_eq!(
12547             r,
12548             mem::transmute(__msa_fexp2_d(mem::transmute(a), mem::transmute(b)))
12549         );
12550     }
12551 
12552     // FIXME: 16-bit floats
12553     // #[simd_test(enable = "msa")]
12554     // unsafe fn test_msa_fexupl_w() {
12555     //     #[rustfmt::skip]
12556     //     let a = f16x8(1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5);
12557     //     #[rustfmt::skip]
12558     //     let r = f32x4::new(5.5, 6.5, 7.5, 8.5);
12559 
12560     //     assert_eq!(r, mem::transmute(__msa_fexupl_w(mem::transmute(a))));
12561     // }
12562 
12563     #[simd_test(enable = "msa")]
test_msa_fexupl_d()12564     unsafe fn test_msa_fexupl_d() {
12565         #[rustfmt::skip]
12566         let a = f32x4::new(5.5, 6.5, 7.5, 8.5);
12567         #[rustfmt::skip]
12568         let r = f64x2::new(7.5, 8.5);
12569 
12570         assert_eq!(r, mem::transmute(__msa_fexupl_d(mem::transmute(a))));
12571     }
12572 
12573     // FIXME: 16-bit floats
12574     //     #[simd_test(enable = "msa")]
12575     // unsafe fn test_msa_fexupr_w() {
12576     //     #[rustfmt::skip]
12577     //     let a = f16x8(1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5);
12578     //     #[rustfmt::skip]
12579     //     let r = f32x4::new(1.5, 2.5, 3.5, 4.5);
12580 
12581     //     assert_eq!(r, mem::transmute(__msa_fexupr_w(mem::transmute(a))));
12582     // }
12583 
12584     #[simd_test(enable = "msa")]
test_msa_fexupr_d()12585     unsafe fn test_msa_fexupr_d() {
12586         #[rustfmt::skip]
12587         let a = f32x4::new(5.5, 6.5, 7.5, 8.5);
12588         #[rustfmt::skip]
12589         let r = f64x2::new(5.5, 6.5);
12590 
12591         assert_eq!(r, mem::transmute(__msa_fexupr_d(mem::transmute(a))));
12592     }
12593 
12594     #[simd_test(enable = "msa")]
test_msa_ffint_s_w()12595     unsafe fn test_msa_ffint_s_w() {
12596         #[rustfmt::skip]
12597         let a = i32x4::new(-1, 2, -3, 4);
12598         #[rustfmt::skip]
12599         let r = f32x4::new(-1.0, 2.0, -3.0, 4.0);
12600 
12601         assert_eq!(r, mem::transmute(__msa_ffint_s_w(mem::transmute(a))));
12602     }
12603 
12604     #[simd_test(enable = "msa")]
test_msa_ffint_s_d()12605     unsafe fn test_msa_ffint_s_d() {
12606         #[rustfmt::skip]
12607         let a = i64x2::new(-1, 2);
12608         #[rustfmt::skip]
12609         let r = f64x2::new(-1.0,     2.0);
12610 
12611         assert_eq!(r, mem::transmute(__msa_ffint_s_d(mem::transmute(a))));
12612     }
12613 
12614     #[simd_test(enable = "msa")]
test_msa_ffint_u_w()12615     unsafe fn test_msa_ffint_u_w() {
12616         #[rustfmt::skip]
12617         let a = u32x4::new(1, 2, 3, 4);
12618         #[rustfmt::skip]
12619         let r = f32x4::new(1.0, 2.0, 3.0, 4.0);
12620 
12621         assert_eq!(r, mem::transmute(__msa_ffint_u_w(mem::transmute(a))));
12622     }
12623 
12624     #[simd_test(enable = "msa")]
test_msa_ffint_u_d()12625     unsafe fn test_msa_ffint_u_d() {
12626         #[rustfmt::skip]
12627         let a = u64x2::new(1, 2);
12628         #[rustfmt::skip]
12629         let r = f64x2::new(1.0, 2.0);
12630 
12631         assert_eq!(r, mem::transmute(__msa_ffint_u_d(mem::transmute(a))));
12632     }
12633 
12634     #[simd_test(enable = "msa")]
test_msa_ffql_w()12635     unsafe fn test_msa_ffql_w() {
12636         #[rustfmt::skip]
12637         let a = i16x8::new(11, 25, 33, 47, 11, 25, 33, 47);
12638         #[rustfmt::skip]
12639         let r = f32x4::new(
12640             0.00033569336, 0.00076293945,
12641             0.0010070801, 0.0014343262
12642         );
12643 
12644         assert_eq!(r, mem::transmute(__msa_ffql_w(mem::transmute(a))));
12645     }
12646 
12647     #[simd_test(enable = "msa")]
test_msa_ffql_d()12648     unsafe fn test_msa_ffql_d() {
12649         #[rustfmt::skip]
12650         let a = i32x4::new(1111, 2222, 3333, 4444);
12651         #[rustfmt::skip]
12652         let r = f64x2::new(
12653             0.000001552049070596695,
12654             0.0000020693987607955933
12655         );
12656 
12657         assert_eq!(r, mem::transmute(__msa_ffql_d(mem::transmute(a))));
12658     }
12659 
12660     #[simd_test(enable = "msa")]
test_msa_ffqr_w()12661     unsafe fn test_msa_ffqr_w() {
12662         #[rustfmt::skip]
12663         let a = i16x8::new(12, 26, 34, 48, 11, 25, 33, 47);
12664         #[rustfmt::skip]
12665         let r = f32x4::new(
12666             0.00036621094, 0.00079345703,
12667             0.0010375977, 0.0014648438
12668         );
12669 
12670         assert_eq!(r, mem::transmute(__msa_ffqr_w(mem::transmute(a))));
12671     }
12672 
12673     #[simd_test(enable = "msa")]
test_msa_ffqr_d()12674     unsafe fn test_msa_ffqr_d() {
12675         #[rustfmt::skip]
12676         let a = i32x4::new(1111, 2555, 3333, 475);
12677         #[rustfmt::skip]
12678         let r = f64x2::new(
12679             0.0000005173496901988983,
12680             0.0000011897645890712738
12681         );
12682 
12683         assert_eq!(r, mem::transmute(__msa_ffqr_d(mem::transmute(a))));
12684     }
12685 
12686     #[simd_test(enable = "msa")]
test_msa_fill_b()12687     unsafe fn test_msa_fill_b() {
12688         #[rustfmt::skip]
12689         let r = i8x16::new(
12690             2, 2, 2, 2,
12691             2, 2, 2, 2,
12692             2, 2, 2, 2,
12693             2, 2, 2, 2
12694         );
12695 
12696         assert_eq!(r, mem::transmute(__msa_fill_b(2)));
12697     }
12698 
12699     #[simd_test(enable = "msa")]
test_msa_fill_h()12700     unsafe fn test_msa_fill_h() {
12701         #[rustfmt::skip]
12702         let r = i16x8::new(2, 2, 2, 2, 2, 2, 2, 2);
12703 
12704         assert_eq!(r, mem::transmute(__msa_fill_h(2)));
12705     }
12706 
12707     #[simd_test(enable = "msa")]
test_msa_fill_w()12708     unsafe fn test_msa_fill_w() {
12709         #[rustfmt::skip]
12710         let r = i32x4::new(2, 2, 2, 2);
12711 
12712         assert_eq!(r, mem::transmute(__msa_fill_w(2)));
12713     }
12714 
12715     #[simd_test(enable = "msa")]
test_msa_fill_d()12716     unsafe fn test_msa_fill_d() {
12717         #[rustfmt::skip]
12718         let r = i64x2::new(2, 2);
12719 
12720         assert_eq!(r, mem::transmute(__msa_fill_d(2)));
12721     }
12722 
12723     #[simd_test(enable = "msa")]
test_msa_flog2_w()12724     unsafe fn test_msa_flog2_w() {
12725         #[rustfmt::skip]
12726         let a = f32x4::new(8.0, 16.0, 32.0, 64.0);
12727         #[rustfmt::skip]
12728         let r = f32x4::new(3.0, 4.0, 5.0, 6.0);
12729 
12730         assert_eq!(r, mem::transmute(__msa_flog2_w(mem::transmute(a))));
12731     }
12732 
12733     #[simd_test(enable = "msa")]
test_msa_flog2_d()12734     unsafe fn test_msa_flog2_d() {
12735         #[rustfmt::skip]
12736         let a = f64x2::new(8.0, 16.0);
12737         #[rustfmt::skip]
12738         let r = f64x2::new(3.0, 4.0);
12739 
12740         assert_eq!(r, mem::transmute(__msa_flog2_d(mem::transmute(a))));
12741     }
12742 
12743     #[simd_test(enable = "msa")]
test_msa_fmadd_w()12744     unsafe fn test_msa_fmadd_w() {
12745         #[rustfmt::skip]
12746         let a = f32x4::new(1.0, 2.0, 3.0, 4.0);
12747         #[rustfmt::skip]
12748         let b = f32x4::new(5.0, 6.0, 7.0, 8.0);
12749         #[rustfmt::skip]
12750         let c = f32x4::new(9.0, 10.0, 11.0, 12.0);
12751         #[rustfmt::skip]
12752         let r = f32x4::new(46.0, 62.0, 80.0, 100.0);
12753 
12754         assert_eq!(
12755             r,
12756             mem::transmute(__msa_fmadd_w(
12757                 mem::transmute(a),
12758                 mem::transmute(b),
12759                 mem::transmute(c)
12760             ))
12761         );
12762     }
12763 
12764     #[simd_test(enable = "msa")]
test_msa_fmadd_d()12765     unsafe fn test_msa_fmadd_d() {
12766         #[rustfmt::skip]
12767         let a = f64x2::new(1.0, 2.0);
12768         #[rustfmt::skip]
12769         let b = f64x2::new(3.0, 4.0);
12770         #[rustfmt::skip]
12771         let c = f64x2::new(5.0, 6.0);
12772         #[rustfmt::skip]
12773         let r = f64x2::new(16.0, 26.0);
12774 
12775         assert_eq!(
12776             r,
12777             mem::transmute(__msa_fmadd_d(
12778                 mem::transmute(a),
12779                 mem::transmute(b),
12780                 mem::transmute(c)
12781             ))
12782         );
12783     }
12784 
12785     #[simd_test(enable = "msa")]
test_msa_fmax_w()12786     unsafe fn test_msa_fmax_w() {
12787         #[rustfmt::skip]
12788         let a = f32x4::new(1.0, -6.0, 7.0, 8.0);
12789         #[rustfmt::skip]
12790         let b = f32x4::new(5.0, -2.0, 3.0, 4.0);
12791         #[rustfmt::skip]
12792         let r = f32x4::new(5.0, -2.0, 7.0, 8.0);
12793 
12794         assert_eq!(
12795             r,
12796             mem::transmute(__msa_fmax_w(mem::transmute(a), mem::transmute(b)))
12797         );
12798     }
12799 
12800     #[simd_test(enable = "msa")]
test_msa_fmax_d()12801     unsafe fn test_msa_fmax_d() {
12802         #[rustfmt::skip]
12803         let a = f64x2::new(1.0, 4.0);
12804         #[rustfmt::skip]
12805         let b = f64x2::new(3.0, 2.0);
12806         #[rustfmt::skip]
12807         let r = f64x2::new(3.0, 4.0);
12808 
12809         assert_eq!(
12810             r,
12811             mem::transmute(__msa_fmax_d(mem::transmute(a), mem::transmute(b)))
12812         );
12813     }
12814 
12815     #[simd_test(enable = "msa")]
test_msa_fmax_a_w()12816     unsafe fn test_msa_fmax_a_w() {
12817         #[rustfmt::skip]
12818         let a = f32x4::new(1.0, -6.0, -7.0, -8.0);
12819         #[rustfmt::skip]
12820         let b = f32x4::new(5.0, -2.0, 3.0, 4.0);
12821         #[rustfmt::skip]
12822         let r = f32x4::new(5.0, -6.0, -7.0, -8.0);
12823 
12824         assert_eq!(
12825             r,
12826             mem::transmute(__msa_fmax_a_w(mem::transmute(a), mem::transmute(b)))
12827         );
12828     }
12829 
12830     #[simd_test(enable = "msa")]
test_msa_fmax_a_d()12831     unsafe fn test_msa_fmax_a_d() {
12832         #[rustfmt::skip]
12833         let a = f64x2::new(1.0, -4.0);
12834         #[rustfmt::skip]
12835         let b = f64x2::new(3.0, 2.0);
12836         #[rustfmt::skip]
12837         let r = f64x2::new(3.0, -4.0);
12838 
12839         assert_eq!(
12840             r,
12841             mem::transmute(__msa_fmax_a_d(mem::transmute(a), mem::transmute(b)))
12842         );
12843     }
12844 
12845     #[simd_test(enable = "msa")]
test_msa_fmin_w()12846     unsafe fn test_msa_fmin_w() {
12847         #[rustfmt::skip]
12848         let a = f32x4::new(1.0, -6.0, 7.0, 8.0);
12849         #[rustfmt::skip]
12850         let b = f32x4::new(5.0, -2.0, 3.0, 4.0);
12851         #[rustfmt::skip]
12852         let r = f32x4::new(1.0, -6.0, 3.0, 4.0);
12853 
12854         assert_eq!(
12855             r,
12856             mem::transmute(__msa_fmin_w(mem::transmute(a), mem::transmute(b)))
12857         );
12858     }
12859 
12860     #[simd_test(enable = "msa")]
test_msa_fmin_d()12861     unsafe fn test_msa_fmin_d() {
12862         #[rustfmt::skip]
12863         let a = f64x2::new(1.0, 4.0);
12864         #[rustfmt::skip]
12865         let b = f64x2::new(3.0, 2.0);
12866         #[rustfmt::skip]
12867         let r = f64x2::new(1.0, 2.0);
12868 
12869         assert_eq!(
12870             r,
12871             mem::transmute(__msa_fmin_d(mem::transmute(a), mem::transmute(b)))
12872         );
12873     }
12874 
12875     #[simd_test(enable = "msa")]
test_msa_fmin_a_w()12876     unsafe fn test_msa_fmin_a_w() {
12877         #[rustfmt::skip]
12878         let a = f32x4::new(1.0, -6.0, -7.0, -8.0);
12879         #[rustfmt::skip]
12880         let b = f32x4::new(5.0, -2.0, 3.0, 4.0);
12881         #[rustfmt::skip]
12882         let r = f32x4::new(1.0, -2.0, 3.0, 4.0);
12883 
12884         assert_eq!(
12885             r,
12886             mem::transmute(__msa_fmin_a_w(mem::transmute(a), mem::transmute(b)))
12887         );
12888     }
12889 
12890     #[simd_test(enable = "msa")]
test_msa_fmin_a_d()12891     unsafe fn test_msa_fmin_a_d() {
12892         #[rustfmt::skip]
12893         let a = f64x2::new(1.0, -4.0);
12894         #[rustfmt::skip]
12895         let b = f64x2::new(3.0, 2.0);
12896         #[rustfmt::skip]
12897         let r = f64x2::new(1.0, 2.0);
12898 
12899         assert_eq!(
12900             r,
12901             mem::transmute(__msa_fmin_a_d(mem::transmute(a), mem::transmute(b)))
12902         );
12903     }
12904 
12905     #[simd_test(enable = "msa")]
test_msa_fmsub_w()12906     unsafe fn test_msa_fmsub_w() {
12907         #[rustfmt::skip]
12908         let a = f32x4::new(1.0, 2.0, 3.0, 4.0);
12909         #[rustfmt::skip]
12910         let b = f32x4::new(5.0, 6.0, 7.0, 8.0);
12911         #[rustfmt::skip]
12912         let c = f32x4::new(9.0, 10.0, 11.0, 12.0);
12913         #[rustfmt::skip]
12914         let r = f32x4::new(-44.0, -58.0, -74.0, -92.0);
12915 
12916         assert_eq!(
12917             r,
12918             mem::transmute(__msa_fmsub_w(
12919                 mem::transmute(a),
12920                 mem::transmute(b),
12921                 mem::transmute(c)
12922             ))
12923         );
12924     }
12925 
12926     #[simd_test(enable = "msa")]
test_msa_fmsub_d()12927     unsafe fn test_msa_fmsub_d() {
12928         #[rustfmt::skip]
12929         let a = f64x2::new(1.0, 2.0);
12930         #[rustfmt::skip]
12931         let b = f64x2::new(3.0, 4.0);
12932         #[rustfmt::skip]
12933         let c = f64x2::new(5.0, 6.0);
12934         #[rustfmt::skip]
12935         let r = f64x2::new(-14.0, -22.0);
12936 
12937         assert_eq!(
12938             r,
12939             mem::transmute(__msa_fmsub_d(
12940                 mem::transmute(a),
12941                 mem::transmute(b),
12942                 mem::transmute(c)
12943             ))
12944         );
12945     }
12946 
12947     #[simd_test(enable = "msa")]
test_msa_fmul_w()12948     unsafe fn test_msa_fmul_w() {
12949         #[rustfmt::skip]
12950         let a = f32x4::new(1.1, -2.2, 3.3, 4.4);
12951         #[rustfmt::skip]
12952         let b = f32x4::new(4.4, 3.3, 2.2, -1.1);
12953         #[rustfmt::skip]
12954         let r = f32x4::new(4.84, -7.26, 7.26, -4.84);
12955 
12956         assert_eq!(
12957             r,
12958             mem::transmute(__msa_fmul_w(mem::transmute(a), mem::transmute(b)))
12959         );
12960     }
12961 
12962     #[simd_test(enable = "msa")]
test_msa_fmul_d()12963     unsafe fn test_msa_fmul_d() {
12964         #[rustfmt::skip]
12965         let a = f64x2::new(1.1, -2.2);
12966         #[rustfmt::skip]
12967         let b = f64x2::new(4.0, -3.3);
12968         #[rustfmt::skip]
12969         let r = f64x2::new(4.4, 7.26);
12970 
12971         assert_eq!(
12972             r,
12973             mem::transmute(__msa_fmul_d(mem::transmute(a), mem::transmute(b)))
12974         );
12975     }
12976 
12977     #[simd_test(enable = "msa")]
test_msa_frint_w()12978     unsafe fn test_msa_frint_w() {
12979         #[rustfmt::skip]
12980         let a = f32x4::new(2.6, -2.7, 1.3, -1.7);
12981         #[rustfmt::skip]
12982         let r = f32x4::new(3.0, -3.0, 1.0, -2.0);
12983 
12984         assert_eq!(r, mem::transmute(__msa_frint_w(mem::transmute(a))));
12985     }
12986 
12987     #[simd_test(enable = "msa")]
test_msa_frint_d()12988     unsafe fn test_msa_frint_d() {
12989         #[rustfmt::skip]
12990         let a = f64x2::new(2.6, 1.3);
12991         #[rustfmt::skip]
12992         let r = f64x2::new(3.0, 1.0);
12993 
12994         assert_eq!(r, mem::transmute(__msa_frint_d(mem::transmute(a))));
12995     }
12996 
12997     #[simd_test(enable = "msa")]
test_msa_frcp_w()12998     unsafe fn test_msa_frcp_w() {
12999         #[rustfmt::skip]
13000         let a = f32x4::new(2.6, -2.7, 1.3, -1.7);
13001         #[rustfmt::skip]
13002         let r = f32x4::new(
13003             0.3846154, -0.37037036,
13004             0.7692308, -0.58823526
13005         );
13006 
13007         assert_eq!(r, mem::transmute(__msa_frcp_w(mem::transmute(a))));
13008     }
13009 
13010     #[simd_test(enable = "msa")]
test_msa_frcp_d()13011     unsafe fn test_msa_frcp_d() {
13012         #[rustfmt::skip]
13013         let a = f64x2::new(2.6, 1.3);
13014         #[rustfmt::skip]
13015         let r = f64x2::new(0.3846153846153846, 0.7692307692307692);
13016 
13017         assert_eq!(r, mem::transmute(__msa_frcp_d(mem::transmute(a))));
13018     }
13019 
13020     #[simd_test(enable = "msa")]
test_msa_frsqrt_w()13021     unsafe fn test_msa_frsqrt_w() {
13022         #[rustfmt::skip]
13023         let a = f32x4::new(2.6, 2.7, 1.3, 1.7);
13024         #[rustfmt::skip]
13025         let r = f32x4::new(
13026             0.6201737, 0.6085806,
13027             0.87705797, 0.766965
13028         );
13029 
13030         assert_eq!(r, mem::transmute(__msa_frsqrt_w(mem::transmute(a))));
13031     }
13032 
13033     #[simd_test(enable = "msa")]
test_msa_frsqrt_d()13034     unsafe fn test_msa_frsqrt_d() {
13035         #[rustfmt::skip]
13036         let a = f64x2::new(2.6, 1.3);
13037         #[rustfmt::skip]
13038         let r = f64x2::new(0.6201736729460422, 0.8770580193070292);
13039 
13040         assert_eq!(r, mem::transmute(__msa_frsqrt_d(mem::transmute(a))));
13041     }
13042 
13043     #[simd_test(enable = "msa")]
test_msa_fsaf_w()13044     unsafe fn test_msa_fsaf_w() {
13045         #[rustfmt::skip]
13046         let a = f32x4::new(-5.5, 5.5, 5.5, 5.5);
13047         #[rustfmt::skip]
13048         let b = f32x4::new(-5.5, 5.5, 5.5, 5.5);
13049         #[rustfmt::skip]
13050         let r = i32x4::new(0, 0, 0, 0);
13051 
13052         assert_eq!(
13053             r,
13054             mem::transmute(__msa_fsaf_w(mem::transmute(a), mem::transmute(b)))
13055         );
13056     }
13057 
13058     #[simd_test(enable = "msa")]
test_msa_fsaf_d()13059     unsafe fn test_msa_fsaf_d() {
13060         #[rustfmt::skip]
13061         let a = f64x2::new(-125.5, 5.5);
13062         #[rustfmt::skip]
13063         let b = f64x2::new(125.5, 3.3);
13064         #[rustfmt::skip]
13065         let r = i64x2::new(0, 0);
13066 
13067         assert_eq!(
13068             r,
13069             mem::transmute(__msa_fsaf_d(mem::transmute(a), mem::transmute(b)))
13070         );
13071     }
13072 
13073     #[simd_test(enable = "msa")]
test_msa_fseq_w()13074     unsafe fn test_msa_fseq_w() {
13075         #[rustfmt::skip]
13076         let a = f32x4::new(-5.5, -3.3, f32::NAN, f32::NAN);
13077         #[rustfmt::skip]
13078         let b = f32x4::new(5.5, -3.3, f32::NAN, 1.1);
13079         #[rustfmt::skip]
13080         let r = i32x4::new(0, -1, 0, 0);
13081 
13082         assert_eq!(
13083             r,
13084             mem::transmute(__msa_fseq_w(mem::transmute(a), mem::transmute(b)))
13085         );
13086     }
13087 
13088     #[simd_test(enable = "msa")]
test_msa_fseq_d()13089     unsafe fn test_msa_fseq_d() {
13090         #[rustfmt::skip]
13091         let a = f64x2::new(-125.5, 5.5);
13092         #[rustfmt::skip]
13093         let b = f64x2::new(125.5, 5.5);
13094         #[rustfmt::skip]
13095         let r = i64x2::new(0, -1);
13096 
13097         assert_eq!(
13098             r,
13099             mem::transmute(__msa_fseq_d(mem::transmute(a), mem::transmute(b)))
13100         );
13101     }
13102 
13103     #[simd_test(enable = "msa")]
test_msa_fsle_w()13104     unsafe fn test_msa_fsle_w() {
13105         #[rustfmt::skip]
13106         let a = f32x4::new(5.5, 5.5, 5.5, f32::NAN);
13107         #[rustfmt::skip]
13108         let b = f32x4::new(-5.5, 3.3, 5.5, f32::NAN);
13109         #[rustfmt::skip]
13110         let r = i32x4::new(0, 0, -1, 0);
13111 
13112         assert_eq!(
13113             r,
13114             mem::transmute(__msa_fsle_w(mem::transmute(a), mem::transmute(b)))
13115         );
13116     }
13117 
13118     #[simd_test(enable = "msa")]
test_msa_fsle_d()13119     unsafe fn test_msa_fsle_d() {
13120         #[rustfmt::skip]
13121         let a = f64x2::new(-125.5, 5.5);
13122         #[rustfmt::skip]
13123         let b = f64x2::new(125.5, 3.3);
13124         #[rustfmt::skip]
13125         let r = i64x2::new(-1, 0);
13126 
13127         assert_eq!(
13128             r,
13129             mem::transmute(__msa_fsle_d(mem::transmute(a), mem::transmute(b)))
13130         );
13131     }
13132 
13133     #[simd_test(enable = "msa")]
test_msa_fslt_w()13134     unsafe fn test_msa_fslt_w() {
13135         #[rustfmt::skip]
13136         let a = f32x4::new(-5.5, 5.5, 5.5, 5.5);
13137         #[rustfmt::skip]
13138         let b = f32x4::new(5.5, 3.3, 5.5, 1.1);
13139         #[rustfmt::skip]
13140         let r = i32x4::new(-1, 0, 0, 0);
13141 
13142         assert_eq!(
13143             r,
13144             mem::transmute(__msa_fslt_w(mem::transmute(a), mem::transmute(b)))
13145         );
13146     }
13147 
13148     #[simd_test(enable = "msa")]
test_msa_fslt_d()13149     unsafe fn test_msa_fslt_d() {
13150         #[rustfmt::skip]
13151         let a = f64x2::new(-125.5, 5.5);
13152         #[rustfmt::skip]
13153         let b = f64x2::new(125.5, 3.3);
13154         #[rustfmt::skip]
13155         let r = i64x2::new(-1, 0);
13156 
13157         assert_eq!(
13158             r,
13159             mem::transmute(__msa_fslt_d(mem::transmute(a), mem::transmute(b)))
13160         );
13161     }
13162 
13163     #[simd_test(enable = "msa")]
test_msa_fsne_w()13164     unsafe fn test_msa_fsne_w() {
13165         #[rustfmt::skip]
13166         let a = f32x4::new(-5.5, 5.5, 5.5, 5.5);
13167         #[rustfmt::skip]
13168         let b = f32x4::new(5.5, 3.3, 5.5, 1.1);
13169         #[rustfmt::skip]
13170         let r = i32x4::new(-1, -1, 0, -1);
13171 
13172         assert_eq!(
13173             r,
13174             mem::transmute(__msa_fsne_w(mem::transmute(a), mem::transmute(b)))
13175         );
13176     }
13177 
13178     #[simd_test(enable = "msa")]
test_msa_fsne_d()13179     unsafe fn test_msa_fsne_d() {
13180         #[rustfmt::skip]
13181         let a = f64x2::new(-125.5, 5.5);
13182         #[rustfmt::skip]
13183         let b = f64x2::new(125.5, 5.5);
13184         #[rustfmt::skip]
13185         let r = i64x2::new(-1, 0);
13186 
13187         assert_eq!(
13188             r,
13189             mem::transmute(__msa_fsne_d(mem::transmute(a), mem::transmute(b)))
13190         );
13191     }
13192 
13193     #[simd_test(enable = "msa")]
test_msa_fsor_w()13194     unsafe fn test_msa_fsor_w() {
13195         #[rustfmt::skip]
13196         let a = f32x4::new(-5.5, f32::NAN, 5.5, 5.5);
13197         #[rustfmt::skip]
13198         let b = f32x4::new(5.5, 3.3, 5.5, 1.1);
13199         #[rustfmt::skip]
13200         let r = i32x4::new(-1, 0, -1, -1);
13201 
13202         assert_eq!(
13203             r,
13204             mem::transmute(__msa_fsor_w(mem::transmute(a), mem::transmute(b)))
13205         );
13206     }
13207 
13208     #[simd_test(enable = "msa")]
test_msa_fsor_d()13209     unsafe fn test_msa_fsor_d() {
13210         #[rustfmt::skip]
13211         let a = f64x2::new(-125.5, 5.5);
13212         #[rustfmt::skip]
13213         let b = f64x2::new(125.5, f64::NAN);
13214         #[rustfmt::skip]
13215         let r = i64x2::new(-1, 0);
13216 
13217         assert_eq!(
13218             r,
13219             mem::transmute(__msa_fsor_d(mem::transmute(a), mem::transmute(b)))
13220         );
13221     }
13222 
13223     #[simd_test(enable = "msa")]
test_msa_fsqrt_w()13224     unsafe fn test_msa_fsqrt_w() {
13225         #[rustfmt::skip]
13226         let a = f32x4::new(9.0, 81.0, 1089.0, 10000.0);
13227         #[rustfmt::skip]
13228         let r = f32x4::new(3.0, 9.0, 33.0, 100.0);
13229 
13230         assert_eq!(r, mem::transmute(__msa_fsqrt_w(mem::transmute(a))));
13231     }
13232 
13233     #[simd_test(enable = "msa")]
test_msa_fsqrt_d()13234     unsafe fn test_msa_fsqrt_d() {
13235         #[rustfmt::skip]
13236         let a = f64x2::new(81.0, 10000.0);
13237         #[rustfmt::skip]
13238         let r = f64x2::new(9.0, 100.0);
13239 
13240         assert_eq!(r, mem::transmute(__msa_fsqrt_d(mem::transmute(a))));
13241     }
13242 
13243     #[simd_test(enable = "msa")]
test_msa_fsub_w()13244     unsafe fn test_msa_fsub_w() {
13245         #[rustfmt::skip]
13246         let a = f32x4::new(5.5, 6.5, 7.5, 8.5);
13247         #[rustfmt::skip]
13248         let b = f32x4::new(1.25, 1.75, 2.25, 2.75);
13249         #[rustfmt::skip]
13250         let r = f32x4::new(4.25, 4.75, 5.25, 5.75);
13251 
13252         assert_eq!(
13253             r,
13254             mem::transmute(__msa_fsub_w(mem::transmute(a), mem::transmute(b)))
13255         );
13256     }
13257 
13258     #[simd_test(enable = "msa")]
test_msa_fsub_d()13259     unsafe fn test_msa_fsub_d() {
13260         #[rustfmt::skip]
13261         let a = f64x2::new(555.5, 55.5);
13262         #[rustfmt::skip]
13263         let b = f64x2::new(4.25, 3.25);
13264         #[rustfmt::skip]
13265         let r = f64x2::new(551.25, 52.25);
13266 
13267         assert_eq!(
13268             r,
13269             mem::transmute(__msa_fsub_d(mem::transmute(a), mem::transmute(b)))
13270         );
13271     }
13272 
13273     #[simd_test(enable = "msa")]
test_msa_fsueq_w()13274     unsafe fn test_msa_fsueq_w() {
13275         #[rustfmt::skip]
13276         let a = f32x4::new(5.5, f32::NAN, 5.5, 5.5);
13277         #[rustfmt::skip]
13278         let b = f32x4::new(5.5, 5.5, -5.5, 5.5);
13279         #[rustfmt::skip]
13280         let r = i32x4::new(-1, -1, 0, -1);
13281 
13282         assert_eq!(
13283             r,
13284             mem::transmute(__msa_fsueq_w(mem::transmute(a), mem::transmute(b)))
13285         );
13286     }
13287 
13288     #[simd_test(enable = "msa")]
test_msa_fsueq_d()13289     unsafe fn test_msa_fsueq_d() {
13290         #[rustfmt::skip]
13291         let a = f64x2::new(-5.5, 5.5);
13292         #[rustfmt::skip]
13293         let b = f64x2::new(5.5, f64::NAN);
13294         #[rustfmt::skip]
13295         let r = i64x2::new(0, -1);
13296 
13297         assert_eq!(
13298             r,
13299             mem::transmute(__msa_fsueq_d(mem::transmute(a), mem::transmute(b)))
13300         );
13301     }
13302 
13303     #[simd_test(enable = "msa")]
test_msa_fsule_w()13304     unsafe fn test_msa_fsule_w() {
13305         #[rustfmt::skip]
13306         let a = f32x4::new(5.7, 5.8, 5.9, f32::NAN);
13307         #[rustfmt::skip]
13308         let b = f32x4::new(5.6, 5.9, 5.9, f32::NAN);
13309         #[rustfmt::skip]
13310         let r = i32x4::new(0, -1, -1, -1);
13311 
13312         assert_eq!(
13313             r,
13314             mem::transmute(__msa_fsule_w(mem::transmute(a), mem::transmute(b)))
13315         );
13316     }
13317 
13318     #[simd_test(enable = "msa")]
test_msa_fsule_d()13319     unsafe fn test_msa_fsule_d() {
13320         #[rustfmt::skip]
13321         let a = f64x2::new(5.5, 5.5);
13322         #[rustfmt::skip]
13323         let b = f64x2::new(5.5, 5.5);
13324         #[rustfmt::skip]
13325         let r = i64x2::new(-1, -1);
13326 
13327         assert_eq!(
13328             r,
13329             mem::transmute(__msa_fsule_d(mem::transmute(a), mem::transmute(b)))
13330         );
13331     }
13332 
13333     #[simd_test(enable = "msa")]
test_msa_fsult_w()13334     unsafe fn test_msa_fsult_w() {
13335         #[rustfmt::skip]
13336         let a = f32x4::new(5.5, 5.5, 5.5, 5.5);
13337         #[rustfmt::skip]
13338         let b = f32x4::new(5.6, f32::NAN, 2.2, 1.1);
13339         #[rustfmt::skip]
13340         let r = i32x4::new(-1, -1, 0, 0);
13341 
13342         assert_eq!(
13343             r,
13344             mem::transmute(__msa_fsult_w(mem::transmute(a), mem::transmute(b)))
13345         );
13346     }
13347 
13348     #[simd_test(enable = "msa")]
test_msa_fsult_d()13349     unsafe fn test_msa_fsult_d() {
13350         #[rustfmt::skip]
13351         let a = f64x2::new(5.5, f64::NAN);
13352         #[rustfmt::skip]
13353         let b = f64x2::new(4.4, 3.3);
13354         #[rustfmt::skip]
13355         let r = i64x2::new(0, -1);
13356 
13357         assert_eq!(
13358             r,
13359             mem::transmute(__msa_fsult_d(mem::transmute(a), mem::transmute(b)))
13360         );
13361     }
13362 
13363     #[simd_test(enable = "msa")]
test_msa_fsun_w()13364     unsafe fn test_msa_fsun_w() {
13365         #[rustfmt::skip]
13366         let a = f32x4::new(5.5, 5.5, f32::NAN, 5.5);
13367         #[rustfmt::skip]
13368         let b = f32x4::new(4.4, 3.3, 2.2, f32::NAN);
13369         #[rustfmt::skip]
13370         let r = i32x4::new(0, 0, -1, -1);
13371 
13372         assert_eq!(
13373             r,
13374             mem::transmute(__msa_fsun_w(mem::transmute(a), mem::transmute(b)))
13375         );
13376     }
13377 
13378     #[simd_test(enable = "msa")]
test_msa_fsun_d()13379     unsafe fn test_msa_fsun_d() {
13380         #[rustfmt::skip]
13381         let a = f64x2::new(5.5, f64::NAN);
13382         #[rustfmt::skip]
13383         let b = f64x2::new(4.4, 3.3);
13384         #[rustfmt::skip]
13385         let r = i64x2::new(0, -1);
13386 
13387         assert_eq!(
13388             r,
13389             mem::transmute(__msa_fsun_d(mem::transmute(a), mem::transmute(b)))
13390         );
13391     }
13392 
13393     #[simd_test(enable = "msa")]
test_msa_fsune_w()13394     unsafe fn test_msa_fsune_w() {
13395         #[rustfmt::skip]
13396         let a = f32x4::new(5.5, 5.5, f32::NAN, 5.5);
13397         #[rustfmt::skip]
13398         let b = f32x4::new(4.4, 3.3, 2.2, 5.5);
13399         #[rustfmt::skip]
13400         let r = i32x4::new(-1, -1, -1, 0);
13401 
13402         assert_eq!(
13403             r,
13404             mem::transmute(__msa_fsune_w(mem::transmute(a), mem::transmute(b)))
13405         );
13406     }
13407 
13408     #[simd_test(enable = "msa")]
test_msa_fsune_d()13409     unsafe fn test_msa_fsune_d() {
13410         #[rustfmt::skip]
13411         let a = f64x2::new(5.5, f64::NAN);
13412         #[rustfmt::skip]
13413         let b = f64x2::new(5.5, 3.3);
13414         #[rustfmt::skip]
13415         let r = i64x2::new(0, -1);
13416 
13417         assert_eq!(
13418             r,
13419             mem::transmute(__msa_fsune_d(mem::transmute(a), mem::transmute(b)))
13420         );
13421     }
13422 
13423     #[simd_test(enable = "msa")]
test_msa_ftint_s_w()13424     unsafe fn test_msa_ftint_s_w() {
13425         #[rustfmt::skip]
13426         let a = f32x4::new(-5.5, 75.6, -1000.7, 1219.3);
13427         #[rustfmt::skip]
13428         let r = i32x4::new(-6, 76, -1001, 1219);
13429 
13430         assert_eq!(r, mem::transmute(__msa_ftint_s_w(mem::transmute(a))));
13431     }
13432 
13433     #[simd_test(enable = "msa")]
test_msa_ftint_s_d()13434     unsafe fn test_msa_ftint_s_d() {
13435         #[rustfmt::skip]
13436         let a = f64x2::new(-5.5, 25656.4);
13437         #[rustfmt::skip]
13438         let r = i64x2::new(-6, 25656);
13439 
13440         assert_eq!(r, mem::transmute(__msa_ftint_s_d(mem::transmute(a))));
13441     }
13442 
13443     #[simd_test(enable = "msa")]
test_msa_ftint_u_w()13444     unsafe fn test_msa_ftint_u_w() {
13445         #[rustfmt::skip]
13446         let a = f32x4::new(-5.5, 75.6, -1000.7, 1219.3);
13447         #[rustfmt::skip]
13448         let r = u32x4::new(0, 76, 0, 1219);
13449 
13450         assert_eq!(r, mem::transmute(__msa_ftint_u_w(mem::transmute(a))));
13451     }
13452 
13453     #[simd_test(enable = "msa")]
test_msa_ftint_u_d()13454     unsafe fn test_msa_ftint_u_d() {
13455         #[rustfmt::skip]
13456         let a = f64x2::new(5.5, -25656.4);
13457         #[rustfmt::skip]
13458         let r = u64x2::new(6, 0);
13459 
13460         assert_eq!(r, mem::transmute(__msa_ftint_u_d(mem::transmute(a))));
13461     }
13462 
13463     #[simd_test(enable = "msa")]
test_msa_ftq_h()13464     unsafe fn test_msa_ftq_h() {
13465         #[rustfmt::skip]
13466         let a = f32x4::new(0.00001, 0.0002, 0.00001, -0.0002);
13467         #[rustfmt::skip]
13468         let b = f32x4::new(0.0001, -0.002, 0.0001, 0.002);
13469         #[rustfmt::skip]
13470         let r = i16x8::new(3, -66, 3, 66, 0, 7, 0, -7);
13471 
13472         assert_eq!(
13473             r,
13474             mem::transmute(__msa_ftq_h(mem::transmute(a), mem::transmute(b)))
13475         );
13476     }
13477 
13478     #[simd_test(enable = "msa")]
test_msa_ftq_w()13479     unsafe fn test_msa_ftq_w() {
13480         #[rustfmt::skip]
13481         let a = f64x2::new(0.00001, -0.0002);
13482         #[rustfmt::skip]
13483         let b = f64x2::new(0.00000045, 0.000015);
13484         #[rustfmt::skip]
13485         let r = i32x4::new(966, 32212, 21475, -429497);
13486 
13487         assert_eq!(
13488             r,
13489             mem::transmute(__msa_ftq_w(mem::transmute(a), mem::transmute(b)))
13490         );
13491     }
13492 
13493     #[simd_test(enable = "msa")]
test_msa_ftrunc_s_w()13494     unsafe fn test_msa_ftrunc_s_w() {
13495         #[rustfmt::skip]
13496         let a = f32x4::new(-5.5, 75.6, -1000.7, 1219.3);
13497         #[rustfmt::skip]
13498         let r = i32x4::new(-5, 75, -1000, 1219);
13499 
13500         assert_eq!(r, mem::transmute(__msa_ftrunc_s_w(mem::transmute(a))));
13501     }
13502 
13503     #[simd_test(enable = "msa")]
test_msa_ftrunc_s_d()13504     unsafe fn test_msa_ftrunc_s_d() {
13505         #[rustfmt::skip]
13506         let a = f64x2::new(-5.5, 25656.4);
13507         #[rustfmt::skip]
13508         let r = i64x2::new(-5, 25656);
13509 
13510         assert_eq!(r, mem::transmute(__msa_ftrunc_s_d(mem::transmute(a))));
13511     }
13512 
13513     #[simd_test(enable = "msa")]
test_msa_ftrunc_u_w()13514     unsafe fn test_msa_ftrunc_u_w() {
13515         #[rustfmt::skip]
13516         let a = f32x4::new(-5.5, 75.6, -1000.7, 1219.3);
13517         #[rustfmt::skip]
13518         let r = u32x4::new(0, 75, 0, 1219);
13519 
13520         assert_eq!(r, mem::transmute(__msa_ftrunc_u_w(mem::transmute(a))));
13521     }
13522 
13523     #[simd_test(enable = "msa")]
test_msa_ftrunc_u_d()13524     unsafe fn test_msa_ftrunc_u_d() {
13525         #[rustfmt::skip]
13526         let a = f64x2::new(5.5, -25656.4);
13527         #[rustfmt::skip]
13528         let r = u64x2::new(5, 0);
13529 
13530         assert_eq!(r, mem::transmute(__msa_ftrunc_u_d(mem::transmute(a))));
13531     }
13532 
13533     #[simd_test(enable = "msa")]
test_msa_hadd_s_h()13534     unsafe fn test_msa_hadd_s_h() {
13535         #[rustfmt::skip]
13536         let a = i8x16::new(
13537             1, 2, 3, 4,
13538             -1, -2, -3, -4,
13539             1, 2, 3, 4,
13540             -1, -2, -3, -4
13541         );
13542         #[rustfmt::skip]
13543         let b = i8x16::new(
13544             4, 3, 2, 1,
13545             4, 3, 2, 1,
13546             4, 3, 2, 1,
13547             4, 3, 2, 1
13548         );
13549         #[rustfmt::skip]
13550         let r = i16x8::new(6, 6, 2, -2, 6, 6, 2, -2);
13551 
13552         assert_eq!(
13553             r,
13554             mem::transmute(__msa_hadd_s_h(mem::transmute(a), mem::transmute(b)))
13555         );
13556     }
13557 
13558     #[simd_test(enable = "msa")]
test_msa_hadd_s_w()13559     unsafe fn test_msa_hadd_s_w() {
13560         #[rustfmt::skip]
13561         let a = i16x8::new(
13562             1, 2, 3, 4,
13563             -1, -2, -3, -4
13564         );
13565         #[rustfmt::skip]
13566         let b = i16x8::new(
13567             4, 3, 2, 1,
13568             4, 3, 2, 1
13569         );
13570         #[rustfmt::skip]
13571         let r = i32x4::new(6, 6, 2, -2);
13572 
13573         assert_eq!(
13574             r,
13575             mem::transmute(__msa_hadd_s_w(mem::transmute(a), mem::transmute(b)))
13576         );
13577     }
13578 
13579     #[simd_test(enable = "msa")]
test_msa_hadd_s_d()13580     unsafe fn test_msa_hadd_s_d() {
13581         #[rustfmt::skip]
13582         let a = i32x4::new(1, -2, 3, -4);
13583         #[rustfmt::skip]
13584         let b = i32x4::new(4, 3, 2, 1);
13585         #[rustfmt::skip]
13586         let r = i64x2::new(2, -2);
13587 
13588         assert_eq!(
13589             r,
13590             mem::transmute(__msa_hadd_s_d(mem::transmute(a), mem::transmute(b)))
13591         );
13592     }
13593 
13594     #[simd_test(enable = "msa")]
test_msa_hadd_u_h()13595     unsafe fn test_msa_hadd_u_h() {
13596         #[rustfmt::skip]
13597         let a = u8x16::new(
13598             1, 2, 3, 4,
13599             1, 2, 3, 4,
13600             1, 2, 3, 4,
13601             1, 2, 3, 4
13602         );
13603         #[rustfmt::skip]
13604         let b = u8x16::new(
13605             4, 3, 2, 1,
13606             4, 3, 2, 1,
13607             4, 3, 2, 1,
13608             4, 3, 2, 1
13609         );
13610         #[rustfmt::skip]
13611         let r = u16x8::new(6, 6, 6, 6, 6, 6, 6, 6);
13612 
13613         assert_eq!(
13614             r,
13615             mem::transmute(__msa_hadd_u_h(mem::transmute(a), mem::transmute(b)))
13616         );
13617     }
13618 
13619     #[simd_test(enable = "msa")]
test_msa_hadd_u_w()13620     unsafe fn test_msa_hadd_u_w() {
13621         #[rustfmt::skip]
13622         let a = u16x8::new(
13623             1, 2, 3, 4,
13624             1, 2, 3, 4
13625         );
13626         #[rustfmt::skip]
13627         let b = u16x8::new(
13628             4, 3, 2, 1,
13629             4, 3, 2, 1
13630         );
13631         #[rustfmt::skip]
13632         let r = u32x4::new(6, 6, 6, 6);
13633 
13634         assert_eq!(
13635             r,
13636             mem::transmute(__msa_hadd_u_w(mem::transmute(a), mem::transmute(b)))
13637         );
13638     }
13639 
13640     #[simd_test(enable = "msa")]
test_msa_hadd_u_d()13641     unsafe fn test_msa_hadd_u_d() {
13642         #[rustfmt::skip]
13643         let a = u32x4::new(1, 2, 3, 4);
13644         #[rustfmt::skip]
13645         let b = u32x4::new(4, 3, 2, 1);
13646         #[rustfmt::skip]
13647         let r = u64x2::new(6, 6);
13648 
13649         assert_eq!(
13650             r,
13651             mem::transmute(__msa_hadd_u_d(mem::transmute(a), mem::transmute(b)))
13652         );
13653     }
13654 
13655     #[simd_test(enable = "msa")]
test_msa_hsub_s_h()13656     unsafe fn test_msa_hsub_s_h() {
13657         #[rustfmt::skip]
13658         let a = i8x16::new(
13659             1, 2, 3, 4,
13660             -1, -2, -3, -4,
13661             1, 2, 3, 4,
13662             -1, -2, -3, -4
13663         );
13664         #[rustfmt::skip]
13665         let b = i8x16::new(
13666             4, 3, 2, 1,
13667             4, 3, 2, 1,
13668             4, 3, 2, 1,
13669             4, 3, 2, 1
13670         );
13671         #[rustfmt::skip]
13672         let r = i16x8::new(-2, 2, -6, -6, -2, 2, -6, -6);
13673 
13674         assert_eq!(
13675             r,
13676             mem::transmute(__msa_hsub_s_h(mem::transmute(a), mem::transmute(b)))
13677         );
13678     }
13679 
13680     #[simd_test(enable = "msa")]
test_msa_hsub_s_w()13681     unsafe fn test_msa_hsub_s_w() {
13682         #[rustfmt::skip]
13683         let a = i16x8::new(
13684             1, 2, 3, 4,
13685             -1, -2, -3, -4
13686         );
13687         #[rustfmt::skip]
13688         let b = i16x8::new(
13689             4, 3, 2, 1,
13690             4, 3, 2, 1
13691         );
13692         #[rustfmt::skip]
13693         let r = i32x4::new(-2, 2, -6, -6);
13694 
13695         assert_eq!(
13696             r,
13697             mem::transmute(__msa_hsub_s_w(mem::transmute(a), mem::transmute(b)))
13698         );
13699     }
13700 
13701     #[simd_test(enable = "msa")]
test_msa_hsub_s_d()13702     unsafe fn test_msa_hsub_s_d() {
13703         #[rustfmt::skip]
13704         let a = i32x4::new(1, -2, 3, -4);
13705         #[rustfmt::skip]
13706         let b = i32x4::new(4, 3, 2, 1);
13707         #[rustfmt::skip]
13708         let r = i64x2::new(-6, -6);
13709 
13710         assert_eq!(
13711             r,
13712             mem::transmute(__msa_hsub_s_d(mem::transmute(a), mem::transmute(b)))
13713         );
13714     }
13715 
13716     #[simd_test(enable = "msa")]
test_msa_hsub_u_h()13717     unsafe fn test_msa_hsub_u_h() {
13718         #[rustfmt::skip]
13719         let a = u8x16::new(
13720             1, 2, 3, 4,
13721             1, 2, 3, 4,
13722             1, 2, 3, 4,
13723             1, 2, 3, 4
13724         );
13725         #[rustfmt::skip]
13726         let b = u8x16::new(
13727             4, 3, 2, 1,
13728             4, 3, 2, 1,
13729             4, 3, 2, 1,
13730             4, 3, 2, 1
13731         );
13732         #[rustfmt::skip]
13733         let r = i16x8::new(-2, 2, -2, 2, -2, 2, -2, 2);
13734 
13735         assert_eq!(
13736             r,
13737             mem::transmute(__msa_hsub_u_h(mem::transmute(a), mem::transmute(b)))
13738         );
13739     }
13740 
13741     #[simd_test(enable = "msa")]
test_msa_hsub_u_w()13742     unsafe fn test_msa_hsub_u_w() {
13743         #[rustfmt::skip]
13744         let a = u16x8::new(
13745             1, 2, 3, 4,
13746             1, 2, 3, 4
13747         );
13748         #[rustfmt::skip]
13749         let b = u16x8::new(
13750             4, 3, 2, 1,
13751             4, 3, 2, 1
13752         );
13753         #[rustfmt::skip]
13754         let r = i32x4::new(-2, 2, -2, 2);
13755 
13756         assert_eq!(
13757             r,
13758             mem::transmute(__msa_hsub_u_w(mem::transmute(a), mem::transmute(b)))
13759         );
13760     }
13761 
13762     #[simd_test(enable = "msa")]
test_msa_hsub_u_d()13763     unsafe fn test_msa_hsub_u_d() {
13764         #[rustfmt::skip]
13765         let a = u32x4::new(1, 2, 3, 4);
13766         #[rustfmt::skip]
13767         let b = u32x4::new(4, 3, 2, 1);
13768         #[rustfmt::skip]
13769         let r = i64x2::new(-2, 2);
13770 
13771         assert_eq!(
13772             r,
13773             mem::transmute(__msa_hsub_u_d(mem::transmute(a), mem::transmute(b)))
13774         );
13775     }
13776 
13777     #[simd_test(enable = "msa")]
test_msa_ilvev_b()13778     unsafe fn test_msa_ilvev_b() {
13779         #[rustfmt::skip]
13780         let a = i8x16::new(
13781             1, 2, 3, 4,
13782             1, 2, 3, 4,
13783             1, 2, 3, 4,
13784             1, 2, 3, 4
13785         );
13786         #[rustfmt::skip]
13787         let b = i8x16::new(
13788             4, 3, 2, 1,
13789             4, 3, 2, 1,
13790             4, 3, 2, 1,
13791             4, 3, 2, 1
13792         );
13793         #[rustfmt::skip]
13794         let r = i8x16::new(
13795             4, 1, 2, 3,
13796             4, 1, 2, 3,
13797             4, 1, 2, 3,
13798             4, 1, 2, 3
13799         );
13800 
13801         assert_eq!(
13802             r,
13803             mem::transmute(__msa_ilvev_b(mem::transmute(a), mem::transmute(b)))
13804         );
13805     }
13806 
13807     #[simd_test(enable = "msa")]
test_msa_ilvev_h()13808     unsafe fn test_msa_ilvev_h() {
13809         #[rustfmt::skip]
13810         let a = i16x8::new(
13811             1, 2, 3, 4,
13812             1, 2, 3, 4
13813         );
13814         #[rustfmt::skip]
13815         let b = i16x8::new(
13816             4, 3, 2, 1,
13817             4, 3, 2, 1
13818         );
13819         #[rustfmt::skip]
13820         let r = i16x8::new(4, 1, 2, 3, 4, 1, 2, 3);
13821 
13822         assert_eq!(
13823             r,
13824             mem::transmute(__msa_ilvev_h(mem::transmute(a), mem::transmute(b)))
13825         );
13826     }
13827 
13828     #[simd_test(enable = "msa")]
test_msa_ilvev_w()13829     unsafe fn test_msa_ilvev_w() {
13830         #[rustfmt::skip]
13831         let a = i32x4::new(1, 2, 3, 4);
13832         #[rustfmt::skip]
13833         let b = i32x4::new(4, 3, 2, 1);
13834         #[rustfmt::skip]
13835         let r = i32x4::new(4, 1, 2, 3);
13836 
13837         assert_eq!(
13838             r,
13839             mem::transmute(__msa_ilvev_w(mem::transmute(a), mem::transmute(b)))
13840         );
13841     }
13842 
13843     #[simd_test(enable = "msa")]
test_msa_ilvev_d()13844     unsafe fn test_msa_ilvev_d() {
13845         #[rustfmt::skip]
13846         let a = i64x2::new(1, 2);
13847         #[rustfmt::skip]
13848         let b = i64x2::new(4, 3);
13849         #[rustfmt::skip]
13850         let r = i64x2::new(4, 1);
13851 
13852         assert_eq!(
13853             r,
13854             mem::transmute(__msa_ilvev_d(mem::transmute(a), mem::transmute(b)))
13855         );
13856     }
13857 
13858     #[simd_test(enable = "msa")]
test_msa_ilvl_b()13859     unsafe fn test_msa_ilvl_b() {
13860         #[rustfmt::skip]
13861         let a = i8x16::new(
13862             1, 2, 3, 4,
13863             5, 6, 7, 8,
13864             9, 10, 11, 12,
13865             13, 14, 15, 16
13866         );
13867         #[rustfmt::skip]
13868         let b = i8x16::new(
13869             16, 15, 14, 13,
13870             12, 11, 10, 9,
13871             8, 7, 6, 5,
13872             4, 3, 2, 1
13873         );
13874         #[rustfmt::skip]
13875         let r = i8x16::new(
13876             8, 9, 7, 10,
13877             6, 11, 5, 12,
13878             4, 13, 3, 14,
13879             2, 15, 1, 16
13880         );
13881 
13882         assert_eq!(
13883             r,
13884             mem::transmute(__msa_ilvl_b(mem::transmute(a), mem::transmute(b)))
13885         );
13886     }
13887 
13888     #[simd_test(enable = "msa")]
test_msa_ilvl_h()13889     unsafe fn test_msa_ilvl_h() {
13890         #[rustfmt::skip]
13891         let a = i16x8::new(
13892             1, 2, 3, 4,
13893             5, 6, 7, 8
13894         );
13895         #[rustfmt::skip]
13896         let b = i16x8::new(
13897             8, 7, 6, 5,
13898             4, 3, 2, 1
13899         );
13900         #[rustfmt::skip]
13901         let r = i16x8::new(4, 5, 3, 6, 2, 7, 1, 8);
13902 
13903         assert_eq!(
13904             r,
13905             mem::transmute(__msa_ilvl_h(mem::transmute(a), mem::transmute(b)))
13906         );
13907     }
13908 
13909     #[simd_test(enable = "msa")]
test_msa_ilvl_w()13910     unsafe fn test_msa_ilvl_w() {
13911         #[rustfmt::skip]
13912         let a = i32x4::new(1, 2, 3, 4);
13913         #[rustfmt::skip]
13914         let b = i32x4::new(4, 3, 2, 1);
13915         #[rustfmt::skip]
13916         let r = i32x4::new(2, 3, 1, 4);
13917 
13918         assert_eq!(
13919             r,
13920             mem::transmute(__msa_ilvl_w(mem::transmute(a), mem::transmute(b)))
13921         );
13922     }
13923 
13924     #[simd_test(enable = "msa")]
test_msa_ilvl_d()13925     unsafe fn test_msa_ilvl_d() {
13926         #[rustfmt::skip]
13927         let a = i64x2::new(1, 2);
13928         #[rustfmt::skip]
13929         let b = i64x2::new(2, 1);
13930         #[rustfmt::skip]
13931         let r = i64x2::new(1, 2);
13932 
13933         assert_eq!(
13934             r,
13935             mem::transmute(__msa_ilvl_d(mem::transmute(a), mem::transmute(b)))
13936         );
13937     }
13938 
13939     #[simd_test(enable = "msa")]
test_msa_ilvod_b()13940     unsafe fn test_msa_ilvod_b() {
13941         #[rustfmt::skip]
13942         let a = i8x16::new(
13943             1, 2, 3, 4,
13944             5, 6, 7, 8,
13945             9, 10, 11, 12,
13946             13, 14, 15, 16
13947         );
13948         #[rustfmt::skip]
13949         let b = i8x16::new(
13950             16, 15, 14, 13,
13951             12, 11, 10, 9,
13952             8, 7, 6, 5,
13953             4, 3, 2, 1
13954         );
13955         #[rustfmt::skip]
13956         let r = i8x16::new(
13957             15, 2, 13, 4,
13958             11, 6, 9, 8,
13959             7, 10, 5, 12,
13960             3, 14, 1, 16
13961         );
13962 
13963         assert_eq!(
13964             r,
13965             mem::transmute(__msa_ilvod_b(mem::transmute(a), mem::transmute(b)))
13966         );
13967     }
13968 
13969     #[simd_test(enable = "msa")]
test_msa_ilvod_h()13970     unsafe fn test_msa_ilvod_h() {
13971         #[rustfmt::skip]
13972         let a = i16x8::new(
13973             1, 2, 3, 4,
13974             5, 6, 7, 8
13975         );
13976         #[rustfmt::skip]
13977         let b = i16x8::new(
13978             8, 7, 6, 5,
13979             4, 3, 2, 1
13980         );
13981         #[rustfmt::skip]
13982         let r = i16x8::new(7, 2, 5, 4, 3, 6, 1, 8);
13983 
13984         assert_eq!(
13985             r,
13986             mem::transmute(__msa_ilvod_h(mem::transmute(a), mem::transmute(b)))
13987         );
13988     }
13989 
13990     #[simd_test(enable = "msa")]
test_msa_ilvod_w()13991     unsafe fn test_msa_ilvod_w() {
13992         #[rustfmt::skip]
13993         let a = i32x4::new(1, 2, 3, 4);
13994         #[rustfmt::skip]
13995         let b = i32x4::new(4, 3, 2, 1);
13996         #[rustfmt::skip]
13997         let r = i32x4::new(3, 2, 1, 4);
13998 
13999         assert_eq!(
14000             r,
14001             mem::transmute(__msa_ilvod_w(mem::transmute(a), mem::transmute(b)))
14002         );
14003     }
14004 
14005     #[simd_test(enable = "msa")]
test_msa_ilvod_d()14006     unsafe fn test_msa_ilvod_d() {
14007         #[rustfmt::skip]
14008         let a = i64x2::new(1, 2);
14009         #[rustfmt::skip]
14010         let b = i64x2::new(2, 1);
14011         #[rustfmt::skip]
14012         let r = i64x2::new(1, 2);
14013 
14014         assert_eq!(
14015             r,
14016             mem::transmute(__msa_ilvod_d(mem::transmute(a), mem::transmute(b)))
14017         );
14018     }
14019 
14020     #[simd_test(enable = "msa")]
test_msa_ilvr_b()14021     unsafe fn test_msa_ilvr_b() {
14022         #[rustfmt::skip]
14023         let a = i8x16::new(
14024             1, 2, 3, 4,
14025             5, 6, 7, 8,
14026             9, 10, 11, 12,
14027             13, 14, 15, 16
14028         );
14029         #[rustfmt::skip]
14030         let b = i8x16::new(
14031             16, 15, 14, 13,
14032             12, 11, 10, 9,
14033             8, 7, 6, 5,
14034             4, 3, 2, 1
14035         );
14036         #[rustfmt::skip]
14037         let r = i8x16::new(
14038             16, 1, 15, 2,
14039             14, 3, 13, 4,
14040             12, 5, 11, 6,
14041             10, 7, 9, 8
14042         );
14043 
14044         assert_eq!(
14045             r,
14046             mem::transmute(__msa_ilvr_b(mem::transmute(a), mem::transmute(b)))
14047         );
14048     }
14049 
14050     #[simd_test(enable = "msa")]
test_msa_ilvr_h()14051     unsafe fn test_msa_ilvr_h() {
14052         #[rustfmt::skip]
14053         let a = i16x8::new(
14054             1, 2, 3, 4,
14055             5, 6, 7, 8,
14056         );
14057         #[rustfmt::skip]
14058         let b = i16x8::new(
14059             8, 7, 6, 5,
14060             4, 3, 2, 1,
14061         );
14062         #[rustfmt::skip]
14063         let r = i16x8::new(8, 1, 7, 2, 6, 3, 5, 4);
14064 
14065         assert_eq!(
14066             r,
14067             mem::transmute(__msa_ilvr_h(mem::transmute(a), mem::transmute(b)))
14068         );
14069     }
14070 
14071     #[simd_test(enable = "msa")]
test_msa_ilvr_w()14072     unsafe fn test_msa_ilvr_w() {
14073         #[rustfmt::skip]
14074         let a = i32x4::new(1, 2, 3, 4);
14075         #[rustfmt::skip]
14076         let b = i32x4::new(4, 3, 2, 1);
14077         #[rustfmt::skip]
14078         let r = i32x4::new(4, 1, 3, 2);
14079 
14080         assert_eq!(
14081             r,
14082             mem::transmute(__msa_ilvr_w(mem::transmute(a), mem::transmute(b)))
14083         );
14084     }
14085 
14086     #[simd_test(enable = "msa")]
test_msa_ilvr_d()14087     unsafe fn test_msa_ilvr_d() {
14088         #[rustfmt::skip]
14089         let a = i64x2::new(1, 2);
14090         #[rustfmt::skip]
14091         let b = i64x2::new(2, 1);
14092         #[rustfmt::skip]
14093         let r = i64x2::new(2, 1);
14094 
14095         assert_eq!(
14096             r,
14097             mem::transmute(__msa_ilvr_d(mem::transmute(a), mem::transmute(b)))
14098         );
14099     }
14100 
14101     #[simd_test(enable = "msa")]
test_msa_insert_b()14102     unsafe fn test_msa_insert_b() {
14103         #[rustfmt::skip]
14104         let a = i8x16::new(
14105             -100, 127, 4, 127,
14106             -100, 127, 4, 127,
14107             -100, 127, 4, 127,
14108             -100, 127, 4, 127
14109         );
14110         #[rustfmt::skip]
14111         let r = i8x16::new(
14112             -100, 127, 4, 127,
14113             -100, 127, 4, 127,
14114             -100, 127, 4, 127,
14115             5, 127, 4, 127
14116         );
14117 
14118         assert_eq!(r, mem::transmute(__msa_insert_b(mem::transmute(a), 12, 5)));
14119     }
14120 
14121     #[simd_test(enable = "msa")]
test_msa_insert_h()14122     unsafe fn test_msa_insert_h() {
14123         #[rustfmt::skip]
14124         let a = i16x8::new(
14125             32767, 3276, 100, 11,
14126             32767, 3276, 100, 11
14127         );
14128         #[rustfmt::skip]
14129         let r = i16x8::new(
14130             32767, 3276, 100, 11,
14131             5, 3276, 100, 11
14132         );
14133 
14134         assert_eq!(r, mem::transmute(__msa_insert_h(mem::transmute(a), 4, 5)));
14135     }
14136 
14137     #[simd_test(enable = "msa")]
test_msa_insert_w()14138     unsafe fn test_msa_insert_w() {
14139         #[rustfmt::skip]
14140         let a = i32x4::new(100, 2147483647, 5, -2147483647);
14141         #[rustfmt::skip]
14142         let r = i32x4::new(100, 7, 5, -2147483647);
14143 
14144         assert_eq!(r, mem::transmute(__msa_insert_w(mem::transmute(a), 1, 7)));
14145     }
14146 
14147     #[simd_test(enable = "msa")]
test_msa_insert_d()14148     unsafe fn test_msa_insert_d() {
14149         #[rustfmt::skip]
14150         let a = i64x2::new(3, i64::MAX);
14151         #[rustfmt::skip]
14152         let r = i64x2::new(3, 100);
14153 
14154         assert_eq!(r, mem::transmute(__msa_insert_d(mem::transmute(a), 1, 100)));
14155     }
14156 
14157     #[simd_test(enable = "msa")]
test_msa_insve_b()14158     unsafe fn test_msa_insve_b() {
14159         #[rustfmt::skip]
14160         let a = i8x16::new(
14161             -100, i8::MAX, 4, i8::MAX,
14162             -100, i8::MAX, 4, i8::MAX,
14163             -100, i8::MAX, 4, i8::MAX,
14164             -100, i8::MAX, 4, i8::MAX
14165         );
14166         #[rustfmt::skip]
14167         let b = i8x16::new(
14168             5, 2, 3, 4,
14169             1, 2, 3, 4,
14170             1, 2, 3, 4,
14171             1, 2, 3, 4
14172         );
14173         #[rustfmt::skip]
14174         let r = i8x16::new(
14175             -100, 127, 4, 127,
14176             -100, 127, 4, 127,
14177             -100, 127, 4, 127,
14178             5, 127, 4, 127
14179         );
14180 
14181         assert_eq!(
14182             r,
14183             mem::transmute(__msa_insve_b(mem::transmute(a), 12, mem::transmute(b)))
14184         );
14185     }
14186 
14187     #[simd_test(enable = "msa")]
test_msa_insve_h()14188     unsafe fn test_msa_insve_h() {
14189         #[rustfmt::skip]
14190         let a = i16x8::new(
14191             i16::MAX, 3276, 100, 11,
14192             i16::MAX, 3276, 100, 11
14193         );
14194         #[rustfmt::skip]
14195         let b = i16x8::new(
14196             1, 2, 3, 4,
14197             1, 2, 3, 4
14198         );
14199         #[rustfmt::skip]
14200         let r = i16x8::new(
14201             32767, 3276, 100, 11,
14202             1, 3276, 100, 11
14203         );
14204 
14205         assert_eq!(
14206             r,
14207             mem::transmute(__msa_insve_h(mem::transmute(a), 4, mem::transmute(b)))
14208         );
14209     }
14210 
14211     #[simd_test(enable = "msa")]
test_msa_insve_w()14212     unsafe fn test_msa_insve_w() {
14213         #[rustfmt::skip]
14214         let a = i32x4::new(100, 2147483647, 5, -2147483647);
14215         #[rustfmt::skip]
14216         let b = i32x4::new(1, 2, 3, 4);
14217         #[rustfmt::skip]
14218         let r = i32x4::new(100, 2147483647, 5, 1);
14219 
14220         assert_eq!(
14221             r,
14222             mem::transmute(__msa_insve_w(mem::transmute(a), 3, mem::transmute(b)))
14223         );
14224     }
14225 
14226     #[simd_test(enable = "msa")]
test_msa_insve_d()14227     unsafe fn test_msa_insve_d() {
14228         #[rustfmt::skip]
14229         let a = i64x2::new(3, i64::MAX);
14230         #[rustfmt::skip]
14231         let b = i64x2::new(1, 2);
14232         #[rustfmt::skip]
14233         let r = i64x2::new(3, 1);
14234 
14235         assert_eq!(
14236             r,
14237             mem::transmute(__msa_insve_d(mem::transmute(a), 1, mem::transmute(b)))
14238         );
14239     }
14240 
14241     #[simd_test(enable = "msa")]
test_msa_ld_b()14242     unsafe fn test_msa_ld_b() {
14243         #[rustfmt::skip]
14244         let mut a : [i8; 32] = [
14245             0, 1, 2, 3, 4, 5, 6, 7,
14246             8, 9, 10, 11, 12, 13, 14, 15,
14247             16, 17, 18, 19, 20, 21, 22, 23,
14248             24, 25, 26, 27, 28, 29, 30, 31
14249         ];
14250         let p = &mut a[4] as *mut _ as *mut u8;
14251         #[rustfmt::skip]
14252         let r = i8x16::new(
14253             13, 14, 15, 16,
14254             17, 18, 19, 20,
14255             21, 22, 23, 24,
14256             25, 26, 27, 28
14257         );
14258 
14259         assert_eq!(r, mem::transmute(__msa_ld_b(p, 9)));
14260     }
14261 
14262     #[simd_test(enable = "msa")]
test_msa_ld_h()14263     unsafe fn test_msa_ld_h() {
14264         #[rustfmt::skip]
14265         let mut a : [i16; 16] = [
14266             0, 1, 2, 3, 4, 5, 6, 7,
14267             8, 9, 10, 11, 12, 13, 14, 15
14268         ];
14269         let p = &mut a[4] as *mut _ as *mut u8;
14270         #[rustfmt::skip]
14271         let r = i16x8::new(3, 4, 5, 6, 7, 8, 9, 10);
14272 
14273         assert_eq!(r, mem::transmute(__msa_ld_h(p, -2)));
14274     }
14275 
14276     #[simd_test(enable = "msa")]
test_msa_ld_w()14277     unsafe fn test_msa_ld_w() {
14278         #[rustfmt::skip]
14279         let mut a : [i32; 8] = [0, 1, 2, 3, 4, 5, 6, 7];
14280         let p = &mut a[3] as *mut _ as *mut u8;
14281         #[rustfmt::skip]
14282         let r = i32x4::new(2, 3, 4, 5);
14283 
14284         assert_eq!(r, mem::transmute(__msa_ld_w(p, -4)));
14285     }
14286 
14287     #[simd_test(enable = "msa")]
test_msa_ld_d()14288     unsafe fn test_msa_ld_d() {
14289         #[rustfmt::skip]
14290         let mut a : [i64; 8] = [0, 1, 2, 3, 4, 5, 6, 7];
14291         let p = &mut a[4] as *mut _ as *mut u8;
14292         #[rustfmt::skip]
14293         let r = i64x2::new(0, 1);
14294 
14295         assert_eq!(r, mem::transmute(__msa_ld_d(p, -32)));
14296     }
14297 
14298     #[simd_test(enable = "msa")]
test_msa_ldi_b()14299     unsafe fn test_msa_ldi_b() {
14300         #[rustfmt::skip]
14301         let r = i8x16::new(
14302             -20, -20, -20, -20,
14303             -20, -20, -20, -20,
14304             -20, -20, -20, -20,
14305             -20, -20, -20, -20
14306         );
14307 
14308         assert_eq!(r, mem::transmute(__msa_ldi_b(-20)));
14309     }
14310 
14311     #[simd_test(enable = "msa")]
test_msa_ldi_h()14312     unsafe fn test_msa_ldi_h() {
14313         #[rustfmt::skip]
14314         let r = i16x8::new(
14315             255, 255, 255, 255,
14316             255, 255, 255, 255
14317         );
14318 
14319         assert_eq!(r, mem::transmute(__msa_ldi_h(255)));
14320     }
14321 
14322     #[simd_test(enable = "msa")]
test_msa_ldi_w()14323     unsafe fn test_msa_ldi_w() {
14324         #[rustfmt::skip]
14325         let r = i32x4::new(-509, -509, -509, -509);
14326 
14327         assert_eq!(r, mem::transmute(__msa_ldi_w(-509)));
14328     }
14329 
14330     // FIXME: https://reviews.llvm.org/D59884
14331     // If target type is i64, negative immediate loses the sign
14332     // Test passes if 4294967185 is used instead -111 in vector `r`
14333     // #[simd_test(enable = "msa")]
14334     // unsafe fn test_msa_ldi_d() {
14335     //     let r = i64x2::new(-111, -111);
14336 
14337     //     assert_eq!(r, mem::transmute(__msa_ldi_d(-111)));
14338     // }
14339 
14340     #[simd_test(enable = "msa")]
test_msa_madd_q_h()14341     unsafe fn test_msa_madd_q_h() {
14342         #[rustfmt::skip]
14343         let a = i16x8::new(
14344             i16::MAX, 1024, i16::MIN, -1024,
14345             1, 2, 3, 4
14346         );
14347         #[rustfmt::skip]
14348         let b = i16x8::new(
14349             1024, 1024, 1024, 1024,
14350             1024, 1024, 1024, 1024
14351         );
14352         #[rustfmt::skip]
14353         let c = i16x8::new(
14354             i16::MAX, i16::MAX, 1, -1,
14355             33, 66, 99, 132
14356         );
14357         #[rustfmt::skip]
14358         let r = i16x8::new(32767, 2047, -32768, -1025, 2, 4, 6, 8);
14359 
14360         assert_eq!(
14361             r,
14362             mem::transmute(__msa_madd_q_h(
14363                 mem::transmute(a),
14364                 mem::transmute(b),
14365                 mem::transmute(c)
14366             ))
14367         );
14368     }
14369 
14370     #[simd_test(enable = "msa")]
test_msa_madd_q_w()14371     unsafe fn test_msa_madd_q_w() {
14372         #[rustfmt::skip]
14373         let a = i32x4::new(i32::MAX, i32::MIN, 1, 2);
14374         #[rustfmt::skip]
14375         let b = i32x4::new(102401, 102401, 102401, 102401);
14376         #[rustfmt::skip]
14377         let c = i32x4::new(10240, 20480, 30720, 40960);
14378         #[rustfmt::skip]
14379         let r = i32x4::new(2147483647, -2147483648, 2, 3);
14380 
14381         assert_eq!(
14382             r,
14383             mem::transmute(__msa_madd_q_w(
14384                 mem::transmute(a),
14385                 mem::transmute(b),
14386                 mem::transmute(c)
14387             ))
14388         );
14389     }
14390 
14391     #[simd_test(enable = "msa")]
test_msa_maddr_q_h()14392     unsafe fn test_msa_maddr_q_h() {
14393         #[rustfmt::skip]
14394         let a = i16x8::new(
14395             32767, 1024, -32768, -1024,
14396             1, 2, 3, 4
14397         );
14398         #[rustfmt::skip]
14399         let b = i16x8::new(
14400             1024, 1024, 1024, 1024,
14401             1024, 1024, 1024, 1024
14402         );
14403         #[rustfmt::skip]
14404         let c = i16x8::new(
14405             32767, 32767, 32767, 32767,
14406             33, 66, 99, 132
14407         );
14408         #[rustfmt::skip]
14409         let r = i16x8::new(32767, 2048, -31744, 0, 2, 4, 6, 8);
14410 
14411         assert_eq!(
14412             r,
14413             mem::transmute(__msa_maddr_q_h(
14414                 mem::transmute(a),
14415                 mem::transmute(b),
14416                 mem::transmute(c)
14417             ))
14418         );
14419     }
14420 
14421     #[simd_test(enable = "msa")]
test_msa_maddr_q_w()14422     unsafe fn test_msa_maddr_q_w() {
14423         #[rustfmt::skip]
14424         let a = i32x4::new(i32::MAX, i32::MIN, 1, 2);
14425         #[rustfmt::skip]
14426         let b = i32x4::new(102401, 102401, 102401, 102401);
14427         #[rustfmt::skip]
14428         let c = i32x4::new(10240, 20480, 30720, 40960);
14429         #[rustfmt::skip]
14430         let r = i32x4::new(2147483647, -2147483647, 2, 4);
14431 
14432         assert_eq!(
14433             r,
14434             mem::transmute(__msa_maddr_q_w(
14435                 mem::transmute(a),
14436                 mem::transmute(b),
14437                 mem::transmute(c)
14438             ))
14439         );
14440     }
14441 
14442     #[simd_test(enable = "msa")]
test_msa_maddv_b()14443     unsafe fn test_msa_maddv_b() {
14444         #[rustfmt::skip]
14445         let a = i8x16::new(
14446             1, 2, 3, 4,
14447             1, 2, 3, 4,
14448             1, 2, 3, 4,
14449             1, 2, 3, 4
14450         );
14451         #[rustfmt::skip]
14452         let b = i8x16::new(
14453             5, 6, 7, 8,
14454             5, 6, 7, 8,
14455             5, 6, 7, 8,
14456             5, 6, 7, 8
14457         );
14458         #[rustfmt::skip]
14459         let c = i8x16::new(
14460             9, 10, 11, 12,
14461             9, 10, 11, 12,
14462             9, 10, 11, 12,
14463             9, 10, 11, 12
14464         );
14465         #[rustfmt::skip]
14466         let r = i8x16::new(
14467             46, 62, 80, 100,
14468             46, 62, 80, 100,
14469             46, 62, 80, 100,
14470             46, 62, 80, 100
14471         );
14472 
14473         assert_eq!(
14474             r,
14475             mem::transmute(__msa_maddv_b(
14476                 mem::transmute(a),
14477                 mem::transmute(b),
14478                 mem::transmute(c)
14479             ))
14480         );
14481     }
14482 
14483     #[simd_test(enable = "msa")]
test_msa_maddv_h()14484     unsafe fn test_msa_maddv_h() {
14485         #[rustfmt::skip]
14486         let a = i16x8::new(1, 2, 3, 4, 1, 2, 3, 4);
14487         #[rustfmt::skip]
14488         let b = i16x8::new(5, 6, 7, 8, 5, 6, 7, 8);
14489         #[rustfmt::skip]
14490         let c = i16x8::new(9, 10, 11, 12, 9, 10, 11, 12);
14491         #[rustfmt::skip]
14492         let r = i16x8::new(46, 62, 80, 100, 46, 62, 80, 100);
14493 
14494         assert_eq!(
14495             r,
14496             mem::transmute(__msa_maddv_h(
14497                 mem::transmute(a),
14498                 mem::transmute(b),
14499                 mem::transmute(c)
14500             ))
14501         );
14502     }
14503 
14504     #[simd_test(enable = "msa")]
test_msa_maddv_w()14505     unsafe fn test_msa_maddv_w() {
14506         #[rustfmt::skip]
14507         let a = i32x4::new(1, 2, 1, 2);
14508         #[rustfmt::skip]
14509         let b = i32x4::new(3, 4, 3, 4);
14510         #[rustfmt::skip]
14511         let c = i32x4::new(5, 6, 5, 6);
14512         #[rustfmt::skip]
14513         let r = i32x4::new(16, 26, 16, 26);
14514 
14515         assert_eq!(
14516             r,
14517             mem::transmute(__msa_maddv_w(
14518                 mem::transmute(a),
14519                 mem::transmute(b),
14520                 mem::transmute(c)
14521             ))
14522         );
14523     }
14524 
14525     #[simd_test(enable = "msa")]
test_msa_maddv_d()14526     unsafe fn test_msa_maddv_d() {
14527         #[rustfmt::skip]
14528         let a = i64x2::new(1, 2);
14529         #[rustfmt::skip]
14530         let b = i64x2::new(3, 4);
14531         #[rustfmt::skip]
14532         let c = i64x2::new(5, 6);
14533         #[rustfmt::skip]
14534         let r = i64x2::new(16, 26);
14535 
14536         assert_eq!(
14537             r,
14538             mem::transmute(__msa_maddv_d(
14539                 mem::transmute(a),
14540                 mem::transmute(b),
14541                 mem::transmute(c)
14542             ))
14543         );
14544     }
14545 
14546     #[simd_test(enable = "msa")]
test_msa_max_a_b()14547     unsafe fn test_msa_max_a_b() {
14548         #[rustfmt::skip]
14549         let a = i8x16::new(
14550             1, 2, 3, 4,
14551             -1, -2, -3, -4,
14552             1, 2, 3, 4,
14553             -1, -2, -3, -4
14554         );
14555         #[rustfmt::skip]
14556         let b = i8x16::new(
14557             -6, -7, -8, -9,
14558             6, 7, 8, 9,
14559             -6, -7, -8, -9,
14560             6, 7, 8, 9
14561         );
14562         #[rustfmt::skip]
14563         let r = i8x16::new(
14564             -6, -7, -8, -9,
14565             6, 7, 8, 9,
14566             -6, -7, -8, -9,
14567             6, 7, 8, 9
14568         );
14569 
14570         assert_eq!(
14571             r,
14572             mem::transmute(__msa_max_a_b(mem::transmute(a), mem::transmute(b)))
14573         );
14574     }
14575 
14576     #[simd_test(enable = "msa")]
test_msa_max_a_h()14577     unsafe fn test_msa_max_a_h() {
14578         #[rustfmt::skip]
14579         let a = i16x8::new(1, -2, 3, -4, 1, -2, 3, -4);
14580         #[rustfmt::skip]
14581         let b = i16x8::new(-6, 7, -8, 9, -6, 7, -8, 9);
14582         #[rustfmt::skip]
14583         let r = i16x8::new(-6, 7, -8, 9, -6, 7, -8, 9);
14584 
14585         assert_eq!(
14586             r,
14587             mem::transmute(__msa_max_a_h(mem::transmute(a), mem::transmute(b)))
14588         );
14589     }
14590 
14591     #[simd_test(enable = "msa")]
test_msa_max_a_w()14592     unsafe fn test_msa_max_a_w() {
14593         #[rustfmt::skip]
14594         let a = i32x4::new(1, -2, 3, -4);
14595         #[rustfmt::skip]
14596         let b = i32x4::new(6, 7, 8, 9);
14597         #[rustfmt::skip]
14598         let r = i32x4::new(6, 7, 8, 9);
14599 
14600         assert_eq!(
14601             r,
14602             mem::transmute(__msa_max_a_w(mem::transmute(a), mem::transmute(b)))
14603         );
14604     }
14605 
14606     #[simd_test(enable = "msa")]
test_msa_max_a_d()14607     unsafe fn test_msa_max_a_d() {
14608         #[rustfmt::skip]
14609         let a = i64x2::new(-1, 2);
14610         #[rustfmt::skip]
14611         let b = i64x2::new(6, -7);
14612         #[rustfmt::skip]
14613         let r = i64x2::new(6, -7);
14614 
14615         assert_eq!(
14616             r,
14617             mem::transmute(__msa_max_a_d(mem::transmute(a), mem::transmute(b)))
14618         );
14619     }
14620 
14621     #[simd_test(enable = "msa")]
test_msa_max_s_b()14622     unsafe fn test_msa_max_s_b() {
14623         #[rustfmt::skip]
14624         let a = i8x16::new(
14625             1, 2, 3, 4,
14626             -1, -2, -3, -4,
14627             1, 2, 3, 4,
14628             -1, -2, -3, -4
14629         );
14630         #[rustfmt::skip]
14631         let b = i8x16::new(
14632             -6, -7, -8, -9,
14633             6, 7, 8, 9,
14634             -6, -7, -8, -9,
14635             6, 7, 8, 9
14636         );
14637         #[rustfmt::skip]
14638         let r = i8x16::new(
14639             1, 2, 3, 4,
14640             6, 7, 8, 9,
14641             1, 2, 3, 4,
14642             6, 7, 8, 9
14643         );
14644 
14645         assert_eq!(
14646             r,
14647             mem::transmute(__msa_max_s_b(mem::transmute(a), mem::transmute(b)))
14648         );
14649     }
14650 
14651     #[simd_test(enable = "msa")]
test_msa_max_s_h()14652     unsafe fn test_msa_max_s_h() {
14653         #[rustfmt::skip]
14654         let a = i16x8::new(1, -2, 3, -4, 1, -2, 3, -4);
14655         #[rustfmt::skip]
14656         let b = i16x8::new(-6, 7, -8, 9, -6, 7, -8, 9);
14657         #[rustfmt::skip]
14658         let r = i16x8::new(1, 7, 3, 9, 1, 7, 3, 9);
14659 
14660         assert_eq!(
14661             r,
14662             mem::transmute(__msa_max_s_h(mem::transmute(a), mem::transmute(b)))
14663         );
14664     }
14665 
14666     #[simd_test(enable = "msa")]
test_msa_max_s_w()14667     unsafe fn test_msa_max_s_w() {
14668         #[rustfmt::skip]
14669         let a = i32x4::new(1, -2, 3, -4);
14670         #[rustfmt::skip]
14671         let b = i32x4::new(6, 7, 8, 9);
14672         #[rustfmt::skip]
14673         let r = i32x4::new(6, 7, 8, 9);
14674 
14675         assert_eq!(
14676             r,
14677             mem::transmute(__msa_max_s_w(mem::transmute(a), mem::transmute(b)))
14678         );
14679     }
14680 
14681     #[simd_test(enable = "msa")]
test_msa_max_s_d()14682     unsafe fn test_msa_max_s_d() {
14683         #[rustfmt::skip]
14684         let a = i64x2::new(-1, 2);
14685         #[rustfmt::skip]
14686         let b = i64x2::new(6, -7);
14687         #[rustfmt::skip]
14688         let r = i64x2::new(6, 2);
14689 
14690         assert_eq!(
14691             r,
14692             mem::transmute(__msa_max_s_d(mem::transmute(a), mem::transmute(b)))
14693         );
14694     }
14695 
14696     #[simd_test(enable = "msa")]
test_msa_max_u_b()14697     unsafe fn test_msa_max_u_b() {
14698         #[rustfmt::skip]
14699         let a = u8x16::new(
14700             1, 2, 3, 4,
14701             1, 2, 3, 4,
14702             1, 2, 3, 4,
14703             1, 2, 3, 4
14704         );
14705         #[rustfmt::skip]
14706         let b = u8x16::new(
14707             6, 7, 8, 9,
14708             6, 7, 8, 9,
14709             6, 7, 8, 9,
14710             6, 7, 8, 9
14711         );
14712         #[rustfmt::skip]
14713         let r = u8x16::new(
14714             6, 7, 8, 9,
14715             6, 7, 8, 9,
14716             6, 7, 8, 9,
14717             6, 7, 8, 9
14718         );
14719 
14720         assert_eq!(
14721             r,
14722             mem::transmute(__msa_max_u_b(mem::transmute(a), mem::transmute(b)))
14723         );
14724     }
14725 
14726     #[simd_test(enable = "msa")]
test_msa_max_u_h()14727     unsafe fn test_msa_max_u_h() {
14728         #[rustfmt::skip]
14729         let a = u16x8::new(1, 2, 3, 4, 1, 2, 3, 4);
14730         #[rustfmt::skip]
14731         let b = u16x8::new(6, 7, 8, 9, 6, 7, 8, 9);
14732         #[rustfmt::skip]
14733         let r = u16x8::new(6, 7, 8, 9, 6, 7, 8, 9);
14734 
14735         assert_eq!(
14736             r,
14737             mem::transmute(__msa_max_u_h(mem::transmute(a), mem::transmute(b)))
14738         );
14739     }
14740 
14741     #[simd_test(enable = "msa")]
test_msa_max_u_w()14742     unsafe fn test_msa_max_u_w() {
14743         #[rustfmt::skip]
14744         let a = u32x4::new(1, 2, 3, 4);
14745         #[rustfmt::skip]
14746         let b = u32x4::new(6, 7, 8, 9);
14747         #[rustfmt::skip]
14748         let r = u32x4::new(6, 7, 8, 9);
14749 
14750         assert_eq!(
14751             r,
14752             mem::transmute(__msa_max_u_w(mem::transmute(a), mem::transmute(b)))
14753         );
14754     }
14755 
14756     #[simd_test(enable = "msa")]
test_msa_max_u_d()14757     unsafe fn test_msa_max_u_d() {
14758         #[rustfmt::skip]
14759         let a = u64x2::new(1, 2);
14760         #[rustfmt::skip]
14761         let b = u64x2::new(6, 7);
14762         #[rustfmt::skip]
14763         let r = u64x2::new(6, 7);
14764 
14765         assert_eq!(
14766             r,
14767             mem::transmute(__msa_max_u_d(mem::transmute(a), mem::transmute(b)))
14768         );
14769     }
14770 
14771     #[simd_test(enable = "msa")]
test_msa_maxi_s_b()14772     unsafe fn test_msa_maxi_s_b() {
14773         #[rustfmt::skip]
14774         let a = i8x16::new(
14775             1, -20, -6, 8,
14776             1, -20, -6, 8,
14777             1, -20, -6, 8,
14778             1, -20, -6, 8
14779         );
14780         #[rustfmt::skip]
14781         let r = i8x16::new(
14782             1, -16, -6, 8,
14783             1, -16, -6, 8,
14784             1, -16, -6, 8,
14785             1, -16, -6, 8
14786         );
14787 
14788         assert_eq!(r, mem::transmute(__msa_maxi_s_b(mem::transmute(a), -16)));
14789     }
14790 
14791     #[simd_test(enable = "msa")]
test_msa_maxi_s_h()14792     unsafe fn test_msa_maxi_s_h() {
14793         #[rustfmt::skip]
14794         let a = i16x8::new(1, 3, -60, -8, 1, 3, -6, -8);
14795         #[rustfmt::skip]
14796         let r = i16x8::new(15, 15, 15, 15, 15, 15, 15, 15);
14797 
14798         assert_eq!(r, mem::transmute(__msa_maxi_s_h(mem::transmute(a), 15)));
14799     }
14800 
14801     #[simd_test(enable = "msa")]
test_msa_maxi_s_w()14802     unsafe fn test_msa_maxi_s_w() {
14803         #[rustfmt::skip]
14804         let a = i32x4::new(1, 3, -6, -8);
14805         #[rustfmt::skip]
14806         let r = i32x4::new(1, 3, -5, -5);
14807 
14808         assert_eq!(r, mem::transmute(__msa_maxi_s_w(mem::transmute(a), -5)));
14809     }
14810 
14811     // FIXME: https://reviews.llvm.org/D59884
14812     // If target type is i64, negative immediate loses the sign
14813     // Test passes if 4294967293 is used instead -3 in vector `r`
14814     // #[simd_test(enable = "msa")]
14815     // unsafe fn test_msa_maxi_s_d() {
14816     //     #[rustfmt::skip]
14817     //     let a = i64x2::new(1, -8);
14818     //     #[rustfmt::skip]
14819     //     let r = i64x2::new(-3, -3);
14820 
14821     //     assert_eq!(r, mem::transmute(__msa_maxi_s_d(mem::transmute(a), -3)));
14822     // }
14823 
14824     #[simd_test(enable = "msa")]
test_msa_maxi_u_b()14825     unsafe fn test_msa_maxi_u_b() {
14826         #[rustfmt::skip]
14827         let a = u8x16::new(
14828             1, 3, 6, 8,
14829             1, 3, 6, 8,
14830             1, 3, 6, 8,
14831             1, 3, 6, 8
14832         );
14833         #[rustfmt::skip]
14834         let r = u8x16::new(
14835             5, 5, 6, 8,
14836             5, 5, 6, 8,
14837             5, 5, 6, 8,
14838             5, 5, 6, 8
14839         );
14840 
14841         assert_eq!(r, mem::transmute(__msa_maxi_u_b(mem::transmute(a), 5)));
14842     }
14843 
14844     #[simd_test(enable = "msa")]
test_msa_maxi_u_h()14845     unsafe fn test_msa_maxi_u_h() {
14846         #[rustfmt::skip]
14847         let a = u16x8::new(1, 3, 6, 8, 1, 3, 6, 8);
14848         #[rustfmt::skip]
14849         let r = u16x8::new(5, 5, 6, 8, 5, 5, 6, 8);
14850 
14851         assert_eq!(r, mem::transmute(__msa_maxi_u_h(mem::transmute(a), 5)));
14852     }
14853 
14854     #[simd_test(enable = "msa")]
test_msa_maxi_u_w()14855     unsafe fn test_msa_maxi_u_w() {
14856         #[rustfmt::skip]
14857         let a = u32x4::new(1, 3, 6, 8);
14858         #[rustfmt::skip]
14859         let r = u32x4::new(5, 5, 6, 8);
14860 
14861         assert_eq!(r, mem::transmute(__msa_maxi_u_w(mem::transmute(a), 5)));
14862     }
14863 
14864     #[simd_test(enable = "msa")]
test_msa_maxi_u_d()14865     unsafe fn test_msa_maxi_u_d() {
14866         #[rustfmt::skip]
14867         let a = u64x2::new(1, 8);
14868         #[rustfmt::skip]
14869         let r = u64x2::new(5, 8);
14870 
14871         assert_eq!(r, mem::transmute(__msa_maxi_u_d(mem::transmute(a), 5)));
14872     }
14873 
14874     #[simd_test(enable = "msa")]
test_msa_min_a_b()14875     unsafe fn test_msa_min_a_b() {
14876         #[rustfmt::skip]
14877         let a = i8x16::new(
14878             1, 2, 3, 4,
14879             -1, -2, -3, -4,
14880             1, 2, 3, 4,
14881             -1, -2, -3, -4
14882         );
14883         #[rustfmt::skip]
14884         let b = i8x16::new(
14885             -6, -7, -8, -9,
14886             6, 7, 8, 9,
14887             -6, -7, -8, -9,
14888             6, 7, 8, 9
14889         );
14890         #[rustfmt::skip]
14891         let r = i8x16::new(
14892             1, 2, 3, 4,
14893             -1, -2, -3, -4,
14894             1, 2, 3, 4,
14895             -1, -2, -3, -4
14896         );
14897 
14898         assert_eq!(
14899             r,
14900             mem::transmute(__msa_min_a_b(mem::transmute(a), mem::transmute(b)))
14901         );
14902     }
14903 
14904     #[simd_test(enable = "msa")]
test_msa_min_a_h()14905     unsafe fn test_msa_min_a_h() {
14906         #[rustfmt::skip]
14907         let a = i16x8::new(1, -2, 3, -4, 1, -2, 3, -4);
14908         #[rustfmt::skip]
14909         let b = i16x8::new(-6, 7, -8, 9, -6, 7, -8, 9);
14910         #[rustfmt::skip]
14911         let r = i16x8::new(1, -2, 3, -4, 1, -2, 3, -4);
14912 
14913         assert_eq!(
14914             r,
14915             mem::transmute(__msa_min_a_h(mem::transmute(a), mem::transmute(b)))
14916         );
14917     }
14918 
14919     #[simd_test(enable = "msa")]
test_msa_min_a_w()14920     unsafe fn test_msa_min_a_w() {
14921         #[rustfmt::skip]
14922         let a = i32x4::new(1, -2, 3, -4);
14923         #[rustfmt::skip]
14924         let b = i32x4::new(6, 7, 8, 9);
14925         #[rustfmt::skip]
14926         let r = i32x4::new(1, -2, 3, -4);
14927 
14928         assert_eq!(
14929             r,
14930             mem::transmute(__msa_min_a_w(mem::transmute(a), mem::transmute(b)))
14931         );
14932     }
14933 
14934     #[simd_test(enable = "msa")]
test_msa_min_a_d()14935     unsafe fn test_msa_min_a_d() {
14936         #[rustfmt::skip]
14937         let a = i64x2::new(-1, 2);
14938         #[rustfmt::skip]
14939         let b = i64x2::new(6, -7);
14940         #[rustfmt::skip]
14941         let r = i64x2::new(-1, 2);
14942 
14943         assert_eq!(
14944             r,
14945             mem::transmute(__msa_min_a_d(mem::transmute(a), mem::transmute(b)))
14946         );
14947     }
14948 
14949     #[simd_test(enable = "msa")]
test_msa_min_s_b()14950     unsafe fn test_msa_min_s_b() {
14951         #[rustfmt::skip]
14952         let a = i8x16::new(
14953             1, 2, 3, 4,
14954             -1, -2, -3, -4,
14955             1, 2, 3, 4,
14956             -1, -2, -3, -4
14957         );
14958         #[rustfmt::skip]
14959         let b = i8x16::new(
14960             -6, -7, -8, -9,
14961             6, 7, 8, 9,
14962             -6, -7, -8, -9,
14963             6, 7, 8, 9
14964         );
14965         #[rustfmt::skip]
14966         let r = i8x16::new(
14967             -6, -7, -8, -9,
14968             -1, -2, -3, -4,
14969             -6, -7, -8, -9,
14970             -1, -2, -3, -4
14971         );
14972 
14973         assert_eq!(
14974             r,
14975             mem::transmute(__msa_min_s_b(mem::transmute(a), mem::transmute(b)))
14976         );
14977     }
14978 
14979     #[simd_test(enable = "msa")]
test_msa_min_s_h()14980     unsafe fn test_msa_min_s_h() {
14981         #[rustfmt::skip]
14982         let a = i16x8::new(1, -2, 3, -4, 1, -2, 3, -4);
14983         #[rustfmt::skip]
14984         let b = i16x8::new(-6, 7, -8, 9, -6, 7, -8, 9);
14985         #[rustfmt::skip]
14986         let r = i16x8::new(-6, -2, -8, -4, -6, -2, -8, -4);
14987 
14988         assert_eq!(
14989             r,
14990             mem::transmute(__msa_min_s_h(mem::transmute(a), mem::transmute(b)))
14991         );
14992     }
14993 
14994     #[simd_test(enable = "msa")]
test_msa_min_s_w()14995     unsafe fn test_msa_min_s_w() {
14996         #[rustfmt::skip]
14997         let a = i32x4::new(1, -2, 3, -4);
14998         #[rustfmt::skip]
14999         let b = i32x4::new(6, 7, 8, 9);
15000         #[rustfmt::skip]
15001         let r = i32x4::new(1, -2, 3, -4);
15002 
15003         assert_eq!(
15004             r,
15005             mem::transmute(__msa_min_s_w(mem::transmute(a), mem::transmute(b)))
15006         );
15007     }
15008 
15009     #[simd_test(enable = "msa")]
test_msa_min_s_d()15010     unsafe fn test_msa_min_s_d() {
15011         #[rustfmt::skip]
15012         let a = i64x2::new(-1, 2);
15013         #[rustfmt::skip]
15014         let b = i64x2::new(6, -7);
15015         #[rustfmt::skip]
15016         let r = i64x2::new(-1, -7);
15017 
15018         assert_eq!(
15019             r,
15020             mem::transmute(__msa_min_s_d(mem::transmute(a), mem::transmute(b)))
15021         );
15022     }
15023 
15024     #[simd_test(enable = "msa")]
test_msa_mini_s_b()15025     unsafe fn test_msa_mini_s_b() {
15026         #[rustfmt::skip]
15027         let a = i8x16::new(
15028             1, 2, 3, 4,
15029             -1, -2, -3, -4,
15030             1, 2, 3, 4,
15031             -1, -2, -3, -4
15032         );
15033         #[rustfmt::skip]
15034         let r = i8x16::new(
15035             -10, -10, -10, -10,
15036             -10, -10, -10, -10,
15037             -10, -10, -10, -10,
15038             -10, -10, -10, -10
15039         );
15040 
15041         assert_eq!(r, mem::transmute(__msa_mini_s_b(mem::transmute(a), -10)));
15042     }
15043 
15044     #[simd_test(enable = "msa")]
test_msa_mini_s_h()15045     unsafe fn test_msa_mini_s_h() {
15046         #[rustfmt::skip]
15047         let a = i16x8::new(1, -2, 3, -4, 1, -2, 3, -4);
15048         #[rustfmt::skip]
15049         let r = i16x8::new(-3, -3, -3, -4, -3, -3, -3, -4);
15050 
15051         assert_eq!(r, mem::transmute(__msa_mini_s_h(mem::transmute(a), -3)));
15052     }
15053 
15054     #[simd_test(enable = "msa")]
test_msa_mini_s_w()15055     unsafe fn test_msa_mini_s_w() {
15056         #[rustfmt::skip]
15057         let a = i32x4::new(1, -2, 3, -4);
15058         #[rustfmt::skip]
15059         let r = i32x4::new(-3, -3, -3, -4);
15060 
15061         assert_eq!(r, mem::transmute(__msa_mini_s_w(mem::transmute(a), -3)));
15062     }
15063 
15064     // FIXME: https://reviews.llvm.org/D59884
15065     // If target type is i64, negative immediate loses the sign
15066     // -3 is represented as 4294967293
15067     // #[simd_test(enable = "msa")]
15068     // unsafe fn test_msa_mini_s_d() {
15069     //     #[rustfmt::skip]
15070     //     let a = i64x2::new(-3, 2);
15071     //     #[rustfmt::skip]
15072     //     let r = i64x2::new(-1, -3);
15073 
15074     //     assert_eq!(r, mem::transmute(__msa_mini_s_d(mem::transmute(a), -3)));
15075     // }
15076 
15077     #[simd_test(enable = "msa")]
test_msa_min_u_b()15078     unsafe fn test_msa_min_u_b() {
15079         #[rustfmt::skip]
15080         let a = u8x16::new(
15081             1, 2, 3, 4,
15082             1, 2, 3, 4,
15083             1, 2, 3, 4,
15084             1, 2, 3, 4
15085         );
15086         #[rustfmt::skip]
15087         let b = u8x16::new(
15088             6, 7, 8, 9,
15089             6, 7, 8, 9,
15090             6, 7, 8, 9,
15091             6, 7, 8, 9
15092         );
15093         #[rustfmt::skip]
15094         let r = u8x16::new(
15095             1, 2, 3, 4,
15096             1, 2, 3, 4,
15097             1, 2, 3, 4,
15098             1, 2, 3, 4
15099         );
15100 
15101         assert_eq!(
15102             r,
15103             mem::transmute(__msa_min_u_b(mem::transmute(a), mem::transmute(b)))
15104         );
15105     }
15106 
15107     #[simd_test(enable = "msa")]
test_msa_min_u_h()15108     unsafe fn test_msa_min_u_h() {
15109         #[rustfmt::skip]
15110         let a = u16x8::new(1, 2, 3, 4, 1, 2, 3, 4);
15111         #[rustfmt::skip]
15112         let b = u16x8::new(6, 7, 8, 9, 6, 7, 8, 9);
15113         #[rustfmt::skip]
15114         let r = u16x8::new(1, 2, 3, 4, 1, 2, 3, 4,);
15115 
15116         assert_eq!(
15117             r,
15118             mem::transmute(__msa_min_u_h(mem::transmute(a), mem::transmute(b)))
15119         );
15120     }
15121 
15122     #[simd_test(enable = "msa")]
test_msa_min_u_w()15123     unsafe fn test_msa_min_u_w() {
15124         #[rustfmt::skip]
15125         let a = u32x4::new(1, 2, 3, 4);
15126         #[rustfmt::skip]
15127         let b = u32x4::new(6, 7, 8, 9);
15128         #[rustfmt::skip]
15129         let r = u32x4::new(1, 2, 3, 4,);
15130 
15131         assert_eq!(
15132             r,
15133             mem::transmute(__msa_min_u_w(mem::transmute(a), mem::transmute(b)))
15134         );
15135     }
15136 
15137     #[simd_test(enable = "msa")]
test_msa_min_u_d()15138     unsafe fn test_msa_min_u_d() {
15139         #[rustfmt::skip]
15140         let a = u64x2::new(1, 2);
15141         #[rustfmt::skip]
15142         let b = u64x2::new(6, 7);
15143         #[rustfmt::skip]
15144         let r = u64x2::new(1, 2,);
15145 
15146         assert_eq!(
15147             r,
15148             mem::transmute(__msa_min_u_d(mem::transmute(a), mem::transmute(b)))
15149         );
15150     }
15151 
15152     #[simd_test(enable = "msa")]
test_msa_mini_u_b()15153     unsafe fn test_msa_mini_u_b() {
15154         #[rustfmt::skip]
15155         let a = u8x16::new(
15156             1, 3, 6, 8,
15157             1, 3, 6, 8,
15158             1, 3, 6, 8,
15159             1, 3, 6, 8
15160         );
15161         #[rustfmt::skip]
15162         let r = u8x16::new(
15163             1, 3, 5, 5,
15164             1, 3, 5, 5,
15165             1, 3, 5, 5,
15166             1, 3, 5, 5
15167         );
15168 
15169         assert_eq!(r, mem::transmute(__msa_mini_u_b(mem::transmute(a), 5)));
15170     }
15171 
15172     #[simd_test(enable = "msa")]
test_msa_mini_u_h()15173     unsafe fn test_msa_mini_u_h() {
15174         #[rustfmt::skip]
15175         let a = u16x8::new(1, 3, 6, 8, 1, 3, 6, 8);
15176         #[rustfmt::skip]
15177         let r = u16x8::new(1, 3, 5, 5, 1, 3, 5, 5);
15178 
15179         assert_eq!(r, mem::transmute(__msa_mini_u_h(mem::transmute(a), 5)));
15180     }
15181 
15182     #[simd_test(enable = "msa")]
test_msa_mini_u_w()15183     unsafe fn test_msa_mini_u_w() {
15184         #[rustfmt::skip]
15185         let a = u32x4::new(1, 3, 6, 8);
15186         #[rustfmt::skip]
15187         let r = u32x4::new(1, 3, 5, 5);
15188 
15189         assert_eq!(r, mem::transmute(__msa_mini_u_w(mem::transmute(a), 5)));
15190     }
15191 
15192     #[simd_test(enable = "msa")]
test_msa_mini_u_d()15193     unsafe fn test_msa_mini_u_d() {
15194         #[rustfmt::skip]
15195         let a = u64x2::new(1, 8);
15196         #[rustfmt::skip]
15197         let r = u64x2::new(1, 5);
15198 
15199         assert_eq!(r, mem::transmute(__msa_mini_u_d(mem::transmute(a), 5)));
15200     }
15201 
15202     #[simd_test(enable = "msa")]
test_msa_mod_s_b()15203     unsafe fn test_msa_mod_s_b() {
15204         #[rustfmt::skip]
15205         let a = i8x16::new(
15206             -6, -7, -8, -9,
15207             6, 7, 8, 9,
15208             -6, -7, -8, -9,
15209             6, 7, 8, 9
15210         );
15211         #[rustfmt::skip]
15212         let b = i8x16::new(
15213             1, 2, 3, 4,
15214             -1, -2, -3, -4,
15215             1, 2, 3, 4,
15216             -1, -2, -3, -4
15217         );
15218         #[rustfmt::skip]
15219         let r = i8x16::new(
15220             0, -1, -2, -1,
15221             0, 1, 2, 1,
15222             0, -1, -2, -1,
15223             0, 1, 2, 1
15224         );
15225 
15226         assert_eq!(
15227             r,
15228             mem::transmute(__msa_mod_s_b(mem::transmute(a), mem::transmute(b)))
15229         );
15230     }
15231 
15232     #[simd_test(enable = "msa")]
test_msa_mod_s_h()15233     unsafe fn test_msa_mod_s_h() {
15234         #[rustfmt::skip]
15235         let a = i16x8::new(-6, 7, -8, 9, -6, 7, -8, 9);
15236         #[rustfmt::skip]
15237         let b = i16x8::new(1, -2, 3, -4, 1, -2, 3, -4);
15238         #[rustfmt::skip]
15239         let r = i16x8::new(0, 1, -2, 1, 0, 1, -2, 1);
15240 
15241         assert_eq!(
15242             r,
15243             mem::transmute(__msa_mod_s_h(mem::transmute(a), mem::transmute(b)))
15244         );
15245     }
15246 
15247     #[simd_test(enable = "msa")]
test_msa_mod_s_w()15248     unsafe fn test_msa_mod_s_w() {
15249         #[rustfmt::skip]
15250         let a = i32x4::new(6, 7, 8, 9);
15251         #[rustfmt::skip]
15252         let b = i32x4::new(1, -2, 3, -4);
15253         #[rustfmt::skip]
15254         let r = i32x4::new(0, 1, 2, 1);
15255 
15256         assert_eq!(
15257             r,
15258             mem::transmute(__msa_mod_s_w(mem::transmute(a), mem::transmute(b)))
15259         );
15260     }
15261 
15262     #[simd_test(enable = "msa")]
test_msa_mod_s_d()15263     unsafe fn test_msa_mod_s_d() {
15264         #[rustfmt::skip]
15265         let a = i64x2::new(6, -7);
15266         #[rustfmt::skip]
15267         let b = i64x2::new(-1, 2);
15268         #[rustfmt::skip]
15269         let r = i64x2::new(0, -1);
15270 
15271         assert_eq!(
15272             r,
15273             mem::transmute(__msa_mod_s_d(mem::transmute(a), mem::transmute(b)))
15274         );
15275     }
15276 
15277     #[simd_test(enable = "msa")]
test_msa_mod_u_b()15278     unsafe fn test_msa_mod_u_b() {
15279         #[rustfmt::skip]
15280         let a = u8x16::new(
15281             6, 7, 8, 9,
15282             6, 7, 8, 9,
15283             6, 7, 8, 9,
15284             6, 7, 8, 9
15285         );
15286         #[rustfmt::skip]
15287         let b = u8x16::new(
15288             1, 2, 3, 4,
15289             1, 2, 3, 4,
15290             1, 2, 3, 4,
15291             1, 2, 3, 4
15292         );
15293         #[rustfmt::skip]
15294         let r = u8x16::new(
15295             0, 1, 2, 1,
15296             0, 1, 2, 1,
15297             0, 1, 2, 1,
15298             0, 1, 2, 1
15299         );
15300 
15301         assert_eq!(
15302             r,
15303             mem::transmute(__msa_mod_u_b(mem::transmute(a), mem::transmute(b)))
15304         );
15305     }
15306 
15307     #[simd_test(enable = "msa")]
test_msa_mod_u_h()15308     unsafe fn test_msa_mod_u_h() {
15309         #[rustfmt::skip]
15310         let a = u16x8::new(6, 7, 8, 9, 6, 7, 8, 9);
15311         #[rustfmt::skip]
15312         let b = u16x8::new(1, 2, 3, 4, 1, 2, 3, 4);
15313         #[rustfmt::skip]
15314         let r = u16x8::new(0, 1, 2, 1, 0, 1, 2, 1);
15315 
15316         assert_eq!(
15317             r,
15318             mem::transmute(__msa_mod_u_h(mem::transmute(a), mem::transmute(b)))
15319         );
15320     }
15321 
15322     #[simd_test(enable = "msa")]
test_msa_mod_u_w()15323     unsafe fn test_msa_mod_u_w() {
15324         #[rustfmt::skip]
15325         let a = u32x4::new(6, 7, 8, 9);
15326         #[rustfmt::skip]
15327         let b = u32x4::new(1, 2, 3, 4);
15328         #[rustfmt::skip]
15329         let r = u32x4::new(0, 1, 2, 1);
15330 
15331         assert_eq!(
15332             r,
15333             mem::transmute(__msa_mod_u_w(mem::transmute(a), mem::transmute(b)))
15334         );
15335     }
15336 
15337     #[simd_test(enable = "msa")]
test_msa_mod_u_d()15338     unsafe fn test_msa_mod_u_d() {
15339         #[rustfmt::skip]
15340         let a = u64x2::new(6, 7);
15341         #[rustfmt::skip]
15342         let b = u64x2::new(1, 2);
15343         #[rustfmt::skip]
15344         let r = u64x2::new(0, 1);
15345 
15346         assert_eq!(
15347             r,
15348             mem::transmute(__msa_mod_u_d(mem::transmute(a), mem::transmute(b)))
15349         );
15350     }
15351 
15352     #[simd_test(enable = "msa")]
test_msa_move_v()15353     unsafe fn test_msa_move_v() {
15354         #[rustfmt::skip]
15355         let a = i8x16::new(
15356             1, 2, 3, 4,
15357             5, 6, 7, 8,
15358             1, 2, 3, 4,
15359             5, 6, 7, 8
15360             );
15361         #[rustfmt::skip]
15362         let r = i8x16::new(
15363             1, 2, 3, 4,
15364             5, 6, 7, 8,
15365             1, 2, 3, 4,
15366             5, 6, 7, 8
15367             );
15368 
15369         assert_eq!(r, mem::transmute(__msa_move_v(mem::transmute(a))));
15370     }
15371 
15372     #[simd_test(enable = "msa")]
test_msa_msub_q_h()15373     unsafe fn test_msa_msub_q_h() {
15374         #[rustfmt::skip]
15375         let a = i16x8::new(
15376             1024, -1024, 1024, -1024,
15377             1, 2, 3, 4
15378         );
15379         #[rustfmt::skip]
15380         let b = i16x8::new(
15381             1025, 1025, 1025, 1025,
15382             1025, 1025, 1025, 1025
15383         );
15384         #[rustfmt::skip]
15385         let c = i16x8::new(
15386             1024, 2048, 3072, 4096,
15387             1024, 2048, 3072, 4096
15388         );
15389         #[rustfmt::skip]
15390         let r = i16x8::new(991, -1089, 927, -1153, -32, -63, -94, -125);
15391 
15392         assert_eq!(
15393             r,
15394             mem::transmute(__msa_msub_q_h(
15395                 mem::transmute(a),
15396                 mem::transmute(b),
15397                 mem::transmute(c)
15398             ))
15399         );
15400     }
15401 
15402     #[simd_test(enable = "msa")]
test_msa_msub_q_w()15403     unsafe fn test_msa_msub_q_w() {
15404         #[rustfmt::skip]
15405         let a = i32x4::new(2147483647, -2147483647, 1, 2);
15406         #[rustfmt::skip]
15407         let b = i32x4::new(10240, 10240, 10240, 10240);
15408         #[rustfmt::skip]
15409         let c = i32x4::new(10240, 20480, 30720, 40960);
15410         #[rustfmt::skip]
15411         let r = i32x4::new(2147483646, -2147483648, 0, 1);
15412 
15413         assert_eq!(
15414             r,
15415             mem::transmute(__msa_msub_q_w(
15416                 mem::transmute(a),
15417                 mem::transmute(b),
15418                 mem::transmute(c)
15419             ))
15420         );
15421     }
15422 
15423     #[simd_test(enable = "msa")]
test_msa_msubr_q_h()15424     unsafe fn test_msa_msubr_q_h() {
15425         #[rustfmt::skip]
15426         let a = i16x8::new(
15427             1024, -1024, 1024, -1024,
15428             1, 2, 3, 4
15429         );
15430         #[rustfmt::skip]
15431         let b = i16x8::new(
15432             1025, 1025, 1025, 1025,
15433             1025, 1025, 1025, 1025
15434         );
15435         #[rustfmt::skip]
15436         let c = i16x8::new(
15437             1024, 2048, 3072, 4096,
15438             1024, 2048, 3072, 4096
15439         );
15440         #[rustfmt::skip]
15441         let r = i16x8::new(992, -1088, 928, -1152, -31, -62, -93, -124);
15442 
15443         assert_eq!(
15444             r,
15445             mem::transmute(__msa_msubr_q_h(
15446                 mem::transmute(a),
15447                 mem::transmute(b),
15448                 mem::transmute(c)
15449             ))
15450         );
15451     }
15452 
15453     #[simd_test(enable = "msa")]
test_msa_msubr_q_w()15454     unsafe fn test_msa_msubr_q_w() {
15455         #[rustfmt::skip]
15456         let a = i32x4::new(i32::MAX, -2147483647, 1, 2);
15457         #[rustfmt::skip]
15458         let b = i32x4::new(10240, 10240, 10240, 10240);
15459         #[rustfmt::skip]
15460         let c = i32x4::new(10240, 20480, 30720, 40960);
15461         #[rustfmt::skip]
15462         let r = i32x4::new(2147483647, -2147483647, 1, 2);
15463 
15464         assert_eq!(
15465             r,
15466             mem::transmute(__msa_msubr_q_w(
15467                 mem::transmute(a),
15468                 mem::transmute(b),
15469                 mem::transmute(c)
15470             ))
15471         );
15472     }
15473 
15474     #[simd_test(enable = "msa")]
test_msa_msubv_b()15475     unsafe fn test_msa_msubv_b() {
15476         #[rustfmt::skip]
15477         let a = i8x16::new(
15478             1, 2, 3, 4,
15479             1, 2, 3, 4,
15480             1, 2, 3, 4,
15481             1, 2, 3, 4
15482         );
15483         #[rustfmt::skip]
15484         let b = i8x16::new(
15485             5, 6, 7, 8,
15486             5, 6, 7, 8,
15487             5, 6, 7, 8,
15488             5, 6, 7, 8
15489         );
15490         #[rustfmt::skip]
15491         let c = i8x16::new(
15492             9, 10, 11, 12,
15493             9, 10, 11, 12,
15494             9, 10, 11, 12,
15495             9, 10, 11, 12
15496         );
15497         #[rustfmt::skip]
15498         let r = i8x16::new(
15499             -44, -58, -74, -92,
15500             -44, -58, -74, -92,
15501             -44, -58, -74, -92,
15502             -44, -58, -74, -92
15503         );
15504 
15505         assert_eq!(
15506             r,
15507             mem::transmute(__msa_msubv_b(
15508                 mem::transmute(a),
15509                 mem::transmute(b),
15510                 mem::transmute(c)
15511             ))
15512         );
15513     }
15514 
15515     #[simd_test(enable = "msa")]
test_msa_msubv_h()15516     unsafe fn test_msa_msubv_h() {
15517         #[rustfmt::skip]
15518         let a = i16x8::new(1, 2, 3, 4, 1, 2, 3, 4);
15519         #[rustfmt::skip]
15520         let b = i16x8::new(5, 6, 7, 8, 5, 6, 7, 8);
15521         #[rustfmt::skip]
15522         let c = i16x8::new(9, 10, 11, 12, 9, 10, 11, 12);
15523         #[rustfmt::skip]
15524         let r = i16x8::new(-44, -58, -74, -92, -44, -58, -74, -92);
15525 
15526         assert_eq!(
15527             r,
15528             mem::transmute(__msa_msubv_h(
15529                 mem::transmute(a),
15530                 mem::transmute(b),
15531                 mem::transmute(c)
15532             ))
15533         );
15534     }
15535 
15536     #[simd_test(enable = "msa")]
test_msa_msubv_w()15537     unsafe fn test_msa_msubv_w() {
15538         #[rustfmt::skip]
15539         let a = i32x4::new(1, 2, 1, 2);
15540         #[rustfmt::skip]
15541         let b = i32x4::new(3, 4, 3, 4);
15542         #[rustfmt::skip]
15543         let c = i32x4::new(5, 6, 5, 6);
15544         #[rustfmt::skip]
15545         let r = i32x4::new(-14, -22, -14, -22);
15546 
15547         assert_eq!(
15548             r,
15549             mem::transmute(__msa_msubv_w(
15550                 mem::transmute(a),
15551                 mem::transmute(b),
15552                 mem::transmute(c)
15553             ))
15554         );
15555     }
15556 
15557     #[simd_test(enable = "msa")]
test_msa_msubv_d()15558     unsafe fn test_msa_msubv_d() {
15559         #[rustfmt::skip]
15560         let a = i64x2::new(1, 2);
15561         #[rustfmt::skip]
15562         let b = i64x2::new(3, 4);
15563         #[rustfmt::skip]
15564         let c = i64x2::new(5, 6);
15565         #[rustfmt::skip]
15566         let r = i64x2::new(-14, -22);
15567 
15568         assert_eq!(
15569             r,
15570             mem::transmute(__msa_msubv_d(
15571                 mem::transmute(a),
15572                 mem::transmute(b),
15573                 mem::transmute(c)
15574             ))
15575         );
15576     }
15577 
15578     #[simd_test(enable = "msa")]
test_msa_mul_q_h()15579     unsafe fn test_msa_mul_q_h() {
15580         #[rustfmt::skip]
15581         let a = i16x8::new(
15582             12500, -20, -300, 400,
15583             12500, 20, 300, 400
15584         );
15585         #[rustfmt::skip]
15586         let b = i16x8::new(
15587             1250, 10240, -7585, 8456,
15588             1250, 10240, -7585, 8456
15589         );
15590         #[rustfmt::skip]
15591         let r = i16x8::new(476, -7, 69, 103, 476, 6, -70, 103);
15592 
15593         assert_eq!(
15594             r,
15595             mem::transmute(__msa_mul_q_h(mem::transmute(a), mem::transmute(b)))
15596         );
15597     }
15598 
15599     #[simd_test(enable = "msa")]
test_msa_mul_q_w()15600     unsafe fn test_msa_mul_q_w() {
15601         #[rustfmt::skip]
15602         let a = i32x4::new(
15603             i32::MAX, i32::MAX,
15604             i32::MIN, i32::MIN
15605         );
15606         #[rustfmt::skip]
15607         let b = i32x4::new(30, 60, 30, 60);
15608         #[rustfmt::skip]
15609         let r = i32x4::new(29, 59, -30, -60);
15610 
15611         assert_eq!(
15612             r,
15613             mem::transmute(__msa_mul_q_w(mem::transmute(a), mem::transmute(b)))
15614         );
15615     }
15616 
15617     #[simd_test(enable = "msa")]
test_msa_mulr_q_h()15618     unsafe fn test_msa_mulr_q_h() {
15619         #[rustfmt::skip]
15620         let a = i16x8::new(
15621             12500, -20, -300, 400,
15622             12500, 20, 300, 400
15623         );
15624         #[rustfmt::skip]
15625         let b = i16x8::new(
15626             1250, 10240, -7585, 8456,
15627             1250, 10240, -7585, 8456
15628         );
15629         #[rustfmt::skip]
15630         let r = i16x8::new(477, -6, 69, 103, 477, 6, -69, 103);
15631 
15632         assert_eq!(
15633             r,
15634             mem::transmute(__msa_mulr_q_h(mem::transmute(a), mem::transmute(b)))
15635         );
15636     }
15637 
15638     #[simd_test(enable = "msa")]
test_msa_mulr_q_w()15639     unsafe fn test_msa_mulr_q_w() {
15640         #[rustfmt::skip]
15641         let a = i32x4::new(
15642             i32::MAX, i32::MAX,
15643             i32::MIN, i32::MIN
15644         );
15645         #[rustfmt::skip]
15646         let b = i32x4::new(30, 60, 30, 60);
15647         #[rustfmt::skip]
15648         let r = i32x4::new(30, 60, -30, -60);
15649 
15650         assert_eq!(
15651             r,
15652             mem::transmute(__msa_mulr_q_w(mem::transmute(a), mem::transmute(b)))
15653         );
15654     }
15655 
15656     #[simd_test(enable = "msa")]
test_msa_mulv_b()15657     unsafe fn test_msa_mulv_b() {
15658         #[rustfmt::skip]
15659         let a = i8x16::new(
15660             1, 2, 3, 4,
15661             5, 6, 7, 8,
15662             9, 10, 11, 12,
15663             13, 14, 15, 16
15664         );
15665         #[rustfmt::skip]
15666         let b = i8x16::new(
15667             16, 15, 14, 13,
15668             12, 11, 10, 9,
15669             8, 7, 6, 5,
15670             4, 3, 2, 1
15671         );
15672         #[rustfmt::skip]
15673         let r = i8x16::new(
15674             16, 30, 42, 52,
15675             60, 66, 70, 72,
15676             72, 70, 66, 60,
15677             52, 42, 30, 16
15678         );
15679 
15680         assert_eq!(
15681             r,
15682             mem::transmute(__msa_mulv_b(mem::transmute(a), mem::transmute(b)))
15683         );
15684     }
15685 
15686     #[simd_test(enable = "msa")]
test_msa_mulv_h()15687     unsafe fn test_msa_mulv_h() {
15688         #[rustfmt::skip]
15689         let a = i16x8::new(
15690             1, 2, 3, 4,
15691             5, 6, 7, 8
15692         );
15693         #[rustfmt::skip]
15694         let b = i16x8::new(
15695             8, 7, 6, 5,
15696             4, 3, 2, 1
15697         );
15698         #[rustfmt::skip]
15699         let r = i16x8::new(8, 14, 18, 20, 20, 18, 14, 8);
15700 
15701         assert_eq!(
15702             r,
15703             mem::transmute(__msa_mulv_h(mem::transmute(a), mem::transmute(b)))
15704         );
15705     }
15706 
15707     #[simd_test(enable = "msa")]
test_msa_mulv_w()15708     unsafe fn test_msa_mulv_w() {
15709         #[rustfmt::skip]
15710         let a = i32x4::new(1, 2, 3, 4);
15711         #[rustfmt::skip]
15712         let b = i32x4::new(4, 3, 2, 1);
15713         #[rustfmt::skip]
15714         let r = i32x4::new(4, 6, 6, 4);
15715 
15716         assert_eq!(
15717             r,
15718             mem::transmute(__msa_mulv_w(mem::transmute(a), mem::transmute(b)))
15719         );
15720     }
15721 
15722     #[simd_test(enable = "msa")]
test_msa_mulv_d()15723     unsafe fn test_msa_mulv_d() {
15724         #[rustfmt::skip]
15725         let a = i64x2::new(1, 2);
15726         #[rustfmt::skip]
15727         let b = i64x2::new(2, 1);
15728         #[rustfmt::skip]
15729         let r = i64x2::new(2, 2);
15730 
15731         assert_eq!(
15732             r,
15733             mem::transmute(__msa_mulv_d(mem::transmute(a), mem::transmute(b)))
15734         );
15735     }
15736 
15737     #[simd_test(enable = "msa")]
test_msa_nloc_b()15738     unsafe fn test_msa_nloc_b() {
15739         #[rustfmt::skip]
15740         let a = i8x16::new(
15741             -128, -64, -32, -16,
15742             -8, -4, -2, -1,
15743             1, 2, 4, 8,
15744             16, 32, 64, 127
15745         );
15746         #[rustfmt::skip]
15747         let r = i8x16::new(
15748             1, 2, 3, 4,
15749             5, 6, 7, 8,
15750             0, 0, 0, 0,
15751             0, 0, 0, 0
15752         );
15753 
15754         assert_eq!(r, mem::transmute(__msa_nloc_b(mem::transmute(a))));
15755     }
15756 
15757     #[simd_test(enable = "msa")]
test_msa_nloc_h()15758     unsafe fn test_msa_nloc_h() {
15759         #[rustfmt::skip]
15760         let a = i16x8::new(
15761             -32768, -16384, -8192, -4096,
15762             4096, 8192, 16384, 32767
15763         );
15764         #[rustfmt::skip]
15765         let r = i16x8::new(1, 2, 3, 4, 0, 0, 0, 0);
15766 
15767         assert_eq!(r, mem::transmute(__msa_nloc_h(mem::transmute(a))));
15768     }
15769 
15770     #[simd_test(enable = "msa")]
test_msa_nloc_w()15771     unsafe fn test_msa_nloc_w() {
15772         #[rustfmt::skip]
15773         let a = i32x4::new(
15774             i32::MIN, -1073741824,
15775             1073741824, i32::MAX
15776         );
15777         #[rustfmt::skip]
15778         let r = i32x4::new(1, 2, 0, 0);
15779 
15780         assert_eq!(r, mem::transmute(__msa_nloc_w(mem::transmute(a))));
15781     }
15782 
15783     #[simd_test(enable = "msa")]
test_msa_nloc_d()15784     unsafe fn test_msa_nloc_d() {
15785         #[rustfmt::skip]
15786         let a = i64x2::new(i64::MIN, i64::MAX);
15787         #[rustfmt::skip]
15788         let r = i64x2::new(1, 0);
15789 
15790         assert_eq!(r, mem::transmute(__msa_nloc_d(mem::transmute(a))));
15791     }
15792 
15793     #[simd_test(enable = "msa")]
test_msa_nlzc_b()15794     unsafe fn test_msa_nlzc_b() {
15795         #[rustfmt::skip]
15796         let a = i8x16::new(
15797             1, 2, 3, 4,
15798             5, 6, 7, 8,
15799             9, 10, 11, 12,
15800             13, 14, 15, 16
15801         );
15802         #[rustfmt::skip]
15803         let r = i8x16::new(
15804             7, 6, 6, 5,
15805             5, 5, 5, 4,
15806             4, 4, 4, 4,
15807             4, 4, 4, 3
15808         );
15809 
15810         assert_eq!(r, mem::transmute(__msa_nlzc_b(mem::transmute(a))));
15811     }
15812 
15813     #[simd_test(enable = "msa")]
test_msa_nlzc_h()15814     unsafe fn test_msa_nlzc_h() {
15815         #[rustfmt::skip]
15816         let a = i16x8::new(
15817             1, 2, 3, 4,
15818             5, 6, 7, 8
15819         );
15820         #[rustfmt::skip]
15821         let r = i16x8::new(15, 14, 14, 13, 13, 13, 13, 12);
15822 
15823         assert_eq!(r, mem::transmute(__msa_nlzc_h(mem::transmute(a))));
15824     }
15825 
15826     #[simd_test(enable = "msa")]
test_msa_nlzc_w()15827     unsafe fn test_msa_nlzc_w() {
15828         #[rustfmt::skip]
15829         let a = i32x4::new(1, 2, 3, 4);
15830         #[rustfmt::skip]
15831         let r = i32x4::new(31, 30, 30, 29);
15832 
15833         assert_eq!(r, mem::transmute(__msa_nlzc_w(mem::transmute(a))));
15834     }
15835 
15836     #[simd_test(enable = "msa")]
test_msa_nlzc_d()15837     unsafe fn test_msa_nlzc_d() {
15838         #[rustfmt::skip]
15839         let a = i64x2::new(1, 2);
15840         #[rustfmt::skip]
15841         let r = i64x2::new(63, 62);
15842 
15843         assert_eq!(r, mem::transmute(__msa_nlzc_d(mem::transmute(a))));
15844     }
15845 
15846     #[simd_test(enable = "msa")]
test_msa_nor_v()15847     unsafe fn test_msa_nor_v() {
15848         #[rustfmt::skip]
15849         let a = u8x16::new(
15850             1, 2, 3, 4,
15851             5, 6, 7, 8,
15852             9, 10, 11, 12,
15853             13, 14, 15, 16
15854         );
15855         #[rustfmt::skip]
15856         let b = u8x16::new(
15857             1, 2, 3, 4,
15858             5, 6, 7, 8,
15859             9, 10, 11, 12,
15860             13, 14, 15, 16
15861         );
15862         #[rustfmt::skip]
15863         let r = u8x16::new(
15864             254, 253, 252, 251,
15865             250, 249, 248, 247,
15866             246, 245, 244, 243,
15867             242, 241, 240, 239
15868         );
15869 
15870         assert_eq!(
15871             r,
15872             mem::transmute(__msa_nor_v(mem::transmute(a), mem::transmute(b)))
15873         );
15874     }
15875 
15876     #[simd_test(enable = "msa")]
test_msa_nori_b()15877     unsafe fn test_msa_nori_b() {
15878         #[rustfmt::skip]
15879         let a = u8x16::new(
15880             1, 2, 3, 4,
15881             5, 6, 7, 8,
15882             9, 10, 11, 12,
15883             13, 14, 15, 16
15884         );
15885         #[rustfmt::skip]
15886         let r = u8x16::new(
15887             250, 249, 248, 251,
15888             250, 249, 248, 243,
15889             242, 241, 240, 243,
15890             242, 241, 240, 235
15891         );
15892 
15893         assert_eq!(r, mem::transmute(__msa_nori_b(mem::transmute(a), 4)));
15894     }
15895 
15896     #[simd_test(enable = "msa")]
test_msa_or_v()15897     unsafe fn test_msa_or_v() {
15898         #[rustfmt::skip]
15899         let a = u8x16::new(
15900             1, 2, 3, 4,
15901             5, 6, 7, 8,
15902             9, 10, 11, 12,
15903             13, 14, 15, 16
15904         );
15905         #[rustfmt::skip]
15906         let b = u8x16::new(
15907             1, 2, 3, 4,
15908             5, 6, 7, 8,
15909             9, 10, 11, 12,
15910             13, 14, 15, 16
15911         );
15912         #[rustfmt::skip]
15913         let r = u8x16::new(
15914             1, 2, 3, 4,
15915             5, 6, 7, 8,
15916             9, 10, 11, 12,
15917             13, 14, 15, 16
15918         );
15919 
15920         assert_eq!(
15921             r,
15922             mem::transmute(__msa_or_v(mem::transmute(a), mem::transmute(b)))
15923         );
15924     }
15925 
15926     #[simd_test(enable = "msa")]
test_msa_ori_b()15927     unsafe fn test_msa_ori_b() {
15928         #[rustfmt::skip]
15929         let a = u8x16::new(
15930             1, 2, 3, 4,
15931             5, 6, 7, 8,
15932             9, 10, 11, 12,
15933             13, 14, 15, 16
15934         );
15935         #[rustfmt::skip]
15936         let r = u8x16::new(
15937             5, 6, 7, 4,
15938             5, 6, 7, 12,
15939             13, 14, 15, 12,
15940             13, 14, 15, 20
15941         );
15942 
15943         assert_eq!(r, mem::transmute(__msa_ori_b(mem::transmute(a), 4)));
15944     }
15945 
15946     #[simd_test(enable = "msa")]
test_msa_pckev_b()15947     unsafe fn test_msa_pckev_b() {
15948         #[rustfmt::skip]
15949         let a = i8x16::new(
15950             1, 2, 3, 4,
15951             1, 2, 3, 4,
15952             1, 2, 3, 4,
15953             1, 2, 3, 4
15954         );
15955         #[rustfmt::skip]
15956         let b = i8x16::new(
15957             4, 3, 2, 1,
15958             4, 3, 2, 1,
15959             4, 3, 2, 1,
15960             4, 3, 2, 1
15961         );
15962         #[rustfmt::skip]
15963         let r = i8x16::new(
15964             4, 2, 4, 2,
15965             4, 2, 4, 2,
15966             1, 3, 1, 3,
15967             1, 3, 1, 3
15968         );
15969 
15970         assert_eq!(
15971             r,
15972             mem::transmute(__msa_pckev_b(mem::transmute(a), mem::transmute(b)))
15973         );
15974     }
15975 
15976     #[simd_test(enable = "msa")]
test_msa_pckev_h()15977     unsafe fn test_msa_pckev_h() {
15978         #[rustfmt::skip]
15979         let a = i16x8::new(1, 2, 3, 4, 1, 2, 3, 4);
15980         #[rustfmt::skip]
15981         let b = i16x8::new(4, 3, 2, 1, 4, 3, 2, 1);
15982         #[rustfmt::skip]
15983         let r = i16x8::new(4, 2, 4, 2, 1, 3, 1, 3);
15984 
15985         assert_eq!(
15986             r,
15987             mem::transmute(__msa_pckev_h(mem::transmute(a), mem::transmute(b)))
15988         );
15989     }
15990 
15991     #[simd_test(enable = "msa")]
test_msa_pckev_w()15992     unsafe fn test_msa_pckev_w() {
15993         #[rustfmt::skip]
15994         let a = i32x4::new(1, 2, 3, 4);
15995         #[rustfmt::skip]
15996         let b = i32x4::new(4, 3, 2, 1);
15997         #[rustfmt::skip]
15998         let r = i32x4::new(4, 2, 1, 3);
15999 
16000         assert_eq!(
16001             r,
16002             mem::transmute(__msa_pckev_w(mem::transmute(a), mem::transmute(b)))
16003         );
16004     }
16005 
16006     #[simd_test(enable = "msa")]
test_msa_pckev_d()16007     unsafe fn test_msa_pckev_d() {
16008         #[rustfmt::skip]
16009         let a = i64x2::new(1, 2);
16010         #[rustfmt::skip]
16011         let b = i64x2::new(4, 3);
16012         #[rustfmt::skip]
16013         let r = i64x2::new(4, 1);
16014 
16015         assert_eq!(
16016             r,
16017             mem::transmute(__msa_pckev_d(mem::transmute(a), mem::transmute(b)))
16018         );
16019     }
16020 
16021     #[simd_test(enable = "msa")]
test_msa_pckod_b()16022     unsafe fn test_msa_pckod_b() {
16023         #[rustfmt::skip]
16024         let a = i8x16::new(
16025             1, 2, 3, 4,
16026             1, 2, 3, 4,
16027             1, 2, 3, 4,
16028             1, 2, 3, 4
16029         );
16030         #[rustfmt::skip]
16031         let b = i8x16::new(
16032             4, 3, 2, 1,
16033             4, 3, 2, 1,
16034             4, 3, 2, 1,
16035             4, 3, 2, 1
16036         );
16037         #[rustfmt::skip]
16038         let r = i8x16::new(
16039             3, 1, 3, 1,
16040             3, 1, 3, 1,
16041             2, 4, 2, 4,
16042             2, 4, 2, 4
16043         );
16044 
16045         assert_eq!(
16046             r,
16047             mem::transmute(__msa_pckod_b(mem::transmute(a), mem::transmute(b)))
16048         );
16049     }
16050 
16051     #[simd_test(enable = "msa")]
test_msa_pckod_h()16052     unsafe fn test_msa_pckod_h() {
16053         #[rustfmt::skip]
16054         let a = i16x8::new(1, 2, 3, 4, 1, 2, 3, 4);
16055         #[rustfmt::skip]
16056         let b = i16x8::new(4, 3, 2, 1, 4, 3, 2, 1);
16057         #[rustfmt::skip]
16058         let r = i16x8::new(3, 1, 3, 1, 2, 4, 2, 4);
16059 
16060         assert_eq!(
16061             r,
16062             mem::transmute(__msa_pckod_h(mem::transmute(a), mem::transmute(b)))
16063         );
16064     }
16065 
16066     #[simd_test(enable = "msa")]
test_msa_pckod_w()16067     unsafe fn test_msa_pckod_w() {
16068         #[rustfmt::skip]
16069         let a = i32x4::new(1, 2, 3, 4);
16070         #[rustfmt::skip]
16071         let b = i32x4::new(4, 3, 2, 1);
16072         #[rustfmt::skip]
16073         let r = i32x4::new(3, 1, 2, 4);
16074 
16075         assert_eq!(
16076             r,
16077             mem::transmute(__msa_pckod_w(mem::transmute(a), mem::transmute(b)))
16078         );
16079     }
16080 
16081     #[simd_test(enable = "msa")]
test_msa_pckod_d()16082     unsafe fn test_msa_pckod_d() {
16083         #[rustfmt::skip]
16084         let a = i64x2::new(1, 2);
16085         #[rustfmt::skip]
16086         let b = i64x2::new(4, 3);
16087         #[rustfmt::skip]
16088         let r = i64x2::new(3, 2);
16089 
16090         assert_eq!(
16091             r,
16092             mem::transmute(__msa_pckod_d(mem::transmute(a), mem::transmute(b)))
16093         );
16094     }
16095 
16096     #[simd_test(enable = "msa")]
test_msa_pcnt_b()16097     unsafe fn test_msa_pcnt_b() {
16098         #[rustfmt::skip]
16099         let a = i8x16::new(
16100             -128, -64, -32, -16,
16101             -8, -4, -2, -1,
16102             1, 2, 4, 8,
16103             16, 32, 64, 127
16104         );
16105         #[rustfmt::skip]
16106         let r = i8x16::new(
16107             1, 2, 3, 4,
16108             5, 6, 7, 8,
16109             1, 1, 1, 1,
16110             1, 1, 1, 7
16111         );
16112 
16113         assert_eq!(r, mem::transmute(__msa_pcnt_b(mem::transmute(a))));
16114     }
16115 
16116     #[simd_test(enable = "msa")]
test_msa_pcnt_h()16117     unsafe fn test_msa_pcnt_h() {
16118         #[rustfmt::skip]
16119         let a = i16x8::new(
16120             -32768, -16384, -8192, -4096,
16121             4096, 8192, 16384, 32767
16122         );
16123         #[rustfmt::skip]
16124         let r = i16x8::new(1, 2, 3, 4, 1, 1, 1, 15);
16125 
16126         assert_eq!(r, mem::transmute(__msa_pcnt_h(mem::transmute(a))));
16127     }
16128 
16129     #[simd_test(enable = "msa")]
test_msa_pcnt_w()16130     unsafe fn test_msa_pcnt_w() {
16131         #[rustfmt::skip]
16132         let a = i32x4::new(
16133             i32::MIN, -1073741824,
16134             1073741824, i32::MAX
16135         );
16136         #[rustfmt::skip]
16137         let r = i32x4::new(1, 2, 1, 31);
16138 
16139         assert_eq!(r, mem::transmute(__msa_pcnt_w(mem::transmute(a))));
16140     }
16141 
16142     #[simd_test(enable = "msa")]
test_msa_pcnt_d()16143     unsafe fn test_msa_pcnt_d() {
16144         #[rustfmt::skip]
16145         let a = i64x2::new(-2147483648, 2147483647);
16146         #[rustfmt::skip]
16147         let r = i64x2::new(33, 31);
16148 
16149         assert_eq!(r, mem::transmute(__msa_pcnt_d(mem::transmute(a))));
16150     }
16151 
16152     #[simd_test(enable = "msa")]
test_msa_sat_s_b()16153     unsafe fn test_msa_sat_s_b() {
16154         #[rustfmt::skip]
16155         let a = i8x16::new(
16156             i8::MAX, 105, 30, 1,
16157             i8::MAX, 105, 30, 1,
16158             i8::MAX, 105, 30, 1,
16159             i8::MAX, 105, 30, 1
16160         );
16161         #[rustfmt::skip]
16162         let r = i8x16::new(
16163             3, 3, 3, 1,
16164             3, 3, 3, 1,
16165             3, 3, 3, 1,
16166             3, 3, 3, 1
16167         );
16168 
16169         assert_eq!(r, mem::transmute(__msa_sat_s_b(mem::transmute(a), 2)));
16170     }
16171 
16172     #[simd_test(enable = "msa")]
test_msa_sat_s_h()16173     unsafe fn test_msa_sat_s_h() {
16174         #[rustfmt::skip]
16175         let a = i16x8::new(
16176             i16::MAX, 1155, 155, 1,
16177             i16::MAX, 1155, 155, 1
16178         );
16179         #[rustfmt::skip]
16180         let r = i16x8::new(127, 127, 127, 1, 127, 127, 127, 1);
16181 
16182         assert_eq!(r, mem::transmute(__msa_sat_s_h(mem::transmute(a), 7)));
16183     }
16184 
16185     #[simd_test(enable = "msa")]
test_msa_sat_s_w()16186     unsafe fn test_msa_sat_s_w() {
16187         #[rustfmt::skip]
16188         let a = i32x4::new(i32::MAX, 111111155, i32::MAX, 1);
16189         #[rustfmt::skip]
16190         let r = i32x4::new(131071, 131071, 131071, 1);
16191 
16192         assert_eq!(r, mem::transmute(__msa_sat_s_w(mem::transmute(a), 17)));
16193     }
16194 
16195     #[simd_test(enable = "msa")]
test_msa_sat_s_d()16196     unsafe fn test_msa_sat_s_d() {
16197         #[rustfmt::skip]
16198         let a = i64x2::new(i64::MAX, 1);
16199         #[rustfmt::skip]
16200         let r = i64x2::new(137438953471, 1);
16201 
16202         assert_eq!(r, mem::transmute(__msa_sat_s_d(mem::transmute(a), 37)));
16203     }
16204 
16205     #[simd_test(enable = "msa")]
test_msa_sat_u_b()16206     unsafe fn test_msa_sat_u_b() {
16207         #[rustfmt::skip]
16208         let a = u8x16::new(
16209             u8::MAX, 105, 30, 1,
16210             u8::MAX, 105, 30, 1,
16211             u8::MAX, 105, 30, 1,
16212             u8::MAX, 105, 30, 1
16213         );
16214         #[rustfmt::skip]
16215         let r = u8x16::new(
16216             7, 7, 7, 1,
16217             7, 7, 7, 1,
16218             7, 7, 7, 1,
16219             7, 7, 7, 1
16220         );
16221 
16222         assert_eq!(r, mem::transmute(__msa_sat_u_b(mem::transmute(a), 2)));
16223     }
16224 
16225     #[simd_test(enable = "msa")]
test_msa_sat_u_h()16226     unsafe fn test_msa_sat_u_h() {
16227         #[rustfmt::skip]
16228         let a = u16x8::new(
16229             u16::MAX, 1155, 155, 1,
16230             u16::MAX, 1155, 155, 1
16231         );
16232         #[rustfmt::skip]
16233         let r = u16x8::new(255, 255, 155, 1, 255, 255, 155, 1);
16234 
16235         assert_eq!(r, mem::transmute(__msa_sat_u_h(mem::transmute(a), 7)));
16236     }
16237 
16238     #[simd_test(enable = "msa")]
test_msa_sat_u_w()16239     unsafe fn test_msa_sat_u_w() {
16240         #[rustfmt::skip]
16241         let a = u32x4::new(u32::MAX, 111111155, u32::MAX, 1);
16242         #[rustfmt::skip]
16243         let r = u32x4::new(262143, 262143, 262143, 1);
16244 
16245         assert_eq!(r, mem::transmute(__msa_sat_u_w(mem::transmute(a), 17)));
16246     }
16247 
16248     #[simd_test(enable = "msa")]
test_msa_sat_u_d()16249     unsafe fn test_msa_sat_u_d() {
16250         #[rustfmt::skip]
16251         let a = u64x2::new(u64::MAX, 1);
16252         #[rustfmt::skip]
16253         let r = u64x2::new(274877906943, 1);
16254 
16255         assert_eq!(r, mem::transmute(__msa_sat_u_d(mem::transmute(a), 37)));
16256     }
16257 
16258     #[simd_test(enable = "msa")]
test_msa_shf_b()16259     unsafe fn test_msa_shf_b() {
16260         #[rustfmt::skip]
16261         let a = i8x16::new(
16262             11, 12, 3, 4,
16263             11, 12, 3, 4,
16264             11, 12, 3, 4,
16265             11, 12, 3, 4
16266         );
16267         #[rustfmt::skip]
16268         let r = i8x16::new(
16269             11, 3, 4, 12,
16270             11, 3, 4, 12,
16271             11, 3, 4, 12,
16272             11, 3, 4, 12
16273         );
16274 
16275         assert_eq!(r, mem::transmute(__msa_shf_b(mem::transmute(a), 120)));
16276     }
16277 
16278     #[simd_test(enable = "msa")]
test_msa_shf_h()16279     unsafe fn test_msa_shf_h() {
16280         #[rustfmt::skip]
16281         let a = i16x8::new(
16282             11, 12, 13, 14,
16283             11, 12, 13, 14
16284         );
16285         #[rustfmt::skip]
16286         let r = i16x8::new(11, 14, 12, 13, 11, 14, 12, 13);
16287 
16288         assert_eq!(r, mem::transmute(__msa_shf_h(mem::transmute(a), 156)));
16289     }
16290 
16291     #[simd_test(enable = "msa")]
test_msa_shf_w()16292     unsafe fn test_msa_shf_w() {
16293         #[rustfmt::skip]
16294         let a = i32x4::new(1, 2, 3, 4);
16295         #[rustfmt::skip]
16296         let r = i32x4::new(1, 3, 2, 4);
16297 
16298         assert_eq!(r, mem::transmute(__msa_shf_w(mem::transmute(a), 216)));
16299     }
16300 
16301     #[simd_test(enable = "msa")]
test_msa_sld_b()16302     unsafe fn test_msa_sld_b() {
16303         #[rustfmt::skip]
16304         let a = i8x16::new(
16305             0, 1, 2, 3,
16306             4, 5, 6, 7,
16307             8, 9, 10, 11,
16308             12, 13, 14, 15
16309         );
16310         #[rustfmt::skip]
16311         let b = i8x16::new(
16312             16, 17, 18, 19,
16313             20, 21, 22, 23,
16314             24, 25, 26, 27,
16315             28, 29, 30, 31
16316         );
16317         #[rustfmt::skip]
16318         let r = i8x16::new(
16319             21, 22, 23, 24,
16320             25, 26, 27, 28,
16321             29, 30, 31, 0,
16322             1, 2, 3, 4
16323         );
16324 
16325         assert_eq!(
16326             r,
16327             mem::transmute(__msa_sld_b(mem::transmute(a), mem::transmute(b), 5))
16328         );
16329     }
16330 
16331     #[simd_test(enable = "msa")]
test_msa_sld_h()16332     unsafe fn test_msa_sld_h() {
16333         #[rustfmt::skip]
16334         let a = i16x8::new(0, 1, 2, 3, 4, 5, 6, 7);
16335         #[rustfmt::skip]
16336         let b = i16x8::new(8, 9, 10, 11, 12, 13, 14, 15);
16337         // let c = 5 as i32;
16338         let r = i16x8::new(9, 10, 11, 0, 13, 14, 15, 4);
16339 
16340         assert_eq!(
16341             r,
16342             mem::transmute(__msa_sld_h(mem::transmute(a), mem::transmute(b), 2))
16343         );
16344     }
16345 
16346     #[simd_test(enable = "msa")]
test_msa_sld_w()16347     unsafe fn test_msa_sld_w() {
16348         #[rustfmt::skip]
16349         let a = i32x4::new(0, 1, 2, 3);
16350         #[rustfmt::skip]
16351         let b = i32x4::new(4, 5, 6, 7);
16352         #[rustfmt::skip]
16353         let r = i32x4::new(4, 5, 6, 7);
16354 
16355         assert_eq!(
16356             r,
16357             mem::transmute(__msa_sld_w(mem::transmute(a), mem::transmute(b), 4))
16358         );
16359     }
16360 
16361     #[simd_test(enable = "msa")]
test_msa_sld_d()16362     unsafe fn test_msa_sld_d() {
16363         #[rustfmt::skip]
16364         let a = i64x2::new(0, 1);
16365         #[rustfmt::skip]
16366         let b = i64x2::new(2, 3);
16367         #[rustfmt::skip]
16368         let r = i64x2::new(2, 3);
16369 
16370         assert_eq!(
16371             r,
16372             mem::transmute(__msa_sld_d(mem::transmute(a), mem::transmute(b), 2))
16373         );
16374     }
16375 
16376     #[simd_test(enable = "msa")]
test_msa_sldi_b()16377     unsafe fn test_msa_sldi_b() {
16378         #[rustfmt::skip]
16379         let a = i8x16::new(
16380             0, 1, 2, 3,
16381             4, 5, 6, 7,
16382             8, 9, 10, 11,
16383             12, 13, 14, 15
16384         );
16385         #[rustfmt::skip]
16386         let b = i8x16::new(
16387             16, 17, 18, 19,
16388             20, 21, 22, 23,
16389             24, 25, 26, 27,
16390             28, 29, 30, 31
16391         );
16392         #[rustfmt::skip]
16393         let r = i8x16::new(
16394             21, 22, 23, 24,
16395             25, 26, 27, 28,
16396             29, 30, 31, 0,
16397             1, 2, 3, 4
16398         );
16399 
16400         assert_eq!(
16401             r,
16402             mem::transmute(__msa_sldi_b(mem::transmute(a), mem::transmute(b), 5))
16403         );
16404     }
16405 
16406     #[simd_test(enable = "msa")]
test_msa_sldi_h()16407     unsafe fn test_msa_sldi_h() {
16408         #[rustfmt::skip]
16409         let a = i16x8::new(0, 1, 2, 3, 4, 5, 6, 7);
16410         #[rustfmt::skip]
16411         let b = i16x8::new(8, 9, 10, 11, 12, 13, 14, 15);
16412         // let c = 5 as i32;
16413         let r = i16x8::new(9, 10, 11, 0, 13, 14, 15, 4);
16414 
16415         assert_eq!(
16416             r,
16417             mem::transmute(__msa_sldi_h(mem::transmute(a), mem::transmute(b), 2))
16418         );
16419     }
16420 
16421     #[simd_test(enable = "msa")]
test_msa_sldi_w()16422     unsafe fn test_msa_sldi_w() {
16423         #[rustfmt::skip]
16424         let a = i32x4::new(0, 1, 2, 3);
16425         #[rustfmt::skip]
16426         let b = i32x4::new(4, 5, 6, 7);
16427         #[rustfmt::skip]
16428         let r = i32x4::new(4, 5, 6, 7);
16429 
16430         assert_eq!(
16431             r,
16432             mem::transmute(__msa_sldi_w(mem::transmute(a), mem::transmute(b), 4))
16433         );
16434     }
16435 
16436     #[simd_test(enable = "msa")]
test_msa_sldi_d()16437     unsafe fn test_msa_sldi_d() {
16438         #[rustfmt::skip]
16439         let a = i64x2::new(0, 1);
16440         #[rustfmt::skip]
16441         let b = i64x2::new(2, 3);
16442         #[rustfmt::skip]
16443         let r = i64x2::new(2, 3);
16444 
16445         assert_eq!(
16446             r,
16447             mem::transmute(__msa_sldi_d(mem::transmute(a), mem::transmute(b), 2))
16448         );
16449     }
16450 
16451     #[simd_test(enable = "msa")]
test_msa_sll_b()16452     unsafe fn test_msa_sll_b() {
16453         #[rustfmt::skip]
16454         let a = i8x16::new(
16455             1, 2, 3, 4,
16456             1, 2, 3, 4,
16457             1, 2, 3, 4,
16458             1, 2, 3, 4
16459         );
16460         #[rustfmt::skip]
16461         let b = i8x16::new(
16462             4, 3, 2, 1,
16463             4, 3, 2, 1,
16464             4, 3, 2, 1,
16465             4, 3, 2, 1
16466         );
16467         #[rustfmt::skip]
16468         let r = i8x16::new(
16469             16, 16, 12, 8,
16470             16, 16, 12, 8,
16471             16, 16, 12, 8,
16472             16, 16, 12, 8
16473         );
16474 
16475         assert_eq!(
16476             r,
16477             mem::transmute(__msa_sll_b(mem::transmute(a), mem::transmute(b)))
16478         );
16479     }
16480 
16481     #[simd_test(enable = "msa")]
test_msa_sll_h()16482     unsafe fn test_msa_sll_h() {
16483         #[rustfmt::skip]
16484         let a = i16x8::new(1, 2, 3, 4, 1, 2, 3, 4);
16485         #[rustfmt::skip]
16486         let b = i16x8::new(4, 3, 2, 1, 4, 3, 2, 1);
16487         #[rustfmt::skip]
16488         let r = i16x8::new(16, 16, 12, 8, 16, 16, 12, 8);
16489 
16490         assert_eq!(
16491             r,
16492             mem::transmute(__msa_sll_h(mem::transmute(a), mem::transmute(b)))
16493         );
16494     }
16495 
16496     #[simd_test(enable = "msa")]
test_msa_sll_w()16497     unsafe fn test_msa_sll_w() {
16498         #[rustfmt::skip]
16499         let a = i32x4::new(1, 2, 3, 4);
16500         #[rustfmt::skip]
16501         let b = i32x4::new(4, 3, 2, 1);
16502         #[rustfmt::skip]
16503         let r = i32x4::new(16, 16, 12, 8);
16504 
16505         assert_eq!(
16506             r,
16507             mem::transmute(__msa_sll_w(mem::transmute(a), mem::transmute(b)))
16508         );
16509     }
16510 
16511     #[simd_test(enable = "msa")]
test_msa_sll_d()16512     unsafe fn test_msa_sll_d() {
16513         #[rustfmt::skip]
16514         let a = i64x2::new(1, 2);
16515         #[rustfmt::skip]
16516         let b = i64x2::new(4, 3);
16517         #[rustfmt::skip]
16518         let r = i64x2::new(16, 16);
16519 
16520         assert_eq!(
16521             r,
16522             mem::transmute(__msa_sll_d(mem::transmute(a), mem::transmute(b)))
16523         );
16524     }
16525 
16526     #[simd_test(enable = "msa")]
test_msa_slli_b()16527     unsafe fn test_msa_slli_b() {
16528         #[rustfmt::skip]
16529         let a = i8x16::new(
16530             1, 2, 3, 4,
16531             1, 2, 3, 4,
16532             1, 2, 3, 4,
16533             1, 2, 3, 4
16534         );
16535         #[rustfmt::skip]
16536         let r = i8x16::new(
16537             4, 8, 12, 16,
16538             4, 8, 12, 16,
16539             4, 8, 12, 16,
16540             4, 8, 12, 16
16541         );
16542 
16543         assert_eq!(r, mem::transmute(__msa_slli_b(mem::transmute(a), 2)));
16544     }
16545 
16546     #[simd_test(enable = "msa")]
test_msa_slli_h()16547     unsafe fn test_msa_slli_h() {
16548         #[rustfmt::skip]
16549         let a = i16x8::new(
16550             1, 2, 3, 4,
16551             1, 2, 3, 4
16552         );
16553         #[rustfmt::skip]
16554         let r = i16x8::new(4, 8, 12, 16, 4, 8, 12, 16);
16555 
16556         assert_eq!(r, mem::transmute(__msa_slli_h(mem::transmute(a), 2)));
16557     }
16558 
16559     #[simd_test(enable = "msa")]
test_msa_slli_w()16560     unsafe fn test_msa_slli_w() {
16561         #[rustfmt::skip]
16562         let a = i32x4::new(1, 2, 3, 4);
16563         #[rustfmt::skip]
16564         let r = i32x4::new(4, 8, 12, 16);
16565 
16566         assert_eq!(r, mem::transmute(__msa_slli_w(mem::transmute(a), 2)));
16567     }
16568 
16569     #[simd_test(enable = "msa")]
test_msa_slli_d()16570     unsafe fn test_msa_slli_d() {
16571         #[rustfmt::skip]
16572         let a = i64x2::new(1, 2);
16573         #[rustfmt::skip]
16574         let r = i64x2::new(2, 4);
16575 
16576         assert_eq!(r, mem::transmute(__msa_slli_d(mem::transmute(a), 1)));
16577     }
16578 
16579     #[simd_test(enable = "msa")]
test_msa_splat_b()16580     unsafe fn test_msa_splat_b() {
16581         #[rustfmt::skip]
16582         let a = i8x16::new(
16583             1, 2, 3, 4,
16584             1, 2, 3, 4,
16585             1, 2, 3, 4,
16586             1, 2, 3, 4
16587         );
16588         #[rustfmt::skip]
16589         let r = i8x16::new(
16590             4, 4, 4, 4,
16591             4, 4, 4, 4,
16592             4, 4, 4, 4,
16593             4, 4, 4, 4
16594         );
16595 
16596         assert_eq!(r, mem::transmute(__msa_splat_b(mem::transmute(a), 3)));
16597     }
16598 
16599     #[simd_test(enable = "msa")]
test_msa_splat_h()16600     unsafe fn test_msa_splat_h() {
16601         #[rustfmt::skip]
16602         let a = i16x8::new(
16603             1, 2, 3, 4,
16604             1, 2, 3, 4,
16605         );
16606         #[rustfmt::skip]
16607         let r = i16x8::new(4, 4, 4, 4, 4, 4, 4, 4);
16608 
16609         assert_eq!(r, mem::transmute(__msa_splat_h(mem::transmute(a), 3)));
16610     }
16611 
16612     #[simd_test(enable = "msa")]
test_msa_splat_w()16613     unsafe fn test_msa_splat_w() {
16614         #[rustfmt::skip]
16615         let a = i32x4::new(1, 2, 3, 4);
16616         #[rustfmt::skip]
16617         let r = i32x4::new(4, 4, 4, 4);
16618 
16619         assert_eq!(r, mem::transmute(__msa_splat_w(mem::transmute(a), 3)));
16620     }
16621 
16622     #[simd_test(enable = "msa")]
test_msa_splat_d()16623     unsafe fn test_msa_splat_d() {
16624         #[rustfmt::skip]
16625         let a = i64x2::new(1, 2);
16626         #[rustfmt::skip]
16627         let r = i64x2::new(2, 2);
16628 
16629         assert_eq!(r, mem::transmute(__msa_splat_d(mem::transmute(a), 3)));
16630     }
16631 
16632     #[simd_test(enable = "msa")]
test_msa_splati_b()16633     unsafe fn test_msa_splati_b() {
16634         #[rustfmt::skip]
16635         let a = i8x16::new(
16636             1, 2, 3, 4,
16637             1, 2, 3, 4,
16638             1, 2, 3, 4,
16639             1, 2, 3, 4
16640         );
16641         #[rustfmt::skip]
16642         let r = i8x16::new(
16643             3, 3, 3, 3,
16644             3, 3, 3, 3,
16645             3, 3, 3, 3,
16646             3, 3, 3, 3
16647         );
16648 
16649         assert_eq!(r, mem::transmute(__msa_splati_b(mem::transmute(a), 2)));
16650     }
16651 
16652     #[simd_test(enable = "msa")]
test_msa_splati_h()16653     unsafe fn test_msa_splati_h() {
16654         #[rustfmt::skip]
16655         let a = i16x8::new(
16656             1, 2, 3, 4,
16657             1, 2, 3, 4,
16658         );
16659         #[rustfmt::skip]
16660         let r = i16x8::new(3, 3, 3, 3, 3, 3, 3, 3);
16661 
16662         assert_eq!(r, mem::transmute(__msa_splati_h(mem::transmute(a), 2)));
16663     }
16664 
16665     #[simd_test(enable = "msa")]
test_msa_splati_w()16666     unsafe fn test_msa_splati_w() {
16667         #[rustfmt::skip]
16668         let a = i32x4::new(1, 2, 3, 4);
16669         #[rustfmt::skip]
16670         let r = i32x4::new(3, 3, 3, 3);
16671 
16672         assert_eq!(r, mem::transmute(__msa_splati_w(mem::transmute(a), 2)));
16673     }
16674 
16675     #[simd_test(enable = "msa")]
test_msa_splati_d()16676     unsafe fn test_msa_splati_d() {
16677         #[rustfmt::skip]
16678         let a = i64x2::new(1, 2);
16679         #[rustfmt::skip]
16680         let r = i64x2::new(2, 2);
16681 
16682         assert_eq!(r, mem::transmute(__msa_splati_d(mem::transmute(a), 1)));
16683     }
16684 
16685     #[simd_test(enable = "msa")]
test_msa_sra_b()16686     unsafe fn test_msa_sra_b() {
16687         #[rustfmt::skip]
16688         let a = i8x16::new(
16689             -128, -64, -32, -16,
16690             -8, -4, -2, -1,
16691             1, 2, 4, 8,
16692             16, 32, 64, 127
16693         );
16694         #[rustfmt::skip]
16695         let b = i8x16::new(
16696             8, 7, 6, 5,
16697             4, 3, 2, 1,
16698             8, 7, 6, 5,
16699             4, 3, 2, 1
16700         );
16701         #[rustfmt::skip]
16702         let r = i8x16::new(
16703             -128, -1, -1, -1,
16704             -1, -1, -1, -1,
16705             1, 0, 0, 0,
16706             1, 4, 16, 63
16707         );
16708 
16709         assert_eq!(
16710             r,
16711             mem::transmute(__msa_sra_b(mem::transmute(a), mem::transmute(b)))
16712         );
16713     }
16714 
16715     #[simd_test(enable = "msa")]
test_msa_sra_h()16716     unsafe fn test_msa_sra_h() {
16717         #[rustfmt::skip]
16718         let a = i16x8::new(
16719             -32768, -16384, -8192, -4096,
16720             1, 2, 3, 4
16721         );
16722         #[rustfmt::skip]
16723         let b = i16x8::new(
16724             15, 14, 13, 12,
16725             12, 13, 14, 15
16726         );
16727         #[rustfmt::skip]
16728         let r = i16x8::new(
16729             -1, -1, -1, -1,
16730             0, 0, 0, 0
16731         );
16732 
16733         assert_eq!(
16734             r,
16735             mem::transmute(__msa_sra_h(mem::transmute(a), mem::transmute(b)))
16736         );
16737     }
16738 
16739     #[simd_test(enable = "msa")]
test_msa_sra_w()16740     unsafe fn test_msa_sra_w() {
16741         #[rustfmt::skip]
16742         let a = i32x4::new(i32::MIN, -1073741824, 1, 2);
16743         #[rustfmt::skip]
16744         let b = i32x4::new(16, 15, 16, 15);
16745         #[rustfmt::skip]
16746         let r = i32x4::new(-32768, -32768, 0, 0);
16747 
16748         assert_eq!(
16749             r,
16750             mem::transmute(__msa_sra_w(mem::transmute(a), mem::transmute(b)))
16751         );
16752     }
16753 
16754     #[simd_test(enable = "msa")]
test_msa_sra_d()16755     unsafe fn test_msa_sra_d() {
16756         #[rustfmt::skip]
16757         let a = i64x2::new(i64::MIN, i64::MAX);
16758         #[rustfmt::skip]
16759         let b = i64x2::new(32, 31);
16760         #[rustfmt::skip]
16761         let r = i64x2::new(-2147483648, 4294967295);
16762 
16763         assert_eq!(
16764             r,
16765             mem::transmute(__msa_sra_d(mem::transmute(a), mem::transmute(b)))
16766         );
16767     }
16768 
16769     #[simd_test(enable = "msa")]
test_msa_srai_b()16770     unsafe fn test_msa_srai_b() {
16771         #[rustfmt::skip]
16772         let a = i8x16::new(
16773             i8::MAX, 125, 55, 1,
16774             i8::MAX, 125, 55, 1,
16775             i8::MAX, 125, 55, 1,
16776             i8::MAX, 125, 55, 1
16777         );
16778         #[rustfmt::skip]
16779         let r = i8x16::new(
16780             31, 31, 13, 0,
16781             31, 31, 13, 0,
16782             31, 31, 13, 0,
16783             31, 31, 13, 0
16784         );
16785 
16786         assert_eq!(r, mem::transmute(__msa_srai_b(mem::transmute(a), 2)));
16787     }
16788 
16789     #[simd_test(enable = "msa")]
test_msa_srai_h()16790     unsafe fn test_msa_srai_h() {
16791         #[rustfmt::skip]
16792         let a = i16x8::new(
16793             i16::MAX, 125, 55, 1,
16794             i16::MAX, 125, 55, 1
16795         );
16796         #[rustfmt::skip]
16797         let r = i16x8::new(8191, 31, 13, 0, 8191, 31, 13, 0);
16798 
16799         assert_eq!(r, mem::transmute(__msa_srai_h(mem::transmute(a), 2)));
16800     }
16801 
16802     #[simd_test(enable = "msa")]
test_msa_srai_w()16803     unsafe fn test_msa_srai_w() {
16804         #[rustfmt::skip]
16805         let a = i32x4::new(i32::MAX, 125, 55, 1);
16806         let r = i32x4::new(536870911, 31, 13, 0);
16807 
16808         assert_eq!(r, mem::transmute(__msa_srai_w(mem::transmute(a), 2)));
16809     }
16810 
16811     #[simd_test(enable = "msa")]
test_msa_srai_d()16812     unsafe fn test_msa_srai_d() {
16813         #[rustfmt::skip]
16814         let a = i64x2::new(i64::MAX, 55);
16815         #[rustfmt::skip]
16816         let r = i64x2::new(2305843009213693951, 13);
16817 
16818         assert_eq!(r, mem::transmute(__msa_srai_d(mem::transmute(a), 2)));
16819     }
16820 
16821     #[simd_test(enable = "msa")]
test_msa_srar_b()16822     unsafe fn test_msa_srar_b() {
16823         #[rustfmt::skip]
16824         let a = i8x16::new(
16825             -128, -64, -32, -16,
16826             -8, -4, -2, -1,
16827             1, 2, 4, 8,
16828             16, 32, 64, 127
16829         );
16830         #[rustfmt::skip]
16831         let b = i8x16::new(
16832             4, 3, 2, 1,
16833             4, 3, 2, 1,
16834             8, 7, 6, 5,
16835             4, 3, 2, 1
16836         );
16837         #[rustfmt::skip]
16838         let r = i8x16::new(
16839             -8, -8, -8, -8,
16840             0, 0, 0, 0,
16841             1, 0, 0, 0,
16842             1, 4, 16, 64
16843         );
16844 
16845         assert_eq!(
16846             r,
16847             mem::transmute(__msa_srar_b(mem::transmute(a), mem::transmute(b)))
16848         );
16849     }
16850 
16851     #[simd_test(enable = "msa")]
test_msa_srar_h()16852     unsafe fn test_msa_srar_h() {
16853         #[rustfmt::skip]
16854         let a = i16x8::new(
16855             i16::MIN, -16384, -8192, -4096,
16856             150, 50, 25, 15
16857         );
16858         #[rustfmt::skip]
16859         let b = i16x8::new(
16860             4, 3, 2, 1,
16861             1, 2, 3, 4
16862         );
16863         #[rustfmt::skip]
16864         let r = i16x8::new(
16865             -2048, -2048, -2048, -2048,
16866             75, 13, 3, 1
16867         );
16868 
16869         assert_eq!(
16870             r,
16871             mem::transmute(__msa_srar_h(mem::transmute(a), mem::transmute(b)))
16872         );
16873     }
16874 
16875     #[simd_test(enable = "msa")]
test_msa_srar_w()16876     unsafe fn test_msa_srar_w() {
16877         #[rustfmt::skip]
16878         let a = i32x4::new(i32::MIN, -1073741824, 100, 50);
16879         #[rustfmt::skip]
16880         let b = i32x4::new(16, 15, 1, 2);
16881         #[rustfmt::skip]
16882         let r = i32x4::new(-32768, -32768, 50, 13);
16883 
16884         assert_eq!(
16885             r,
16886             mem::transmute(__msa_srar_w(mem::transmute(a), mem::transmute(b)))
16887         );
16888     }
16889 
16890     #[simd_test(enable = "msa")]
test_msa_srar_d()16891     unsafe fn test_msa_srar_d() {
16892         #[rustfmt::skip]
16893         let a = i64x2::new(i64::MIN, i64::MAX);
16894         #[rustfmt::skip]
16895         let b = i64x2::new(32, 31);
16896         #[rustfmt::skip]
16897         let r = i64x2::new(-2147483648, 4294967296);
16898 
16899         assert_eq!(
16900             r,
16901             mem::transmute(__msa_srar_d(mem::transmute(a), mem::transmute(b)))
16902         );
16903     }
16904 
16905     #[simd_test(enable = "msa")]
test_msa_srari_b()16906     unsafe fn test_msa_srari_b() {
16907         #[rustfmt::skip]
16908         let a = i8x16::new(
16909             125, i8::MAX, 55, 1,
16910             125, i8::MAX, 55, 1,
16911             125, i8::MAX, 55, 1,
16912             125, i8::MAX, 55, 1
16913         );
16914         #[rustfmt::skip]
16915         let r = i8x16::new(
16916             31, 32, 14, 0,
16917             31, 32, 14, 0,
16918             31, 32, 14, 0,
16919             31, 32, 14, 0
16920         );
16921 
16922         assert_eq!(r, mem::transmute(__msa_srari_b(mem::transmute(a), 2)));
16923     }
16924 
16925     #[simd_test(enable = "msa")]
test_msa_srari_h()16926     unsafe fn test_msa_srari_h() {
16927         #[rustfmt::skip]
16928         let a = i16x8::new(2155, 1155, 155, 1, 2155, 1155, 155, 1);
16929         #[rustfmt::skip]
16930         let r = i16x8::new(539, 289, 39, 0, 539, 289, 39, 0);
16931 
16932         assert_eq!(r, mem::transmute(__msa_srari_h(mem::transmute(a), 2)));
16933     }
16934 
16935     #[simd_test(enable = "msa")]
test_msa_srari_w()16936     unsafe fn test_msa_srari_w() {
16937         #[rustfmt::skip]
16938         let a = i32x4::new(211111155, 111111155, 11111155, 1);
16939         #[rustfmt::skip]
16940         let r = i32x4::new(52777789, 27777789, 2777789, 0);
16941 
16942         assert_eq!(r, mem::transmute(__msa_srari_w(mem::transmute(a), 2)));
16943     }
16944 
16945     #[simd_test(enable = "msa")]
test_msa_srari_d()16946     unsafe fn test_msa_srari_d() {
16947         #[rustfmt::skip]
16948         let a = i64x2::new(211111111155, 111111111155);
16949         #[rustfmt::skip]
16950         let r = i64x2::new(52777777789, 27777777789);
16951 
16952         assert_eq!(r, mem::transmute(__msa_srari_d(mem::transmute(a), 2)));
16953     }
16954 
16955     #[simd_test(enable = "msa")]
test_msa_srl_b()16956     unsafe fn test_msa_srl_b() {
16957         #[rustfmt::skip]
16958         let a = i8x16::new(
16959             -128, -64, -32, -16,
16960             -8, -4, -2, -1,
16961             1, 2, 4, 8,
16962             16, 32, 64, 127
16963         );
16964         #[rustfmt::skip]
16965         let b = i8x16::new(
16966             8, 7, 6, 5,
16967             4, 3, 2, 1,
16968             8, 7, 6, 5,
16969             4, 3, 2, 1
16970         );
16971         #[rustfmt::skip]
16972         let r = i8x16::new(
16973             -128, 1, 3, 7,
16974             15, 31, 63, 127,
16975             1, 0, 0, 0,
16976             1, 4, 16, 63
16977         );
16978 
16979         assert_eq!(
16980             r,
16981             mem::transmute(__msa_srl_b(mem::transmute(a), mem::transmute(b)))
16982         );
16983     }
16984 
16985     #[simd_test(enable = "msa")]
test_msa_srl_h()16986     unsafe fn test_msa_srl_h() {
16987         #[rustfmt::skip]
16988         let a = i16x8::new(
16989             -32768, -16384, -8192, -4096,
16990             1, 2, 3, 4
16991         );
16992         #[rustfmt::skip]
16993         let b = i16x8::new(
16994             15, 14, 13, 12,
16995             4, 3, 2, 1
16996         );
16997         #[rustfmt::skip]
16998         let r = i16x8::new(1, 3, 7, 15, 0, 0, 0, 2);
16999 
17000         assert_eq!(
17001             r,
17002             mem::transmute(__msa_srl_h(mem::transmute(a), mem::transmute(b)))
17003         );
17004     }
17005 
17006     #[simd_test(enable = "msa")]
test_msa_srl_w()17007     unsafe fn test_msa_srl_w() {
17008         #[rustfmt::skip]
17009         let a = i32x4::new(i32::MIN, -1073741824, 1, 2);
17010         #[rustfmt::skip]
17011         let b = i32x4::new(16, 15, 16, 15);
17012         #[rustfmt::skip]
17013         let r = i32x4::new(32768, 98304, 0, 0);
17014 
17015         assert_eq!(
17016             r,
17017             mem::transmute(__msa_srl_w(mem::transmute(a), mem::transmute(b)))
17018         );
17019     }
17020 
17021     #[simd_test(enable = "msa")]
test_msa_srl_d()17022     unsafe fn test_msa_srl_d() {
17023         #[rustfmt::skip]
17024         let a = i64x2::new(i64::MIN, i64::MAX);
17025         #[rustfmt::skip]
17026         let b = i64x2::new(32, 31);
17027         #[rustfmt::skip]
17028         let r = i64x2::new(2147483648, 4294967295);
17029 
17030         assert_eq!(
17031             r,
17032             mem::transmute(__msa_srl_d(mem::transmute(a), mem::transmute(b)))
17033         );
17034     }
17035 
17036     #[simd_test(enable = "msa")]
test_msa_srli_b()17037     unsafe fn test_msa_srli_b() {
17038         #[rustfmt::skip]
17039         let a = i8x16::new(
17040             25, 50, 100, 127,
17041             25, 50, 100, 127,
17042             25, 50, 100, 127,
17043             25, 50, 100, 127
17044         );
17045         #[rustfmt::skip]
17046         let r = i8x16::new(
17047             6, 12, 25, 31,
17048             6, 12, 25, 31,
17049             6, 12, 25, 31,
17050             6, 12, 25, 31
17051         );
17052 
17053         assert_eq!(r, mem::transmute(__msa_srli_b(mem::transmute(a), 2)));
17054     }
17055 
17056     #[simd_test(enable = "msa")]
test_msa_srli_h()17057     unsafe fn test_msa_srli_h() {
17058         #[rustfmt::skip]
17059         let a = i16x8::new(
17060             i16::MAX, 3276, 100, 127,
17061             i16::MAX, 3276, 100, 127
17062         );
17063         #[rustfmt::skip]
17064         let r = i16x8::new(
17065             8191, 819, 25, 31,
17066             8191, 819, 25, 31
17067         );
17068 
17069         assert_eq!(r, mem::transmute(__msa_srli_h(mem::transmute(a), 2)));
17070     }
17071 
17072     #[simd_test(enable = "msa")]
test_msa_srli_w()17073     unsafe fn test_msa_srli_w() {
17074         #[rustfmt::skip]
17075         let a = i32x4::new(100, i32::MAX, 100, i32::MAX);
17076         #[rustfmt::skip]
17077         let r = i32x4::new(25, 536870911, 25, 536870911);
17078 
17079         assert_eq!(r, mem::transmute(__msa_srli_w(mem::transmute(a), 2)));
17080     }
17081 
17082     #[simd_test(enable = "msa")]
test_msa_srli_d()17083     unsafe fn test_msa_srli_d() {
17084         #[rustfmt::skip]
17085         let a = i64x2::new(100, i64::MAX);
17086         #[rustfmt::skip]
17087         let r = i64x2::new(50, 4611686018427387903);
17088 
17089         assert_eq!(r, mem::transmute(__msa_srli_d(mem::transmute(a), 1)));
17090     }
17091 
17092     #[simd_test(enable = "msa")]
test_msa_srlr_b()17093     unsafe fn test_msa_srlr_b() {
17094         #[rustfmt::skip]
17095         let a = i8x16::new(
17096             -128, -64, -32, -16,
17097             -8, -4, -2, -1,
17098             1, 2, 4, 8,
17099             16, 32, 64, 127
17100         );
17101         #[rustfmt::skip]
17102         let b = i8x16::new(
17103             8, 7, 6, 5,
17104             4, 3, 2, 1,
17105             8, 7, 6, 5,
17106             4, 3, 2, 1
17107         );
17108         #[rustfmt::skip]
17109         let r = i8x16::new(
17110             -128, 2, 4, 8,
17111             16, 32, 64, -128,
17112             1, 0, 0, 0,
17113             1, 4, 16, 64
17114         );
17115 
17116         assert_eq!(
17117             r,
17118             mem::transmute(__msa_srlr_b(mem::transmute(a), mem::transmute(b)))
17119         );
17120     }
17121 
17122     #[simd_test(enable = "msa")]
test_msa_srlr_h()17123     unsafe fn test_msa_srlr_h() {
17124         #[rustfmt::skip]
17125         let a = i16x8::new(
17126             -32768, -16384, -8192, -4096,
17127             1, 2, 3, 4
17128         );
17129         #[rustfmt::skip]
17130         let b = i16x8::new(
17131             15, 14, 13, 12,
17132             4, 3, 2, 1
17133         );
17134         #[rustfmt::skip]
17135         let r = i16x8::new(1, 3, 7, 15, 0, 0, 1, 2);
17136 
17137         assert_eq!(
17138             r,
17139             mem::transmute(__msa_srlr_h(mem::transmute(a), mem::transmute(b)))
17140         );
17141     }
17142 
17143     #[simd_test(enable = "msa")]
test_msa_srlr_w()17144     unsafe fn test_msa_srlr_w() {
17145         #[rustfmt::skip]
17146         let a = i32x4::new(i32::MIN, -1073741824, 1, 2);
17147         #[rustfmt::skip]
17148         let b = i32x4::new(16, 15, 16, 15);
17149         let r = i32x4::new(32768, 98304, 0, 0);
17150 
17151         assert_eq!(
17152             r,
17153             mem::transmute(__msa_srlr_w(mem::transmute(a), mem::transmute(b)))
17154         );
17155     }
17156 
17157     #[simd_test(enable = "msa")]
test_msa_srlr_d()17158     unsafe fn test_msa_srlr_d() {
17159         #[rustfmt::skip]
17160         let a = i64x2::new(i64::MIN, i64::MAX);
17161         #[rustfmt::skip]
17162         let b = i64x2::new(32, 31);
17163         #[rustfmt::skip]
17164         let r = i64x2::new(2147483648, 4294967296);
17165 
17166         assert_eq!(
17167             r,
17168             mem::transmute(__msa_srlr_d(mem::transmute(a), mem::transmute(b)))
17169         );
17170     }
17171 
17172     #[simd_test(enable = "msa")]
test_msa_srlri_b()17173     unsafe fn test_msa_srlri_b() {
17174         #[rustfmt::skip]
17175         let a = i8x16::new(
17176             25, 50, 100, i8::MAX,
17177             25, 50, 100, i8::MAX,
17178             25, 50, 100, i8::MAX,
17179             25, 50, 100, i8::MAX
17180         );
17181         #[rustfmt::skip]
17182         let r = i8x16::new(
17183             6, 13, 25, 32,
17184             6, 13, 25, 32,
17185             6, 13, 25, 32,
17186             6, 13, 25, 32
17187         );
17188 
17189         assert_eq!(r, mem::transmute(__msa_srlri_b(mem::transmute(a), 2)));
17190     }
17191 
17192     #[simd_test(enable = "msa")]
test_msa_srlri_h()17193     unsafe fn test_msa_srlri_h() {
17194         #[rustfmt::skip]
17195         let a = i16x8::new(
17196             i16::MAX, 3276, 100, 127,
17197             i16::MAX, 3276, 100, 127
17198         );
17199         let r = i16x8::new(8192, 819, 25, 32, 8192, 819, 25, 32);
17200 
17201         assert_eq!(r, mem::transmute(__msa_srlri_h(mem::transmute(a), 2)));
17202     }
17203 
17204     #[simd_test(enable = "msa")]
test_msa_srlri_w()17205     unsafe fn test_msa_srlri_w() {
17206         #[rustfmt::skip]
17207         let a = i32x4::new(100, 150, 200, i32::MAX);
17208         #[rustfmt::skip]
17209         let r = i32x4::new(25, 38, 50, 536870912);
17210 
17211         assert_eq!(r, mem::transmute(__msa_srlri_w(mem::transmute(a), 2)));
17212     }
17213 
17214     #[simd_test(enable = "msa")]
test_msa_srlri_d()17215     unsafe fn test_msa_srlri_d() {
17216         #[rustfmt::skip]
17217         let a = i64x2::new(100, i64::MAX);
17218         #[rustfmt::skip]
17219         let r = i64x2::new(50, 4611686018427387904);
17220 
17221         assert_eq!(r, mem::transmute(__msa_srlri_d(mem::transmute(a), 1)));
17222     }
17223 
17224     #[simd_test(enable = "msa")]
test_msa_st_b()17225     unsafe fn test_msa_st_b() {
17226         #[rustfmt::skip]
17227         let a = i8x16::new(
17228             13, 14, 15, 16,
17229             17, 18, 19, 20,
17230             21, 22, 23, 24,
17231             25, 26, 27, 28
17232         );
17233         #[rustfmt::skip]
17234         let mut arr : [i8; 16] = [
17235             0, 0, 0, 0,
17236             0, 0, 0, 0,
17237             0, 0, 0, 0,
17238             0, 0, 0, 0
17239         ];
17240         #[rustfmt::skip]
17241         let r : [i8; 16] = [
17242             13, 14, 15, 16,
17243             17, 18, 19, 20,
17244             21, 22, 23, 24,
17245             25, 26, 27, 28
17246         ];
17247         __msa_st_b(mem::transmute(a), arr.as_mut_ptr() as *mut u8, 0);
17248         assert_eq!(arr, r);
17249     }
17250 
17251     #[simd_test(enable = "msa")]
test_msa_st_h()17252     unsafe fn test_msa_st_h() {
17253         #[rustfmt::skip]
17254         let a = i16x8::new(13, 14, 15, 16, 17, 18, 19, 20);
17255         let mut arr: [i16; 8] = [0, 0, 0, 0, 0, 0, 0, 0];
17256         #[rustfmt::skip]
17257         let r  : [i16; 8] = [13, 14, 15, 16, 17, 18, 19, 20];
17258         __msa_st_h(mem::transmute(a), arr.as_mut_ptr() as *mut u8, 0);
17259         assert_eq!(arr, r);
17260     }
17261 
17262     #[simd_test(enable = "msa")]
test_msa_st_w()17263     unsafe fn test_msa_st_w() {
17264         #[rustfmt::skip]
17265         let a = i32x4::new(13, 14, 15, 16);
17266         let mut arr: [i32; 4] = [0, 0, 0, 0];
17267         #[rustfmt::skip]
17268         let r  : [i32; 4] = [13, 14, 15, 16];
17269         __msa_st_w(mem::transmute(a), arr.as_mut_ptr() as *mut u8, 0);
17270         assert_eq!(arr, r);
17271     }
17272 
17273     #[simd_test(enable = "msa")]
test_msa_st_d()17274     unsafe fn test_msa_st_d() {
17275         #[rustfmt::skip]
17276         let a = i64x2::new(13, 14);
17277         let mut arr: [i64; 2] = [0, 0];
17278         #[rustfmt::skip]
17279         let r : [i64; 2] = [13, 14];
17280         __msa_st_d(mem::transmute(a), arr.as_mut_ptr() as *mut u8, 0);
17281         assert_eq!(arr, r);
17282     }
17283 
17284     #[simd_test(enable = "msa")]
test_msa_subs_s_b()17285     unsafe fn test_msa_subs_s_b() {
17286         #[rustfmt::skip]
17287         let a = i8x16::new(
17288             i8::MIN, -2, -3, -4,
17289             i8::MIN, -2, -3, -4,
17290             i8::MIN, -2, -3, -4,
17291             i8::MIN, -2, -3, -4
17292         );
17293         #[rustfmt::skip]
17294         let b = i8x16::new(
17295             6, -7, 8, -9,
17296             6, -7, 8, -9,
17297             6, -7, 8, -9,
17298             6, -7, 8, -9
17299         );
17300         #[rustfmt::skip]
17301         let r = i8x16::new(
17302             i8::MIN, 5, -11, 5,
17303             i8::MIN, 5, -11, 5,
17304             i8::MIN, 5, -11, 5,
17305             i8::MIN, 5, -11, 5
17306         );
17307 
17308         assert_eq!(
17309             r,
17310             mem::transmute(__msa_subs_s_b(mem::transmute(a), mem::transmute(b)))
17311         );
17312     }
17313 
17314     #[simd_test(enable = "msa")]
test_msa_subs_s_h()17315     unsafe fn test_msa_subs_s_h() {
17316         #[rustfmt::skip]
17317         let a = i16x8::new(
17318             i16::MIN, -2, -3, -4,
17319             i16::MIN, -2, -3, -4
17320         );
17321         #[rustfmt::skip]
17322         let b = i16x8::new(6, -7, 8, -9, 6, -7, 8, -9);
17323         #[rustfmt::skip]
17324         let r = i16x8::new(
17325             i16::MIN, 5, -11, 5,
17326             i16::MIN, 5, -11, 5
17327         );
17328 
17329         assert_eq!(
17330             r,
17331             mem::transmute(__msa_subs_s_h(mem::transmute(a), mem::transmute(b)))
17332         );
17333     }
17334 
17335     #[simd_test(enable = "msa")]
test_msa_subs_s_w()17336     unsafe fn test_msa_subs_s_w() {
17337         #[rustfmt::skip]
17338         let a = i32x4::new(i32::MIN, -2, -3, -4);
17339         #[rustfmt::skip]
17340         let b = i32x4::new(6, -7, 8, -9);
17341         #[rustfmt::skip]
17342         let r = i32x4::new(i32::MIN, 5, -11, 5);
17343 
17344         assert_eq!(
17345             r,
17346             mem::transmute(__msa_subs_s_w(mem::transmute(a), mem::transmute(b)))
17347         );
17348     }
17349 
17350     #[simd_test(enable = "msa")]
test_msa_subs_s_d()17351     unsafe fn test_msa_subs_s_d() {
17352         #[rustfmt::skip]
17353         let a = i64x2::new(i64::MIN, -2);
17354         #[rustfmt::skip]
17355         let b = i64x2::new(6, -7);
17356         #[rustfmt::skip]
17357         let r = i64x2::new(i64::MIN, 5);
17358 
17359         assert_eq!(
17360             r,
17361             mem::transmute(__msa_subs_s_d(mem::transmute(a), mem::transmute(b)))
17362         );
17363     }
17364 
17365     #[simd_test(enable = "msa")]
test_msa_subs_u_b()17366     unsafe fn test_msa_subs_u_b() {
17367         #[rustfmt::skip]
17368         let a = u8x16::new(
17369             u8::MAX, 2, 3, 4,
17370             u8::MAX, 2, 3, 4,
17371             u8::MAX, 2, 3, 4,
17372             u8::MAX, 2, 3, 4
17373         );
17374         #[rustfmt::skip]
17375         let b = u8x16::new(
17376             6, 7, 8, 9,
17377             6, 7, 8, 9,
17378             6, 7, 8, 9,
17379             6, 7, 8, 9
17380         );
17381         #[rustfmt::skip]
17382         let r = u8x16::new(
17383             249, 0, 0, 0,
17384             249, 0, 0, 0,
17385             249, 0, 0, 0,
17386             249, 0, 0, 0
17387         );
17388 
17389         assert_eq!(
17390             r,
17391             mem::transmute(__msa_subs_u_b(mem::transmute(a), mem::transmute(b)))
17392         );
17393     }
17394 
17395     #[simd_test(enable = "msa")]
test_msa_subs_u_h()17396     unsafe fn test_msa_subs_u_h() {
17397         #[rustfmt::skip]
17398         let a = u16x8::new(
17399             u16::MAX, 2, 3, 4,
17400             u16::MAX, 2, 3, 4
17401         );
17402         #[rustfmt::skip]
17403         let b = u16x8::new(6, 7, 8, 9, 6, 7, 8, 9);
17404         #[rustfmt::skip]
17405         let r = u16x8::new(65529, 0, 0, 0, 65529, 0, 0, 0);
17406 
17407         assert_eq!(
17408             r,
17409             mem::transmute(__msa_subs_u_h(mem::transmute(a), mem::transmute(b)))
17410         );
17411     }
17412 
17413     #[simd_test(enable = "msa")]
test_msa_subs_u_w()17414     unsafe fn test_msa_subs_u_w() {
17415         #[rustfmt::skip]
17416         let a = u32x4::new(u32::MAX, 2, 3, 4);
17417         #[rustfmt::skip]
17418         let b = u32x4::new(6, 7, 8, 9);
17419         #[rustfmt::skip]
17420         let r = u32x4::new(4294967289, 0, 0, 0);
17421 
17422         assert_eq!(
17423             r,
17424             mem::transmute(__msa_subs_u_w(mem::transmute(a), mem::transmute(b)))
17425         );
17426     }
17427 
17428     #[simd_test(enable = "msa")]
test_msa_subs_u_d()17429     unsafe fn test_msa_subs_u_d() {
17430         #[rustfmt::skip]
17431         let a = u64x2::new(u64::MAX, 2);
17432         #[rustfmt::skip]
17433         let b = u64x2::new(6, 7);
17434         #[rustfmt::skip]
17435         let r = u64x2::new(18446744073709551609, 0);
17436 
17437         assert_eq!(
17438             r,
17439             mem::transmute(__msa_subs_u_d(mem::transmute(a), mem::transmute(b)))
17440         );
17441     }
17442 
17443     #[simd_test(enable = "msa")]
test_msa_subsus_u_b()17444     unsafe fn test_msa_subsus_u_b() {
17445         #[rustfmt::skip]
17446         let a = u8x16::new(
17447             u8::MAX, 2, 3, 4,
17448             u8::MAX, 2, 3, 4,
17449             u8::MAX, 2, 3, 4,
17450             u8::MAX, 2, 3, 4
17451         );
17452         #[rustfmt::skip]
17453         let b = i8x16::new(
17454             -6, -7, -8, -9,
17455             -6, -7, -8, -9,
17456             -6, -7, -8, -9,
17457             -6, -7, -8, -9
17458         );
17459         #[rustfmt::skip]
17460         let r = u8x16::new(
17461             255, 9, 11, 13,
17462             255, 9, 11, 13,
17463             255, 9, 11, 13,
17464             255, 9, 11, 13
17465         );
17466 
17467         assert_eq!(
17468             r,
17469             mem::transmute(__msa_subsus_u_b(mem::transmute(a), mem::transmute(b)))
17470         );
17471     }
17472 
17473     #[simd_test(enable = "msa")]
test_msa_subsus_u_h()17474     unsafe fn test_msa_subsus_u_h() {
17475         #[rustfmt::skip]
17476         let a = u16x8::new(
17477             u16::MAX, 2, 3, 4,
17478             u16::MAX, 2, 3, 4
17479         );
17480         #[rustfmt::skip]
17481         let b = i16x8::new(-6, -7, -8, -9, -6, -7, -8, -9);
17482         #[rustfmt::skip]
17483         let r = u16x8::new(65535, 9, 11, 13, 65535, 9, 11, 13);
17484 
17485         assert_eq!(
17486             r,
17487             mem::transmute(__msa_subsus_u_h(mem::transmute(a), mem::transmute(b)))
17488         );
17489     }
17490 
17491     #[simd_test(enable = "msa")]
test_msa_subsus_u_w()17492     unsafe fn test_msa_subsus_u_w() {
17493         #[rustfmt::skip]
17494         let a = u32x4::new(u32::MAX, 2, 3, 4);
17495         #[rustfmt::skip]
17496         let b = i32x4::new(-6, -7, -8, -9);
17497         #[rustfmt::skip]
17498         let r = u32x4::new(4294967295, 9, 11, 13);
17499 
17500         assert_eq!(
17501             r,
17502             mem::transmute(__msa_subsus_u_w(mem::transmute(a), mem::transmute(b)))
17503         );
17504     }
17505 
17506     #[simd_test(enable = "msa")]
test_msa_subsus_u_d()17507     unsafe fn test_msa_subsus_u_d() {
17508         #[rustfmt::skip]
17509         let a = u64x2::new(u64::MAX, 2);
17510         #[rustfmt::skip]
17511         let b = i64x2::new(-6, -7);
17512         #[rustfmt::skip]
17513         let r = u64x2::new(18446744073709551615, 9);
17514 
17515         assert_eq!(
17516             r,
17517             mem::transmute(__msa_subsus_u_d(mem::transmute(a), mem::transmute(b)))
17518         );
17519     }
17520 
17521     #[simd_test(enable = "msa")]
test_msa_subsuu_s_b()17522     unsafe fn test_msa_subsuu_s_b() {
17523         #[rustfmt::skip]
17524         let a = u8x16::new(
17525             u8::MAX, 2, 3, 4,
17526             u8::MAX, 2, 3, 4,
17527             u8::MAX, 2, 3, 4,
17528             u8::MAX, 2, 3, 4
17529         );
17530         #[rustfmt::skip]
17531         let b = u8x16::new(
17532             6, 7, 8, u8::MAX,
17533             6, 7, 8, u8::MAX,
17534             6, 7, 8, u8::MAX,
17535             6, 7, 8, u8::MAX
17536         );
17537         #[rustfmt::skip]
17538         let r = i8x16::new(
17539             127, -5, -5, -128,
17540             127, -5, -5, -128,
17541             127, -5, -5, -128,
17542             127, -5, -5, -128
17543         );
17544 
17545         assert_eq!(
17546             r,
17547             mem::transmute(__msa_subsuu_s_b(mem::transmute(a), mem::transmute(b)))
17548         );
17549     }
17550 
17551     #[simd_test(enable = "msa")]
test_msa_subsuu_s_h()17552     unsafe fn test_msa_subsuu_s_h() {
17553         #[rustfmt::skip]
17554         let a = u16x8::new(
17555             u16::MAX, 2, 3,
17556             4, u16::MAX, 2, 3, 4
17557         );
17558         #[rustfmt::skip]
17559         let b = u16x8::new(6, 7, 8, 65535, 6, 7, 8, 65535);
17560         #[rustfmt::skip]
17561         let r = i16x8::new(32767, -5, -5, -32768, 32767, -5, -5, -32768);
17562 
17563         assert_eq!(
17564             r,
17565             mem::transmute(__msa_subsuu_s_h(mem::transmute(a), mem::transmute(b)))
17566         );
17567     }
17568 
17569     #[simd_test(enable = "msa")]
test_msa_subsuu_s_w()17570     unsafe fn test_msa_subsuu_s_w() {
17571         #[rustfmt::skip]
17572         let a = u32x4::new(u32::MAX, 2, 3, 4);
17573         #[rustfmt::skip]
17574         let b = u32x4::new(6, 7, 8, 4294967295);
17575         #[rustfmt::skip]
17576         let r = i32x4::new(2147483647, -5, -5, -2147483648);
17577 
17578         assert_eq!(
17579             r,
17580             mem::transmute(__msa_subsuu_s_w(mem::transmute(a), mem::transmute(b)))
17581         );
17582     }
17583 
17584     #[simd_test(enable = "msa")]
test_msa_subsuu_s_d()17585     unsafe fn test_msa_subsuu_s_d() {
17586         #[rustfmt::skip]
17587         let a = u64x2::new(u64::MAX, 2);
17588         #[rustfmt::skip]
17589         let b = u64x2::new(6, 7);
17590         #[rustfmt::skip]
17591         let r = i64x2::new(i64::MAX, -5);
17592 
17593         assert_eq!(
17594             r,
17595             mem::transmute(__msa_subsuu_s_d(mem::transmute(a), mem::transmute(b)))
17596         );
17597     }
17598 
17599     #[simd_test(enable = "msa")]
test_msa_subv_b()17600     unsafe fn test_msa_subv_b() {
17601         #[rustfmt::skip]
17602         let a = i8x16::new(
17603             i8::MIN, -2, -3, -4,
17604             i8::MIN, -2, -3, -4,
17605             i8::MIN, -2, -3, -4,
17606             i8::MIN, -2, -3, -4
17607         );
17608         #[rustfmt::skip]
17609         let b = i8x16::new(
17610             6, -7, 8, -9,
17611             6, -7, 8, -9,
17612             6, -7, 8, -9,
17613             6, -7, 8, -9
17614         );
17615         #[rustfmt::skip]
17616         let r = i8x16::new(
17617             122, 5, -11, 5,
17618             122, 5, -11, 5,
17619             122, 5, -11, 5,
17620             122, 5, -11, 5
17621         );
17622 
17623         assert_eq!(
17624             r,
17625             mem::transmute(__msa_subv_b(mem::transmute(a), mem::transmute(b)))
17626         );
17627     }
17628 
17629     #[simd_test(enable = "msa")]
test_msa_subv_h()17630     unsafe fn test_msa_subv_h() {
17631         #[rustfmt::skip]
17632         let a = i16x8::new(
17633             i16::MIN, -2, -3, -4,
17634             i16::MIN, -2, -3, -4
17635         );
17636         #[rustfmt::skip]
17637         let b = i16x8::new(6, -7, 8, -9, 6, -7, 8, -9);
17638         #[rustfmt::skip]
17639         let r = i16x8::new(32762, 5, -11, 5, 32762, 5, -11, 5);
17640 
17641         assert_eq!(
17642             r,
17643             mem::transmute(__msa_subv_h(mem::transmute(a), mem::transmute(b)))
17644         );
17645     }
17646 
17647     #[simd_test(enable = "msa")]
test_msa_subv_w()17648     unsafe fn test_msa_subv_w() {
17649         #[rustfmt::skip]
17650         let a = i32x4::new(i32::MIN, -2, -3, -4);
17651         #[rustfmt::skip]
17652         let b = i32x4::new(6, -7, 8, -9);
17653         #[rustfmt::skip]
17654         let r = i32x4::new(2147483642, 5, -11, 5);
17655 
17656         assert_eq!(
17657             r,
17658             mem::transmute(__msa_subv_w(mem::transmute(a), mem::transmute(b)))
17659         );
17660     }
17661 
17662     #[simd_test(enable = "msa")]
test_msa_subv_d()17663     unsafe fn test_msa_subv_d() {
17664         #[rustfmt::skip]
17665         let a = i64x2::new(i64::MAX, -2);
17666         #[rustfmt::skip]
17667         let b = i64x2::new(6, -7);
17668         #[rustfmt::skip]
17669         let r = i64x2::new(9223372036854775801, 5);
17670 
17671         assert_eq!(
17672             r,
17673             mem::transmute(__msa_subv_d(mem::transmute(a), mem::transmute(b)))
17674         );
17675     }
17676 
17677     #[simd_test(enable = "msa")]
test_msa_subvi_b()17678     unsafe fn test_msa_subvi_b() {
17679         #[rustfmt::skip]
17680         let a = i8x16::new(
17681             100, i8::MAX, 50, i8::MIN,
17682             100, i8::MAX, 50, i8::MIN,
17683             100, i8::MAX, 50, i8::MIN,
17684             100, i8::MAX, 50, i8::MIN
17685         );
17686         #[rustfmt::skip]
17687         let r = i8x16::new(
17688             95, 122, 45, 123,
17689             95, 122, 45, 123,
17690             95, 122, 45, 123,
17691             95, 122, 45, 123
17692         );
17693 
17694         assert_eq!(r, mem::transmute(__msa_subvi_b(mem::transmute(a), 5)));
17695     }
17696 
17697     #[simd_test(enable = "msa")]
test_msa_subvi_h()17698     unsafe fn test_msa_subvi_h() {
17699         #[rustfmt::skip]
17700         let a = i16x8::new(
17701             i16::MAX, 3276, -100, i16::MIN,
17702             i16::MAX, 3276, -100, i16::MIN
17703         );
17704         #[rustfmt::skip]
17705         let r = i16x8::new(
17706             32762, 3271, -105, 32763,
17707             32762, 3271, -105, 32763
17708         );
17709 
17710         assert_eq!(r, mem::transmute(__msa_subvi_h(mem::transmute(a), 5)));
17711     }
17712 
17713     #[simd_test(enable = "msa")]
test_msa_subvi_w()17714     unsafe fn test_msa_subvi_w() {
17715         #[rustfmt::skip]
17716         let a = i32x4::new(100, 150, 200, i32::MAX);
17717         #[rustfmt::skip]
17718         let r = i32x4::new(95, 145, 195, 2147483642);
17719 
17720         assert_eq!(r, mem::transmute(__msa_subvi_w(mem::transmute(a), 5)));
17721     }
17722 
17723     #[simd_test(enable = "msa")]
test_msa_subvi_d()17724     unsafe fn test_msa_subvi_d() {
17725         #[rustfmt::skip]
17726         let a = i64x2::new(100, i64::MAX);
17727         #[rustfmt::skip]
17728         let r = i64x2::new(95, 9223372036854775802);
17729 
17730         assert_eq!(r, mem::transmute(__msa_subvi_d(mem::transmute(a), 5)));
17731     }
17732 
17733     #[simd_test(enable = "msa")]
test_msa_vshf_b()17734     unsafe fn test_msa_vshf_b() {
17735         #[rustfmt::skip]
17736         let a = i8x16::new(
17737             1, 2, 3, 4,
17738             1, 2, 3, 4,
17739             1, 2, 3, 4,
17740             1, 2, 3, 4
17741         );
17742         #[rustfmt::skip]
17743         let b = i8x16::new(
17744             4, 3, 2, 1,
17745             4, 3, 2, 1,
17746             4, 3, 2, 1,
17747             4, 3, 2, 1
17748         );
17749         #[rustfmt::skip]
17750         let c = i8x16::new(
17751             4, 3, 2, 1,
17752             4, 3, 2, 1,
17753             4, 3, 2, 1,
17754             4, 3, 2, 1
17755         );
17756         #[rustfmt::skip]
17757         let r = i8x16::new(
17758             3, 2, 1, 4,
17759             3, 2, 1, 4,
17760             3, 2, 1, 4,
17761             3, 2, 1, 4
17762         );
17763 
17764         assert_eq!(
17765             r,
17766             mem::transmute(__msa_vshf_b(
17767                 mem::transmute(a),
17768                 mem::transmute(b),
17769                 mem::transmute(c)
17770             ))
17771         );
17772     }
17773 
17774     #[simd_test(enable = "msa")]
test_msa_vshf_h()17775     unsafe fn test_msa_vshf_h() {
17776         #[rustfmt::skip]
17777         let a = i16x8::new(
17778             1, 2, 3, 4,
17779             1, 2, 3, 4
17780         );
17781         #[rustfmt::skip]
17782         let b = i16x8::new(
17783             4, 3, 2, 1,
17784             4, 3, 2, 1
17785         );
17786         #[rustfmt::skip]
17787         let c = i16x8::new(
17788             4, 3, 2, 1,
17789             4, 3, 2, 1
17790         );
17791         let r = i16x8::new(3, 2, 1, 4, 3, 2, 1, 4);
17792 
17793         assert_eq!(
17794             r,
17795             mem::transmute(__msa_vshf_h(
17796                 mem::transmute(a),
17797                 mem::transmute(b),
17798                 mem::transmute(c)
17799             ))
17800         );
17801     }
17802 
17803     #[simd_test(enable = "msa")]
test_msa_vshf_w()17804     unsafe fn test_msa_vshf_w() {
17805         #[rustfmt::skip]
17806         let a = i32x4::new(1, 2, 3, 4);
17807         #[rustfmt::skip]
17808         let b = i32x4::new(4, 3, 2, 1);
17809         #[rustfmt::skip]
17810         let c = i32x4::new(4, 3, 2, 1);
17811         #[rustfmt::skip]
17812         let r = i32x4::new(3, 2, 1, 4);
17813 
17814         assert_eq!(
17815             r,
17816             mem::transmute(__msa_vshf_w(
17817                 mem::transmute(a),
17818                 mem::transmute(b),
17819                 mem::transmute(c)
17820             ))
17821         );
17822     }
17823 
17824     #[simd_test(enable = "msa")]
test_msa_vshf_d()17825     unsafe fn test_msa_vshf_d() {
17826         #[rustfmt::skip]
17827         let a = i64x2::new(1, 2);
17828         #[rustfmt::skip]
17829         let b = i64x2::new(4, 3);
17830         #[rustfmt::skip]
17831         let c = i64x2::new(4, 3);
17832         #[rustfmt::skip]
17833         let r = i64x2::new(3, 4);
17834 
17835         assert_eq!(
17836             r,
17837             mem::transmute(__msa_vshf_d(
17838                 mem::transmute(a),
17839                 mem::transmute(b),
17840                 mem::transmute(c)
17841             ))
17842         );
17843     }
17844 
17845     #[simd_test(enable = "msa")]
test_msa_xor_v()17846     unsafe fn test_msa_xor_v() {
17847         #[rustfmt::skip]
17848         let a = u8x16::new(
17849             1, 2, 3, 4,
17850             5, 6, 7, 8,
17851             9, 10, 11, 12,
17852             13, 14, 15, 16
17853         );
17854         #[rustfmt::skip]
17855         let b = u8x16::new(
17856             16, 15, 14, 13,
17857             12, 11, 10, 9,
17858             8, 7, 6, 5,
17859             4, 3, 2, 1
17860         );
17861         #[rustfmt::skip]
17862         let r = u8x16::new(
17863             17, 13, 13, 9,
17864             9, 13, 13, 1,
17865             1, 13, 13, 9,
17866             9, 13, 13, 17
17867         );
17868 
17869         assert_eq!(
17870             r,
17871             mem::transmute(__msa_xor_v(mem::transmute(a), mem::transmute(b)))
17872         );
17873     }
17874 
17875     #[simd_test(enable = "msa")]
test_msa_xori_b()17876     unsafe fn test_msa_xori_b() {
17877         #[rustfmt::skip]
17878         let a = u8x16::new(
17879             1, 2, 3, 4,
17880             5, 6, 7, 8,
17881             9, 10, 11, 12,
17882             13, 14, 15, 16
17883         );
17884         #[rustfmt::skip]
17885         let r = u8x16::new(
17886             5, 6, 7, 0,
17887             1, 2, 3, 12,
17888             13, 14, 15, 8,
17889             9, 10, 11, 20
17890         );
17891 
17892         assert_eq!(r, mem::transmute(__msa_xori_b(mem::transmute(a), 4)));
17893     }
17894 }
17895