34 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("mmx")))
39 __builtin_ia32_emms();
43 _mm_cvtsi32_si64(
int __i)
45 return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
49 _mm_cvtsi64_si32(__m64 __m)
51 return __builtin_ia32_vec_ext_v2si((__v2si)__m, 0);
55 _mm_cvtsi64_m64(
long long __i)
61 _mm_cvtm64_si64(__m64 __m)
63 return (
long long)__m;
67 _mm_packs_pi16(__m64 __m1, __m64 __m2)
69 return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
73 _mm_packs_pi32(__m64 __m1, __m64 __m2)
75 return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
79 _mm_packs_pu16(__m64 __m1, __m64 __m2)
81 return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
85 _mm_unpackhi_pi8(__m64 __m1, __m64 __m2)
87 return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
91 _mm_unpackhi_pi16(__m64 __m1, __m64 __m2)
93 return (__m64)__builtin_ia32_punpckhwd((__v4hi)__m1, (__v4hi)__m2);
97 _mm_unpackhi_pi32(__m64 __m1, __m64 __m2)
99 return (__m64)__builtin_ia32_punpckhdq((__v2si)__m1, (__v2si)__m2);
103 _mm_unpacklo_pi8(__m64 __m1, __m64 __m2)
105 return (__m64)__builtin_ia32_punpcklbw((__v8qi)__m1, (__v8qi)__m2);
109 _mm_unpacklo_pi16(__m64 __m1, __m64 __m2)
111 return (__m64)__builtin_ia32_punpcklwd((__v4hi)__m1, (__v4hi)__m2);
115 _mm_unpacklo_pi32(__m64 __m1, __m64 __m2)
117 return (__m64)__builtin_ia32_punpckldq((__v2si)__m1, (__v2si)__m2);
121 _mm_add_pi8(__m64 __m1, __m64 __m2)
123 return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2);
127 _mm_add_pi16(__m64 __m1, __m64 __m2)
129 return (__m64)__builtin_ia32_paddw((__v4hi)__m1, (__v4hi)__m2);
133 _mm_add_pi32(__m64 __m1, __m64 __m2)
135 return (__m64)__builtin_ia32_paddd((__v2si)__m1, (__v2si)__m2);
139 _mm_adds_pi8(__m64 __m1, __m64 __m2)
141 return (__m64)__builtin_ia32_paddsb((__v8qi)__m1, (__v8qi)__m2);
145 _mm_adds_pi16(__m64 __m1, __m64 __m2)
147 return (__m64)__builtin_ia32_paddsw((__v4hi)__m1, (__v4hi)__m2);
151 _mm_adds_pu8(__m64 __m1, __m64 __m2)
153 return (__m64)__builtin_ia32_paddusb((__v8qi)__m1, (__v8qi)__m2);
157 _mm_adds_pu16(__m64 __m1, __m64 __m2)
159 return (__m64)__builtin_ia32_paddusw((__v4hi)__m1, (__v4hi)__m2);
163 _mm_sub_pi8(__m64 __m1, __m64 __m2)
165 return (__m64)__builtin_ia32_psubb((__v8qi)__m1, (__v8qi)__m2);
169 _mm_sub_pi16(__m64 __m1, __m64 __m2)
171 return (__m64)__builtin_ia32_psubw((__v4hi)__m1, (__v4hi)__m2);
175 _mm_sub_pi32(__m64 __m1, __m64 __m2)
177 return (__m64)__builtin_ia32_psubd((__v2si)__m1, (__v2si)__m2);
181 _mm_subs_pi8(__m64 __m1, __m64 __m2)
183 return (__m64)__builtin_ia32_psubsb((__v8qi)__m1, (__v8qi)__m2);
187 _mm_subs_pi16(__m64 __m1, __m64 __m2)
189 return (__m64)__builtin_ia32_psubsw((__v4hi)__m1, (__v4hi)__m2);
193 _mm_subs_pu8(__m64 __m1, __m64 __m2)
195 return (__m64)__builtin_ia32_psubusb((__v8qi)__m1, (__v8qi)__m2);
199 _mm_subs_pu16(__m64 __m1, __m64 __m2)
201 return (__m64)__builtin_ia32_psubusw((__v4hi)__m1, (__v4hi)__m2);
205 _mm_madd_pi16(__m64 __m1, __m64 __m2)
207 return (__m64)__builtin_ia32_pmaddwd((__v4hi)__m1, (__v4hi)__m2);
211 _mm_mulhi_pi16(__m64 __m1, __m64 __m2)
213 return (__m64)__builtin_ia32_pmulhw((__v4hi)__m1, (__v4hi)__m2);
217 _mm_mullo_pi16(__m64 __m1, __m64 __m2)
219 return (__m64)__builtin_ia32_pmullw((__v4hi)__m1, (__v4hi)__m2);
223 _mm_sll_pi16(__m64 __m, __m64 __count)
225 return (__m64)__builtin_ia32_psllw((__v4hi)__m, __count);
229 _mm_slli_pi16(__m64 __m,
int __count)
231 return (__m64)__builtin_ia32_psllwi((__v4hi)__m, __count);
235 _mm_sll_pi32(__m64 __m, __m64 __count)
237 return (__m64)__builtin_ia32_pslld((__v2si)__m, __count);
241 _mm_slli_pi32(__m64 __m,
int __count)
243 return (__m64)__builtin_ia32_pslldi((__v2si)__m, __count);
247 _mm_sll_si64(__m64 __m, __m64 __count)
249 return (__m64)__builtin_ia32_psllq(__m, __count);
253 _mm_slli_si64(__m64 __m,
int __count)
255 return (__m64)__builtin_ia32_psllqi(__m, __count);
259 _mm_sra_pi16(__m64 __m, __m64 __count)
261 return (__m64)__builtin_ia32_psraw((__v4hi)__m, __count);
265 _mm_srai_pi16(__m64 __m,
int __count)
267 return (__m64)__builtin_ia32_psrawi((__v4hi)__m, __count);
271 _mm_sra_pi32(__m64 __m, __m64 __count)
273 return (__m64)__builtin_ia32_psrad((__v2si)__m, __count);
277 _mm_srai_pi32(__m64 __m,
int __count)
279 return (__m64)__builtin_ia32_psradi((__v2si)__m, __count);
283 _mm_srl_pi16(__m64 __m, __m64 __count)
285 return (__m64)__builtin_ia32_psrlw((__v4hi)__m, __count);
289 _mm_srli_pi16(__m64 __m,
int __count)
291 return (__m64)__builtin_ia32_psrlwi((__v4hi)__m, __count);
295 _mm_srl_pi32(__m64 __m, __m64 __count)
297 return (__m64)__builtin_ia32_psrld((__v2si)__m, __count);
301 _mm_srli_pi32(__m64 __m,
int __count)
303 return (__m64)__builtin_ia32_psrldi((__v2si)__m, __count);
307 _mm_srl_si64(__m64 __m, __m64 __count)
309 return (__m64)__builtin_ia32_psrlq(__m, __count);
313 _mm_srli_si64(__m64 __m,
int __count)
315 return (__m64)__builtin_ia32_psrlqi(__m, __count);
319 _mm_and_si64(__m64 __m1, __m64 __m2)
321 return __builtin_ia32_pand(__m1, __m2);
325 _mm_andnot_si64(__m64 __m1, __m64 __m2)
327 return __builtin_ia32_pandn(__m1, __m2);
331 _mm_or_si64(__m64 __m1, __m64 __m2)
333 return __builtin_ia32_por(__m1, __m2);
337 _mm_xor_si64(__m64 __m1, __m64 __m2)
339 return __builtin_ia32_pxor(__m1, __m2);
343 _mm_cmpeq_pi8(__m64 __m1, __m64 __m2)
345 return (__m64)__builtin_ia32_pcmpeqb((__v8qi)__m1, (__v8qi)__m2);
349 _mm_cmpeq_pi16(__m64 __m1, __m64 __m2)
351 return (__m64)__builtin_ia32_pcmpeqw((__v4hi)__m1, (__v4hi)__m2);
355 _mm_cmpeq_pi32(__m64 __m1, __m64 __m2)
357 return (__m64)__builtin_ia32_pcmpeqd((__v2si)__m1, (__v2si)__m2);
361 _mm_cmpgt_pi8(__m64 __m1, __m64 __m2)
363 return (__m64)__builtin_ia32_pcmpgtb((__v8qi)__m1, (__v8qi)__m2);
367 _mm_cmpgt_pi16(__m64 __m1, __m64 __m2)
369 return (__m64)__builtin_ia32_pcmpgtw((__v4hi)__m1, (__v4hi)__m2);
373 _mm_cmpgt_pi32(__m64 __m1, __m64 __m2)
375 return (__m64)__builtin_ia32_pcmpgtd((__v2si)__m1, (__v2si)__m2);
379 _mm_setzero_si64(
void)
381 return (__m64){ 0LL };
385 _mm_set_pi32(
int __i1,
int __i0)
387 return (__m64)__builtin_ia32_vec_init_v2si(__i0, __i1);
391 _mm_set_pi16(
short __s3,
short __s2,
short __s1,
short __s0)
393 return (__m64)__builtin_ia32_vec_init_v4hi(__s0, __s1, __s2, __s3);
397 _mm_set_pi8(
char __b7,
char __b6,
char __b5,
char __b4,
char __b3,
char __b2,
398 char __b1,
char __b0)
400 return (__m64)__builtin_ia32_vec_init_v8qi(__b0, __b1, __b2, __b3,
401 __b4, __b5, __b6, __b7);
405 _mm_set1_pi32(
int __i)
407 return _mm_set_pi32(__i, __i);
411 _mm_set1_pi16(
short __w)
413 return _mm_set_pi16(__w, __w, __w, __w);
417 _mm_set1_pi8(
char __b)
419 return _mm_set_pi8(__b, __b, __b, __b, __b, __b, __b, __b);
423 _mm_setr_pi32(
int __i0,
int __i1)
425 return _mm_set_pi32(__i1, __i0);
429 _mm_setr_pi16(
short __w0,
short __w1,
short __w2,
short __w3)
431 return _mm_set_pi16(__w3, __w2, __w1, __w0);
435 _mm_setr_pi8(
char __b0,
char __b1,
char __b2,
char __b3,
char __b4,
char __b5,
436 char __b6,
char __b7)
438 return _mm_set_pi8(__b7, __b6, __b5, __b4, __b3, __b2, __b1, __b0);
441 #undef __DEFAULT_FN_ATTRS
444 #define _m_empty _mm_empty
445 #define _m_from_int _mm_cvtsi32_si64
446 #define _m_from_int64 _mm_cvtsi64_m64
447 #define _m_to_int _mm_cvtsi64_si32
448 #define _m_to_int64 _mm_cvtm64_si64
449 #define _m_packsswb _mm_packs_pi16
450 #define _m_packssdw _mm_packs_pi32
451 #define _m_packuswb _mm_packs_pu16
452 #define _m_punpckhbw _mm_unpackhi_pi8
453 #define _m_punpckhwd _mm_unpackhi_pi16
454 #define _m_punpckhdq _mm_unpackhi_pi32
455 #define _m_punpcklbw _mm_unpacklo_pi8
456 #define _m_punpcklwd _mm_unpacklo_pi16
457 #define _m_punpckldq _mm_unpacklo_pi32
458 #define _m_paddb _mm_add_pi8
459 #define _m_paddw _mm_add_pi16
460 #define _m_paddd _mm_add_pi32
461 #define _m_paddsb _mm_adds_pi8
462 #define _m_paddsw _mm_adds_pi16
463 #define _m_paddusb _mm_adds_pu8
464 #define _m_paddusw _mm_adds_pu16
465 #define _m_psubb _mm_sub_pi8
466 #define _m_psubw _mm_sub_pi16
467 #define _m_psubd _mm_sub_pi32
468 #define _m_psubsb _mm_subs_pi8
469 #define _m_psubsw _mm_subs_pi16
470 #define _m_psubusb _mm_subs_pu8
471 #define _m_psubusw _mm_subs_pu16
472 #define _m_pmaddwd _mm_madd_pi16
473 #define _m_pmulhw _mm_mulhi_pi16
474 #define _m_pmullw _mm_mullo_pi16
475 #define _m_psllw _mm_sll_pi16
476 #define _m_psllwi _mm_slli_pi16
477 #define _m_pslld _mm_sll_pi32
478 #define _m_pslldi _mm_slli_pi32
479 #define _m_psllq _mm_sll_si64
480 #define _m_psllqi _mm_slli_si64
481 #define _m_psraw _mm_sra_pi16
482 #define _m_psrawi _mm_srai_pi16
483 #define _m_psrad _mm_sra_pi32
484 #define _m_psradi _mm_srai_pi32
485 #define _m_psrlw _mm_srl_pi16
486 #define _m_psrlwi _mm_srli_pi16
487 #define _m_psrld _mm_srl_pi32
488 #define _m_psrldi _mm_srli_pi32
489 #define _m_psrlq _mm_srl_si64
490 #define _m_psrlqi _mm_srli_si64
491 #define _m_pand _mm_and_si64
492 #define _m_pandn _mm_andnot_si64
493 #define _m_por _mm_or_si64
494 #define _m_pxor _mm_xor_si64
495 #define _m_pcmpeqb _mm_cmpeq_pi8
496 #define _m_pcmpeqw _mm_cmpeq_pi16
497 #define _m_pcmpeqd _mm_cmpeq_pi32
498 #define _m_pcmpgtb _mm_cmpgt_pi8
499 #define _m_pcmpgtw _mm_cmpgt_pi16
500 #define _m_pcmpgtd _mm_cmpgt_pi32
#define __DEFAULT_FN_ATTRS
Definition: mmintrin.h:34
static vector float vector float __b
Definition: altivec.h:419
long long __m64 __attribute__((__vector_size__(8)))
Definition: mmintrin.h:27