ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
tmmintrin.h
Go to the documentation of this file.
1 /*===---- tmmintrin.h - SSSE3 intrinsics -----------------------------------===
2  *
3  * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4  * See https://llvm.org/LICENSE.txt for license information.
5  * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6  *
7  *===-----------------------------------------------------------------------===
8  */
9 
10 #ifndef __TMMINTRIN_H
11 #define __TMMINTRIN_H
12 
13 #include <pmmintrin.h>
14 
15 /* Define the default attributes for the functions in this file. */
16 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("ssse3"), __min_vector_width__(64)))
17 #define __DEFAULT_FN_ATTRS_MMX __attribute__((__always_inline__, __nodebug__, __target__("mmx,ssse3"), __min_vector_width__(64)))
18 
31 static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
33 {
34  return (__m64)__builtin_ia32_pabsb((__v8qi)__a);
35 }
36 
49 static __inline__ __m128i __DEFAULT_FN_ATTRS
50 _mm_abs_epi8(__m128i __a)
51 {
52  return (__m128i)__builtin_ia32_pabsb128((__v16qi)__a);
53 }
54 
67 static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
69 {
70  return (__m64)__builtin_ia32_pabsw((__v4hi)__a);
71 }
72 
85 static __inline__ __m128i __DEFAULT_FN_ATTRS
87 {
88  return (__m128i)__builtin_ia32_pabsw128((__v8hi)__a);
89 }
90 
103 static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
105 {
106  return (__m64)__builtin_ia32_pabsd((__v2si)__a);
107 }
108 
121 static __inline__ __m128i __DEFAULT_FN_ATTRS
123 {
124  return (__m128i)__builtin_ia32_pabsd128((__v4si)__a);
125 }
126 
147 #define _mm_alignr_epi8(a, b, n) \
148  (__m128i)__builtin_ia32_palignr128((__v16qi)(__m128i)(a), \
149  (__v16qi)(__m128i)(b), (n))
150 
170 #define _mm_alignr_pi8(a, b, n) \
171  (__m64)__builtin_ia32_palignr((__v8qi)(__m64)(a), (__v8qi)(__m64)(b), (n))
172 
190 static __inline__ __m128i __DEFAULT_FN_ATTRS
191 _mm_hadd_epi16(__m128i __a, __m128i __b)
192 {
193  return (__m128i)__builtin_ia32_phaddw128((__v8hi)__a, (__v8hi)__b);
194 }
195 
213 static __inline__ __m128i __DEFAULT_FN_ATTRS
214 _mm_hadd_epi32(__m128i __a, __m128i __b)
215 {
216  return (__m128i)__builtin_ia32_phaddd128((__v4si)__a, (__v4si)__b);
217 }
218 
236 static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
237 _mm_hadd_pi16(__m64 __a, __m64 __b)
238 {
239  return (__m64)__builtin_ia32_phaddw((__v4hi)__a, (__v4hi)__b);
240 }
241 
259 static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
260 _mm_hadd_pi32(__m64 __a, __m64 __b)
261 {
262  return (__m64)__builtin_ia32_phaddd((__v2si)__a, (__v2si)__b);
263 }
264 
284 static __inline__ __m128i __DEFAULT_FN_ATTRS
285 _mm_hadds_epi16(__m128i __a, __m128i __b)
286 {
287  return (__m128i)__builtin_ia32_phaddsw128((__v8hi)__a, (__v8hi)__b);
288 }
289 
309 static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
310 _mm_hadds_pi16(__m64 __a, __m64 __b)
311 {
312  return (__m64)__builtin_ia32_phaddsw((__v4hi)__a, (__v4hi)__b);
313 }
314 
332 static __inline__ __m128i __DEFAULT_FN_ATTRS
333 _mm_hsub_epi16(__m128i __a, __m128i __b)
334 {
335  return (__m128i)__builtin_ia32_phsubw128((__v8hi)__a, (__v8hi)__b);
336 }
337 
355 static __inline__ __m128i __DEFAULT_FN_ATTRS
356 _mm_hsub_epi32(__m128i __a, __m128i __b)
357 {
358  return (__m128i)__builtin_ia32_phsubd128((__v4si)__a, (__v4si)__b);
359 }
360 
378 static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
379 _mm_hsub_pi16(__m64 __a, __m64 __b)
380 {
381  return (__m64)__builtin_ia32_phsubw((__v4hi)__a, (__v4hi)__b);
382 }
383 
401 static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
402 _mm_hsub_pi32(__m64 __a, __m64 __b)
403 {
404  return (__m64)__builtin_ia32_phsubd((__v2si)__a, (__v2si)__b);
405 }
406 
426 static __inline__ __m128i __DEFAULT_FN_ATTRS
427 _mm_hsubs_epi16(__m128i __a, __m128i __b)
428 {
429  return (__m128i)__builtin_ia32_phsubsw128((__v8hi)__a, (__v8hi)__b);
430 }
431 
451 static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
452 _mm_hsubs_pi16(__m64 __a, __m64 __b)
453 {
454  return (__m64)__builtin_ia32_phsubsw((__v4hi)__a, (__v4hi)__b);
455 }
456 
485 static __inline__ __m128i __DEFAULT_FN_ATTRS
486 _mm_maddubs_epi16(__m128i __a, __m128i __b)
487 {
488  return (__m128i)__builtin_ia32_pmaddubsw128((__v16qi)__a, (__v16qi)__b);
489 }
490 
515 static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
516 _mm_maddubs_pi16(__m64 __a, __m64 __b)
517 {
518  return (__m64)__builtin_ia32_pmaddubsw((__v8qi)__a, (__v8qi)__b);
519 }
520 
535 static __inline__ __m128i __DEFAULT_FN_ATTRS
536 _mm_mulhrs_epi16(__m128i __a, __m128i __b)
537 {
538  return (__m128i)__builtin_ia32_pmulhrsw128((__v8hi)__a, (__v8hi)__b);
539 }
540 
555 static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
556 _mm_mulhrs_pi16(__m64 __a, __m64 __b)
557 {
558  return (__m64)__builtin_ia32_pmulhrsw((__v4hi)__a, (__v4hi)__b);
559 }
560 
581 static __inline__ __m128i __DEFAULT_FN_ATTRS
582 _mm_shuffle_epi8(__m128i __a, __m128i __b)
583 {
584  return (__m128i)__builtin_ia32_pshufb128((__v16qi)__a, (__v16qi)__b);
585 }
586 
606 static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
607 _mm_shuffle_pi8(__m64 __a, __m64 __b)
608 {
609  return (__m64)__builtin_ia32_pshufb((__v8qi)__a, (__v8qi)__b);
610 }
611 
632 static __inline__ __m128i __DEFAULT_FN_ATTRS
633 _mm_sign_epi8(__m128i __a, __m128i __b)
634 {
635  return (__m128i)__builtin_ia32_psignb128((__v16qi)__a, (__v16qi)__b);
636 }
637 
658 static __inline__ __m128i __DEFAULT_FN_ATTRS
659 _mm_sign_epi16(__m128i __a, __m128i __b)
660 {
661  return (__m128i)__builtin_ia32_psignw128((__v8hi)__a, (__v8hi)__b);
662 }
663 
684 static __inline__ __m128i __DEFAULT_FN_ATTRS
685 _mm_sign_epi32(__m128i __a, __m128i __b)
686 {
687  return (__m128i)__builtin_ia32_psignd128((__v4si)__a, (__v4si)__b);
688 }
689 
710 static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
711 _mm_sign_pi8(__m64 __a, __m64 __b)
712 {
713  return (__m64)__builtin_ia32_psignb((__v8qi)__a, (__v8qi)__b);
714 }
715 
736 static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
737 _mm_sign_pi16(__m64 __a, __m64 __b)
738 {
739  return (__m64)__builtin_ia32_psignw((__v4hi)__a, (__v4hi)__b);
740 }
741 
762 static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
763 _mm_sign_pi32(__m64 __a, __m64 __b)
764 {
765  return (__m64)__builtin_ia32_psignd((__v2si)__a, (__v2si)__b);
766 }
767 
768 #undef __DEFAULT_FN_ATTRS
769 #undef __DEFAULT_FN_ATTRS_MMX
770 
771 #endif /* __TMMINTRIN_H */
static __inline__ vector float vector float __b
Definition: altivec.h:520
static __inline__ void int __a
Definition: emmintrin.h:4185
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_sign_epi16(__m128i __a, __m128i __b)
For each 16-bit integer in the first source operand, perform one of the following actions as specifie...
Definition: tmmintrin.h:659
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_hadd_epi32(__m128i __a, __m128i __b)
Horizontally adds the adjacent pairs of values contained in 2 packed 128-bit vectors of [4 x i32].
Definition: tmmintrin.h:214
static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX _mm_sign_pi16(__m64 __a, __m64 __b)
For each 16-bit integer in the first source operand, perform one of the following actions as specifie...
Definition: tmmintrin.h:737
static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX _mm_shuffle_pi8(__m64 __a, __m64 __b)
Copies the 8-bit integers from a 64-bit integer vector to the destination or clears 8-bit values in t...
Definition: tmmintrin.h:607
static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX _mm_hsub_pi16(__m64 __a, __m64 __b)
Horizontally subtracts the adjacent pairs of values contained in 2 packed 64-bit vectors of [4 x i16]...
Definition: tmmintrin.h:379
#define __DEFAULT_FN_ATTRS
Definition: tmmintrin.h:16
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_hsub_epi32(__m128i __a, __m128i __b)
Horizontally subtracts the adjacent pairs of values contained in 2 packed 128-bit vectors of [4 x i32...
Definition: tmmintrin.h:356
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_abs_epi8(__m128i __a)
Computes the absolute value of each of the packed 8-bit signed integers in the source operand and sto...
Definition: tmmintrin.h:50
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_mulhrs_epi16(__m128i __a, __m128i __b)
Multiplies packed 16-bit signed integer values, truncates the 32-bit products to the 18 most signific...
Definition: tmmintrin.h:536
static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX _mm_maddubs_pi16(__m64 __a, __m64 __b)
Multiplies corresponding pairs of packed 8-bit unsigned integer values contained in the first source ...
Definition: tmmintrin.h:516
static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX _mm_hadd_pi32(__m64 __a, __m64 __b)
Horizontally adds the adjacent pairs of values contained in 2 packed 64-bit vectors of [2 x i32].
Definition: tmmintrin.h:260
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_abs_epi16(__m128i __a)
Computes the absolute value of each of the packed 16-bit signed integers in the source operand and st...
Definition: tmmintrin.h:86
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_maddubs_epi16(__m128i __a, __m128i __b)
Multiplies corresponding pairs of packed 8-bit unsigned integer values contained in the first source ...
Definition: tmmintrin.h:486
static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX _mm_abs_pi8(__m64 __a)
Computes the absolute value of each of the packed 8-bit signed integers in the source operand and sto...
Definition: tmmintrin.h:32
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_sign_epi8(__m128i __a, __m128i __b)
For each 8-bit integer in the first source operand, perform one of the following actions as specified...
Definition: tmmintrin.h:633
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_hsub_epi16(__m128i __a, __m128i __b)
Horizontally subtracts the adjacent pairs of values contained in 2 packed 128-bit vectors of [8 x i16...
Definition: tmmintrin.h:333
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_hsubs_epi16(__m128i __a, __m128i __b)
Horizontally subtracts the adjacent pairs of values contained in 2 packed 128-bit vectors of [8 x i16...
Definition: tmmintrin.h:427
static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX _mm_abs_pi16(__m64 __a)
Computes the absolute value of each of the packed 16-bit signed integers in the source operand and st...
Definition: tmmintrin.h:68
static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX _mm_hadds_pi16(__m64 __a, __m64 __b)
Horizontally adds the adjacent pairs of values contained in 2 packed 64-bit vectors of [4 x i16].
Definition: tmmintrin.h:310
static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX _mm_sign_pi8(__m64 __a, __m64 __b)
For each 8-bit integer in the first source operand, perform one of the following actions as specified...
Definition: tmmintrin.h:711
static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX _mm_sign_pi32(__m64 __a, __m64 __b)
For each 32-bit integer in the first source operand, perform one of the following actions as specifie...
Definition: tmmintrin.h:763
#define __DEFAULT_FN_ATTRS_MMX
Definition: tmmintrin.h:17
static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX _mm_mulhrs_pi16(__m64 __a, __m64 __b)
Multiplies packed 16-bit signed integer values, truncates the 32-bit products to the 18 most signific...
Definition: tmmintrin.h:556
static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX _mm_hadd_pi16(__m64 __a, __m64 __b)
Horizontally adds the adjacent pairs of values contained in 2 packed 64-bit vectors of [4 x i16].
Definition: tmmintrin.h:237
static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX _mm_hsubs_pi16(__m64 __a, __m64 __b)
Horizontally subtracts the adjacent pairs of values contained in 2 packed 64-bit vectors of [4 x i16]...
Definition: tmmintrin.h:452
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_hadds_epi16(__m128i __a, __m128i __b)
Horizontally adds the adjacent pairs of values contained in 2 packed 128-bit vectors of [8 x i16].
Definition: tmmintrin.h:285
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_sign_epi32(__m128i __a, __m128i __b)
For each 32-bit integer in the first source operand, perform one of the following actions as specifie...
Definition: tmmintrin.h:685
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_hadd_epi16(__m128i __a, __m128i __b)
Horizontally adds the adjacent pairs of values contained in 2 packed 128-bit vectors of [8 x i16].
Definition: tmmintrin.h:191
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_shuffle_epi8(__m128i __a, __m128i __b)
Copies the 8-bit integers from a 128-bit integer vector to the destination or clears 8-bit values in ...
Definition: tmmintrin.h:582
static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX _mm_hsub_pi32(__m64 __a, __m64 __b)
Horizontally subtracts the adjacent pairs of values contained in 2 packed 64-bit vectors of [2 x i32]...
Definition: tmmintrin.h:402
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_abs_epi32(__m128i __a)
Computes the absolute value of each of the packed 32-bit signed integers in the source operand and st...
Definition: tmmintrin.h:122
static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX _mm_abs_pi32(__m64 __a)
Computes the absolute value of each of the packed 32-bit signed integers in the source operand and st...
Definition: tmmintrin.h:104