1*344a7f5eSAndroid Build Coastguard Worker /*===---- mmintrin.h - MMX intrinsics --------------------------------------===
2*344a7f5eSAndroid Build Coastguard Worker *
3*344a7f5eSAndroid Build Coastguard Worker * Permission is hereby granted, free of charge, to any person obtaining a copy
4*344a7f5eSAndroid Build Coastguard Worker * of this software and associated documentation files (the "Software"), to deal
5*344a7f5eSAndroid Build Coastguard Worker * in the Software without restriction, including without limitation the rights
6*344a7f5eSAndroid Build Coastguard Worker * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7*344a7f5eSAndroid Build Coastguard Worker * copies of the Software, and to permit persons to whom the Software is
8*344a7f5eSAndroid Build Coastguard Worker * furnished to do so, subject to the following conditions:
9*344a7f5eSAndroid Build Coastguard Worker *
10*344a7f5eSAndroid Build Coastguard Worker * The above copyright notice and this permission notice shall be included in
11*344a7f5eSAndroid Build Coastguard Worker * all copies or substantial portions of the Software.
12*344a7f5eSAndroid Build Coastguard Worker *
13*344a7f5eSAndroid Build Coastguard Worker * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14*344a7f5eSAndroid Build Coastguard Worker * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15*344a7f5eSAndroid Build Coastguard Worker * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16*344a7f5eSAndroid Build Coastguard Worker * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17*344a7f5eSAndroid Build Coastguard Worker * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18*344a7f5eSAndroid Build Coastguard Worker * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19*344a7f5eSAndroid Build Coastguard Worker * THE SOFTWARE.
20*344a7f5eSAndroid Build Coastguard Worker *
21*344a7f5eSAndroid Build Coastguard Worker *===-----------------------------------------------------------------------===
22*344a7f5eSAndroid Build Coastguard Worker */
23*344a7f5eSAndroid Build Coastguard Worker
24*344a7f5eSAndroid Build Coastguard Worker #ifndef __MMINTRIN_H
25*344a7f5eSAndroid Build Coastguard Worker #define __MMINTRIN_H
26*344a7f5eSAndroid Build Coastguard Worker
27*344a7f5eSAndroid Build Coastguard Worker typedef long long __m64 __attribute__((__vector_size__(8)));
28*344a7f5eSAndroid Build Coastguard Worker
29*344a7f5eSAndroid Build Coastguard Worker typedef long long __v1di __attribute__((__vector_size__(8)));
30*344a7f5eSAndroid Build Coastguard Worker typedef int __v2si __attribute__((__vector_size__(8)));
31*344a7f5eSAndroid Build Coastguard Worker typedef short __v4hi __attribute__((__vector_size__(8)));
32*344a7f5eSAndroid Build Coastguard Worker typedef char __v8qi __attribute__((__vector_size__(8)));
33*344a7f5eSAndroid Build Coastguard Worker
34*344a7f5eSAndroid Build Coastguard Worker /* Define the default attributes for the functions in this file. */
35*344a7f5eSAndroid Build Coastguard Worker #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("mmx")))
36*344a7f5eSAndroid Build Coastguard Worker
37*344a7f5eSAndroid Build Coastguard Worker /// \brief Clears the MMX state by setting the state of the x87 stack registers
38*344a7f5eSAndroid Build Coastguard Worker /// to empty.
39*344a7f5eSAndroid Build Coastguard Worker ///
40*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
41*344a7f5eSAndroid Build Coastguard Worker ///
42*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c EMMS instruction.
43*344a7f5eSAndroid Build Coastguard Worker ///
44*344a7f5eSAndroid Build Coastguard Worker static __inline__ void __DEFAULT_FN_ATTRS
_mm_empty(void)45*344a7f5eSAndroid Build Coastguard Worker _mm_empty(void)
46*344a7f5eSAndroid Build Coastguard Worker {
47*344a7f5eSAndroid Build Coastguard Worker __builtin_ia32_emms();
48*344a7f5eSAndroid Build Coastguard Worker }
49*344a7f5eSAndroid Build Coastguard Worker
50*344a7f5eSAndroid Build Coastguard Worker /// \brief Constructs a 64-bit integer vector, setting the lower 32 bits to the
51*344a7f5eSAndroid Build Coastguard Worker /// value of the 32-bit integer parameter and setting the upper 32 bits to 0.
52*344a7f5eSAndroid Build Coastguard Worker ///
53*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
54*344a7f5eSAndroid Build Coastguard Worker ///
55*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VMOVD / MOVD instruction.
56*344a7f5eSAndroid Build Coastguard Worker ///
57*344a7f5eSAndroid Build Coastguard Worker /// \param __i
58*344a7f5eSAndroid Build Coastguard Worker /// A 32-bit integer value.
59*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector. The lower 32 bits contain the value of the
60*344a7f5eSAndroid Build Coastguard Worker /// parameter. The upper 32 bits are set to 0.
61*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_cvtsi32_si64(int __i)62*344a7f5eSAndroid Build Coastguard Worker _mm_cvtsi32_si64(int __i)
63*344a7f5eSAndroid Build Coastguard Worker {
64*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
65*344a7f5eSAndroid Build Coastguard Worker }
66*344a7f5eSAndroid Build Coastguard Worker
67*344a7f5eSAndroid Build Coastguard Worker /// \brief Returns the lower 32 bits of a 64-bit integer vector as a 32-bit
68*344a7f5eSAndroid Build Coastguard Worker /// signed integer.
69*344a7f5eSAndroid Build Coastguard Worker ///
70*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
71*344a7f5eSAndroid Build Coastguard Worker ///
72*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VMOVD / MOVD instruction.
73*344a7f5eSAndroid Build Coastguard Worker ///
74*344a7f5eSAndroid Build Coastguard Worker /// \param __m
75*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector.
76*344a7f5eSAndroid Build Coastguard Worker /// \returns A 32-bit signed integer value containing the lower 32 bits of the
77*344a7f5eSAndroid Build Coastguard Worker /// parameter.
78*344a7f5eSAndroid Build Coastguard Worker static __inline__ int __DEFAULT_FN_ATTRS
_mm_cvtsi64_si32(__m64 __m)79*344a7f5eSAndroid Build Coastguard Worker _mm_cvtsi64_si32(__m64 __m)
80*344a7f5eSAndroid Build Coastguard Worker {
81*344a7f5eSAndroid Build Coastguard Worker return __builtin_ia32_vec_ext_v2si((__v2si)__m, 0);
82*344a7f5eSAndroid Build Coastguard Worker }
83*344a7f5eSAndroid Build Coastguard Worker
84*344a7f5eSAndroid Build Coastguard Worker /// \brief Casts a 64-bit signed integer value into a 64-bit integer vector.
85*344a7f5eSAndroid Build Coastguard Worker ///
86*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
87*344a7f5eSAndroid Build Coastguard Worker ///
88*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VMOVQ / MOVD instruction.
89*344a7f5eSAndroid Build Coastguard Worker ///
90*344a7f5eSAndroid Build Coastguard Worker /// \param __i
91*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit signed integer.
92*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector containing the same bitwise pattern as the
93*344a7f5eSAndroid Build Coastguard Worker /// parameter.
94*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_cvtsi64_m64(long long __i)95*344a7f5eSAndroid Build Coastguard Worker _mm_cvtsi64_m64(long long __i)
96*344a7f5eSAndroid Build Coastguard Worker {
97*344a7f5eSAndroid Build Coastguard Worker return (__m64)__i;
98*344a7f5eSAndroid Build Coastguard Worker }
99*344a7f5eSAndroid Build Coastguard Worker
100*344a7f5eSAndroid Build Coastguard Worker /// \brief Casts a 64-bit integer vector into a 64-bit signed integer value.
101*344a7f5eSAndroid Build Coastguard Worker ///
102*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
103*344a7f5eSAndroid Build Coastguard Worker ///
104*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VMOVQ / MOVD instruction.
105*344a7f5eSAndroid Build Coastguard Worker ///
106*344a7f5eSAndroid Build Coastguard Worker /// \param __m
107*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector.
108*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit signed integer containing the same bitwise pattern as the
109*344a7f5eSAndroid Build Coastguard Worker /// parameter.
110*344a7f5eSAndroid Build Coastguard Worker static __inline__ long long __DEFAULT_FN_ATTRS
_mm_cvtm64_si64(__m64 __m)111*344a7f5eSAndroid Build Coastguard Worker _mm_cvtm64_si64(__m64 __m)
112*344a7f5eSAndroid Build Coastguard Worker {
113*344a7f5eSAndroid Build Coastguard Worker return (long long)__m;
114*344a7f5eSAndroid Build Coastguard Worker }
115*344a7f5eSAndroid Build Coastguard Worker
116*344a7f5eSAndroid Build Coastguard Worker /// \brief Converts 16-bit signed integers from both 64-bit integer vector
117*344a7f5eSAndroid Build Coastguard Worker /// parameters of [4 x i16] into 8-bit signed integer values, and constructs
118*344a7f5eSAndroid Build Coastguard Worker /// a 64-bit integer vector of [8 x i8] as the result. Positive values
119*344a7f5eSAndroid Build Coastguard Worker /// greater than 0x7F are saturated to 0x7F. Negative values less than 0x80
120*344a7f5eSAndroid Build Coastguard Worker /// are saturated to 0x80.
121*344a7f5eSAndroid Build Coastguard Worker ///
122*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
123*344a7f5eSAndroid Build Coastguard Worker ///
124*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PACKSSWB instruction.
125*344a7f5eSAndroid Build Coastguard Worker ///
126*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
127*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16]. Each 16-bit element is treated as a
128*344a7f5eSAndroid Build Coastguard Worker /// 16-bit signed integer and is converted to an 8-bit signed integer with
129*344a7f5eSAndroid Build Coastguard Worker /// saturation. Positive values greater than 0x7F are saturated to 0x7F.
130*344a7f5eSAndroid Build Coastguard Worker /// Negative values less than 0x80 are saturated to 0x80. The converted
131*344a7f5eSAndroid Build Coastguard Worker /// [4 x i8] values are written to the lower 32 bits of the result.
132*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
133*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16]. Each 16-bit element is treated as a
134*344a7f5eSAndroid Build Coastguard Worker /// 16-bit signed integer and is converted to an 8-bit signed integer with
135*344a7f5eSAndroid Build Coastguard Worker /// saturation. Positive values greater than 0x7F are saturated to 0x7F.
136*344a7f5eSAndroid Build Coastguard Worker /// Negative values less than 0x80 are saturated to 0x80. The converted
137*344a7f5eSAndroid Build Coastguard Worker /// [4 x i8] values are written to the upper 32 bits of the result.
138*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [8 x i8] containing the converted
139*344a7f5eSAndroid Build Coastguard Worker /// values.
140*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_packs_pi16(__m64 __m1,__m64 __m2)141*344a7f5eSAndroid Build Coastguard Worker _mm_packs_pi16(__m64 __m1, __m64 __m2)
142*344a7f5eSAndroid Build Coastguard Worker {
143*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
144*344a7f5eSAndroid Build Coastguard Worker }
145*344a7f5eSAndroid Build Coastguard Worker
146*344a7f5eSAndroid Build Coastguard Worker /// \brief Converts 32-bit signed integers from both 64-bit integer vector
147*344a7f5eSAndroid Build Coastguard Worker /// parameters of [2 x i32] into 16-bit signed integer values, and constructs
148*344a7f5eSAndroid Build Coastguard Worker /// a 64-bit integer vector of [4 x i16] as the result. Positive values
149*344a7f5eSAndroid Build Coastguard Worker /// greater than 0x7FFF are saturated to 0x7FFF. Negative values less than
150*344a7f5eSAndroid Build Coastguard Worker /// 0x8000 are saturated to 0x8000.
151*344a7f5eSAndroid Build Coastguard Worker ///
152*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
153*344a7f5eSAndroid Build Coastguard Worker ///
154*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PACKSSDW instruction.
155*344a7f5eSAndroid Build Coastguard Worker ///
156*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
157*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [2 x i32]. Each 32-bit element is treated as a
158*344a7f5eSAndroid Build Coastguard Worker /// 32-bit signed integer and is converted to a 16-bit signed integer with
159*344a7f5eSAndroid Build Coastguard Worker /// saturation. Positive values greater than 0x7FFF are saturated to 0x7FFF.
160*344a7f5eSAndroid Build Coastguard Worker /// Negative values less than 0x8000 are saturated to 0x8000. The converted
161*344a7f5eSAndroid Build Coastguard Worker /// [2 x i16] values are written to the lower 32 bits of the result.
162*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
163*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [2 x i32]. Each 32-bit element is treated as a
164*344a7f5eSAndroid Build Coastguard Worker /// 32-bit signed integer and is converted to a 16-bit signed integer with
165*344a7f5eSAndroid Build Coastguard Worker /// saturation. Positive values greater than 0x7FFF are saturated to 0x7FFF.
166*344a7f5eSAndroid Build Coastguard Worker /// Negative values less than 0x8000 are saturated to 0x8000. The converted
167*344a7f5eSAndroid Build Coastguard Worker /// [2 x i16] values are written to the upper 32 bits of the result.
168*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [4 x i16] containing the converted
169*344a7f5eSAndroid Build Coastguard Worker /// values.
170*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_packs_pi32(__m64 __m1,__m64 __m2)171*344a7f5eSAndroid Build Coastguard Worker _mm_packs_pi32(__m64 __m1, __m64 __m2)
172*344a7f5eSAndroid Build Coastguard Worker {
173*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
174*344a7f5eSAndroid Build Coastguard Worker }
175*344a7f5eSAndroid Build Coastguard Worker
176*344a7f5eSAndroid Build Coastguard Worker /// \brief Converts 16-bit signed integers from both 64-bit integer vector
177*344a7f5eSAndroid Build Coastguard Worker /// parameters of [4 x i16] into 8-bit unsigned integer values, and
178*344a7f5eSAndroid Build Coastguard Worker /// constructs a 64-bit integer vector of [8 x i8] as the result. Values
179*344a7f5eSAndroid Build Coastguard Worker /// greater than 0xFF are saturated to 0xFF. Values less than 0 are saturated
180*344a7f5eSAndroid Build Coastguard Worker /// to 0.
181*344a7f5eSAndroid Build Coastguard Worker ///
182*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
183*344a7f5eSAndroid Build Coastguard Worker ///
184*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PACKUSWB instruction.
185*344a7f5eSAndroid Build Coastguard Worker ///
186*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
187*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16]. Each 16-bit element is treated as a
188*344a7f5eSAndroid Build Coastguard Worker /// 16-bit signed integer and is converted to an 8-bit unsigned integer with
189*344a7f5eSAndroid Build Coastguard Worker /// saturation. Values greater than 0xFF are saturated to 0xFF. Values less
190*344a7f5eSAndroid Build Coastguard Worker /// than 0 are saturated to 0. The converted [4 x i8] values are written to
191*344a7f5eSAndroid Build Coastguard Worker /// the lower 32 bits of the result.
192*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
193*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16]. Each 16-bit element is treated as a
194*344a7f5eSAndroid Build Coastguard Worker /// 16-bit signed integer and is converted to an 8-bit unsigned integer with
195*344a7f5eSAndroid Build Coastguard Worker /// saturation. Values greater than 0xFF are saturated to 0xFF. Values less
196*344a7f5eSAndroid Build Coastguard Worker /// than 0 are saturated to 0. The converted [4 x i8] values are written to
197*344a7f5eSAndroid Build Coastguard Worker /// the upper 32 bits of the result.
198*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [8 x i8] containing the converted
199*344a7f5eSAndroid Build Coastguard Worker /// values.
200*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_packs_pu16(__m64 __m1,__m64 __m2)201*344a7f5eSAndroid Build Coastguard Worker _mm_packs_pu16(__m64 __m1, __m64 __m2)
202*344a7f5eSAndroid Build Coastguard Worker {
203*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
204*344a7f5eSAndroid Build Coastguard Worker }
205*344a7f5eSAndroid Build Coastguard Worker
206*344a7f5eSAndroid Build Coastguard Worker /// \brief Unpacks the upper 32 bits from two 64-bit integer vectors of [8 x i8]
207*344a7f5eSAndroid Build Coastguard Worker /// and interleaves them into a 64-bit integer vector of [8 x i8].
208*344a7f5eSAndroid Build Coastguard Worker ///
209*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
210*344a7f5eSAndroid Build Coastguard Worker ///
211*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PUNPCKHBW instruction.
212*344a7f5eSAndroid Build Coastguard Worker ///
213*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
214*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [8 x i8].
215*344a7f5eSAndroid Build Coastguard Worker /// Bits [39:32] are written to bits [7:0] of the result.
216*344a7f5eSAndroid Build Coastguard Worker /// Bits [47:40] are written to bits [23:16] of the result.
217*344a7f5eSAndroid Build Coastguard Worker /// Bits [55:48] are written to bits [39:32] of the result.
218*344a7f5eSAndroid Build Coastguard Worker /// Bits [63:56] are written to bits [55:48] of the result.
219*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
220*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [8 x i8].
221*344a7f5eSAndroid Build Coastguard Worker /// Bits [39:32] are written to bits [15:8] of the result.
222*344a7f5eSAndroid Build Coastguard Worker /// Bits [47:40] are written to bits [31:24] of the result.
223*344a7f5eSAndroid Build Coastguard Worker /// Bits [55:48] are written to bits [47:40] of the result.
224*344a7f5eSAndroid Build Coastguard Worker /// Bits [63:56] are written to bits [63:56] of the result.
225*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [8 x i8] containing the interleaved
226*344a7f5eSAndroid Build Coastguard Worker /// values.
227*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_unpackhi_pi8(__m64 __m1,__m64 __m2)228*344a7f5eSAndroid Build Coastguard Worker _mm_unpackhi_pi8(__m64 __m1, __m64 __m2)
229*344a7f5eSAndroid Build Coastguard Worker {
230*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
231*344a7f5eSAndroid Build Coastguard Worker }
232*344a7f5eSAndroid Build Coastguard Worker
233*344a7f5eSAndroid Build Coastguard Worker /// \brief Unpacks the upper 32 bits from two 64-bit integer vectors of
234*344a7f5eSAndroid Build Coastguard Worker /// [4 x i16] and interleaves them into a 64-bit integer vector of [4 x i16].
235*344a7f5eSAndroid Build Coastguard Worker ///
236*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
237*344a7f5eSAndroid Build Coastguard Worker ///
238*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PUNPCKHWD instruction.
239*344a7f5eSAndroid Build Coastguard Worker ///
240*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
241*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
242*344a7f5eSAndroid Build Coastguard Worker /// Bits [47:32] are written to bits [15:0] of the result.
243*344a7f5eSAndroid Build Coastguard Worker /// Bits [63:48] are written to bits [47:32] of the result.
244*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
245*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
246*344a7f5eSAndroid Build Coastguard Worker /// Bits [47:32] are written to bits [31:16] of the result.
247*344a7f5eSAndroid Build Coastguard Worker /// Bits [63:48] are written to bits [63:48] of the result.
248*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [4 x i16] containing the interleaved
249*344a7f5eSAndroid Build Coastguard Worker /// values.
250*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_unpackhi_pi16(__m64 __m1,__m64 __m2)251*344a7f5eSAndroid Build Coastguard Worker _mm_unpackhi_pi16(__m64 __m1, __m64 __m2)
252*344a7f5eSAndroid Build Coastguard Worker {
253*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_punpckhwd((__v4hi)__m1, (__v4hi)__m2);
254*344a7f5eSAndroid Build Coastguard Worker }
255*344a7f5eSAndroid Build Coastguard Worker
256*344a7f5eSAndroid Build Coastguard Worker /// \brief Unpacks the upper 32 bits from two 64-bit integer vectors of
257*344a7f5eSAndroid Build Coastguard Worker /// [2 x i32] and interleaves them into a 64-bit integer vector of [2 x i32].
258*344a7f5eSAndroid Build Coastguard Worker ///
259*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
260*344a7f5eSAndroid Build Coastguard Worker ///
261*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PUNPCKHDQ instruction.
262*344a7f5eSAndroid Build Coastguard Worker ///
263*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
264*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [2 x i32]. The upper 32 bits are written to
265*344a7f5eSAndroid Build Coastguard Worker /// the lower 32 bits of the result.
266*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
267*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [2 x i32]. The upper 32 bits are written to
268*344a7f5eSAndroid Build Coastguard Worker /// the upper 32 bits of the result.
269*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [2 x i32] containing the interleaved
270*344a7f5eSAndroid Build Coastguard Worker /// values.
271*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_unpackhi_pi32(__m64 __m1,__m64 __m2)272*344a7f5eSAndroid Build Coastguard Worker _mm_unpackhi_pi32(__m64 __m1, __m64 __m2)
273*344a7f5eSAndroid Build Coastguard Worker {
274*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_punpckhdq((__v2si)__m1, (__v2si)__m2);
275*344a7f5eSAndroid Build Coastguard Worker }
276*344a7f5eSAndroid Build Coastguard Worker
277*344a7f5eSAndroid Build Coastguard Worker /// \brief Unpacks the lower 32 bits from two 64-bit integer vectors of [8 x i8]
278*344a7f5eSAndroid Build Coastguard Worker /// and interleaves them into a 64-bit integer vector of [8 x i8].
279*344a7f5eSAndroid Build Coastguard Worker ///
280*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
281*344a7f5eSAndroid Build Coastguard Worker ///
282*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PUNPCKLBW instruction.
283*344a7f5eSAndroid Build Coastguard Worker ///
284*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
285*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [8 x i8].
286*344a7f5eSAndroid Build Coastguard Worker /// Bits [7:0] are written to bits [7:0] of the result.
287*344a7f5eSAndroid Build Coastguard Worker /// Bits [15:8] are written to bits [23:16] of the result.
288*344a7f5eSAndroid Build Coastguard Worker /// Bits [23:16] are written to bits [39:32] of the result.
289*344a7f5eSAndroid Build Coastguard Worker /// Bits [31:24] are written to bits [55:48] of the result.
290*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
291*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [8 x i8].
292*344a7f5eSAndroid Build Coastguard Worker /// Bits [7:0] are written to bits [15:8] of the result.
293*344a7f5eSAndroid Build Coastguard Worker /// Bits [15:8] are written to bits [31:24] of the result.
294*344a7f5eSAndroid Build Coastguard Worker /// Bits [23:16] are written to bits [47:40] of the result.
295*344a7f5eSAndroid Build Coastguard Worker /// Bits [31:24] are written to bits [63:56] of the result.
296*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [8 x i8] containing the interleaved
297*344a7f5eSAndroid Build Coastguard Worker /// values.
298*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_unpacklo_pi8(__m64 __m1,__m64 __m2)299*344a7f5eSAndroid Build Coastguard Worker _mm_unpacklo_pi8(__m64 __m1, __m64 __m2)
300*344a7f5eSAndroid Build Coastguard Worker {
301*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_punpcklbw((__v8qi)__m1, (__v8qi)__m2);
302*344a7f5eSAndroid Build Coastguard Worker }
303*344a7f5eSAndroid Build Coastguard Worker
304*344a7f5eSAndroid Build Coastguard Worker /// \brief Unpacks the lower 32 bits from two 64-bit integer vectors of
305*344a7f5eSAndroid Build Coastguard Worker /// [4 x i16] and interleaves them into a 64-bit integer vector of [4 x i16].
306*344a7f5eSAndroid Build Coastguard Worker ///
307*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
308*344a7f5eSAndroid Build Coastguard Worker ///
309*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PUNPCKLWD instruction.
310*344a7f5eSAndroid Build Coastguard Worker ///
311*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
312*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
313*344a7f5eSAndroid Build Coastguard Worker /// Bits [15:0] are written to bits [15:0] of the result.
314*344a7f5eSAndroid Build Coastguard Worker /// Bits [31:16] are written to bits [47:32] of the result.
315*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
316*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
317*344a7f5eSAndroid Build Coastguard Worker /// Bits [15:0] are written to bits [31:16] of the result.
318*344a7f5eSAndroid Build Coastguard Worker /// Bits [31:16] are written to bits [63:48] of the result.
319*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [4 x i16] containing the interleaved
320*344a7f5eSAndroid Build Coastguard Worker /// values.
321*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_unpacklo_pi16(__m64 __m1,__m64 __m2)322*344a7f5eSAndroid Build Coastguard Worker _mm_unpacklo_pi16(__m64 __m1, __m64 __m2)
323*344a7f5eSAndroid Build Coastguard Worker {
324*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_punpcklwd((__v4hi)__m1, (__v4hi)__m2);
325*344a7f5eSAndroid Build Coastguard Worker }
326*344a7f5eSAndroid Build Coastguard Worker
327*344a7f5eSAndroid Build Coastguard Worker /// \brief Unpacks the lower 32 bits from two 64-bit integer vectors of
328*344a7f5eSAndroid Build Coastguard Worker /// [2 x i32] and interleaves them into a 64-bit integer vector of [2 x i32].
329*344a7f5eSAndroid Build Coastguard Worker ///
330*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
331*344a7f5eSAndroid Build Coastguard Worker ///
332*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PUNPCKLDQ instruction.
333*344a7f5eSAndroid Build Coastguard Worker ///
334*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
335*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [2 x i32]. The lower 32 bits are written to
336*344a7f5eSAndroid Build Coastguard Worker /// the lower 32 bits of the result.
337*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
338*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [2 x i32]. The lower 32 bits are written to
339*344a7f5eSAndroid Build Coastguard Worker /// the upper 32 bits of the result.
340*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [2 x i32] containing the interleaved
341*344a7f5eSAndroid Build Coastguard Worker /// values.
342*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_unpacklo_pi32(__m64 __m1,__m64 __m2)343*344a7f5eSAndroid Build Coastguard Worker _mm_unpacklo_pi32(__m64 __m1, __m64 __m2)
344*344a7f5eSAndroid Build Coastguard Worker {
345*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_punpckldq((__v2si)__m1, (__v2si)__m2);
346*344a7f5eSAndroid Build Coastguard Worker }
347*344a7f5eSAndroid Build Coastguard Worker
348*344a7f5eSAndroid Build Coastguard Worker /// \brief Adds each 8-bit integer element of the first 64-bit integer vector
349*344a7f5eSAndroid Build Coastguard Worker /// of [8 x i8] to the corresponding 8-bit integer element of the second
350*344a7f5eSAndroid Build Coastguard Worker /// 64-bit integer vector of [8 x i8]. The lower 8 bits of the results are
351*344a7f5eSAndroid Build Coastguard Worker /// packed into a 64-bit integer vector of [8 x i8].
352*344a7f5eSAndroid Build Coastguard Worker ///
353*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
354*344a7f5eSAndroid Build Coastguard Worker ///
355*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PADDB instruction.
356*344a7f5eSAndroid Build Coastguard Worker ///
357*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
358*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [8 x i8].
359*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
360*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [8 x i8].
361*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [8 x i8] containing the sums of both
362*344a7f5eSAndroid Build Coastguard Worker /// parameters.
363*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_add_pi8(__m64 __m1,__m64 __m2)364*344a7f5eSAndroid Build Coastguard Worker _mm_add_pi8(__m64 __m1, __m64 __m2)
365*344a7f5eSAndroid Build Coastguard Worker {
366*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2);
367*344a7f5eSAndroid Build Coastguard Worker }
368*344a7f5eSAndroid Build Coastguard Worker
369*344a7f5eSAndroid Build Coastguard Worker /// \brief Adds each 16-bit integer element of the first 64-bit integer vector
370*344a7f5eSAndroid Build Coastguard Worker /// of [4 x i16] to the corresponding 16-bit integer element of the second
371*344a7f5eSAndroid Build Coastguard Worker /// 64-bit integer vector of [4 x i16]. The lower 16 bits of the results are
372*344a7f5eSAndroid Build Coastguard Worker /// packed into a 64-bit integer vector of [4 x i16].
373*344a7f5eSAndroid Build Coastguard Worker ///
374*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
375*344a7f5eSAndroid Build Coastguard Worker ///
376*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PADDW instruction.
377*344a7f5eSAndroid Build Coastguard Worker ///
378*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
379*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
380*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
381*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
382*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [4 x i16] containing the sums of both
383*344a7f5eSAndroid Build Coastguard Worker /// parameters.
384*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_add_pi16(__m64 __m1,__m64 __m2)385*344a7f5eSAndroid Build Coastguard Worker _mm_add_pi16(__m64 __m1, __m64 __m2)
386*344a7f5eSAndroid Build Coastguard Worker {
387*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_paddw((__v4hi)__m1, (__v4hi)__m2);
388*344a7f5eSAndroid Build Coastguard Worker }
389*344a7f5eSAndroid Build Coastguard Worker
390*344a7f5eSAndroid Build Coastguard Worker /// \brief Adds each 32-bit integer element of the first 64-bit integer vector
391*344a7f5eSAndroid Build Coastguard Worker /// of [2 x i32] to the corresponding 32-bit integer element of the second
392*344a7f5eSAndroid Build Coastguard Worker /// 64-bit integer vector of [2 x i32]. The lower 32 bits of the results are
393*344a7f5eSAndroid Build Coastguard Worker /// packed into a 64-bit integer vector of [2 x i32].
394*344a7f5eSAndroid Build Coastguard Worker ///
395*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
396*344a7f5eSAndroid Build Coastguard Worker ///
397*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PADDD instruction.
398*344a7f5eSAndroid Build Coastguard Worker ///
399*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
400*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [2 x i32].
401*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
402*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [2 x i32].
403*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [2 x i32] containing the sums of both
404*344a7f5eSAndroid Build Coastguard Worker /// parameters.
405*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_add_pi32(__m64 __m1,__m64 __m2)406*344a7f5eSAndroid Build Coastguard Worker _mm_add_pi32(__m64 __m1, __m64 __m2)
407*344a7f5eSAndroid Build Coastguard Worker {
408*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_paddd((__v2si)__m1, (__v2si)__m2);
409*344a7f5eSAndroid Build Coastguard Worker }
410*344a7f5eSAndroid Build Coastguard Worker
411*344a7f5eSAndroid Build Coastguard Worker /// \brief Adds each 8-bit signed integer element of the first 64-bit integer
412*344a7f5eSAndroid Build Coastguard Worker /// vector of [8 x i8] to the corresponding 8-bit signed integer element of
413*344a7f5eSAndroid Build Coastguard Worker /// the second 64-bit integer vector of [8 x i8]. Positive sums greater than
414*344a7f5eSAndroid Build Coastguard Worker /// 0x7F are saturated to 0x7F. Negative sums less than 0x80 are saturated to
415*344a7f5eSAndroid Build Coastguard Worker /// 0x80. The results are packed into a 64-bit integer vector of [8 x i8].
416*344a7f5eSAndroid Build Coastguard Worker ///
417*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
418*344a7f5eSAndroid Build Coastguard Worker ///
419*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PADDSB instruction.
420*344a7f5eSAndroid Build Coastguard Worker ///
421*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
422*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [8 x i8].
423*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
424*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [8 x i8].
425*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [8 x i8] containing the saturated sums
426*344a7f5eSAndroid Build Coastguard Worker /// of both parameters.
427*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_adds_pi8(__m64 __m1,__m64 __m2)428*344a7f5eSAndroid Build Coastguard Worker _mm_adds_pi8(__m64 __m1, __m64 __m2)
429*344a7f5eSAndroid Build Coastguard Worker {
430*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_paddsb((__v8qi)__m1, (__v8qi)__m2);
431*344a7f5eSAndroid Build Coastguard Worker }
432*344a7f5eSAndroid Build Coastguard Worker
433*344a7f5eSAndroid Build Coastguard Worker /// \brief Adds each 16-bit signed integer element of the first 64-bit integer
434*344a7f5eSAndroid Build Coastguard Worker /// vector of [4 x i16] to the corresponding 16-bit signed integer element of
435*344a7f5eSAndroid Build Coastguard Worker /// the second 64-bit integer vector of [4 x i16]. Positive sums greater than
436*344a7f5eSAndroid Build Coastguard Worker /// 0x7FFF are saturated to 0x7FFF. Negative sums less than 0x8000 are
437*344a7f5eSAndroid Build Coastguard Worker /// saturated to 0x8000. The results are packed into a 64-bit integer vector
438*344a7f5eSAndroid Build Coastguard Worker /// of [4 x i16].
439*344a7f5eSAndroid Build Coastguard Worker ///
440*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
441*344a7f5eSAndroid Build Coastguard Worker ///
442*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PADDSW instruction.
443*344a7f5eSAndroid Build Coastguard Worker ///
444*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
445*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
446*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
447*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
448*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [4 x i16] containing the saturated sums
449*344a7f5eSAndroid Build Coastguard Worker /// of both parameters.
450*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_adds_pi16(__m64 __m1,__m64 __m2)451*344a7f5eSAndroid Build Coastguard Worker _mm_adds_pi16(__m64 __m1, __m64 __m2)
452*344a7f5eSAndroid Build Coastguard Worker {
453*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_paddsw((__v4hi)__m1, (__v4hi)__m2);
454*344a7f5eSAndroid Build Coastguard Worker }
455*344a7f5eSAndroid Build Coastguard Worker
456*344a7f5eSAndroid Build Coastguard Worker /// \brief Adds each 8-bit unsigned integer element of the first 64-bit integer
457*344a7f5eSAndroid Build Coastguard Worker /// vector of [8 x i8] to the corresponding 8-bit unsigned integer element of
458*344a7f5eSAndroid Build Coastguard Worker /// the second 64-bit integer vector of [8 x i8]. Sums greater than 0xFF are
459*344a7f5eSAndroid Build Coastguard Worker /// saturated to 0xFF. The results are packed into a 64-bit integer vector of
460*344a7f5eSAndroid Build Coastguard Worker /// [8 x i8].
461*344a7f5eSAndroid Build Coastguard Worker ///
462*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
463*344a7f5eSAndroid Build Coastguard Worker ///
464*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PADDUSB instruction.
465*344a7f5eSAndroid Build Coastguard Worker ///
466*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
467*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [8 x i8].
468*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
469*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [8 x i8].
470*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [8 x i8] containing the saturated
471*344a7f5eSAndroid Build Coastguard Worker /// unsigned sums of both parameters.
472*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_adds_pu8(__m64 __m1,__m64 __m2)473*344a7f5eSAndroid Build Coastguard Worker _mm_adds_pu8(__m64 __m1, __m64 __m2)
474*344a7f5eSAndroid Build Coastguard Worker {
475*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_paddusb((__v8qi)__m1, (__v8qi)__m2);
476*344a7f5eSAndroid Build Coastguard Worker }
477*344a7f5eSAndroid Build Coastguard Worker
478*344a7f5eSAndroid Build Coastguard Worker /// \brief Adds each 16-bit unsigned integer element of the first 64-bit integer
479*344a7f5eSAndroid Build Coastguard Worker /// vector of [4 x i16] to the corresponding 16-bit unsigned integer element
480*344a7f5eSAndroid Build Coastguard Worker /// of the second 64-bit integer vector of [4 x i16]. Sums greater than
481*344a7f5eSAndroid Build Coastguard Worker /// 0xFFFF are saturated to 0xFFFF. The results are packed into a 64-bit
482*344a7f5eSAndroid Build Coastguard Worker /// integer vector of [4 x i16].
483*344a7f5eSAndroid Build Coastguard Worker ///
484*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
485*344a7f5eSAndroid Build Coastguard Worker ///
486*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PADDUSW instruction.
487*344a7f5eSAndroid Build Coastguard Worker ///
488*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
489*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
490*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
491*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
492*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [4 x i16] containing the saturated
493*344a7f5eSAndroid Build Coastguard Worker /// unsigned sums of both parameters.
494*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_adds_pu16(__m64 __m1,__m64 __m2)495*344a7f5eSAndroid Build Coastguard Worker _mm_adds_pu16(__m64 __m1, __m64 __m2)
496*344a7f5eSAndroid Build Coastguard Worker {
497*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_paddusw((__v4hi)__m1, (__v4hi)__m2);
498*344a7f5eSAndroid Build Coastguard Worker }
499*344a7f5eSAndroid Build Coastguard Worker
500*344a7f5eSAndroid Build Coastguard Worker /// \brief Subtracts each 8-bit integer element of the second 64-bit integer
501*344a7f5eSAndroid Build Coastguard Worker /// vector of [8 x i8] from the corresponding 8-bit integer element of the
502*344a7f5eSAndroid Build Coastguard Worker /// first 64-bit integer vector of [8 x i8]. The lower 8 bits of the results
503*344a7f5eSAndroid Build Coastguard Worker /// are packed into a 64-bit integer vector of [8 x i8].
504*344a7f5eSAndroid Build Coastguard Worker ///
505*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
506*344a7f5eSAndroid Build Coastguard Worker ///
507*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSUBB instruction.
508*344a7f5eSAndroid Build Coastguard Worker ///
509*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
510*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [8 x i8] containing the minuends.
511*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
512*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [8 x i8] containing the subtrahends.
513*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [8 x i8] containing the differences of
514*344a7f5eSAndroid Build Coastguard Worker /// both parameters.
515*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_sub_pi8(__m64 __m1,__m64 __m2)516*344a7f5eSAndroid Build Coastguard Worker _mm_sub_pi8(__m64 __m1, __m64 __m2)
517*344a7f5eSAndroid Build Coastguard Worker {
518*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psubb((__v8qi)__m1, (__v8qi)__m2);
519*344a7f5eSAndroid Build Coastguard Worker }
520*344a7f5eSAndroid Build Coastguard Worker
521*344a7f5eSAndroid Build Coastguard Worker /// \brief Subtracts each 16-bit integer element of the second 64-bit integer
522*344a7f5eSAndroid Build Coastguard Worker /// vector of [4 x i16] from the corresponding 16-bit integer element of the
523*344a7f5eSAndroid Build Coastguard Worker /// first 64-bit integer vector of [4 x i16]. The lower 16 bits of the
524*344a7f5eSAndroid Build Coastguard Worker /// results are packed into a 64-bit integer vector of [4 x i16].
525*344a7f5eSAndroid Build Coastguard Worker ///
526*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
527*344a7f5eSAndroid Build Coastguard Worker ///
528*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSUBW instruction.
529*344a7f5eSAndroid Build Coastguard Worker ///
530*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
531*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16] containing the minuends.
532*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
533*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16] containing the subtrahends.
534*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [4 x i16] containing the differences of
535*344a7f5eSAndroid Build Coastguard Worker /// both parameters.
536*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_sub_pi16(__m64 __m1,__m64 __m2)537*344a7f5eSAndroid Build Coastguard Worker _mm_sub_pi16(__m64 __m1, __m64 __m2)
538*344a7f5eSAndroid Build Coastguard Worker {
539*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psubw((__v4hi)__m1, (__v4hi)__m2);
540*344a7f5eSAndroid Build Coastguard Worker }
541*344a7f5eSAndroid Build Coastguard Worker
542*344a7f5eSAndroid Build Coastguard Worker /// \brief Subtracts each 32-bit integer element of the second 64-bit integer
543*344a7f5eSAndroid Build Coastguard Worker /// vector of [2 x i32] from the corresponding 32-bit integer element of the
544*344a7f5eSAndroid Build Coastguard Worker /// first 64-bit integer vector of [2 x i32]. The lower 32 bits of the
545*344a7f5eSAndroid Build Coastguard Worker /// results are packed into a 64-bit integer vector of [2 x i32].
546*344a7f5eSAndroid Build Coastguard Worker ///
547*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
548*344a7f5eSAndroid Build Coastguard Worker ///
549*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSUBD instruction.
550*344a7f5eSAndroid Build Coastguard Worker ///
551*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
552*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [2 x i32] containing the minuends.
553*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
554*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [2 x i32] containing the subtrahends.
555*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [2 x i32] containing the differences of
556*344a7f5eSAndroid Build Coastguard Worker /// both parameters.
557*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_sub_pi32(__m64 __m1,__m64 __m2)558*344a7f5eSAndroid Build Coastguard Worker _mm_sub_pi32(__m64 __m1, __m64 __m2)
559*344a7f5eSAndroid Build Coastguard Worker {
560*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psubd((__v2si)__m1, (__v2si)__m2);
561*344a7f5eSAndroid Build Coastguard Worker }
562*344a7f5eSAndroid Build Coastguard Worker
563*344a7f5eSAndroid Build Coastguard Worker /// \brief Subtracts each 8-bit signed integer element of the second 64-bit
564*344a7f5eSAndroid Build Coastguard Worker /// integer vector of [8 x i8] from the corresponding 8-bit signed integer
565*344a7f5eSAndroid Build Coastguard Worker /// element of the first 64-bit integer vector of [8 x i8]. Positive results
566*344a7f5eSAndroid Build Coastguard Worker /// greater than 0x7F are saturated to 0x7F. Negative results less than 0x80
567*344a7f5eSAndroid Build Coastguard Worker /// are saturated to 0x80. The results are packed into a 64-bit integer
568*344a7f5eSAndroid Build Coastguard Worker /// vector of [8 x i8].
569*344a7f5eSAndroid Build Coastguard Worker ///
570*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
571*344a7f5eSAndroid Build Coastguard Worker ///
572*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSUBSB instruction.
573*344a7f5eSAndroid Build Coastguard Worker ///
574*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
575*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [8 x i8] containing the minuends.
576*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
577*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [8 x i8] containing the subtrahends.
578*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [8 x i8] containing the saturated
579*344a7f5eSAndroid Build Coastguard Worker /// differences of both parameters.
580*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_subs_pi8(__m64 __m1,__m64 __m2)581*344a7f5eSAndroid Build Coastguard Worker _mm_subs_pi8(__m64 __m1, __m64 __m2)
582*344a7f5eSAndroid Build Coastguard Worker {
583*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psubsb((__v8qi)__m1, (__v8qi)__m2);
584*344a7f5eSAndroid Build Coastguard Worker }
585*344a7f5eSAndroid Build Coastguard Worker
586*344a7f5eSAndroid Build Coastguard Worker /// \brief Subtracts each 16-bit signed integer element of the second 64-bit
587*344a7f5eSAndroid Build Coastguard Worker /// integer vector of [4 x i16] from the corresponding 16-bit signed integer
588*344a7f5eSAndroid Build Coastguard Worker /// element of the first 64-bit integer vector of [4 x i16]. Positive results
589*344a7f5eSAndroid Build Coastguard Worker /// greater than 0x7FFF are saturated to 0x7FFF. Negative results less than
590*344a7f5eSAndroid Build Coastguard Worker /// 0x8000 are saturated to 0x8000. The results are packed into a 64-bit
591*344a7f5eSAndroid Build Coastguard Worker /// integer vector of [4 x i16].
592*344a7f5eSAndroid Build Coastguard Worker ///
593*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
594*344a7f5eSAndroid Build Coastguard Worker ///
595*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSUBSW instruction.
596*344a7f5eSAndroid Build Coastguard Worker ///
597*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
598*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16] containing the minuends.
599*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
600*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16] containing the subtrahends.
601*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [4 x i16] containing the saturated
602*344a7f5eSAndroid Build Coastguard Worker /// differences of both parameters.
603*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_subs_pi16(__m64 __m1,__m64 __m2)604*344a7f5eSAndroid Build Coastguard Worker _mm_subs_pi16(__m64 __m1, __m64 __m2)
605*344a7f5eSAndroid Build Coastguard Worker {
606*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psubsw((__v4hi)__m1, (__v4hi)__m2);
607*344a7f5eSAndroid Build Coastguard Worker }
608*344a7f5eSAndroid Build Coastguard Worker
609*344a7f5eSAndroid Build Coastguard Worker /// \brief Subtracts each 8-bit unsigned integer element of the second 64-bit
610*344a7f5eSAndroid Build Coastguard Worker /// integer vector of [8 x i8] from the corresponding 8-bit unsigned integer
611*344a7f5eSAndroid Build Coastguard Worker /// element of the first 64-bit integer vector of [8 x i8]. If an element of
612*344a7f5eSAndroid Build Coastguard Worker /// the first vector is less than the corresponding element of the second
613*344a7f5eSAndroid Build Coastguard Worker /// vector, the result is saturated to 0. The results are packed into a
614*344a7f5eSAndroid Build Coastguard Worker /// 64-bit integer vector of [8 x i8].
615*344a7f5eSAndroid Build Coastguard Worker ///
616*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
617*344a7f5eSAndroid Build Coastguard Worker ///
618*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSUBUSB instruction.
619*344a7f5eSAndroid Build Coastguard Worker ///
620*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
621*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [8 x i8] containing the minuends.
622*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
623*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [8 x i8] containing the subtrahends.
624*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [8 x i8] containing the saturated
625*344a7f5eSAndroid Build Coastguard Worker /// differences of both parameters.
626*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_subs_pu8(__m64 __m1,__m64 __m2)627*344a7f5eSAndroid Build Coastguard Worker _mm_subs_pu8(__m64 __m1, __m64 __m2)
628*344a7f5eSAndroid Build Coastguard Worker {
629*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psubusb((__v8qi)__m1, (__v8qi)__m2);
630*344a7f5eSAndroid Build Coastguard Worker }
631*344a7f5eSAndroid Build Coastguard Worker
632*344a7f5eSAndroid Build Coastguard Worker /// \brief Subtracts each 16-bit unsigned integer element of the second 64-bit
633*344a7f5eSAndroid Build Coastguard Worker /// integer vector of [4 x i16] from the corresponding 16-bit unsigned
634*344a7f5eSAndroid Build Coastguard Worker /// integer element of the first 64-bit integer vector of [4 x i16]. If an
635*344a7f5eSAndroid Build Coastguard Worker /// element of the first vector is less than the corresponding element of the
636*344a7f5eSAndroid Build Coastguard Worker /// second vector, the result is saturated to 0. The results are packed into
637*344a7f5eSAndroid Build Coastguard Worker /// a 64-bit integer vector of [4 x i16].
638*344a7f5eSAndroid Build Coastguard Worker ///
639*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
640*344a7f5eSAndroid Build Coastguard Worker ///
641*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSUBUSW instruction.
642*344a7f5eSAndroid Build Coastguard Worker ///
643*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
644*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16] containing the minuends.
645*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
646*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16] containing the subtrahends.
647*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [4 x i16] containing the saturated
648*344a7f5eSAndroid Build Coastguard Worker /// differences of both parameters.
649*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_subs_pu16(__m64 __m1,__m64 __m2)650*344a7f5eSAndroid Build Coastguard Worker _mm_subs_pu16(__m64 __m1, __m64 __m2)
651*344a7f5eSAndroid Build Coastguard Worker {
652*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psubusw((__v4hi)__m1, (__v4hi)__m2);
653*344a7f5eSAndroid Build Coastguard Worker }
654*344a7f5eSAndroid Build Coastguard Worker
655*344a7f5eSAndroid Build Coastguard Worker /// \brief Multiplies each 16-bit signed integer element of the first 64-bit
656*344a7f5eSAndroid Build Coastguard Worker /// integer vector of [4 x i16] by the corresponding 16-bit signed integer
657*344a7f5eSAndroid Build Coastguard Worker /// element of the second 64-bit integer vector of [4 x i16] and get four
658*344a7f5eSAndroid Build Coastguard Worker /// 32-bit products. Adds adjacent pairs of products to get two 32-bit sums.
659*344a7f5eSAndroid Build Coastguard Worker /// The lower 32 bits of these two sums are packed into a 64-bit integer
660*344a7f5eSAndroid Build Coastguard Worker /// vector of [2 x i32]. For example, bits [15:0] of both parameters are
661*344a7f5eSAndroid Build Coastguard Worker /// multiplied, bits [31:16] of both parameters are multiplied, and the sum
662*344a7f5eSAndroid Build Coastguard Worker /// of both results is written to bits [31:0] of the result.
663*344a7f5eSAndroid Build Coastguard Worker ///
664*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
665*344a7f5eSAndroid Build Coastguard Worker ///
666*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PMADDWD instruction.
667*344a7f5eSAndroid Build Coastguard Worker ///
668*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
669*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
670*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
671*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
672*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [2 x i32] containing the sums of
673*344a7f5eSAndroid Build Coastguard Worker /// products of both parameters.
674*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_madd_pi16(__m64 __m1,__m64 __m2)675*344a7f5eSAndroid Build Coastguard Worker _mm_madd_pi16(__m64 __m1, __m64 __m2)
676*344a7f5eSAndroid Build Coastguard Worker {
677*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_pmaddwd((__v4hi)__m1, (__v4hi)__m2);
678*344a7f5eSAndroid Build Coastguard Worker }
679*344a7f5eSAndroid Build Coastguard Worker
680*344a7f5eSAndroid Build Coastguard Worker /// \brief Multiplies each 16-bit signed integer element of the first 64-bit
681*344a7f5eSAndroid Build Coastguard Worker /// integer vector of [4 x i16] by the corresponding 16-bit signed integer
682*344a7f5eSAndroid Build Coastguard Worker /// element of the second 64-bit integer vector of [4 x i16]. Packs the upper
683*344a7f5eSAndroid Build Coastguard Worker /// 16 bits of the 32-bit products into a 64-bit integer vector of [4 x i16].
684*344a7f5eSAndroid Build Coastguard Worker ///
685*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
686*344a7f5eSAndroid Build Coastguard Worker ///
687*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PMULHW instruction.
688*344a7f5eSAndroid Build Coastguard Worker ///
689*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
690*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
691*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
692*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
693*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [4 x i16] containing the upper 16 bits
694*344a7f5eSAndroid Build Coastguard Worker /// of the products of both parameters.
695*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_mulhi_pi16(__m64 __m1,__m64 __m2)696*344a7f5eSAndroid Build Coastguard Worker _mm_mulhi_pi16(__m64 __m1, __m64 __m2)
697*344a7f5eSAndroid Build Coastguard Worker {
698*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_pmulhw((__v4hi)__m1, (__v4hi)__m2);
699*344a7f5eSAndroid Build Coastguard Worker }
700*344a7f5eSAndroid Build Coastguard Worker
701*344a7f5eSAndroid Build Coastguard Worker /// \brief Multiplies each 16-bit signed integer element of the first 64-bit
702*344a7f5eSAndroid Build Coastguard Worker /// integer vector of [4 x i16] by the corresponding 16-bit signed integer
703*344a7f5eSAndroid Build Coastguard Worker /// element of the second 64-bit integer vector of [4 x i16]. Packs the lower
704*344a7f5eSAndroid Build Coastguard Worker /// 16 bits of the 32-bit products into a 64-bit integer vector of [4 x i16].
705*344a7f5eSAndroid Build Coastguard Worker ///
706*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
707*344a7f5eSAndroid Build Coastguard Worker ///
708*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PMULLW instruction.
709*344a7f5eSAndroid Build Coastguard Worker ///
710*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
711*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
712*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
713*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
714*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [4 x i16] containing the lower 16 bits
715*344a7f5eSAndroid Build Coastguard Worker /// of the products of both parameters.
716*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_mullo_pi16(__m64 __m1,__m64 __m2)717*344a7f5eSAndroid Build Coastguard Worker _mm_mullo_pi16(__m64 __m1, __m64 __m2)
718*344a7f5eSAndroid Build Coastguard Worker {
719*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_pmullw((__v4hi)__m1, (__v4hi)__m2);
720*344a7f5eSAndroid Build Coastguard Worker }
721*344a7f5eSAndroid Build Coastguard Worker
722*344a7f5eSAndroid Build Coastguard Worker /// \brief Left-shifts each 16-bit signed integer element of the first
723*344a7f5eSAndroid Build Coastguard Worker /// parameter, which is a 64-bit integer vector of [4 x i16], by the number
724*344a7f5eSAndroid Build Coastguard Worker /// of bits specified by the second parameter, which is a 64-bit integer. The
725*344a7f5eSAndroid Build Coastguard Worker /// lower 16 bits of the results are packed into a 64-bit integer vector of
726*344a7f5eSAndroid Build Coastguard Worker /// [4 x i16].
727*344a7f5eSAndroid Build Coastguard Worker ///
728*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
729*344a7f5eSAndroid Build Coastguard Worker ///
730*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSLLW instruction.
731*344a7f5eSAndroid Build Coastguard Worker ///
732*344a7f5eSAndroid Build Coastguard Worker /// \param __m
733*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
734*344a7f5eSAndroid Build Coastguard Worker /// \param __count
735*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector interpreted as a single 64-bit integer.
736*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [4 x i16] containing the left-shifted
737*344a7f5eSAndroid Build Coastguard Worker /// values. If __count is greater or equal to 16, the result is set to all 0.
738*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_sll_pi16(__m64 __m,__m64 __count)739*344a7f5eSAndroid Build Coastguard Worker _mm_sll_pi16(__m64 __m, __m64 __count)
740*344a7f5eSAndroid Build Coastguard Worker {
741*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psllw((__v4hi)__m, __count);
742*344a7f5eSAndroid Build Coastguard Worker }
743*344a7f5eSAndroid Build Coastguard Worker
744*344a7f5eSAndroid Build Coastguard Worker /// \brief Left-shifts each 16-bit signed integer element of a 64-bit integer
745*344a7f5eSAndroid Build Coastguard Worker /// vector of [4 x i16] by the number of bits specified by a 32-bit integer.
746*344a7f5eSAndroid Build Coastguard Worker /// The lower 16 bits of the results are packed into a 64-bit integer vector
747*344a7f5eSAndroid Build Coastguard Worker /// of [4 x i16].
748*344a7f5eSAndroid Build Coastguard Worker ///
749*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
750*344a7f5eSAndroid Build Coastguard Worker ///
751*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSLLW instruction.
752*344a7f5eSAndroid Build Coastguard Worker ///
753*344a7f5eSAndroid Build Coastguard Worker /// \param __m
754*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
755*344a7f5eSAndroid Build Coastguard Worker /// \param __count
756*344a7f5eSAndroid Build Coastguard Worker /// A 32-bit integer value.
757*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [4 x i16] containing the left-shifted
758*344a7f5eSAndroid Build Coastguard Worker /// values. If __count is greater or equal to 16, the result is set to all 0.
759*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_slli_pi16(__m64 __m,int __count)760*344a7f5eSAndroid Build Coastguard Worker _mm_slli_pi16(__m64 __m, int __count)
761*344a7f5eSAndroid Build Coastguard Worker {
762*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psllwi((__v4hi)__m, __count);
763*344a7f5eSAndroid Build Coastguard Worker }
764*344a7f5eSAndroid Build Coastguard Worker
765*344a7f5eSAndroid Build Coastguard Worker /// \brief Left-shifts each 32-bit signed integer element of the first
766*344a7f5eSAndroid Build Coastguard Worker /// parameter, which is a 64-bit integer vector of [2 x i32], by the number
767*344a7f5eSAndroid Build Coastguard Worker /// of bits specified by the second parameter, which is a 64-bit integer. The
768*344a7f5eSAndroid Build Coastguard Worker /// lower 32 bits of the results are packed into a 64-bit integer vector of
769*344a7f5eSAndroid Build Coastguard Worker /// [2 x i32].
770*344a7f5eSAndroid Build Coastguard Worker ///
771*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
772*344a7f5eSAndroid Build Coastguard Worker ///
773*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSLLD instruction.
774*344a7f5eSAndroid Build Coastguard Worker ///
775*344a7f5eSAndroid Build Coastguard Worker /// \param __m
776*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [2 x i32].
777*344a7f5eSAndroid Build Coastguard Worker /// \param __count
778*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector interpreted as a single 64-bit integer.
779*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [2 x i32] containing the left-shifted
780*344a7f5eSAndroid Build Coastguard Worker /// values. If __count is greater or equal to 32, the result is set to all 0.
781*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_sll_pi32(__m64 __m,__m64 __count)782*344a7f5eSAndroid Build Coastguard Worker _mm_sll_pi32(__m64 __m, __m64 __count)
783*344a7f5eSAndroid Build Coastguard Worker {
784*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_pslld((__v2si)__m, __count);
785*344a7f5eSAndroid Build Coastguard Worker }
786*344a7f5eSAndroid Build Coastguard Worker
787*344a7f5eSAndroid Build Coastguard Worker /// \brief Left-shifts each 32-bit signed integer element of a 64-bit integer
788*344a7f5eSAndroid Build Coastguard Worker /// vector of [2 x i32] by the number of bits specified by a 32-bit integer.
789*344a7f5eSAndroid Build Coastguard Worker /// The lower 32 bits of the results are packed into a 64-bit integer vector
790*344a7f5eSAndroid Build Coastguard Worker /// of [2 x i32].
791*344a7f5eSAndroid Build Coastguard Worker ///
792*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
793*344a7f5eSAndroid Build Coastguard Worker ///
794*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSLLD instruction.
795*344a7f5eSAndroid Build Coastguard Worker ///
796*344a7f5eSAndroid Build Coastguard Worker /// \param __m
797*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [2 x i32].
798*344a7f5eSAndroid Build Coastguard Worker /// \param __count
799*344a7f5eSAndroid Build Coastguard Worker /// A 32-bit integer value.
800*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [2 x i32] containing the left-shifted
801*344a7f5eSAndroid Build Coastguard Worker /// values. If __count is greater or equal to 32, the result is set to all 0.
802*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_slli_pi32(__m64 __m,int __count)803*344a7f5eSAndroid Build Coastguard Worker _mm_slli_pi32(__m64 __m, int __count)
804*344a7f5eSAndroid Build Coastguard Worker {
805*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_pslldi((__v2si)__m, __count);
806*344a7f5eSAndroid Build Coastguard Worker }
807*344a7f5eSAndroid Build Coastguard Worker
808*344a7f5eSAndroid Build Coastguard Worker /// \brief Left-shifts the first 64-bit integer parameter by the number of bits
809*344a7f5eSAndroid Build Coastguard Worker /// specified by the second 64-bit integer parameter. The lower 64 bits of
810*344a7f5eSAndroid Build Coastguard Worker /// result are returned.
811*344a7f5eSAndroid Build Coastguard Worker ///
812*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
813*344a7f5eSAndroid Build Coastguard Worker ///
814*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSLLQ instruction.
815*344a7f5eSAndroid Build Coastguard Worker ///
816*344a7f5eSAndroid Build Coastguard Worker /// \param __m
817*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector interpreted as a single 64-bit integer.
818*344a7f5eSAndroid Build Coastguard Worker /// \param __count
819*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector interpreted as a single 64-bit integer.
820*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector containing the left-shifted value. If
821*344a7f5eSAndroid Build Coastguard Worker /// __count is greater or equal to 64, the result is set to 0.
822*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_sll_si64(__m64 __m,__m64 __count)823*344a7f5eSAndroid Build Coastguard Worker _mm_sll_si64(__m64 __m, __m64 __count)
824*344a7f5eSAndroid Build Coastguard Worker {
825*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psllq((__v1di)__m, __count);
826*344a7f5eSAndroid Build Coastguard Worker }
827*344a7f5eSAndroid Build Coastguard Worker
828*344a7f5eSAndroid Build Coastguard Worker /// \brief Left-shifts the first parameter, which is a 64-bit integer, by the
829*344a7f5eSAndroid Build Coastguard Worker /// number of bits specified by the second parameter, which is a 32-bit
830*344a7f5eSAndroid Build Coastguard Worker /// integer. The lower 64 bits of result are returned.
831*344a7f5eSAndroid Build Coastguard Worker ///
832*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
833*344a7f5eSAndroid Build Coastguard Worker ///
834*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSLLQ instruction.
835*344a7f5eSAndroid Build Coastguard Worker ///
836*344a7f5eSAndroid Build Coastguard Worker /// \param __m
837*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector interpreted as a single 64-bit integer.
838*344a7f5eSAndroid Build Coastguard Worker /// \param __count
839*344a7f5eSAndroid Build Coastguard Worker /// A 32-bit integer value.
840*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector containing the left-shifted value. If
841*344a7f5eSAndroid Build Coastguard Worker /// __count is greater or equal to 64, the result is set to 0.
842*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_slli_si64(__m64 __m,int __count)843*344a7f5eSAndroid Build Coastguard Worker _mm_slli_si64(__m64 __m, int __count)
844*344a7f5eSAndroid Build Coastguard Worker {
845*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psllqi((__v1di)__m, __count);
846*344a7f5eSAndroid Build Coastguard Worker }
847*344a7f5eSAndroid Build Coastguard Worker
848*344a7f5eSAndroid Build Coastguard Worker /// \brief Right-shifts each 16-bit integer element of the first parameter,
849*344a7f5eSAndroid Build Coastguard Worker /// which is a 64-bit integer vector of [4 x i16], by the number of bits
850*344a7f5eSAndroid Build Coastguard Worker /// specified by the second parameter, which is a 64-bit integer. High-order
851*344a7f5eSAndroid Build Coastguard Worker /// bits are filled with the sign bit of the initial value of each 16-bit
852*344a7f5eSAndroid Build Coastguard Worker /// element. The 16-bit results are packed into a 64-bit integer vector of
853*344a7f5eSAndroid Build Coastguard Worker /// [4 x i16].
854*344a7f5eSAndroid Build Coastguard Worker ///
855*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
856*344a7f5eSAndroid Build Coastguard Worker ///
857*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSRAW instruction.
858*344a7f5eSAndroid Build Coastguard Worker ///
859*344a7f5eSAndroid Build Coastguard Worker /// \param __m
860*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
861*344a7f5eSAndroid Build Coastguard Worker /// \param __count
862*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector interpreted as a single 64-bit integer.
863*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [4 x i16] containing the right-shifted
864*344a7f5eSAndroid Build Coastguard Worker /// values.
865*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_sra_pi16(__m64 __m,__m64 __count)866*344a7f5eSAndroid Build Coastguard Worker _mm_sra_pi16(__m64 __m, __m64 __count)
867*344a7f5eSAndroid Build Coastguard Worker {
868*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psraw((__v4hi)__m, __count);
869*344a7f5eSAndroid Build Coastguard Worker }
870*344a7f5eSAndroid Build Coastguard Worker
871*344a7f5eSAndroid Build Coastguard Worker /// \brief Right-shifts each 16-bit integer element of a 64-bit integer vector
872*344a7f5eSAndroid Build Coastguard Worker /// of [4 x i16] by the number of bits specified by a 32-bit integer.
873*344a7f5eSAndroid Build Coastguard Worker /// High-order bits are filled with the sign bit of the initial value of each
874*344a7f5eSAndroid Build Coastguard Worker /// 16-bit element. The 16-bit results are packed into a 64-bit integer
875*344a7f5eSAndroid Build Coastguard Worker /// vector of [4 x i16].
876*344a7f5eSAndroid Build Coastguard Worker ///
877*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
878*344a7f5eSAndroid Build Coastguard Worker ///
879*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSRAW instruction.
880*344a7f5eSAndroid Build Coastguard Worker ///
881*344a7f5eSAndroid Build Coastguard Worker /// \param __m
882*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
883*344a7f5eSAndroid Build Coastguard Worker /// \param __count
884*344a7f5eSAndroid Build Coastguard Worker /// A 32-bit integer value.
885*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [4 x i16] containing the right-shifted
886*344a7f5eSAndroid Build Coastguard Worker /// values.
887*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_srai_pi16(__m64 __m,int __count)888*344a7f5eSAndroid Build Coastguard Worker _mm_srai_pi16(__m64 __m, int __count)
889*344a7f5eSAndroid Build Coastguard Worker {
890*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psrawi((__v4hi)__m, __count);
891*344a7f5eSAndroid Build Coastguard Worker }
892*344a7f5eSAndroid Build Coastguard Worker
893*344a7f5eSAndroid Build Coastguard Worker /// \brief Right-shifts each 32-bit integer element of the first parameter,
894*344a7f5eSAndroid Build Coastguard Worker /// which is a 64-bit integer vector of [2 x i32], by the number of bits
895*344a7f5eSAndroid Build Coastguard Worker /// specified by the second parameter, which is a 64-bit integer. High-order
896*344a7f5eSAndroid Build Coastguard Worker /// bits are filled with the sign bit of the initial value of each 32-bit
897*344a7f5eSAndroid Build Coastguard Worker /// element. The 32-bit results are packed into a 64-bit integer vector of
898*344a7f5eSAndroid Build Coastguard Worker /// [2 x i32].
899*344a7f5eSAndroid Build Coastguard Worker ///
900*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
901*344a7f5eSAndroid Build Coastguard Worker ///
902*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSRAD instruction.
903*344a7f5eSAndroid Build Coastguard Worker ///
904*344a7f5eSAndroid Build Coastguard Worker /// \param __m
905*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [2 x i32].
906*344a7f5eSAndroid Build Coastguard Worker /// \param __count
907*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector interpreted as a single 64-bit integer.
908*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [2 x i32] containing the right-shifted
909*344a7f5eSAndroid Build Coastguard Worker /// values.
910*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_sra_pi32(__m64 __m,__m64 __count)911*344a7f5eSAndroid Build Coastguard Worker _mm_sra_pi32(__m64 __m, __m64 __count)
912*344a7f5eSAndroid Build Coastguard Worker {
913*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psrad((__v2si)__m, __count);
914*344a7f5eSAndroid Build Coastguard Worker }
915*344a7f5eSAndroid Build Coastguard Worker
916*344a7f5eSAndroid Build Coastguard Worker /// \brief Right-shifts each 32-bit integer element of a 64-bit integer vector
917*344a7f5eSAndroid Build Coastguard Worker /// of [2 x i32] by the number of bits specified by a 32-bit integer.
918*344a7f5eSAndroid Build Coastguard Worker /// High-order bits are filled with the sign bit of the initial value of each
919*344a7f5eSAndroid Build Coastguard Worker /// 32-bit element. The 32-bit results are packed into a 64-bit integer
920*344a7f5eSAndroid Build Coastguard Worker /// vector of [2 x i32].
921*344a7f5eSAndroid Build Coastguard Worker ///
922*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
923*344a7f5eSAndroid Build Coastguard Worker ///
924*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSRAD instruction.
925*344a7f5eSAndroid Build Coastguard Worker ///
926*344a7f5eSAndroid Build Coastguard Worker /// \param __m
927*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [2 x i32].
928*344a7f5eSAndroid Build Coastguard Worker /// \param __count
929*344a7f5eSAndroid Build Coastguard Worker /// A 32-bit integer value.
930*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [2 x i32] containing the right-shifted
931*344a7f5eSAndroid Build Coastguard Worker /// values.
932*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_srai_pi32(__m64 __m,int __count)933*344a7f5eSAndroid Build Coastguard Worker _mm_srai_pi32(__m64 __m, int __count)
934*344a7f5eSAndroid Build Coastguard Worker {
935*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psradi((__v2si)__m, __count);
936*344a7f5eSAndroid Build Coastguard Worker }
937*344a7f5eSAndroid Build Coastguard Worker
938*344a7f5eSAndroid Build Coastguard Worker /// \brief Right-shifts each 16-bit integer element of the first parameter,
939*344a7f5eSAndroid Build Coastguard Worker /// which is a 64-bit integer vector of [4 x i16], by the number of bits
940*344a7f5eSAndroid Build Coastguard Worker /// specified by the second parameter, which is a 64-bit integer. High-order
941*344a7f5eSAndroid Build Coastguard Worker /// bits are cleared. The 16-bit results are packed into a 64-bit integer
942*344a7f5eSAndroid Build Coastguard Worker /// vector of [4 x i16].
943*344a7f5eSAndroid Build Coastguard Worker ///
944*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
945*344a7f5eSAndroid Build Coastguard Worker ///
946*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSRLW instruction.
947*344a7f5eSAndroid Build Coastguard Worker ///
948*344a7f5eSAndroid Build Coastguard Worker /// \param __m
949*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
950*344a7f5eSAndroid Build Coastguard Worker /// \param __count
951*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector interpreted as a single 64-bit integer.
952*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [4 x i16] containing the right-shifted
953*344a7f5eSAndroid Build Coastguard Worker /// values.
954*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_srl_pi16(__m64 __m,__m64 __count)955*344a7f5eSAndroid Build Coastguard Worker _mm_srl_pi16(__m64 __m, __m64 __count)
956*344a7f5eSAndroid Build Coastguard Worker {
957*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psrlw((__v4hi)__m, __count);
958*344a7f5eSAndroid Build Coastguard Worker }
959*344a7f5eSAndroid Build Coastguard Worker
960*344a7f5eSAndroid Build Coastguard Worker /// \brief Right-shifts each 16-bit integer element of a 64-bit integer vector
961*344a7f5eSAndroid Build Coastguard Worker /// of [4 x i16] by the number of bits specified by a 32-bit integer.
962*344a7f5eSAndroid Build Coastguard Worker /// High-order bits are cleared. The 16-bit results are packed into a 64-bit
963*344a7f5eSAndroid Build Coastguard Worker /// integer vector of [4 x i16].
964*344a7f5eSAndroid Build Coastguard Worker ///
965*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
966*344a7f5eSAndroid Build Coastguard Worker ///
967*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSRLW instruction.
968*344a7f5eSAndroid Build Coastguard Worker ///
969*344a7f5eSAndroid Build Coastguard Worker /// \param __m
970*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
971*344a7f5eSAndroid Build Coastguard Worker /// \param __count
972*344a7f5eSAndroid Build Coastguard Worker /// A 32-bit integer value.
973*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [4 x i16] containing the right-shifted
974*344a7f5eSAndroid Build Coastguard Worker /// values.
975*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_srli_pi16(__m64 __m,int __count)976*344a7f5eSAndroid Build Coastguard Worker _mm_srli_pi16(__m64 __m, int __count)
977*344a7f5eSAndroid Build Coastguard Worker {
978*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psrlwi((__v4hi)__m, __count);
979*344a7f5eSAndroid Build Coastguard Worker }
980*344a7f5eSAndroid Build Coastguard Worker
981*344a7f5eSAndroid Build Coastguard Worker /// \brief Right-shifts each 32-bit integer element of the first parameter,
982*344a7f5eSAndroid Build Coastguard Worker /// which is a 64-bit integer vector of [2 x i32], by the number of bits
983*344a7f5eSAndroid Build Coastguard Worker /// specified by the second parameter, which is a 64-bit integer. High-order
984*344a7f5eSAndroid Build Coastguard Worker /// bits are cleared. The 32-bit results are packed into a 64-bit integer
985*344a7f5eSAndroid Build Coastguard Worker /// vector of [2 x i32].
986*344a7f5eSAndroid Build Coastguard Worker ///
987*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
988*344a7f5eSAndroid Build Coastguard Worker ///
989*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSRLD instruction.
990*344a7f5eSAndroid Build Coastguard Worker ///
991*344a7f5eSAndroid Build Coastguard Worker /// \param __m
992*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [2 x i32].
993*344a7f5eSAndroid Build Coastguard Worker /// \param __count
994*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector interpreted as a single 64-bit integer.
995*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [2 x i32] containing the right-shifted
996*344a7f5eSAndroid Build Coastguard Worker /// values.
997*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_srl_pi32(__m64 __m,__m64 __count)998*344a7f5eSAndroid Build Coastguard Worker _mm_srl_pi32(__m64 __m, __m64 __count)
999*344a7f5eSAndroid Build Coastguard Worker {
1000*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psrld((__v2si)__m, __count);
1001*344a7f5eSAndroid Build Coastguard Worker }
1002*344a7f5eSAndroid Build Coastguard Worker
1003*344a7f5eSAndroid Build Coastguard Worker /// \brief Right-shifts each 32-bit integer element of a 64-bit integer vector
1004*344a7f5eSAndroid Build Coastguard Worker /// of [2 x i32] by the number of bits specified by a 32-bit integer.
1005*344a7f5eSAndroid Build Coastguard Worker /// High-order bits are cleared. The 32-bit results are packed into a 64-bit
1006*344a7f5eSAndroid Build Coastguard Worker /// integer vector of [2 x i32].
1007*344a7f5eSAndroid Build Coastguard Worker ///
1008*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1009*344a7f5eSAndroid Build Coastguard Worker ///
1010*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSRLD instruction.
1011*344a7f5eSAndroid Build Coastguard Worker ///
1012*344a7f5eSAndroid Build Coastguard Worker /// \param __m
1013*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [2 x i32].
1014*344a7f5eSAndroid Build Coastguard Worker /// \param __count
1015*344a7f5eSAndroid Build Coastguard Worker /// A 32-bit integer value.
1016*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [2 x i32] containing the right-shifted
1017*344a7f5eSAndroid Build Coastguard Worker /// values.
1018*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_srli_pi32(__m64 __m,int __count)1019*344a7f5eSAndroid Build Coastguard Worker _mm_srli_pi32(__m64 __m, int __count)
1020*344a7f5eSAndroid Build Coastguard Worker {
1021*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psrldi((__v2si)__m, __count);
1022*344a7f5eSAndroid Build Coastguard Worker }
1023*344a7f5eSAndroid Build Coastguard Worker
1024*344a7f5eSAndroid Build Coastguard Worker /// \brief Right-shifts the first 64-bit integer parameter by the number of bits
1025*344a7f5eSAndroid Build Coastguard Worker /// specified by the second 64-bit integer parameter. High-order bits are
1026*344a7f5eSAndroid Build Coastguard Worker /// cleared.
1027*344a7f5eSAndroid Build Coastguard Worker ///
1028*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1029*344a7f5eSAndroid Build Coastguard Worker ///
1030*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSRLQ instruction.
1031*344a7f5eSAndroid Build Coastguard Worker ///
1032*344a7f5eSAndroid Build Coastguard Worker /// \param __m
1033*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector interpreted as a single 64-bit integer.
1034*344a7f5eSAndroid Build Coastguard Worker /// \param __count
1035*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector interpreted as a single 64-bit integer.
1036*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector containing the right-shifted value.
1037*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_srl_si64(__m64 __m,__m64 __count)1038*344a7f5eSAndroid Build Coastguard Worker _mm_srl_si64(__m64 __m, __m64 __count)
1039*344a7f5eSAndroid Build Coastguard Worker {
1040*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psrlq((__v1di)__m, __count);
1041*344a7f5eSAndroid Build Coastguard Worker }
1042*344a7f5eSAndroid Build Coastguard Worker
1043*344a7f5eSAndroid Build Coastguard Worker /// \brief Right-shifts the first parameter, which is a 64-bit integer, by the
1044*344a7f5eSAndroid Build Coastguard Worker /// number of bits specified by the second parameter, which is a 32-bit
1045*344a7f5eSAndroid Build Coastguard Worker /// integer. High-order bits are cleared.
1046*344a7f5eSAndroid Build Coastguard Worker ///
1047*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1048*344a7f5eSAndroid Build Coastguard Worker ///
1049*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSRLQ instruction.
1050*344a7f5eSAndroid Build Coastguard Worker ///
1051*344a7f5eSAndroid Build Coastguard Worker /// \param __m
1052*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector interpreted as a single 64-bit integer.
1053*344a7f5eSAndroid Build Coastguard Worker /// \param __count
1054*344a7f5eSAndroid Build Coastguard Worker /// A 32-bit integer value.
1055*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector containing the right-shifted value.
1056*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_srli_si64(__m64 __m,int __count)1057*344a7f5eSAndroid Build Coastguard Worker _mm_srli_si64(__m64 __m, int __count)
1058*344a7f5eSAndroid Build Coastguard Worker {
1059*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psrlqi((__v1di)__m, __count);
1060*344a7f5eSAndroid Build Coastguard Worker }
1061*344a7f5eSAndroid Build Coastguard Worker
1062*344a7f5eSAndroid Build Coastguard Worker /// \brief Performs a bitwise AND of two 64-bit integer vectors.
1063*344a7f5eSAndroid Build Coastguard Worker ///
1064*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1065*344a7f5eSAndroid Build Coastguard Worker ///
1066*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PAND instruction.
1067*344a7f5eSAndroid Build Coastguard Worker ///
1068*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
1069*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector.
1070*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
1071*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector.
1072*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector containing the bitwise AND of both
1073*344a7f5eSAndroid Build Coastguard Worker /// parameters.
1074*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_and_si64(__m64 __m1,__m64 __m2)1075*344a7f5eSAndroid Build Coastguard Worker _mm_and_si64(__m64 __m1, __m64 __m2)
1076*344a7f5eSAndroid Build Coastguard Worker {
1077*344a7f5eSAndroid Build Coastguard Worker return __builtin_ia32_pand((__v1di)__m1, (__v1di)__m2);
1078*344a7f5eSAndroid Build Coastguard Worker }
1079*344a7f5eSAndroid Build Coastguard Worker
1080*344a7f5eSAndroid Build Coastguard Worker /// \brief Performs a bitwise NOT of the first 64-bit integer vector, and then
1081*344a7f5eSAndroid Build Coastguard Worker /// performs a bitwise AND of the intermediate result and the second 64-bit
1082*344a7f5eSAndroid Build Coastguard Worker /// integer vector.
1083*344a7f5eSAndroid Build Coastguard Worker ///
1084*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1085*344a7f5eSAndroid Build Coastguard Worker ///
1086*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PANDN instruction.
1087*344a7f5eSAndroid Build Coastguard Worker ///
1088*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
1089*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector. The one's complement of this parameter is used
1090*344a7f5eSAndroid Build Coastguard Worker /// in the bitwise AND.
1091*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
1092*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector.
1093*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector containing the bitwise AND of the second
1094*344a7f5eSAndroid Build Coastguard Worker /// parameter and the one's complement of the first parameter.
1095*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_andnot_si64(__m64 __m1,__m64 __m2)1096*344a7f5eSAndroid Build Coastguard Worker _mm_andnot_si64(__m64 __m1, __m64 __m2)
1097*344a7f5eSAndroid Build Coastguard Worker {
1098*344a7f5eSAndroid Build Coastguard Worker return __builtin_ia32_pandn((__v1di)__m1, (__v1di)__m2);
1099*344a7f5eSAndroid Build Coastguard Worker }
1100*344a7f5eSAndroid Build Coastguard Worker
1101*344a7f5eSAndroid Build Coastguard Worker /// \brief Performs a bitwise OR of two 64-bit integer vectors.
1102*344a7f5eSAndroid Build Coastguard Worker ///
1103*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1104*344a7f5eSAndroid Build Coastguard Worker ///
1105*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c POR instruction.
1106*344a7f5eSAndroid Build Coastguard Worker ///
1107*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
1108*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector.
1109*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
1110*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector.
1111*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector containing the bitwise OR of both
1112*344a7f5eSAndroid Build Coastguard Worker /// parameters.
1113*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_or_si64(__m64 __m1,__m64 __m2)1114*344a7f5eSAndroid Build Coastguard Worker _mm_or_si64(__m64 __m1, __m64 __m2)
1115*344a7f5eSAndroid Build Coastguard Worker {
1116*344a7f5eSAndroid Build Coastguard Worker return __builtin_ia32_por((__v1di)__m1, (__v1di)__m2);
1117*344a7f5eSAndroid Build Coastguard Worker }
1118*344a7f5eSAndroid Build Coastguard Worker
1119*344a7f5eSAndroid Build Coastguard Worker /// \brief Performs a bitwise exclusive OR of two 64-bit integer vectors.
1120*344a7f5eSAndroid Build Coastguard Worker ///
1121*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1122*344a7f5eSAndroid Build Coastguard Worker ///
1123*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PXOR instruction.
1124*344a7f5eSAndroid Build Coastguard Worker ///
1125*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
1126*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector.
1127*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
1128*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector.
1129*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector containing the bitwise exclusive OR of both
1130*344a7f5eSAndroid Build Coastguard Worker /// parameters.
1131*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_xor_si64(__m64 __m1,__m64 __m2)1132*344a7f5eSAndroid Build Coastguard Worker _mm_xor_si64(__m64 __m1, __m64 __m2)
1133*344a7f5eSAndroid Build Coastguard Worker {
1134*344a7f5eSAndroid Build Coastguard Worker return __builtin_ia32_pxor((__v1di)__m1, (__v1di)__m2);
1135*344a7f5eSAndroid Build Coastguard Worker }
1136*344a7f5eSAndroid Build Coastguard Worker
1137*344a7f5eSAndroid Build Coastguard Worker /// \brief Compares the 8-bit integer elements of two 64-bit integer vectors of
1138*344a7f5eSAndroid Build Coastguard Worker /// [8 x i8] to determine if the element of the first vector is equal to the
1139*344a7f5eSAndroid Build Coastguard Worker /// corresponding element of the second vector. The comparison yields 0 for
1140*344a7f5eSAndroid Build Coastguard Worker /// false, 0xFF for true.
1141*344a7f5eSAndroid Build Coastguard Worker ///
1142*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1143*344a7f5eSAndroid Build Coastguard Worker ///
1144*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PCMPEQB instruction.
1145*344a7f5eSAndroid Build Coastguard Worker ///
1146*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
1147*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [8 x i8].
1148*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
1149*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [8 x i8].
1150*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [8 x i8] containing the comparison
1151*344a7f5eSAndroid Build Coastguard Worker /// results.
1152*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_cmpeq_pi8(__m64 __m1,__m64 __m2)1153*344a7f5eSAndroid Build Coastguard Worker _mm_cmpeq_pi8(__m64 __m1, __m64 __m2)
1154*344a7f5eSAndroid Build Coastguard Worker {
1155*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_pcmpeqb((__v8qi)__m1, (__v8qi)__m2);
1156*344a7f5eSAndroid Build Coastguard Worker }
1157*344a7f5eSAndroid Build Coastguard Worker
1158*344a7f5eSAndroid Build Coastguard Worker /// \brief Compares the 16-bit integer elements of two 64-bit integer vectors of
1159*344a7f5eSAndroid Build Coastguard Worker /// [4 x i16] to determine if the element of the first vector is equal to the
1160*344a7f5eSAndroid Build Coastguard Worker /// corresponding element of the second vector. The comparison yields 0 for
1161*344a7f5eSAndroid Build Coastguard Worker /// false, 0xFFFF for true.
1162*344a7f5eSAndroid Build Coastguard Worker ///
1163*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1164*344a7f5eSAndroid Build Coastguard Worker ///
1165*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PCMPEQW instruction.
1166*344a7f5eSAndroid Build Coastguard Worker ///
1167*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
1168*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
1169*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
1170*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
1171*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [4 x i16] containing the comparison
1172*344a7f5eSAndroid Build Coastguard Worker /// results.
1173*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_cmpeq_pi16(__m64 __m1,__m64 __m2)1174*344a7f5eSAndroid Build Coastguard Worker _mm_cmpeq_pi16(__m64 __m1, __m64 __m2)
1175*344a7f5eSAndroid Build Coastguard Worker {
1176*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_pcmpeqw((__v4hi)__m1, (__v4hi)__m2);
1177*344a7f5eSAndroid Build Coastguard Worker }
1178*344a7f5eSAndroid Build Coastguard Worker
1179*344a7f5eSAndroid Build Coastguard Worker /// \brief Compares the 32-bit integer elements of two 64-bit integer vectors of
1180*344a7f5eSAndroid Build Coastguard Worker /// [2 x i32] to determine if the element of the first vector is equal to the
1181*344a7f5eSAndroid Build Coastguard Worker /// corresponding element of the second vector. The comparison yields 0 for
1182*344a7f5eSAndroid Build Coastguard Worker /// false, 0xFFFFFFFF for true.
1183*344a7f5eSAndroid Build Coastguard Worker ///
1184*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1185*344a7f5eSAndroid Build Coastguard Worker ///
1186*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PCMPEQD instruction.
1187*344a7f5eSAndroid Build Coastguard Worker ///
1188*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
1189*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [2 x i32].
1190*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
1191*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [2 x i32].
1192*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [2 x i32] containing the comparison
1193*344a7f5eSAndroid Build Coastguard Worker /// results.
1194*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_cmpeq_pi32(__m64 __m1,__m64 __m2)1195*344a7f5eSAndroid Build Coastguard Worker _mm_cmpeq_pi32(__m64 __m1, __m64 __m2)
1196*344a7f5eSAndroid Build Coastguard Worker {
1197*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_pcmpeqd((__v2si)__m1, (__v2si)__m2);
1198*344a7f5eSAndroid Build Coastguard Worker }
1199*344a7f5eSAndroid Build Coastguard Worker
1200*344a7f5eSAndroid Build Coastguard Worker /// \brief Compares the 8-bit integer elements of two 64-bit integer vectors of
1201*344a7f5eSAndroid Build Coastguard Worker /// [8 x i8] to determine if the element of the first vector is greater than
1202*344a7f5eSAndroid Build Coastguard Worker /// the corresponding element of the second vector. The comparison yields 0
1203*344a7f5eSAndroid Build Coastguard Worker /// for false, 0xFF for true.
1204*344a7f5eSAndroid Build Coastguard Worker ///
1205*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1206*344a7f5eSAndroid Build Coastguard Worker ///
1207*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PCMPGTB instruction.
1208*344a7f5eSAndroid Build Coastguard Worker ///
1209*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
1210*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [8 x i8].
1211*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
1212*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [8 x i8].
1213*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [8 x i8] containing the comparison
1214*344a7f5eSAndroid Build Coastguard Worker /// results.
1215*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_cmpgt_pi8(__m64 __m1,__m64 __m2)1216*344a7f5eSAndroid Build Coastguard Worker _mm_cmpgt_pi8(__m64 __m1, __m64 __m2)
1217*344a7f5eSAndroid Build Coastguard Worker {
1218*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_pcmpgtb((__v8qi)__m1, (__v8qi)__m2);
1219*344a7f5eSAndroid Build Coastguard Worker }
1220*344a7f5eSAndroid Build Coastguard Worker
1221*344a7f5eSAndroid Build Coastguard Worker /// \brief Compares the 16-bit integer elements of two 64-bit integer vectors of
1222*344a7f5eSAndroid Build Coastguard Worker /// [4 x i16] to determine if the element of the first vector is greater than
1223*344a7f5eSAndroid Build Coastguard Worker /// the corresponding element of the second vector. The comparison yields 0
1224*344a7f5eSAndroid Build Coastguard Worker /// for false, 0xFFFF for true.
1225*344a7f5eSAndroid Build Coastguard Worker ///
1226*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1227*344a7f5eSAndroid Build Coastguard Worker ///
1228*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PCMPGTW instruction.
1229*344a7f5eSAndroid Build Coastguard Worker ///
1230*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
1231*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
1232*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
1233*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [4 x i16].
1234*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [4 x i16] containing the comparison
1235*344a7f5eSAndroid Build Coastguard Worker /// results.
1236*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_cmpgt_pi16(__m64 __m1,__m64 __m2)1237*344a7f5eSAndroid Build Coastguard Worker _mm_cmpgt_pi16(__m64 __m1, __m64 __m2)
1238*344a7f5eSAndroid Build Coastguard Worker {
1239*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_pcmpgtw((__v4hi)__m1, (__v4hi)__m2);
1240*344a7f5eSAndroid Build Coastguard Worker }
1241*344a7f5eSAndroid Build Coastguard Worker
1242*344a7f5eSAndroid Build Coastguard Worker /// \brief Compares the 32-bit integer elements of two 64-bit integer vectors of
1243*344a7f5eSAndroid Build Coastguard Worker /// [2 x i32] to determine if the element of the first vector is greater than
1244*344a7f5eSAndroid Build Coastguard Worker /// the corresponding element of the second vector. The comparison yields 0
1245*344a7f5eSAndroid Build Coastguard Worker /// for false, 0xFFFFFFFF for true.
1246*344a7f5eSAndroid Build Coastguard Worker ///
1247*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1248*344a7f5eSAndroid Build Coastguard Worker ///
1249*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PCMPGTD instruction.
1250*344a7f5eSAndroid Build Coastguard Worker ///
1251*344a7f5eSAndroid Build Coastguard Worker /// \param __m1
1252*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [2 x i32].
1253*344a7f5eSAndroid Build Coastguard Worker /// \param __m2
1254*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector of [2 x i32].
1255*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector of [2 x i32] containing the comparison
1256*344a7f5eSAndroid Build Coastguard Worker /// results.
1257*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_cmpgt_pi32(__m64 __m1,__m64 __m2)1258*344a7f5eSAndroid Build Coastguard Worker _mm_cmpgt_pi32(__m64 __m1, __m64 __m2)
1259*344a7f5eSAndroid Build Coastguard Worker {
1260*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_pcmpgtd((__v2si)__m1, (__v2si)__m2);
1261*344a7f5eSAndroid Build Coastguard Worker }
1262*344a7f5eSAndroid Build Coastguard Worker
1263*344a7f5eSAndroid Build Coastguard Worker /// \brief Constructs a 64-bit integer vector initialized to zero.
1264*344a7f5eSAndroid Build Coastguard Worker ///
1265*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1266*344a7f5eSAndroid Build Coastguard Worker ///
1267*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the the \c VXORPS / XORPS instruction.
1268*344a7f5eSAndroid Build Coastguard Worker ///
1269*344a7f5eSAndroid Build Coastguard Worker /// \returns An initialized 64-bit integer vector with all elements set to zero.
1270*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_setzero_si64(void)1271*344a7f5eSAndroid Build Coastguard Worker _mm_setzero_si64(void)
1272*344a7f5eSAndroid Build Coastguard Worker {
1273*344a7f5eSAndroid Build Coastguard Worker return (__m64){ 0LL };
1274*344a7f5eSAndroid Build Coastguard Worker }
1275*344a7f5eSAndroid Build Coastguard Worker
1276*344a7f5eSAndroid Build Coastguard Worker /// \brief Constructs a 64-bit integer vector initialized with the specified
1277*344a7f5eSAndroid Build Coastguard Worker /// 32-bit integer values.
1278*344a7f5eSAndroid Build Coastguard Worker ///
1279*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1280*344a7f5eSAndroid Build Coastguard Worker ///
1281*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic is a utility function and does not correspond to a specific
1282*344a7f5eSAndroid Build Coastguard Worker /// instruction.
1283*344a7f5eSAndroid Build Coastguard Worker ///
1284*344a7f5eSAndroid Build Coastguard Worker /// \param __i1
1285*344a7f5eSAndroid Build Coastguard Worker /// A 32-bit integer value used to initialize the upper 32 bits of the
1286*344a7f5eSAndroid Build Coastguard Worker /// result.
1287*344a7f5eSAndroid Build Coastguard Worker /// \param __i0
1288*344a7f5eSAndroid Build Coastguard Worker /// A 32-bit integer value used to initialize the lower 32 bits of the
1289*344a7f5eSAndroid Build Coastguard Worker /// result.
1290*344a7f5eSAndroid Build Coastguard Worker /// \returns An initialized 64-bit integer vector.
1291*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_set_pi32(int __i1,int __i0)1292*344a7f5eSAndroid Build Coastguard Worker _mm_set_pi32(int __i1, int __i0)
1293*344a7f5eSAndroid Build Coastguard Worker {
1294*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_vec_init_v2si(__i0, __i1);
1295*344a7f5eSAndroid Build Coastguard Worker }
1296*344a7f5eSAndroid Build Coastguard Worker
1297*344a7f5eSAndroid Build Coastguard Worker /// \brief Constructs a 64-bit integer vector initialized with the specified
1298*344a7f5eSAndroid Build Coastguard Worker /// 16-bit integer values.
1299*344a7f5eSAndroid Build Coastguard Worker ///
1300*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1301*344a7f5eSAndroid Build Coastguard Worker ///
1302*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic is a utility function and does not correspond to a specific
1303*344a7f5eSAndroid Build Coastguard Worker /// instruction.
1304*344a7f5eSAndroid Build Coastguard Worker ///
1305*344a7f5eSAndroid Build Coastguard Worker /// \param __s3
1306*344a7f5eSAndroid Build Coastguard Worker /// A 16-bit integer value used to initialize bits [63:48] of the result.
1307*344a7f5eSAndroid Build Coastguard Worker /// \param __s2
1308*344a7f5eSAndroid Build Coastguard Worker /// A 16-bit integer value used to initialize bits [47:32] of the result.
1309*344a7f5eSAndroid Build Coastguard Worker /// \param __s1
1310*344a7f5eSAndroid Build Coastguard Worker /// A 16-bit integer value used to initialize bits [31:16] of the result.
1311*344a7f5eSAndroid Build Coastguard Worker /// \param __s0
1312*344a7f5eSAndroid Build Coastguard Worker /// A 16-bit integer value used to initialize bits [15:0] of the result.
1313*344a7f5eSAndroid Build Coastguard Worker /// \returns An initialized 64-bit integer vector.
1314*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_set_pi16(short __s3,short __s2,short __s1,short __s0)1315*344a7f5eSAndroid Build Coastguard Worker _mm_set_pi16(short __s3, short __s2, short __s1, short __s0)
1316*344a7f5eSAndroid Build Coastguard Worker {
1317*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_vec_init_v4hi(__s0, __s1, __s2, __s3);
1318*344a7f5eSAndroid Build Coastguard Worker }
1319*344a7f5eSAndroid Build Coastguard Worker
1320*344a7f5eSAndroid Build Coastguard Worker /// \brief Constructs a 64-bit integer vector initialized with the specified
1321*344a7f5eSAndroid Build Coastguard Worker /// 8-bit integer values.
1322*344a7f5eSAndroid Build Coastguard Worker ///
1323*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1324*344a7f5eSAndroid Build Coastguard Worker ///
1325*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic is a utility function and does not correspond to a specific
1326*344a7f5eSAndroid Build Coastguard Worker /// instruction.
1327*344a7f5eSAndroid Build Coastguard Worker ///
1328*344a7f5eSAndroid Build Coastguard Worker /// \param __b7
1329*344a7f5eSAndroid Build Coastguard Worker /// An 8-bit integer value used to initialize bits [63:56] of the result.
1330*344a7f5eSAndroid Build Coastguard Worker /// \param __b6
1331*344a7f5eSAndroid Build Coastguard Worker /// An 8-bit integer value used to initialize bits [55:48] of the result.
1332*344a7f5eSAndroid Build Coastguard Worker /// \param __b5
1333*344a7f5eSAndroid Build Coastguard Worker /// An 8-bit integer value used to initialize bits [47:40] of the result.
1334*344a7f5eSAndroid Build Coastguard Worker /// \param __b4
1335*344a7f5eSAndroid Build Coastguard Worker /// An 8-bit integer value used to initialize bits [39:32] of the result.
1336*344a7f5eSAndroid Build Coastguard Worker /// \param __b3
1337*344a7f5eSAndroid Build Coastguard Worker /// An 8-bit integer value used to initialize bits [31:24] of the result.
1338*344a7f5eSAndroid Build Coastguard Worker /// \param __b2
1339*344a7f5eSAndroid Build Coastguard Worker /// An 8-bit integer value used to initialize bits [23:16] of the result.
1340*344a7f5eSAndroid Build Coastguard Worker /// \param __b1
1341*344a7f5eSAndroid Build Coastguard Worker /// An 8-bit integer value used to initialize bits [15:8] of the result.
1342*344a7f5eSAndroid Build Coastguard Worker /// \param __b0
1343*344a7f5eSAndroid Build Coastguard Worker /// An 8-bit integer value used to initialize bits [7:0] of the result.
1344*344a7f5eSAndroid Build Coastguard Worker /// \returns An initialized 64-bit integer vector.
1345*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_set_pi8(char __b7,char __b6,char __b5,char __b4,char __b3,char __b2,char __b1,char __b0)1346*344a7f5eSAndroid Build Coastguard Worker _mm_set_pi8(char __b7, char __b6, char __b5, char __b4, char __b3, char __b2,
1347*344a7f5eSAndroid Build Coastguard Worker char __b1, char __b0)
1348*344a7f5eSAndroid Build Coastguard Worker {
1349*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_vec_init_v8qi(__b0, __b1, __b2, __b3,
1350*344a7f5eSAndroid Build Coastguard Worker __b4, __b5, __b6, __b7);
1351*344a7f5eSAndroid Build Coastguard Worker }
1352*344a7f5eSAndroid Build Coastguard Worker
1353*344a7f5eSAndroid Build Coastguard Worker /// \brief Constructs a 64-bit integer vector of [2 x i32], with each of the
1354*344a7f5eSAndroid Build Coastguard Worker /// 32-bit integer vector elements set to the specified 32-bit integer
1355*344a7f5eSAndroid Build Coastguard Worker /// value.
1356*344a7f5eSAndroid Build Coastguard Worker ///
1357*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1358*344a7f5eSAndroid Build Coastguard Worker ///
1359*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VPSHUFD / PSHUFD instruction.
1360*344a7f5eSAndroid Build Coastguard Worker ///
1361*344a7f5eSAndroid Build Coastguard Worker /// \param __i
1362*344a7f5eSAndroid Build Coastguard Worker /// A 32-bit integer value used to initialize each vector element of the
1363*344a7f5eSAndroid Build Coastguard Worker /// result.
1364*344a7f5eSAndroid Build Coastguard Worker /// \returns An initialized 64-bit integer vector of [2 x i32].
1365*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_set1_pi32(int __i)1366*344a7f5eSAndroid Build Coastguard Worker _mm_set1_pi32(int __i)
1367*344a7f5eSAndroid Build Coastguard Worker {
1368*344a7f5eSAndroid Build Coastguard Worker return _mm_set_pi32(__i, __i);
1369*344a7f5eSAndroid Build Coastguard Worker }
1370*344a7f5eSAndroid Build Coastguard Worker
1371*344a7f5eSAndroid Build Coastguard Worker /// \brief Constructs a 64-bit integer vector of [4 x i16], with each of the
1372*344a7f5eSAndroid Build Coastguard Worker /// 16-bit integer vector elements set to the specified 16-bit integer
1373*344a7f5eSAndroid Build Coastguard Worker /// value.
1374*344a7f5eSAndroid Build Coastguard Worker ///
1375*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1376*344a7f5eSAndroid Build Coastguard Worker ///
1377*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VPSHUFLW / PSHUFLW instruction.
1378*344a7f5eSAndroid Build Coastguard Worker ///
1379*344a7f5eSAndroid Build Coastguard Worker /// \param __w
1380*344a7f5eSAndroid Build Coastguard Worker /// A 16-bit integer value used to initialize each vector element of the
1381*344a7f5eSAndroid Build Coastguard Worker /// result.
1382*344a7f5eSAndroid Build Coastguard Worker /// \returns An initialized 64-bit integer vector of [4 x i16].
1383*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_set1_pi16(short __w)1384*344a7f5eSAndroid Build Coastguard Worker _mm_set1_pi16(short __w)
1385*344a7f5eSAndroid Build Coastguard Worker {
1386*344a7f5eSAndroid Build Coastguard Worker return _mm_set_pi16(__w, __w, __w, __w);
1387*344a7f5eSAndroid Build Coastguard Worker }
1388*344a7f5eSAndroid Build Coastguard Worker
1389*344a7f5eSAndroid Build Coastguard Worker /// \brief Constructs a 64-bit integer vector of [8 x i8], with each of the
1390*344a7f5eSAndroid Build Coastguard Worker /// 8-bit integer vector elements set to the specified 8-bit integer value.
1391*344a7f5eSAndroid Build Coastguard Worker ///
1392*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1393*344a7f5eSAndroid Build Coastguard Worker ///
1394*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VPUNPCKLBW + VPSHUFLW / \c PUNPCKLBW +
1395*344a7f5eSAndroid Build Coastguard Worker /// PSHUFLW instruction.
1396*344a7f5eSAndroid Build Coastguard Worker ///
1397*344a7f5eSAndroid Build Coastguard Worker /// \param __b
1398*344a7f5eSAndroid Build Coastguard Worker /// An 8-bit integer value used to initialize each vector element of the
1399*344a7f5eSAndroid Build Coastguard Worker /// result.
1400*344a7f5eSAndroid Build Coastguard Worker /// \returns An initialized 64-bit integer vector of [8 x i8].
1401*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_set1_pi8(char __b)1402*344a7f5eSAndroid Build Coastguard Worker _mm_set1_pi8(char __b)
1403*344a7f5eSAndroid Build Coastguard Worker {
1404*344a7f5eSAndroid Build Coastguard Worker return _mm_set_pi8(__b, __b, __b, __b, __b, __b, __b, __b);
1405*344a7f5eSAndroid Build Coastguard Worker }
1406*344a7f5eSAndroid Build Coastguard Worker
1407*344a7f5eSAndroid Build Coastguard Worker /// \brief Constructs a 64-bit integer vector, initialized in reverse order with
1408*344a7f5eSAndroid Build Coastguard Worker /// the specified 32-bit integer values.
1409*344a7f5eSAndroid Build Coastguard Worker ///
1410*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1411*344a7f5eSAndroid Build Coastguard Worker ///
1412*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic is a utility function and does not correspond to a specific
1413*344a7f5eSAndroid Build Coastguard Worker /// instruction.
1414*344a7f5eSAndroid Build Coastguard Worker ///
1415*344a7f5eSAndroid Build Coastguard Worker /// \param __i0
1416*344a7f5eSAndroid Build Coastguard Worker /// A 32-bit integer value used to initialize the lower 32 bits of the
1417*344a7f5eSAndroid Build Coastguard Worker /// result.
1418*344a7f5eSAndroid Build Coastguard Worker /// \param __i1
1419*344a7f5eSAndroid Build Coastguard Worker /// A 32-bit integer value used to initialize the upper 32 bits of the
1420*344a7f5eSAndroid Build Coastguard Worker /// result.
1421*344a7f5eSAndroid Build Coastguard Worker /// \returns An initialized 64-bit integer vector.
1422*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_setr_pi32(int __i0,int __i1)1423*344a7f5eSAndroid Build Coastguard Worker _mm_setr_pi32(int __i0, int __i1)
1424*344a7f5eSAndroid Build Coastguard Worker {
1425*344a7f5eSAndroid Build Coastguard Worker return _mm_set_pi32(__i1, __i0);
1426*344a7f5eSAndroid Build Coastguard Worker }
1427*344a7f5eSAndroid Build Coastguard Worker
1428*344a7f5eSAndroid Build Coastguard Worker /// \brief Constructs a 64-bit integer vector, initialized in reverse order with
1429*344a7f5eSAndroid Build Coastguard Worker /// the specified 16-bit integer values.
1430*344a7f5eSAndroid Build Coastguard Worker ///
1431*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1432*344a7f5eSAndroid Build Coastguard Worker ///
1433*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic is a utility function and does not correspond to a specific
1434*344a7f5eSAndroid Build Coastguard Worker /// instruction.
1435*344a7f5eSAndroid Build Coastguard Worker ///
1436*344a7f5eSAndroid Build Coastguard Worker /// \param __w0
1437*344a7f5eSAndroid Build Coastguard Worker /// A 16-bit integer value used to initialize bits [15:0] of the result.
1438*344a7f5eSAndroid Build Coastguard Worker /// \param __w1
1439*344a7f5eSAndroid Build Coastguard Worker /// A 16-bit integer value used to initialize bits [31:16] of the result.
1440*344a7f5eSAndroid Build Coastguard Worker /// \param __w2
1441*344a7f5eSAndroid Build Coastguard Worker /// A 16-bit integer value used to initialize bits [47:32] of the result.
1442*344a7f5eSAndroid Build Coastguard Worker /// \param __w3
1443*344a7f5eSAndroid Build Coastguard Worker /// A 16-bit integer value used to initialize bits [63:48] of the result.
1444*344a7f5eSAndroid Build Coastguard Worker /// \returns An initialized 64-bit integer vector.
1445*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_setr_pi16(short __w0,short __w1,short __w2,short __w3)1446*344a7f5eSAndroid Build Coastguard Worker _mm_setr_pi16(short __w0, short __w1, short __w2, short __w3)
1447*344a7f5eSAndroid Build Coastguard Worker {
1448*344a7f5eSAndroid Build Coastguard Worker return _mm_set_pi16(__w3, __w2, __w1, __w0);
1449*344a7f5eSAndroid Build Coastguard Worker }
1450*344a7f5eSAndroid Build Coastguard Worker
1451*344a7f5eSAndroid Build Coastguard Worker /// \brief Constructs a 64-bit integer vector, initialized in reverse order with
1452*344a7f5eSAndroid Build Coastguard Worker /// the specified 8-bit integer values.
1453*344a7f5eSAndroid Build Coastguard Worker ///
1454*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
1455*344a7f5eSAndroid Build Coastguard Worker ///
1456*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic is a utility function and does not correspond to a specific
1457*344a7f5eSAndroid Build Coastguard Worker /// instruction.
1458*344a7f5eSAndroid Build Coastguard Worker ///
1459*344a7f5eSAndroid Build Coastguard Worker /// \param __b0
1460*344a7f5eSAndroid Build Coastguard Worker /// An 8-bit integer value used to initialize bits [7:0] of the result.
1461*344a7f5eSAndroid Build Coastguard Worker /// \param __b1
1462*344a7f5eSAndroid Build Coastguard Worker /// An 8-bit integer value used to initialize bits [15:8] of the result.
1463*344a7f5eSAndroid Build Coastguard Worker /// \param __b2
1464*344a7f5eSAndroid Build Coastguard Worker /// An 8-bit integer value used to initialize bits [23:16] of the result.
1465*344a7f5eSAndroid Build Coastguard Worker /// \param __b3
1466*344a7f5eSAndroid Build Coastguard Worker /// An 8-bit integer value used to initialize bits [31:24] of the result.
1467*344a7f5eSAndroid Build Coastguard Worker /// \param __b4
1468*344a7f5eSAndroid Build Coastguard Worker /// An 8-bit integer value used to initialize bits [39:32] of the result.
1469*344a7f5eSAndroid Build Coastguard Worker /// \param __b5
1470*344a7f5eSAndroid Build Coastguard Worker /// An 8-bit integer value used to initialize bits [47:40] of the result.
1471*344a7f5eSAndroid Build Coastguard Worker /// \param __b6
1472*344a7f5eSAndroid Build Coastguard Worker /// An 8-bit integer value used to initialize bits [55:48] of the result.
1473*344a7f5eSAndroid Build Coastguard Worker /// \param __b7
1474*344a7f5eSAndroid Build Coastguard Worker /// An 8-bit integer value used to initialize bits [63:56] of the result.
1475*344a7f5eSAndroid Build Coastguard Worker /// \returns An initialized 64-bit integer vector.
1476*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_setr_pi8(char __b0,char __b1,char __b2,char __b3,char __b4,char __b5,char __b6,char __b7)1477*344a7f5eSAndroid Build Coastguard Worker _mm_setr_pi8(char __b0, char __b1, char __b2, char __b3, char __b4, char __b5,
1478*344a7f5eSAndroid Build Coastguard Worker char __b6, char __b7)
1479*344a7f5eSAndroid Build Coastguard Worker {
1480*344a7f5eSAndroid Build Coastguard Worker return _mm_set_pi8(__b7, __b6, __b5, __b4, __b3, __b2, __b1, __b0);
1481*344a7f5eSAndroid Build Coastguard Worker }
1482*344a7f5eSAndroid Build Coastguard Worker
1483*344a7f5eSAndroid Build Coastguard Worker #undef __DEFAULT_FN_ATTRS
1484*344a7f5eSAndroid Build Coastguard Worker
1485*344a7f5eSAndroid Build Coastguard Worker /* Aliases for compatibility. */
1486*344a7f5eSAndroid Build Coastguard Worker #define _m_empty _mm_empty
1487*344a7f5eSAndroid Build Coastguard Worker #define _m_from_int _mm_cvtsi32_si64
1488*344a7f5eSAndroid Build Coastguard Worker #define _m_from_int64 _mm_cvtsi64_m64
1489*344a7f5eSAndroid Build Coastguard Worker #define _m_to_int _mm_cvtsi64_si32
1490*344a7f5eSAndroid Build Coastguard Worker #define _m_to_int64 _mm_cvtm64_si64
1491*344a7f5eSAndroid Build Coastguard Worker #define _m_packsswb _mm_packs_pi16
1492*344a7f5eSAndroid Build Coastguard Worker #define _m_packssdw _mm_packs_pi32
1493*344a7f5eSAndroid Build Coastguard Worker #define _m_packuswb _mm_packs_pu16
1494*344a7f5eSAndroid Build Coastguard Worker #define _m_punpckhbw _mm_unpackhi_pi8
1495*344a7f5eSAndroid Build Coastguard Worker #define _m_punpckhwd _mm_unpackhi_pi16
1496*344a7f5eSAndroid Build Coastguard Worker #define _m_punpckhdq _mm_unpackhi_pi32
1497*344a7f5eSAndroid Build Coastguard Worker #define _m_punpcklbw _mm_unpacklo_pi8
1498*344a7f5eSAndroid Build Coastguard Worker #define _m_punpcklwd _mm_unpacklo_pi16
1499*344a7f5eSAndroid Build Coastguard Worker #define _m_punpckldq _mm_unpacklo_pi32
1500*344a7f5eSAndroid Build Coastguard Worker #define _m_paddb _mm_add_pi8
1501*344a7f5eSAndroid Build Coastguard Worker #define _m_paddw _mm_add_pi16
1502*344a7f5eSAndroid Build Coastguard Worker #define _m_paddd _mm_add_pi32
1503*344a7f5eSAndroid Build Coastguard Worker #define _m_paddsb _mm_adds_pi8
1504*344a7f5eSAndroid Build Coastguard Worker #define _m_paddsw _mm_adds_pi16
1505*344a7f5eSAndroid Build Coastguard Worker #define _m_paddusb _mm_adds_pu8
1506*344a7f5eSAndroid Build Coastguard Worker #define _m_paddusw _mm_adds_pu16
1507*344a7f5eSAndroid Build Coastguard Worker #define _m_psubb _mm_sub_pi8
1508*344a7f5eSAndroid Build Coastguard Worker #define _m_psubw _mm_sub_pi16
1509*344a7f5eSAndroid Build Coastguard Worker #define _m_psubd _mm_sub_pi32
1510*344a7f5eSAndroid Build Coastguard Worker #define _m_psubsb _mm_subs_pi8
1511*344a7f5eSAndroid Build Coastguard Worker #define _m_psubsw _mm_subs_pi16
1512*344a7f5eSAndroid Build Coastguard Worker #define _m_psubusb _mm_subs_pu8
1513*344a7f5eSAndroid Build Coastguard Worker #define _m_psubusw _mm_subs_pu16
1514*344a7f5eSAndroid Build Coastguard Worker #define _m_pmaddwd _mm_madd_pi16
1515*344a7f5eSAndroid Build Coastguard Worker #define _m_pmulhw _mm_mulhi_pi16
1516*344a7f5eSAndroid Build Coastguard Worker #define _m_pmullw _mm_mullo_pi16
1517*344a7f5eSAndroid Build Coastguard Worker #define _m_psllw _mm_sll_pi16
1518*344a7f5eSAndroid Build Coastguard Worker #define _m_psllwi _mm_slli_pi16
1519*344a7f5eSAndroid Build Coastguard Worker #define _m_pslld _mm_sll_pi32
1520*344a7f5eSAndroid Build Coastguard Worker #define _m_pslldi _mm_slli_pi32
1521*344a7f5eSAndroid Build Coastguard Worker #define _m_psllq _mm_sll_si64
1522*344a7f5eSAndroid Build Coastguard Worker #define _m_psllqi _mm_slli_si64
1523*344a7f5eSAndroid Build Coastguard Worker #define _m_psraw _mm_sra_pi16
1524*344a7f5eSAndroid Build Coastguard Worker #define _m_psrawi _mm_srai_pi16
1525*344a7f5eSAndroid Build Coastguard Worker #define _m_psrad _mm_sra_pi32
1526*344a7f5eSAndroid Build Coastguard Worker #define _m_psradi _mm_srai_pi32
1527*344a7f5eSAndroid Build Coastguard Worker #define _m_psrlw _mm_srl_pi16
1528*344a7f5eSAndroid Build Coastguard Worker #define _m_psrlwi _mm_srli_pi16
1529*344a7f5eSAndroid Build Coastguard Worker #define _m_psrld _mm_srl_pi32
1530*344a7f5eSAndroid Build Coastguard Worker #define _m_psrldi _mm_srli_pi32
1531*344a7f5eSAndroid Build Coastguard Worker #define _m_psrlq _mm_srl_si64
1532*344a7f5eSAndroid Build Coastguard Worker #define _m_psrlqi _mm_srli_si64
1533*344a7f5eSAndroid Build Coastguard Worker #define _m_pand _mm_and_si64
1534*344a7f5eSAndroid Build Coastguard Worker #define _m_pandn _mm_andnot_si64
1535*344a7f5eSAndroid Build Coastguard Worker #define _m_por _mm_or_si64
1536*344a7f5eSAndroid Build Coastguard Worker #define _m_pxor _mm_xor_si64
1537*344a7f5eSAndroid Build Coastguard Worker #define _m_pcmpeqb _mm_cmpeq_pi8
1538*344a7f5eSAndroid Build Coastguard Worker #define _m_pcmpeqw _mm_cmpeq_pi16
1539*344a7f5eSAndroid Build Coastguard Worker #define _m_pcmpeqd _mm_cmpeq_pi32
1540*344a7f5eSAndroid Build Coastguard Worker #define _m_pcmpgtb _mm_cmpgt_pi8
1541*344a7f5eSAndroid Build Coastguard Worker #define _m_pcmpgtw _mm_cmpgt_pi16
1542*344a7f5eSAndroid Build Coastguard Worker #define _m_pcmpgtd _mm_cmpgt_pi32
1543*344a7f5eSAndroid Build Coastguard Worker
1544*344a7f5eSAndroid Build Coastguard Worker #endif /* __MMINTRIN_H */
1545*344a7f5eSAndroid Build Coastguard Worker
1546