Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

183 lines
6.0 KiB

  1. /**
  2. *** Copyright (C) 1985-1999 Intel Corporation. All rights reserved.
  3. ***
  4. *** The information and source code contained herein is the exclusive
  5. *** property of Intel Corporation and may not be disclosed, examined
  6. *** or reproduced in whole or in part without explicit written authorization
  7. *** from the company.
  8. ***
  9. **/
  10. /*
  11. * Definitions and declarations for use with compiler intrinsics.
  12. */
  13. #ifndef _MMINTRIN_H_INCLUDED
  14. #define _MMINTRIN_H_INCLUDED
  15. #if defined __cplusplus
  16. extern "C" { /* Begin "C" */
  17. /* Intrinsics use C name-mangling.
  18. */
  19. #endif /* __cplusplus */
  20. #ifdef __ICL
  21. typedef unsigned long long __m64;
  22. #elif _MSC_VER >= 1300
  23. typedef union __declspec(intrin_type) __declspec(align(8)) __m64
  24. {
  25. unsigned __int64 m64_u64;
  26. float m64_f32[2];
  27. __int8 m64_i8[8];
  28. __int16 m64_i16[4];
  29. __int32 m64_i32[2];
  30. __int64 m64_i64;
  31. unsigned __int8 m64_u8[8];
  32. unsigned __int16 m64_u16[4];
  33. unsigned __int32 m64_u32[2];
  34. } __m64;
  35. #endif
  36. /* General support intrinsics */
  37. void _m_empty(void);
  38. __m64 _m_from_int(int i);
  39. int _m_to_int(__m64 m);
  40. __m64 _m_packsswb(__m64 m1, __m64 m2);
  41. __m64 _m_packssdw(__m64 m1, __m64 m2);
  42. __m64 _m_packuswb(__m64 m1, __m64 m2);
  43. __m64 _m_punpckhbw(__m64 m1, __m64 m2);
  44. __m64 _m_punpckhwd(__m64 m1, __m64 m2);
  45. __m64 _m_punpckhdq(__m64 m1, __m64 m2);
  46. __m64 _m_punpcklbw(__m64 m1, __m64 m2);
  47. __m64 _m_punpcklwd(__m64 m1, __m64 m2);
  48. __m64 _m_punpckldq(__m64 m1, __m64 m2);
  49. /* Packed arithmetic intrinsics */
  50. __m64 _m_paddb(__m64 m1, __m64 m2);
  51. __m64 _m_paddw(__m64 m1, __m64 m2);
  52. __m64 _m_paddd(__m64 m1, __m64 m2);
  53. __m64 _m_paddsb(__m64 m1, __m64 m2);
  54. __m64 _m_paddsw(__m64 m1, __m64 m2);
  55. __m64 _m_paddusb(__m64 m1, __m64 m2);
  56. __m64 _m_paddusw(__m64 m1, __m64 m2);
  57. __m64 _m_psubb(__m64 m1, __m64 m2);
  58. __m64 _m_psubw(__m64 m1, __m64 m2);
  59. __m64 _m_psubd(__m64 m1, __m64 m2);
  60. __m64 _m_psubsb(__m64 m1, __m64 m2);
  61. __m64 _m_psubsw(__m64 m1, __m64 m2);
  62. __m64 _m_psubusb(__m64 m1, __m64 m2);
  63. __m64 _m_psubusw(__m64 m1, __m64 m2);
  64. __m64 _m_pmaddwd(__m64 m1, __m64 m2);
  65. __m64 _m_pmulhw(__m64 m1, __m64 m2);
  66. __m64 _m_pmullw(__m64 m1, __m64 m2);
  67. /* Shift intrinsics */
  68. __m64 _m_psllw(__m64 m, __m64 count);
  69. __m64 _m_psllwi(__m64 m, int count);
  70. __m64 _m_pslld(__m64 m, __m64 count);
  71. __m64 _m_pslldi(__m64 m, int count);
  72. __m64 _m_psllq(__m64 m, __m64 count);
  73. __m64 _m_psllqi(__m64 m, int count);
  74. __m64 _m_psraw(__m64 m, __m64 count);
  75. __m64 _m_psrawi(__m64 m, int count);
  76. __m64 _m_psrad(__m64 m, __m64 count);
  77. __m64 _m_psradi(__m64 m, int count);
  78. __m64 _m_psrlw(__m64 m, __m64 count);
  79. __m64 _m_psrlwi(__m64 m, int count);
  80. __m64 _m_psrld(__m64 m, __m64 count);
  81. __m64 _m_psrldi(__m64 m, int count);
  82. __m64 _m_psrlq(__m64 m, __m64 count);
  83. __m64 _m_psrlqi(__m64 m, int count);
  84. /* Logical intrinsics */
  85. __m64 _m_pand(__m64 m1, __m64 m2);
  86. __m64 _m_pandn(__m64 m1, __m64 m2);
  87. __m64 _m_por(__m64 m1, __m64 m2);
  88. __m64 _m_pxor(__m64 m1, __m64 m2);
  89. /* Comparison intrinsics */
  90. __m64 _m_pcmpeqb(__m64 m1, __m64 m2);
  91. __m64 _m_pcmpeqw(__m64 m1, __m64 m2);
  92. __m64 _m_pcmpeqd(__m64 m1, __m64 m2);
  93. __m64 _m_pcmpgtb(__m64 m1, __m64 m2);
  94. __m64 _m_pcmpgtw(__m64 m1, __m64 m2);
  95. __m64 _m_pcmpgtd(__m64 m1, __m64 m2);
  96. /* Utility intrinsics */
  97. __m64 _mm_setzero_si64();
  98. __m64 _mm_set_pi32(int i1, int i0);
  99. __m64 _mm_set_pi16(short s3, short s2, short s1, short s0);
  100. __m64 _mm_set_pi8(char b7, char b6, char b5, char b4,
  101. char b3, char b2, char b1, char b0);
  102. __m64 _mm_set1_pi32(int i);
  103. __m64 _mm_set1_pi16(short s);
  104. __m64 _mm_set1_pi8(char b);
  105. __m64 _mm_setr_pi32(int i1, int i0);
  106. __m64 _mm_setr_pi16(short s3, short s2, short s1, short s0);
  107. __m64 _mm_setr_pi8(char b7, char b6, char b5, char b4,
  108. char b3, char b2, char b1, char b0);
  109. /* Alternate intrinsic name definitions */
  110. #define _mm_empty _m_empty
  111. #define _mm_cvtsi32_si64 _m_from_int
  112. #define _mm_cvtsi64_si32 _m_to_int
  113. #define _mm_packs_pi16 _m_packsswb
  114. #define _mm_packs_pi32 _m_packssdw
  115. #define _mm_packs_pu16 _m_packuswb
  116. #define _mm_unpackhi_pi8 _m_punpckhbw
  117. #define _mm_unpackhi_pi16 _m_punpckhwd
  118. #define _mm_unpackhi_pi32 _m_punpckhdq
  119. #define _mm_unpacklo_pi8 _m_punpcklbw
  120. #define _mm_unpacklo_pi16 _m_punpcklwd
  121. #define _mm_unpacklo_pi32 _m_punpckldq
  122. #define _mm_add_pi8 _m_paddb
  123. #define _mm_add_pi16 _m_paddw
  124. #define _mm_add_pi32 _m_paddd
  125. #define _mm_adds_pi8 _m_paddsb
  126. #define _mm_adds_pi16 _m_paddsw
  127. #define _mm_adds_pu8 _m_paddusb
  128. #define _mm_adds_pu16 _m_paddusw
  129. #define _mm_sub_pi8 _m_psubb
  130. #define _mm_sub_pi16 _m_psubw
  131. #define _mm_sub_pi32 _m_psubd
  132. #define _mm_subs_pi8 _m_psubsb
  133. #define _mm_subs_pi16 _m_psubsw
  134. #define _mm_subs_pu8 _m_psubusb
  135. #define _mm_subs_pu16 _m_psubusw
  136. #define _mm_madd_pi16 _m_pmaddwd
  137. #define _mm_mulhi_pi16 _m_pmulhw
  138. #define _mm_mullo_pi16 _m_pmullw
  139. #define _mm_sll_pi16 _m_psllw
  140. #define _mm_slli_pi16 _m_psllwi
  141. #define _mm_sll_pi32 _m_pslld
  142. #define _mm_slli_pi32 _m_pslldi
  143. #define _mm_sll_si64 _m_psllq
  144. #define _mm_slli_si64 _m_psllqi
  145. #define _mm_sra_pi16 _m_psraw
  146. #define _mm_srai_pi16 _m_psrawi
  147. #define _mm_sra_pi32 _m_psrad
  148. #define _mm_srai_pi32 _m_psradi
  149. #define _mm_srl_pi16 _m_psrlw
  150. #define _mm_srli_pi16 _m_psrlwi
  151. #define _mm_srl_pi32 _m_psrld
  152. #define _mm_srli_pi32 _m_psrldi
  153. #define _mm_srl_si64 _m_psrlq
  154. #define _mm_srli_si64 _m_psrlqi
  155. #define _mm_and_si64 _m_pand
  156. #define _mm_andnot_si64 _m_pandn
  157. #define _mm_or_si64 _m_por
  158. #define _mm_xor_si64 _m_pxor
  159. #define _mm_cmpeq_pi8 _m_pcmpeqb
  160. #define _mm_cmpeq_pi16 _m_pcmpeqw
  161. #define _mm_cmpeq_pi32 _m_pcmpeqd
  162. #define _mm_cmpgt_pi8 _m_pcmpgtb
  163. #define _mm_cmpgt_pi16 _m_pcmpgtw
  164. #define _mm_cmpgt_pi32 _m_pcmpgtd
  165. #if defined __cplusplus
  166. }; /* End "C" */
  167. #endif /* __cplusplus */
  168. #endif /* _MMINTRIN_H_INCLUDED */