1*344a7f5eSAndroid Build Coastguard Worker /*===---- tmmintrin.h - SSSE3 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 __TMMINTRIN_H
25*344a7f5eSAndroid Build Coastguard Worker #define __TMMINTRIN_H
26*344a7f5eSAndroid Build Coastguard Worker
27*344a7f5eSAndroid Build Coastguard Worker #include <pmmintrin.h>
28*344a7f5eSAndroid Build Coastguard Worker
29*344a7f5eSAndroid Build Coastguard Worker /* Define the default attributes for the functions in this file. */
30*344a7f5eSAndroid Build Coastguard Worker #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("ssse3")))
31*344a7f5eSAndroid Build Coastguard Worker
32*344a7f5eSAndroid Build Coastguard Worker /// \brief Computes the absolute value of each of the packed 8-bit signed
33*344a7f5eSAndroid Build Coastguard Worker /// integers in the source operand and stores the 8-bit unsigned integer
34*344a7f5eSAndroid Build Coastguard Worker /// results in the destination.
35*344a7f5eSAndroid Build Coastguard Worker ///
36*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
37*344a7f5eSAndroid Build Coastguard Worker ///
38*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PABSB instruction.
39*344a7f5eSAndroid Build Coastguard Worker ///
40*344a7f5eSAndroid Build Coastguard Worker /// \param __a
41*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit vector of [8 x i8].
42*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector containing the absolute values of the
43*344a7f5eSAndroid Build Coastguard Worker /// elements in the operand.
44*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_abs_pi8(__m64 __a)45*344a7f5eSAndroid Build Coastguard Worker _mm_abs_pi8(__m64 __a)
46*344a7f5eSAndroid Build Coastguard Worker {
47*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_pabsb((__v8qi)__a);
48*344a7f5eSAndroid Build Coastguard Worker }
49*344a7f5eSAndroid Build Coastguard Worker
50*344a7f5eSAndroid Build Coastguard Worker /// \brief Computes the absolute value of each of the packed 8-bit signed
51*344a7f5eSAndroid Build Coastguard Worker /// integers in the source operand and stores the 8-bit unsigned integer
52*344a7f5eSAndroid Build Coastguard Worker /// results in the destination.
53*344a7f5eSAndroid Build Coastguard Worker ///
54*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
55*344a7f5eSAndroid Build Coastguard Worker ///
56*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VPABSB instruction.
57*344a7f5eSAndroid Build Coastguard Worker ///
58*344a7f5eSAndroid Build Coastguard Worker /// \param __a
59*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit vector of [16 x i8].
60*344a7f5eSAndroid Build Coastguard Worker /// \returns A 128-bit integer vector containing the absolute values of the
61*344a7f5eSAndroid Build Coastguard Worker /// elements in the operand.
62*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_abs_epi8(__m128i __a)63*344a7f5eSAndroid Build Coastguard Worker _mm_abs_epi8(__m128i __a)
64*344a7f5eSAndroid Build Coastguard Worker {
65*344a7f5eSAndroid Build Coastguard Worker return (__m128i)__builtin_ia32_pabsb128((__v16qi)__a);
66*344a7f5eSAndroid Build Coastguard Worker }
67*344a7f5eSAndroid Build Coastguard Worker
68*344a7f5eSAndroid Build Coastguard Worker /// \brief Computes the absolute value of each of the packed 16-bit signed
69*344a7f5eSAndroid Build Coastguard Worker /// integers in the source operand and stores the 16-bit unsigned integer
70*344a7f5eSAndroid Build Coastguard Worker /// results in the destination.
71*344a7f5eSAndroid Build Coastguard Worker ///
72*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
73*344a7f5eSAndroid Build Coastguard Worker ///
74*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PABSW instruction.
75*344a7f5eSAndroid Build Coastguard Worker ///
76*344a7f5eSAndroid Build Coastguard Worker /// \param __a
77*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit vector of [4 x i16].
78*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector containing the absolute values of the
79*344a7f5eSAndroid Build Coastguard Worker /// elements in the operand.
80*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_abs_pi16(__m64 __a)81*344a7f5eSAndroid Build Coastguard Worker _mm_abs_pi16(__m64 __a)
82*344a7f5eSAndroid Build Coastguard Worker {
83*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_pabsw((__v4hi)__a);
84*344a7f5eSAndroid Build Coastguard Worker }
85*344a7f5eSAndroid Build Coastguard Worker
86*344a7f5eSAndroid Build Coastguard Worker /// \brief Computes the absolute value of each of the packed 16-bit signed
87*344a7f5eSAndroid Build Coastguard Worker /// integers in the source operand and stores the 16-bit unsigned integer
88*344a7f5eSAndroid Build Coastguard Worker /// results in the destination.
89*344a7f5eSAndroid Build Coastguard Worker ///
90*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
91*344a7f5eSAndroid Build Coastguard Worker ///
92*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VPABSW instruction.
93*344a7f5eSAndroid Build Coastguard Worker ///
94*344a7f5eSAndroid Build Coastguard Worker /// \param __a
95*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit vector of [8 x i16].
96*344a7f5eSAndroid Build Coastguard Worker /// \returns A 128-bit integer vector containing the absolute values of the
97*344a7f5eSAndroid Build Coastguard Worker /// elements in the operand.
98*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_abs_epi16(__m128i __a)99*344a7f5eSAndroid Build Coastguard Worker _mm_abs_epi16(__m128i __a)
100*344a7f5eSAndroid Build Coastguard Worker {
101*344a7f5eSAndroid Build Coastguard Worker return (__m128i)__builtin_ia32_pabsw128((__v8hi)__a);
102*344a7f5eSAndroid Build Coastguard Worker }
103*344a7f5eSAndroid Build Coastguard Worker
104*344a7f5eSAndroid Build Coastguard Worker /// \brief Computes the absolute value of each of the packed 32-bit signed
105*344a7f5eSAndroid Build Coastguard Worker /// integers in the source operand and stores the 32-bit unsigned integer
106*344a7f5eSAndroid Build Coastguard Worker /// results in the destination.
107*344a7f5eSAndroid Build Coastguard Worker ///
108*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
109*344a7f5eSAndroid Build Coastguard Worker ///
110*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PABSD instruction.
111*344a7f5eSAndroid Build Coastguard Worker ///
112*344a7f5eSAndroid Build Coastguard Worker /// \param __a
113*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit vector of [2 x i32].
114*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector containing the absolute values of the
115*344a7f5eSAndroid Build Coastguard Worker /// elements in the operand.
116*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_abs_pi32(__m64 __a)117*344a7f5eSAndroid Build Coastguard Worker _mm_abs_pi32(__m64 __a)
118*344a7f5eSAndroid Build Coastguard Worker {
119*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_pabsd((__v2si)__a);
120*344a7f5eSAndroid Build Coastguard Worker }
121*344a7f5eSAndroid Build Coastguard Worker
122*344a7f5eSAndroid Build Coastguard Worker /// \brief Computes the absolute value of each of the packed 32-bit signed
123*344a7f5eSAndroid Build Coastguard Worker /// integers in the source operand and stores the 32-bit unsigned integer
124*344a7f5eSAndroid Build Coastguard Worker /// results in the destination.
125*344a7f5eSAndroid Build Coastguard Worker ///
126*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
127*344a7f5eSAndroid Build Coastguard Worker ///
128*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VPABSD instruction.
129*344a7f5eSAndroid Build Coastguard Worker ///
130*344a7f5eSAndroid Build Coastguard Worker /// \param __a
131*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit vector of [4 x i32].
132*344a7f5eSAndroid Build Coastguard Worker /// \returns A 128-bit integer vector containing the absolute values of the
133*344a7f5eSAndroid Build Coastguard Worker /// elements in the operand.
134*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_abs_epi32(__m128i __a)135*344a7f5eSAndroid Build Coastguard Worker _mm_abs_epi32(__m128i __a)
136*344a7f5eSAndroid Build Coastguard Worker {
137*344a7f5eSAndroid Build Coastguard Worker return (__m128i)__builtin_ia32_pabsd128((__v4si)__a);
138*344a7f5eSAndroid Build Coastguard Worker }
139*344a7f5eSAndroid Build Coastguard Worker
140*344a7f5eSAndroid Build Coastguard Worker /// \brief Concatenates the two 128-bit integer vector operands, and
141*344a7f5eSAndroid Build Coastguard Worker /// right-shifts the result by the number of bytes specified in the immediate
142*344a7f5eSAndroid Build Coastguard Worker /// operand.
143*344a7f5eSAndroid Build Coastguard Worker ///
144*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
145*344a7f5eSAndroid Build Coastguard Worker ///
146*344a7f5eSAndroid Build Coastguard Worker /// \code
147*344a7f5eSAndroid Build Coastguard Worker /// __m128i _mm_alignr_epi8(__m128i a, __m128i b, const int n);
148*344a7f5eSAndroid Build Coastguard Worker /// \endcode
149*344a7f5eSAndroid Build Coastguard Worker ///
150*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PALIGNR instruction.
151*344a7f5eSAndroid Build Coastguard Worker ///
152*344a7f5eSAndroid Build Coastguard Worker /// \param a
153*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit vector of [16 x i8] containing one of the source operands.
154*344a7f5eSAndroid Build Coastguard Worker /// \param b
155*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit vector of [16 x i8] containing one of the source operands.
156*344a7f5eSAndroid Build Coastguard Worker /// \param n
157*344a7f5eSAndroid Build Coastguard Worker /// An immediate operand specifying how many bytes to right-shift the result.
158*344a7f5eSAndroid Build Coastguard Worker /// \returns A 128-bit integer vector containing the concatenated right-shifted
159*344a7f5eSAndroid Build Coastguard Worker /// value.
160*344a7f5eSAndroid Build Coastguard Worker #define _mm_alignr_epi8(a, b, n) __extension__ ({ \
161*344a7f5eSAndroid Build Coastguard Worker (__m128i)__builtin_ia32_palignr128((__v16qi)(__m128i)(a), \
162*344a7f5eSAndroid Build Coastguard Worker (__v16qi)(__m128i)(b), (n)); })
163*344a7f5eSAndroid Build Coastguard Worker
164*344a7f5eSAndroid Build Coastguard Worker /// \brief Concatenates the two 64-bit integer vector operands, and right-shifts
165*344a7f5eSAndroid Build Coastguard Worker /// the result by the number of bytes specified in the immediate operand.
166*344a7f5eSAndroid Build Coastguard Worker ///
167*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
168*344a7f5eSAndroid Build Coastguard Worker ///
169*344a7f5eSAndroid Build Coastguard Worker /// \code
170*344a7f5eSAndroid Build Coastguard Worker /// __m64 _mm_alignr_pi8(__m64 a, __m64 b, const int n);
171*344a7f5eSAndroid Build Coastguard Worker /// \endcode
172*344a7f5eSAndroid Build Coastguard Worker ///
173*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PALIGNR instruction.
174*344a7f5eSAndroid Build Coastguard Worker ///
175*344a7f5eSAndroid Build Coastguard Worker /// \param a
176*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit vector of [8 x i8] containing one of the source operands.
177*344a7f5eSAndroid Build Coastguard Worker /// \param b
178*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit vector of [8 x i8] containing one of the source operands.
179*344a7f5eSAndroid Build Coastguard Worker /// \param n
180*344a7f5eSAndroid Build Coastguard Worker /// An immediate operand specifying how many bytes to right-shift the result.
181*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector containing the concatenated right-shifted
182*344a7f5eSAndroid Build Coastguard Worker /// value.
183*344a7f5eSAndroid Build Coastguard Worker #define _mm_alignr_pi8(a, b, n) __extension__ ({ \
184*344a7f5eSAndroid Build Coastguard Worker (__m64)__builtin_ia32_palignr((__v8qi)(__m64)(a), (__v8qi)(__m64)(b), (n)); })
185*344a7f5eSAndroid Build Coastguard Worker
186*344a7f5eSAndroid Build Coastguard Worker /// \brief Horizontally adds the adjacent pairs of values contained in 2 packed
187*344a7f5eSAndroid Build Coastguard Worker /// 128-bit vectors of [8 x i16].
188*344a7f5eSAndroid Build Coastguard Worker ///
189*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
190*344a7f5eSAndroid Build Coastguard Worker ///
191*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VPHADDW instruction.
192*344a7f5eSAndroid Build Coastguard Worker ///
193*344a7f5eSAndroid Build Coastguard Worker /// \param __a
194*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit vector of [8 x i16] containing one of the source operands. The
195*344a7f5eSAndroid Build Coastguard Worker /// horizontal sums of the values are stored in the lower bits of the
196*344a7f5eSAndroid Build Coastguard Worker /// destination.
197*344a7f5eSAndroid Build Coastguard Worker /// \param __b
198*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit vector of [8 x i16] containing one of the source operands. The
199*344a7f5eSAndroid Build Coastguard Worker /// horizontal sums of the values are stored in the upper bits of the
200*344a7f5eSAndroid Build Coastguard Worker /// destination.
201*344a7f5eSAndroid Build Coastguard Worker /// \returns A 128-bit vector of [8 x i16] containing the horizontal sums of
202*344a7f5eSAndroid Build Coastguard Worker /// both operands.
203*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_hadd_epi16(__m128i __a,__m128i __b)204*344a7f5eSAndroid Build Coastguard Worker _mm_hadd_epi16(__m128i __a, __m128i __b)
205*344a7f5eSAndroid Build Coastguard Worker {
206*344a7f5eSAndroid Build Coastguard Worker return (__m128i)__builtin_ia32_phaddw128((__v8hi)__a, (__v8hi)__b);
207*344a7f5eSAndroid Build Coastguard Worker }
208*344a7f5eSAndroid Build Coastguard Worker
209*344a7f5eSAndroid Build Coastguard Worker /// \brief Horizontally adds the adjacent pairs of values contained in 2 packed
210*344a7f5eSAndroid Build Coastguard Worker /// 128-bit vectors of [4 x i32].
211*344a7f5eSAndroid Build Coastguard Worker ///
212*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
213*344a7f5eSAndroid Build Coastguard Worker ///
214*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VPHADDD instruction.
215*344a7f5eSAndroid Build Coastguard Worker ///
216*344a7f5eSAndroid Build Coastguard Worker /// \param __a
217*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit vector of [4 x i32] containing one of the source operands. The
218*344a7f5eSAndroid Build Coastguard Worker /// horizontal sums of the values are stored in the lower bits of the
219*344a7f5eSAndroid Build Coastguard Worker /// destination.
220*344a7f5eSAndroid Build Coastguard Worker /// \param __b
221*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit vector of [4 x i32] containing one of the source operands. The
222*344a7f5eSAndroid Build Coastguard Worker /// horizontal sums of the values are stored in the upper bits of the
223*344a7f5eSAndroid Build Coastguard Worker /// destination.
224*344a7f5eSAndroid Build Coastguard Worker /// \returns A 128-bit vector of [4 x i32] containing the horizontal sums of
225*344a7f5eSAndroid Build Coastguard Worker /// both operands.
226*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_hadd_epi32(__m128i __a,__m128i __b)227*344a7f5eSAndroid Build Coastguard Worker _mm_hadd_epi32(__m128i __a, __m128i __b)
228*344a7f5eSAndroid Build Coastguard Worker {
229*344a7f5eSAndroid Build Coastguard Worker return (__m128i)__builtin_ia32_phaddd128((__v4si)__a, (__v4si)__b);
230*344a7f5eSAndroid Build Coastguard Worker }
231*344a7f5eSAndroid Build Coastguard Worker
232*344a7f5eSAndroid Build Coastguard Worker /// \brief Horizontally adds the adjacent pairs of values contained in 2 packed
233*344a7f5eSAndroid Build Coastguard Worker /// 64-bit vectors of [4 x i16].
234*344a7f5eSAndroid Build Coastguard Worker ///
235*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
236*344a7f5eSAndroid Build Coastguard Worker ///
237*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PHADDW instruction.
238*344a7f5eSAndroid Build Coastguard Worker ///
239*344a7f5eSAndroid Build Coastguard Worker /// \param __a
240*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit vector of [4 x i16] containing one of the source operands. The
241*344a7f5eSAndroid Build Coastguard Worker /// horizontal sums of the values are stored in the lower bits of the
242*344a7f5eSAndroid Build Coastguard Worker /// destination.
243*344a7f5eSAndroid Build Coastguard Worker /// \param __b
244*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit vector of [4 x i16] containing one of the source operands. The
245*344a7f5eSAndroid Build Coastguard Worker /// horizontal sums of the values are stored in the upper bits of the
246*344a7f5eSAndroid Build Coastguard Worker /// destination.
247*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit vector of [4 x i16] containing the horizontal sums of both
248*344a7f5eSAndroid Build Coastguard Worker /// operands.
249*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_hadd_pi16(__m64 __a,__m64 __b)250*344a7f5eSAndroid Build Coastguard Worker _mm_hadd_pi16(__m64 __a, __m64 __b)
251*344a7f5eSAndroid Build Coastguard Worker {
252*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_phaddw((__v4hi)__a, (__v4hi)__b);
253*344a7f5eSAndroid Build Coastguard Worker }
254*344a7f5eSAndroid Build Coastguard Worker
255*344a7f5eSAndroid Build Coastguard Worker /// \brief Horizontally adds the adjacent pairs of values contained in 2 packed
256*344a7f5eSAndroid Build Coastguard Worker /// 64-bit vectors of [2 x i32].
257*344a7f5eSAndroid Build Coastguard Worker ///
258*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
259*344a7f5eSAndroid Build Coastguard Worker ///
260*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PHADDD instruction.
261*344a7f5eSAndroid Build Coastguard Worker ///
262*344a7f5eSAndroid Build Coastguard Worker /// \param __a
263*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit vector of [2 x i32] containing one of the source operands. The
264*344a7f5eSAndroid Build Coastguard Worker /// horizontal sums of the values are stored in the lower bits of the
265*344a7f5eSAndroid Build Coastguard Worker /// destination.
266*344a7f5eSAndroid Build Coastguard Worker /// \param __b
267*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit vector of [2 x i32] containing one of the source operands. The
268*344a7f5eSAndroid Build Coastguard Worker /// horizontal sums of the values are stored in the upper bits of the
269*344a7f5eSAndroid Build Coastguard Worker /// destination.
270*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit vector of [2 x i32] containing the horizontal sums of both
271*344a7f5eSAndroid Build Coastguard Worker /// operands.
272*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_hadd_pi32(__m64 __a,__m64 __b)273*344a7f5eSAndroid Build Coastguard Worker _mm_hadd_pi32(__m64 __a, __m64 __b)
274*344a7f5eSAndroid Build Coastguard Worker {
275*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_phaddd((__v2si)__a, (__v2si)__b);
276*344a7f5eSAndroid Build Coastguard Worker }
277*344a7f5eSAndroid Build Coastguard Worker
278*344a7f5eSAndroid Build Coastguard Worker /// \brief Horizontally adds the adjacent pairs of values contained in 2 packed
279*344a7f5eSAndroid Build Coastguard Worker /// 128-bit vectors of [8 x i16]. Positive sums greater than 7FFFh are
280*344a7f5eSAndroid Build Coastguard Worker /// saturated to 7FFFh. Negative sums less than 8000h are saturated to 8000h.
281*344a7f5eSAndroid Build Coastguard Worker ///
282*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
283*344a7f5eSAndroid Build Coastguard Worker ///
284*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VPHADDSW instruction.
285*344a7f5eSAndroid Build Coastguard Worker ///
286*344a7f5eSAndroid Build Coastguard Worker /// \param __a
287*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit vector of [8 x i16] containing one of the source operands. The
288*344a7f5eSAndroid Build Coastguard Worker /// horizontal sums of the values are stored in the lower bits of the
289*344a7f5eSAndroid Build Coastguard Worker /// destination.
290*344a7f5eSAndroid Build Coastguard Worker /// \param __b
291*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit vector of [8 x i16] containing one of the source operands. The
292*344a7f5eSAndroid Build Coastguard Worker /// horizontal sums of the values are stored in the upper bits of the
293*344a7f5eSAndroid Build Coastguard Worker /// destination.
294*344a7f5eSAndroid Build Coastguard Worker /// \returns A 128-bit vector of [8 x i16] containing the horizontal saturated
295*344a7f5eSAndroid Build Coastguard Worker /// sums of both operands.
296*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_hadds_epi16(__m128i __a,__m128i __b)297*344a7f5eSAndroid Build Coastguard Worker _mm_hadds_epi16(__m128i __a, __m128i __b)
298*344a7f5eSAndroid Build Coastguard Worker {
299*344a7f5eSAndroid Build Coastguard Worker return (__m128i)__builtin_ia32_phaddsw128((__v8hi)__a, (__v8hi)__b);
300*344a7f5eSAndroid Build Coastguard Worker }
301*344a7f5eSAndroid Build Coastguard Worker
302*344a7f5eSAndroid Build Coastguard Worker /// \brief Horizontally adds the adjacent pairs of values contained in 2 packed
303*344a7f5eSAndroid Build Coastguard Worker /// 64-bit vectors of [4 x i16]. Positive sums greater than 7FFFh are
304*344a7f5eSAndroid Build Coastguard Worker /// saturated to 7FFFh. Negative sums less than 8000h are saturated to 8000h.
305*344a7f5eSAndroid Build Coastguard Worker ///
306*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
307*344a7f5eSAndroid Build Coastguard Worker ///
308*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PHADDSW instruction.
309*344a7f5eSAndroid Build Coastguard Worker ///
310*344a7f5eSAndroid Build Coastguard Worker /// \param __a
311*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit vector of [4 x i16] containing one of the source operands. The
312*344a7f5eSAndroid Build Coastguard Worker /// horizontal sums of the values are stored in the lower bits of the
313*344a7f5eSAndroid Build Coastguard Worker /// destination.
314*344a7f5eSAndroid Build Coastguard Worker /// \param __b
315*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit vector of [4 x i16] containing one of the source operands. The
316*344a7f5eSAndroid Build Coastguard Worker /// horizontal sums of the values are stored in the upper bits of the
317*344a7f5eSAndroid Build Coastguard Worker /// destination.
318*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit vector of [4 x i16] containing the horizontal saturated
319*344a7f5eSAndroid Build Coastguard Worker /// sums of both operands.
320*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_hadds_pi16(__m64 __a,__m64 __b)321*344a7f5eSAndroid Build Coastguard Worker _mm_hadds_pi16(__m64 __a, __m64 __b)
322*344a7f5eSAndroid Build Coastguard Worker {
323*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_phaddsw((__v4hi)__a, (__v4hi)__b);
324*344a7f5eSAndroid Build Coastguard Worker }
325*344a7f5eSAndroid Build Coastguard Worker
326*344a7f5eSAndroid Build Coastguard Worker /// \brief Horizontally subtracts the adjacent pairs of values contained in 2
327*344a7f5eSAndroid Build Coastguard Worker /// packed 128-bit vectors of [8 x i16].
328*344a7f5eSAndroid Build Coastguard Worker ///
329*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
330*344a7f5eSAndroid Build Coastguard Worker ///
331*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VPHSUBW instruction.
332*344a7f5eSAndroid Build Coastguard Worker ///
333*344a7f5eSAndroid Build Coastguard Worker /// \param __a
334*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit vector of [8 x i16] containing one of the source operands. The
335*344a7f5eSAndroid Build Coastguard Worker /// horizontal differences between the values are stored in the lower bits of
336*344a7f5eSAndroid Build Coastguard Worker /// the destination.
337*344a7f5eSAndroid Build Coastguard Worker /// \param __b
338*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit vector of [8 x i16] containing one of the source operands. The
339*344a7f5eSAndroid Build Coastguard Worker /// horizontal differences between the values are stored in the upper bits of
340*344a7f5eSAndroid Build Coastguard Worker /// the destination.
341*344a7f5eSAndroid Build Coastguard Worker /// \returns A 128-bit vector of [8 x i16] containing the horizontal differences
342*344a7f5eSAndroid Build Coastguard Worker /// of both operands.
343*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_hsub_epi16(__m128i __a,__m128i __b)344*344a7f5eSAndroid Build Coastguard Worker _mm_hsub_epi16(__m128i __a, __m128i __b)
345*344a7f5eSAndroid Build Coastguard Worker {
346*344a7f5eSAndroid Build Coastguard Worker return (__m128i)__builtin_ia32_phsubw128((__v8hi)__a, (__v8hi)__b);
347*344a7f5eSAndroid Build Coastguard Worker }
348*344a7f5eSAndroid Build Coastguard Worker
349*344a7f5eSAndroid Build Coastguard Worker /// \brief Horizontally subtracts the adjacent pairs of values contained in 2
350*344a7f5eSAndroid Build Coastguard Worker /// packed 128-bit vectors of [4 x i32].
351*344a7f5eSAndroid Build Coastguard Worker ///
352*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
353*344a7f5eSAndroid Build Coastguard Worker ///
354*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VPHSUBD instruction.
355*344a7f5eSAndroid Build Coastguard Worker ///
356*344a7f5eSAndroid Build Coastguard Worker /// \param __a
357*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit vector of [4 x i32] containing one of the source operands. The
358*344a7f5eSAndroid Build Coastguard Worker /// horizontal differences between the values are stored in the lower bits of
359*344a7f5eSAndroid Build Coastguard Worker /// the destination.
360*344a7f5eSAndroid Build Coastguard Worker /// \param __b
361*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit vector of [4 x i32] containing one of the source operands. The
362*344a7f5eSAndroid Build Coastguard Worker /// horizontal differences between the values are stored in the upper bits of
363*344a7f5eSAndroid Build Coastguard Worker /// the destination.
364*344a7f5eSAndroid Build Coastguard Worker /// \returns A 128-bit vector of [4 x i32] containing the horizontal differences
365*344a7f5eSAndroid Build Coastguard Worker /// of both operands.
366*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_hsub_epi32(__m128i __a,__m128i __b)367*344a7f5eSAndroid Build Coastguard Worker _mm_hsub_epi32(__m128i __a, __m128i __b)
368*344a7f5eSAndroid Build Coastguard Worker {
369*344a7f5eSAndroid Build Coastguard Worker return (__m128i)__builtin_ia32_phsubd128((__v4si)__a, (__v4si)__b);
370*344a7f5eSAndroid Build Coastguard Worker }
371*344a7f5eSAndroid Build Coastguard Worker
372*344a7f5eSAndroid Build Coastguard Worker /// \brief Horizontally subtracts the adjacent pairs of values contained in 2
373*344a7f5eSAndroid Build Coastguard Worker /// packed 64-bit vectors of [4 x i16].
374*344a7f5eSAndroid Build Coastguard Worker ///
375*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
376*344a7f5eSAndroid Build Coastguard Worker ///
377*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PHSUBW instruction.
378*344a7f5eSAndroid Build Coastguard Worker ///
379*344a7f5eSAndroid Build Coastguard Worker /// \param __a
380*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit vector of [4 x i16] containing one of the source operands. The
381*344a7f5eSAndroid Build Coastguard Worker /// horizontal differences between the values are stored in the lower bits of
382*344a7f5eSAndroid Build Coastguard Worker /// the destination.
383*344a7f5eSAndroid Build Coastguard Worker /// \param __b
384*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit vector of [4 x i16] containing one of the source operands. The
385*344a7f5eSAndroid Build Coastguard Worker /// horizontal differences between the values are stored in the upper bits of
386*344a7f5eSAndroid Build Coastguard Worker /// the destination.
387*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit vector of [4 x i16] containing the horizontal differences
388*344a7f5eSAndroid Build Coastguard Worker /// of both operands.
389*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_hsub_pi16(__m64 __a,__m64 __b)390*344a7f5eSAndroid Build Coastguard Worker _mm_hsub_pi16(__m64 __a, __m64 __b)
391*344a7f5eSAndroid Build Coastguard Worker {
392*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_phsubw((__v4hi)__a, (__v4hi)__b);
393*344a7f5eSAndroid Build Coastguard Worker }
394*344a7f5eSAndroid Build Coastguard Worker
395*344a7f5eSAndroid Build Coastguard Worker /// \brief Horizontally subtracts the adjacent pairs of values contained in 2
396*344a7f5eSAndroid Build Coastguard Worker /// packed 64-bit vectors of [2 x i32].
397*344a7f5eSAndroid Build Coastguard Worker ///
398*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
399*344a7f5eSAndroid Build Coastguard Worker ///
400*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PHSUBD instruction.
401*344a7f5eSAndroid Build Coastguard Worker ///
402*344a7f5eSAndroid Build Coastguard Worker /// \param __a
403*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit vector of [2 x i32] containing one of the source operands. The
404*344a7f5eSAndroid Build Coastguard Worker /// horizontal differences between the values are stored in the lower bits of
405*344a7f5eSAndroid Build Coastguard Worker /// the destination.
406*344a7f5eSAndroid Build Coastguard Worker /// \param __b
407*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit vector of [2 x i32] containing one of the source operands. The
408*344a7f5eSAndroid Build Coastguard Worker /// horizontal differences between the values are stored in the upper bits of
409*344a7f5eSAndroid Build Coastguard Worker /// the destination.
410*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit vector of [2 x i32] containing the horizontal differences
411*344a7f5eSAndroid Build Coastguard Worker /// of both operands.
412*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_hsub_pi32(__m64 __a,__m64 __b)413*344a7f5eSAndroid Build Coastguard Worker _mm_hsub_pi32(__m64 __a, __m64 __b)
414*344a7f5eSAndroid Build Coastguard Worker {
415*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_phsubd((__v2si)__a, (__v2si)__b);
416*344a7f5eSAndroid Build Coastguard Worker }
417*344a7f5eSAndroid Build Coastguard Worker
418*344a7f5eSAndroid Build Coastguard Worker /// \brief Horizontally subtracts the adjacent pairs of values contained in 2
419*344a7f5eSAndroid Build Coastguard Worker /// packed 128-bit vectors of [8 x i16]. Positive differences greater than
420*344a7f5eSAndroid Build Coastguard Worker /// 7FFFh are saturated to 7FFFh. Negative differences less than 8000h are
421*344a7f5eSAndroid Build Coastguard Worker /// saturated to 8000h.
422*344a7f5eSAndroid Build Coastguard Worker ///
423*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
424*344a7f5eSAndroid Build Coastguard Worker ///
425*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VPHSUBSW instruction.
426*344a7f5eSAndroid Build Coastguard Worker ///
427*344a7f5eSAndroid Build Coastguard Worker /// \param __a
428*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit vector of [8 x i16] containing one of the source operands. The
429*344a7f5eSAndroid Build Coastguard Worker /// horizontal differences between the values are stored in the lower bits of
430*344a7f5eSAndroid Build Coastguard Worker /// the destination.
431*344a7f5eSAndroid Build Coastguard Worker /// \param __b
432*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit vector of [8 x i16] containing one of the source operands. The
433*344a7f5eSAndroid Build Coastguard Worker /// horizontal differences between the values are stored in the upper bits of
434*344a7f5eSAndroid Build Coastguard Worker /// the destination.
435*344a7f5eSAndroid Build Coastguard Worker /// \returns A 128-bit vector of [8 x i16] containing the horizontal saturated
436*344a7f5eSAndroid Build Coastguard Worker /// differences of both operands.
437*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_hsubs_epi16(__m128i __a,__m128i __b)438*344a7f5eSAndroid Build Coastguard Worker _mm_hsubs_epi16(__m128i __a, __m128i __b)
439*344a7f5eSAndroid Build Coastguard Worker {
440*344a7f5eSAndroid Build Coastguard Worker return (__m128i)__builtin_ia32_phsubsw128((__v8hi)__a, (__v8hi)__b);
441*344a7f5eSAndroid Build Coastguard Worker }
442*344a7f5eSAndroid Build Coastguard Worker
443*344a7f5eSAndroid Build Coastguard Worker /// \brief Horizontally subtracts the adjacent pairs of values contained in 2
444*344a7f5eSAndroid Build Coastguard Worker /// packed 64-bit vectors of [4 x i16]. Positive differences greater than
445*344a7f5eSAndroid Build Coastguard Worker /// 7FFFh are saturated to 7FFFh. Negative differences less than 8000h are
446*344a7f5eSAndroid Build Coastguard Worker /// saturated to 8000h.
447*344a7f5eSAndroid Build Coastguard Worker ///
448*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
449*344a7f5eSAndroid Build Coastguard Worker ///
450*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PHSUBSW instruction.
451*344a7f5eSAndroid Build Coastguard Worker ///
452*344a7f5eSAndroid Build Coastguard Worker /// \param __a
453*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit vector of [4 x i16] containing one of the source operands. The
454*344a7f5eSAndroid Build Coastguard Worker /// horizontal differences between the values are stored in the lower bits of
455*344a7f5eSAndroid Build Coastguard Worker /// the destination.
456*344a7f5eSAndroid Build Coastguard Worker /// \param __b
457*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit vector of [4 x i16] containing one of the source operands. The
458*344a7f5eSAndroid Build Coastguard Worker /// horizontal differences between the values are stored in the upper bits of
459*344a7f5eSAndroid Build Coastguard Worker /// the destination.
460*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit vector of [4 x i16] containing the horizontal saturated
461*344a7f5eSAndroid Build Coastguard Worker /// differences of both operands.
462*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_hsubs_pi16(__m64 __a,__m64 __b)463*344a7f5eSAndroid Build Coastguard Worker _mm_hsubs_pi16(__m64 __a, __m64 __b)
464*344a7f5eSAndroid Build Coastguard Worker {
465*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_phsubsw((__v4hi)__a, (__v4hi)__b);
466*344a7f5eSAndroid Build Coastguard Worker }
467*344a7f5eSAndroid Build Coastguard Worker
468*344a7f5eSAndroid Build Coastguard Worker /// \brief Multiplies corresponding pairs of packed 8-bit unsigned integer
469*344a7f5eSAndroid Build Coastguard Worker /// values contained in the first source operand and packed 8-bit signed
470*344a7f5eSAndroid Build Coastguard Worker /// integer values contained in the second source operand, adds pairs of
471*344a7f5eSAndroid Build Coastguard Worker /// contiguous products with signed saturation, and writes the 16-bit sums to
472*344a7f5eSAndroid Build Coastguard Worker /// the corresponding bits in the destination. For example, bits [7:0] of
473*344a7f5eSAndroid Build Coastguard Worker /// both operands are multiplied, bits [15:8] of both operands are
474*344a7f5eSAndroid Build Coastguard Worker /// multiplied, and the sum of both results is written to bits [15:0] of the
475*344a7f5eSAndroid Build Coastguard Worker /// destination.
476*344a7f5eSAndroid Build Coastguard Worker ///
477*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
478*344a7f5eSAndroid Build Coastguard Worker ///
479*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VPMADDUBSW instruction.
480*344a7f5eSAndroid Build Coastguard Worker ///
481*344a7f5eSAndroid Build Coastguard Worker /// \param __a
482*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit integer vector containing the first source operand.
483*344a7f5eSAndroid Build Coastguard Worker /// \param __b
484*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit integer vector containing the second source operand.
485*344a7f5eSAndroid Build Coastguard Worker /// \returns A 128-bit integer vector containing the sums of products of both
486*344a7f5eSAndroid Build Coastguard Worker /// operands:
487*344a7f5eSAndroid Build Coastguard Worker /// R0 := (__a0 * __b0) + (__a1 * __b1)
488*344a7f5eSAndroid Build Coastguard Worker /// R1 := (__a2 * __b2) + (__a3 * __b3)
489*344a7f5eSAndroid Build Coastguard Worker /// R2 := (__a4 * __b4) + (__a5 * __b5)
490*344a7f5eSAndroid Build Coastguard Worker /// R3 := (__a6 * __b6) + (__a7 * __b7)
491*344a7f5eSAndroid Build Coastguard Worker /// R4 := (__a8 * __b8) + (__a9 * __b9)
492*344a7f5eSAndroid Build Coastguard Worker /// R5 := (__a10 * __b10) + (__a11 * __b11)
493*344a7f5eSAndroid Build Coastguard Worker /// R6 := (__a12 * __b12) + (__a13 * __b13)
494*344a7f5eSAndroid Build Coastguard Worker /// R7 := (__a14 * __b14) + (__a15 * __b15)
495*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_maddubs_epi16(__m128i __a,__m128i __b)496*344a7f5eSAndroid Build Coastguard Worker _mm_maddubs_epi16(__m128i __a, __m128i __b)
497*344a7f5eSAndroid Build Coastguard Worker {
498*344a7f5eSAndroid Build Coastguard Worker return (__m128i)__builtin_ia32_pmaddubsw128((__v16qi)__a, (__v16qi)__b);
499*344a7f5eSAndroid Build Coastguard Worker }
500*344a7f5eSAndroid Build Coastguard Worker
501*344a7f5eSAndroid Build Coastguard Worker /// \brief Multiplies corresponding pairs of packed 8-bit unsigned integer
502*344a7f5eSAndroid Build Coastguard Worker /// values contained in the first source operand and packed 8-bit signed
503*344a7f5eSAndroid Build Coastguard Worker /// integer values contained in the second source operand, adds pairs of
504*344a7f5eSAndroid Build Coastguard Worker /// contiguous products with signed saturation, and writes the 16-bit sums to
505*344a7f5eSAndroid Build Coastguard Worker /// the corresponding bits in the destination. For example, bits [7:0] of
506*344a7f5eSAndroid Build Coastguard Worker /// both operands are multiplied, bits [15:8] of both operands are
507*344a7f5eSAndroid Build Coastguard Worker /// multiplied, and the sum of both results is written to bits [15:0] of the
508*344a7f5eSAndroid Build Coastguard Worker /// destination.
509*344a7f5eSAndroid Build Coastguard Worker ///
510*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
511*344a7f5eSAndroid Build Coastguard Worker ///
512*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PMADDUBSW instruction.
513*344a7f5eSAndroid Build Coastguard Worker ///
514*344a7f5eSAndroid Build Coastguard Worker /// \param __a
515*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector containing the first source operand.
516*344a7f5eSAndroid Build Coastguard Worker /// \param __b
517*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector containing the second source operand.
518*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector containing the sums of products of both
519*344a7f5eSAndroid Build Coastguard Worker /// operands:
520*344a7f5eSAndroid Build Coastguard Worker /// R0 := (__a0 * __b0) + (__a1 * __b1)
521*344a7f5eSAndroid Build Coastguard Worker /// R1 := (__a2 * __b2) + (__a3 * __b3)
522*344a7f5eSAndroid Build Coastguard Worker /// R2 := (__a4 * __b4) + (__a5 * __b5)
523*344a7f5eSAndroid Build Coastguard Worker /// R3 := (__a6 * __b6) + (__a7 * __b7)
524*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_maddubs_pi16(__m64 __a,__m64 __b)525*344a7f5eSAndroid Build Coastguard Worker _mm_maddubs_pi16(__m64 __a, __m64 __b)
526*344a7f5eSAndroid Build Coastguard Worker {
527*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_pmaddubsw((__v8qi)__a, (__v8qi)__b);
528*344a7f5eSAndroid Build Coastguard Worker }
529*344a7f5eSAndroid Build Coastguard Worker
530*344a7f5eSAndroid Build Coastguard Worker /// \brief Multiplies packed 16-bit signed integer values, truncates the 32-bit
531*344a7f5eSAndroid Build Coastguard Worker /// products to the 18 most significant bits by right-shifting, rounds the
532*344a7f5eSAndroid Build Coastguard Worker /// truncated value by adding 1, and writes bits [16:1] to the destination.
533*344a7f5eSAndroid Build Coastguard Worker ///
534*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
535*344a7f5eSAndroid Build Coastguard Worker ///
536*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VPMULHRSW instruction.
537*344a7f5eSAndroid Build Coastguard Worker ///
538*344a7f5eSAndroid Build Coastguard Worker /// \param __a
539*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit vector of [8 x i16] containing one of the source operands.
540*344a7f5eSAndroid Build Coastguard Worker /// \param __b
541*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit vector of [8 x i16] containing one of the source operands.
542*344a7f5eSAndroid Build Coastguard Worker /// \returns A 128-bit vector of [8 x i16] containing the rounded and scaled
543*344a7f5eSAndroid Build Coastguard Worker /// products of both operands.
544*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_mulhrs_epi16(__m128i __a,__m128i __b)545*344a7f5eSAndroid Build Coastguard Worker _mm_mulhrs_epi16(__m128i __a, __m128i __b)
546*344a7f5eSAndroid Build Coastguard Worker {
547*344a7f5eSAndroid Build Coastguard Worker return (__m128i)__builtin_ia32_pmulhrsw128((__v8hi)__a, (__v8hi)__b);
548*344a7f5eSAndroid Build Coastguard Worker }
549*344a7f5eSAndroid Build Coastguard Worker
550*344a7f5eSAndroid Build Coastguard Worker /// \brief Multiplies packed 16-bit signed integer values, truncates the 32-bit
551*344a7f5eSAndroid Build Coastguard Worker /// products to the 18 most significant bits by right-shifting, rounds the
552*344a7f5eSAndroid Build Coastguard Worker /// truncated value by adding 1, and writes bits [16:1] to the destination.
553*344a7f5eSAndroid Build Coastguard Worker ///
554*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
555*344a7f5eSAndroid Build Coastguard Worker ///
556*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PMULHRSW instruction.
557*344a7f5eSAndroid Build Coastguard Worker ///
558*344a7f5eSAndroid Build Coastguard Worker /// \param __a
559*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit vector of [4 x i16] containing one of the source operands.
560*344a7f5eSAndroid Build Coastguard Worker /// \param __b
561*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit vector of [4 x i16] containing one of the source operands.
562*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit vector of [4 x i16] containing the rounded and scaled
563*344a7f5eSAndroid Build Coastguard Worker /// products of both operands.
564*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_mulhrs_pi16(__m64 __a,__m64 __b)565*344a7f5eSAndroid Build Coastguard Worker _mm_mulhrs_pi16(__m64 __a, __m64 __b)
566*344a7f5eSAndroid Build Coastguard Worker {
567*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_pmulhrsw((__v4hi)__a, (__v4hi)__b);
568*344a7f5eSAndroid Build Coastguard Worker }
569*344a7f5eSAndroid Build Coastguard Worker
570*344a7f5eSAndroid Build Coastguard Worker /// \brief Copies the 8-bit integers from a 128-bit integer vector to the
571*344a7f5eSAndroid Build Coastguard Worker /// destination or clears 8-bit values in the destination, as specified by
572*344a7f5eSAndroid Build Coastguard Worker /// the second source operand.
573*344a7f5eSAndroid Build Coastguard Worker ///
574*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
575*344a7f5eSAndroid Build Coastguard Worker ///
576*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VPSHUFB instruction.
577*344a7f5eSAndroid Build Coastguard Worker ///
578*344a7f5eSAndroid Build Coastguard Worker /// \param __a
579*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit integer vector containing the values to be copied.
580*344a7f5eSAndroid Build Coastguard Worker /// \param __b
581*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit integer vector containing control bytes corresponding to
582*344a7f5eSAndroid Build Coastguard Worker /// positions in the destination:
583*344a7f5eSAndroid Build Coastguard Worker /// Bit 7:
584*344a7f5eSAndroid Build Coastguard Worker /// 1: Clear the corresponding byte in the destination.
585*344a7f5eSAndroid Build Coastguard Worker /// 0: Copy the selected source byte to the corresponding byte in the
586*344a7f5eSAndroid Build Coastguard Worker /// destination.
587*344a7f5eSAndroid Build Coastguard Worker /// Bits [6:4] Reserved.
588*344a7f5eSAndroid Build Coastguard Worker /// Bits [3:0] select the source byte to be copied.
589*344a7f5eSAndroid Build Coastguard Worker /// \returns A 128-bit integer vector containing the copied or cleared values.
590*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_shuffle_epi8(__m128i __a,__m128i __b)591*344a7f5eSAndroid Build Coastguard Worker _mm_shuffle_epi8(__m128i __a, __m128i __b)
592*344a7f5eSAndroid Build Coastguard Worker {
593*344a7f5eSAndroid Build Coastguard Worker return (__m128i)__builtin_ia32_pshufb128((__v16qi)__a, (__v16qi)__b);
594*344a7f5eSAndroid Build Coastguard Worker }
595*344a7f5eSAndroid Build Coastguard Worker
596*344a7f5eSAndroid Build Coastguard Worker /// \brief Copies the 8-bit integers from a 64-bit integer vector to the
597*344a7f5eSAndroid Build Coastguard Worker /// destination or clears 8-bit values in the destination, as specified by
598*344a7f5eSAndroid Build Coastguard Worker /// the second source operand.
599*344a7f5eSAndroid Build Coastguard Worker ///
600*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
601*344a7f5eSAndroid Build Coastguard Worker ///
602*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSHUFB instruction.
603*344a7f5eSAndroid Build Coastguard Worker ///
604*344a7f5eSAndroid Build Coastguard Worker /// \param __a
605*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector containing the values to be copied.
606*344a7f5eSAndroid Build Coastguard Worker /// \param __b
607*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector containing control bytes corresponding to
608*344a7f5eSAndroid Build Coastguard Worker /// positions in the destination:
609*344a7f5eSAndroid Build Coastguard Worker /// Bit 7:
610*344a7f5eSAndroid Build Coastguard Worker /// 1: Clear the corresponding byte in the destination.
611*344a7f5eSAndroid Build Coastguard Worker /// 0: Copy the selected source byte to the corresponding byte in the
612*344a7f5eSAndroid Build Coastguard Worker /// destination.
613*344a7f5eSAndroid Build Coastguard Worker /// Bits [3:0] select the source byte to be copied.
614*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector containing the copied or cleared values.
615*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_shuffle_pi8(__m64 __a,__m64 __b)616*344a7f5eSAndroid Build Coastguard Worker _mm_shuffle_pi8(__m64 __a, __m64 __b)
617*344a7f5eSAndroid Build Coastguard Worker {
618*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_pshufb((__v8qi)__a, (__v8qi)__b);
619*344a7f5eSAndroid Build Coastguard Worker }
620*344a7f5eSAndroid Build Coastguard Worker
621*344a7f5eSAndroid Build Coastguard Worker /// \brief For each 8-bit integer in the first source operand, perform one of
622*344a7f5eSAndroid Build Coastguard Worker /// the following actions as specified by the second source operand: If the
623*344a7f5eSAndroid Build Coastguard Worker /// byte in the second source is negative, calculate the two's complement of
624*344a7f5eSAndroid Build Coastguard Worker /// the corresponding byte in the first source, and write that value to the
625*344a7f5eSAndroid Build Coastguard Worker /// destination. If the byte in the second source is positive, copy the
626*344a7f5eSAndroid Build Coastguard Worker /// corresponding byte from the first source to the destination. If the byte
627*344a7f5eSAndroid Build Coastguard Worker /// in the second source is zero, clear the corresponding byte in the
628*344a7f5eSAndroid Build Coastguard Worker /// destination.
629*344a7f5eSAndroid Build Coastguard Worker ///
630*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
631*344a7f5eSAndroid Build Coastguard Worker ///
632*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VPSIGNB instruction.
633*344a7f5eSAndroid Build Coastguard Worker ///
634*344a7f5eSAndroid Build Coastguard Worker /// \param __a
635*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit integer vector containing the values to be copied.
636*344a7f5eSAndroid Build Coastguard Worker /// \param __b
637*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit integer vector containing control bytes corresponding to
638*344a7f5eSAndroid Build Coastguard Worker /// positions in the destination.
639*344a7f5eSAndroid Build Coastguard Worker /// \returns A 128-bit integer vector containing the resultant values.
640*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_sign_epi8(__m128i __a,__m128i __b)641*344a7f5eSAndroid Build Coastguard Worker _mm_sign_epi8(__m128i __a, __m128i __b)
642*344a7f5eSAndroid Build Coastguard Worker {
643*344a7f5eSAndroid Build Coastguard Worker return (__m128i)__builtin_ia32_psignb128((__v16qi)__a, (__v16qi)__b);
644*344a7f5eSAndroid Build Coastguard Worker }
645*344a7f5eSAndroid Build Coastguard Worker
646*344a7f5eSAndroid Build Coastguard Worker /// \brief For each 16-bit integer in the first source operand, perform one of
647*344a7f5eSAndroid Build Coastguard Worker /// the following actions as specified by the second source operand: If the
648*344a7f5eSAndroid Build Coastguard Worker /// word in the second source is negative, calculate the two's complement of
649*344a7f5eSAndroid Build Coastguard Worker /// the corresponding word in the first source, and write that value to the
650*344a7f5eSAndroid Build Coastguard Worker /// destination. If the word in the second source is positive, copy the
651*344a7f5eSAndroid Build Coastguard Worker /// corresponding word from the first source to the destination. If the word
652*344a7f5eSAndroid Build Coastguard Worker /// in the second source is zero, clear the corresponding word in the
653*344a7f5eSAndroid Build Coastguard Worker /// destination.
654*344a7f5eSAndroid Build Coastguard Worker ///
655*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
656*344a7f5eSAndroid Build Coastguard Worker ///
657*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VPSIGNW instruction.
658*344a7f5eSAndroid Build Coastguard Worker ///
659*344a7f5eSAndroid Build Coastguard Worker /// \param __a
660*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit integer vector containing the values to be copied.
661*344a7f5eSAndroid Build Coastguard Worker /// \param __b
662*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit integer vector containing control words corresponding to
663*344a7f5eSAndroid Build Coastguard Worker /// positions in the destination.
664*344a7f5eSAndroid Build Coastguard Worker /// \returns A 128-bit integer vector containing the resultant values.
665*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_sign_epi16(__m128i __a,__m128i __b)666*344a7f5eSAndroid Build Coastguard Worker _mm_sign_epi16(__m128i __a, __m128i __b)
667*344a7f5eSAndroid Build Coastguard Worker {
668*344a7f5eSAndroid Build Coastguard Worker return (__m128i)__builtin_ia32_psignw128((__v8hi)__a, (__v8hi)__b);
669*344a7f5eSAndroid Build Coastguard Worker }
670*344a7f5eSAndroid Build Coastguard Worker
671*344a7f5eSAndroid Build Coastguard Worker /// \brief For each 32-bit integer in the first source operand, perform one of
672*344a7f5eSAndroid Build Coastguard Worker /// the following actions as specified by the second source operand: If the
673*344a7f5eSAndroid Build Coastguard Worker /// doubleword in the second source is negative, calculate the two's
674*344a7f5eSAndroid Build Coastguard Worker /// complement of the corresponding word in the first source, and write that
675*344a7f5eSAndroid Build Coastguard Worker /// value to the destination. If the doubleword in the second source is
676*344a7f5eSAndroid Build Coastguard Worker /// positive, copy the corresponding word from the first source to the
677*344a7f5eSAndroid Build Coastguard Worker /// destination. If the doubleword in the second source is zero, clear the
678*344a7f5eSAndroid Build Coastguard Worker /// corresponding word in the destination.
679*344a7f5eSAndroid Build Coastguard Worker ///
680*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
681*344a7f5eSAndroid Build Coastguard Worker ///
682*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c VPSIGND instruction.
683*344a7f5eSAndroid Build Coastguard Worker ///
684*344a7f5eSAndroid Build Coastguard Worker /// \param __a
685*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit integer vector containing the values to be copied.
686*344a7f5eSAndroid Build Coastguard Worker /// \param __b
687*344a7f5eSAndroid Build Coastguard Worker /// A 128-bit integer vector containing control doublewords corresponding to
688*344a7f5eSAndroid Build Coastguard Worker /// positions in the destination.
689*344a7f5eSAndroid Build Coastguard Worker /// \returns A 128-bit integer vector containing the resultant values.
690*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_sign_epi32(__m128i __a,__m128i __b)691*344a7f5eSAndroid Build Coastguard Worker _mm_sign_epi32(__m128i __a, __m128i __b)
692*344a7f5eSAndroid Build Coastguard Worker {
693*344a7f5eSAndroid Build Coastguard Worker return (__m128i)__builtin_ia32_psignd128((__v4si)__a, (__v4si)__b);
694*344a7f5eSAndroid Build Coastguard Worker }
695*344a7f5eSAndroid Build Coastguard Worker
696*344a7f5eSAndroid Build Coastguard Worker /// \brief For each 8-bit integer in the first source operand, perform one of
697*344a7f5eSAndroid Build Coastguard Worker /// the following actions as specified by the second source operand: If the
698*344a7f5eSAndroid Build Coastguard Worker /// byte in the second source is negative, calculate the two's complement of
699*344a7f5eSAndroid Build Coastguard Worker /// the corresponding byte in the first source, and write that value to the
700*344a7f5eSAndroid Build Coastguard Worker /// destination. If the byte in the second source is positive, copy the
701*344a7f5eSAndroid Build Coastguard Worker /// corresponding byte from the first source to the destination. If the byte
702*344a7f5eSAndroid Build Coastguard Worker /// in the second source is zero, clear the corresponding byte in the
703*344a7f5eSAndroid Build Coastguard Worker /// destination.
704*344a7f5eSAndroid Build Coastguard Worker ///
705*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
706*344a7f5eSAndroid Build Coastguard Worker ///
707*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSIGNB instruction.
708*344a7f5eSAndroid Build Coastguard Worker ///
709*344a7f5eSAndroid Build Coastguard Worker /// \param __a
710*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector containing the values to be copied.
711*344a7f5eSAndroid Build Coastguard Worker /// \param __b
712*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector containing control bytes corresponding to
713*344a7f5eSAndroid Build Coastguard Worker /// positions in the destination.
714*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector containing the resultant values.
715*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_sign_pi8(__m64 __a,__m64 __b)716*344a7f5eSAndroid Build Coastguard Worker _mm_sign_pi8(__m64 __a, __m64 __b)
717*344a7f5eSAndroid Build Coastguard Worker {
718*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psignb((__v8qi)__a, (__v8qi)__b);
719*344a7f5eSAndroid Build Coastguard Worker }
720*344a7f5eSAndroid Build Coastguard Worker
721*344a7f5eSAndroid Build Coastguard Worker /// \brief For each 16-bit integer in the first source operand, perform one of
722*344a7f5eSAndroid Build Coastguard Worker /// the following actions as specified by the second source operand: If the
723*344a7f5eSAndroid Build Coastguard Worker /// word in the second source is negative, calculate the two's complement of
724*344a7f5eSAndroid Build Coastguard Worker /// the corresponding word in the first source, and write that value to the
725*344a7f5eSAndroid Build Coastguard Worker /// destination. If the word in the second source is positive, copy the
726*344a7f5eSAndroid Build Coastguard Worker /// corresponding word from the first source to the destination. If the word
727*344a7f5eSAndroid Build Coastguard Worker /// in the second source is zero, clear the corresponding word in the
728*344a7f5eSAndroid Build Coastguard Worker /// destination.
729*344a7f5eSAndroid Build Coastguard Worker ///
730*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
731*344a7f5eSAndroid Build Coastguard Worker ///
732*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSIGNW instruction.
733*344a7f5eSAndroid Build Coastguard Worker ///
734*344a7f5eSAndroid Build Coastguard Worker /// \param __a
735*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector containing the values to be copied.
736*344a7f5eSAndroid Build Coastguard Worker /// \param __b
737*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector containing control words corresponding to
738*344a7f5eSAndroid Build Coastguard Worker /// positions in the destination.
739*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector containing the resultant values.
740*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_sign_pi16(__m64 __a,__m64 __b)741*344a7f5eSAndroid Build Coastguard Worker _mm_sign_pi16(__m64 __a, __m64 __b)
742*344a7f5eSAndroid Build Coastguard Worker {
743*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psignw((__v4hi)__a, (__v4hi)__b);
744*344a7f5eSAndroid Build Coastguard Worker }
745*344a7f5eSAndroid Build Coastguard Worker
746*344a7f5eSAndroid Build Coastguard Worker /// \brief For each 32-bit integer in the first source operand, perform one of
747*344a7f5eSAndroid Build Coastguard Worker /// the following actions as specified by the second source operand: If the
748*344a7f5eSAndroid Build Coastguard Worker /// doubleword in the second source is negative, calculate the two's
749*344a7f5eSAndroid Build Coastguard Worker /// complement of the corresponding doubleword in the first source, and
750*344a7f5eSAndroid Build Coastguard Worker /// write that value to the destination. If the doubleword in the second
751*344a7f5eSAndroid Build Coastguard Worker /// source is positive, copy the corresponding doubleword from the first
752*344a7f5eSAndroid Build Coastguard Worker /// source to the destination. If the doubleword in the second source is
753*344a7f5eSAndroid Build Coastguard Worker /// zero, clear the corresponding doubleword in the destination.
754*344a7f5eSAndroid Build Coastguard Worker ///
755*344a7f5eSAndroid Build Coastguard Worker /// \headerfile <x86intrin.h>
756*344a7f5eSAndroid Build Coastguard Worker ///
757*344a7f5eSAndroid Build Coastguard Worker /// This intrinsic corresponds to the \c PSIGND instruction.
758*344a7f5eSAndroid Build Coastguard Worker ///
759*344a7f5eSAndroid Build Coastguard Worker /// \param __a
760*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector containing the values to be copied.
761*344a7f5eSAndroid Build Coastguard Worker /// \param __b
762*344a7f5eSAndroid Build Coastguard Worker /// A 64-bit integer vector containing two control doublewords corresponding
763*344a7f5eSAndroid Build Coastguard Worker /// to positions in the destination.
764*344a7f5eSAndroid Build Coastguard Worker /// \returns A 64-bit integer vector containing the resultant values.
765*344a7f5eSAndroid Build Coastguard Worker static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_sign_pi32(__m64 __a,__m64 __b)766*344a7f5eSAndroid Build Coastguard Worker _mm_sign_pi32(__m64 __a, __m64 __b)
767*344a7f5eSAndroid Build Coastguard Worker {
768*344a7f5eSAndroid Build Coastguard Worker return (__m64)__builtin_ia32_psignd((__v2si)__a, (__v2si)__b);
769*344a7f5eSAndroid Build Coastguard Worker }
770*344a7f5eSAndroid Build Coastguard Worker
771*344a7f5eSAndroid Build Coastguard Worker #undef __DEFAULT_FN_ATTRS
772*344a7f5eSAndroid Build Coastguard Worker
773*344a7f5eSAndroid Build Coastguard Worker #endif /* __TMMINTRIN_H */
774