llvm-runtime-resources-darwin 0.0.0 → 22.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +33 -0
  3. package/include/__clang_cuda_builtin_vars.h +121 -0
  4. package/include/__clang_cuda_cmath.h +512 -0
  5. package/include/__clang_cuda_complex_builtins.h +229 -0
  6. package/include/__clang_cuda_device_functions.h +1572 -0
  7. package/include/__clang_cuda_intrinsics.h +994 -0
  8. package/include/__clang_cuda_libdevice_declares.h +468 -0
  9. package/include/__clang_cuda_math.h +353 -0
  10. package/include/__clang_cuda_math_forward_declares.h +284 -0
  11. package/include/__clang_cuda_runtime_wrapper.h +522 -0
  12. package/include/__clang_cuda_texture_intrinsics.h +1177 -0
  13. package/include/__clang_hip_cmath.h +848 -0
  14. package/include/__clang_hip_libdevice_declares.h +340 -0
  15. package/include/__clang_hip_math.h +1405 -0
  16. package/include/__clang_hip_runtime_wrapper.h +165 -0
  17. package/include/__clang_hip_stdlib.h +43 -0
  18. package/include/__clang_spirv_builtins.h +217 -0
  19. package/include/__float_float.h +176 -0
  20. package/include/__float_header_macro.h +12 -0
  21. package/include/__float_infinity_nan.h +20 -0
  22. package/include/__stdarg___gnuc_va_list.h +13 -0
  23. package/include/__stdarg___va_copy.h +12 -0
  24. package/include/__stdarg_header_macro.h +12 -0
  25. package/include/__stdarg_va_arg.h +22 -0
  26. package/include/__stdarg_va_copy.h +12 -0
  27. package/include/__stdarg_va_list.h +13 -0
  28. package/include/__stddef_header_macro.h +12 -0
  29. package/include/__stddef_max_align_t.h +27 -0
  30. package/include/__stddef_null.h +29 -0
  31. package/include/__stddef_nullptr_t.h +29 -0
  32. package/include/__stddef_offsetof.h +17 -0
  33. package/include/__stddef_ptrdiff_t.h +20 -0
  34. package/include/__stddef_rsize_t.h +20 -0
  35. package/include/__stddef_size_t.h +20 -0
  36. package/include/__stddef_unreachable.h +21 -0
  37. package/include/__stddef_wchar_t.h +28 -0
  38. package/include/__stddef_wint_t.h +15 -0
  39. package/include/__wmmintrin_aes.h +140 -0
  40. package/include/__wmmintrin_pclmul.h +48 -0
  41. package/include/adcintrin.h +165 -0
  42. package/include/adxintrin.h +107 -0
  43. package/include/altivec.h +19364 -0
  44. package/include/amdgpuintrin.h +191 -0
  45. package/include/ammintrin.h +183 -0
  46. package/include/amo.h +131 -0
  47. package/include/amxavx512intrin.h +596 -0
  48. package/include/amxcomplexintrin.h +167 -0
  49. package/include/amxfp16intrin.h +93 -0
  50. package/include/amxfp8intrin.h +230 -0
  51. package/include/amxintrin.h +492 -0
  52. package/include/amxmovrsintrin.h +48 -0
  53. package/include/amxtf32intrin.h +108 -0
  54. package/include/andes_vector.h +16 -0
  55. package/include/arm64intr.h +35 -0
  56. package/include/arm_acle.h +865 -0
  57. package/include/arm_bf16.h +20 -0
  58. package/include/arm_cde.h +410 -0
  59. package/include/arm_cmse.h +217 -0
  60. package/include/arm_fp16.h +596 -0
  61. package/include/arm_mve.h +19187 -0
  62. package/include/arm_neon.h +74183 -0
  63. package/include/arm_neon_sve_bridge.h +182 -0
  64. package/include/arm_sme.h +3741 -0
  65. package/include/arm_sve.h +32278 -0
  66. package/include/arm_vector_types.h +432 -0
  67. package/include/armintr.h +31 -0
  68. package/include/avx10_2_512bf16intrin.h +568 -0
  69. package/include/avx10_2_512convertintrin.h +322 -0
  70. package/include/avx10_2_512minmaxintrin.h +127 -0
  71. package/include/avx10_2_512niintrin.h +314 -0
  72. package/include/avx10_2_512satcvtdsintrin.h +307 -0
  73. package/include/avx10_2_512satcvtintrin.h +301 -0
  74. package/include/avx10_2bf16intrin.h +1094 -0
  75. package/include/avx10_2convertintrin.h +3257 -0
  76. package/include/avx10_2copyintrin.h +66 -0
  77. package/include/avx10_2minmaxintrin.h +232 -0
  78. package/include/avx10_2niintrin.h +409 -0
  79. package/include/avx10_2satcvtdsintrin.h +376 -0
  80. package/include/avx10_2satcvtintrin.h +312 -0
  81. package/include/avx2intrin.h +5191 -0
  82. package/include/avx512bf16intrin.h +292 -0
  83. package/include/avx512bitalgintrin.h +75 -0
  84. package/include/avx512bwintrin.h +1895 -0
  85. package/include/avx512cdintrin.h +112 -0
  86. package/include/avx512dqintrin.h +1350 -0
  87. package/include/avx512fintrin.h +9378 -0
  88. package/include/avx512fp16intrin.h +3355 -0
  89. package/include/avx512ifmaintrin.h +68 -0
  90. package/include/avx512ifmavlintrin.h +138 -0
  91. package/include/avx512vbmi2intrin.h +368 -0
  92. package/include/avx512vbmiintrin.h +98 -0
  93. package/include/avx512vbmivlintrin.h +179 -0
  94. package/include/avx512vlbf16intrin.h +527 -0
  95. package/include/avx512vlbitalgintrin.h +135 -0
  96. package/include/avx512vlbwintrin.h +3064 -0
  97. package/include/avx512vlcdintrin.h +202 -0
  98. package/include/avx512vldqintrin.h +1156 -0
  99. package/include/avx512vlfp16intrin.h +2090 -0
  100. package/include/avx512vlintrin.h +8083 -0
  101. package/include/avx512vlvbmi2intrin.h +710 -0
  102. package/include/avx512vlvnniintrin.h +313 -0
  103. package/include/avx512vlvp2intersectintrin.h +123 -0
  104. package/include/avx512vnniintrin.h +116 -0
  105. package/include/avx512vp2intersectintrin.h +77 -0
  106. package/include/avx512vpopcntdqintrin.h +62 -0
  107. package/include/avx512vpopcntdqvlintrin.h +105 -0
  108. package/include/avxifmaintrin.h +193 -0
  109. package/include/avxintrin.h +5064 -0
  110. package/include/avxneconvertintrin.h +484 -0
  111. package/include/avxvnniint16intrin.h +451 -0
  112. package/include/avxvnniint8intrin.h +454 -0
  113. package/include/avxvnniintrin.h +233 -0
  114. package/include/bmi2intrin.h +253 -0
  115. package/include/bmiintrin.h +604 -0
  116. package/include/builtins.h +19 -0
  117. package/include/cet.h +66 -0
  118. package/include/cetintrin.h +115 -0
  119. package/include/cldemoteintrin.h +36 -0
  120. package/include/clflushoptintrin.h +36 -0
  121. package/include/clwbintrin.h +38 -0
  122. package/include/clzerointrin.h +38 -0
  123. package/include/cmpccxaddintrin.h +70 -0
  124. package/include/cpuid.h +451 -0
  125. package/include/crc32intrin.h +100 -0
  126. package/include/cuda_wrappers/__utility/declval.h +28 -0
  127. package/include/cuda_wrappers/algorithm +116 -0
  128. package/include/cuda_wrappers/bits/basic_string.h +9 -0
  129. package/include/cuda_wrappers/bits/basic_string.tcc +9 -0
  130. package/include/cuda_wrappers/bits/c++config.h +61 -0
  131. package/include/cuda_wrappers/bits/shared_ptr_base.h +9 -0
  132. package/include/cuda_wrappers/cmath +44 -0
  133. package/include/cuda_wrappers/complex +90 -0
  134. package/include/cuda_wrappers/new +108 -0
  135. package/include/emmintrin.h +4940 -0
  136. package/include/enqcmdintrin.h +63 -0
  137. package/include/f16cintrin.h +176 -0
  138. package/include/float.h +48 -0
  139. package/include/fma4intrin.h +220 -0
  140. package/include/fmaintrin.h +826 -0
  141. package/include/fuzzer/FuzzedDataProvider.h +397 -0
  142. package/include/fxsrintrin.h +91 -0
  143. package/include/gfniintrin.h +238 -0
  144. package/include/gpuintrin.h +330 -0
  145. package/include/hexagon_circ_brev_intrinsics.h +298 -0
  146. package/include/hexagon_protos.h +8439 -0
  147. package/include/hexagon_types.h +2628 -0
  148. package/include/hresetintrin.h +49 -0
  149. package/include/htmintrin.h +212 -0
  150. package/include/htmxlintrin.h +345 -0
  151. package/include/hvx_hexagon_protos.h +5399 -0
  152. package/include/ia32intrin.h +863 -0
  153. package/include/immintrin.h +595 -0
  154. package/include/intrin.h +491 -0
  155. package/include/intrin0.h +256 -0
  156. package/include/inttypes.h +101 -0
  157. package/include/invpcidintrin.h +23 -0
  158. package/include/iso646.h +31 -0
  159. package/include/keylockerintrin.h +518 -0
  160. package/include/larchintrin.h +260 -0
  161. package/include/lasxintrin.h +3999 -0
  162. package/include/limits.h +133 -0
  163. package/include/llvm_libc_wrappers/assert.h +32 -0
  164. package/include/llvm_libc_wrappers/ctype.h +28 -0
  165. package/include/llvm_libc_wrappers/inttypes.h +32 -0
  166. package/include/llvm_libc_wrappers/stdio.h +52 -0
  167. package/include/llvm_libc_wrappers/stdlib.h +32 -0
  168. package/include/llvm_libc_wrappers/string.h +28 -0
  169. package/include/llvm_libc_wrappers/time.h +28 -0
  170. package/include/llvm_offload_wrappers/__llvm_offload.h +31 -0
  171. package/include/llvm_offload_wrappers/__llvm_offload_device.h +10 -0
  172. package/include/llvm_offload_wrappers/__llvm_offload_host.h +15 -0
  173. package/include/lsxintrin.h +3752 -0
  174. package/include/lwpintrin.h +136 -0
  175. package/include/lzcntintrin.h +109 -0
  176. package/include/mm3dnow.h +22 -0
  177. package/include/mm_malloc.h +67 -0
  178. package/include/mmintrin.h +1541 -0
  179. package/include/module.modulemap +360 -0
  180. package/include/movdirintrin.h +49 -0
  181. package/include/movrs_avx10_2_512intrin.h +98 -0
  182. package/include/movrs_avx10_2intrin.h +174 -0
  183. package/include/movrsintrin.h +59 -0
  184. package/include/msa.h +573 -0
  185. package/include/mwaitxintrin.h +62 -0
  186. package/include/nmmintrin.h +20 -0
  187. package/include/nvptxintrin.h +219 -0
  188. package/include/opencl-c-base.h +758 -0
  189. package/include/opencl-c.h +18676 -0
  190. package/include/openmp_wrappers/__clang_openmp_device_functions.h +104 -0
  191. package/include/openmp_wrappers/cmath +132 -0
  192. package/include/openmp_wrappers/complex +55 -0
  193. package/include/openmp_wrappers/complex.h +35 -0
  194. package/include/openmp_wrappers/complex_cmath.h +393 -0
  195. package/include/openmp_wrappers/math.h +61 -0
  196. package/include/openmp_wrappers/new +48 -0
  197. package/include/pconfigintrin.h +40 -0
  198. package/include/pkuintrin.h +34 -0
  199. package/include/pmmintrin.h +302 -0
  200. package/include/popcntintrin.h +59 -0
  201. package/include/ppc_wrappers/bmi2intrin.h +134 -0
  202. package/include/ppc_wrappers/bmiintrin.h +165 -0
  203. package/include/ppc_wrappers/emmintrin.h +2269 -0
  204. package/include/ppc_wrappers/immintrin.h +27 -0
  205. package/include/ppc_wrappers/mm_malloc.h +45 -0
  206. package/include/ppc_wrappers/mmintrin.h +1453 -0
  207. package/include/ppc_wrappers/nmmintrin.h +26 -0
  208. package/include/ppc_wrappers/pmmintrin.h +145 -0
  209. package/include/ppc_wrappers/smmintrin.h +683 -0
  210. package/include/ppc_wrappers/tmmintrin.h +453 -0
  211. package/include/ppc_wrappers/x86gprintrin.h +17 -0
  212. package/include/ppc_wrappers/x86intrin.h +28 -0
  213. package/include/ppc_wrappers/xmmintrin.h +1827 -0
  214. package/include/prfchiintrin.h +61 -0
  215. package/include/prfchwintrin.h +57 -0
  216. package/include/profile/InstrProfData.inc +1001 -0
  217. package/include/profile/instr_prof_interface.h +88 -0
  218. package/include/ptrauth.h +407 -0
  219. package/include/ptwriteintrin.h +37 -0
  220. package/include/raointintrin.h +203 -0
  221. package/include/rdpruintrin.h +57 -0
  222. package/include/rdseedintrin.h +105 -0
  223. package/include/riscv_bitmanip.h +195 -0
  224. package/include/riscv_corev_alu.h +128 -0
  225. package/include/riscv_crypto.h +170 -0
  226. package/include/riscv_mips.h +34 -0
  227. package/include/riscv_nds.h +89 -0
  228. package/include/riscv_ntlh.h +26 -0
  229. package/include/riscv_vector.h +422 -0
  230. package/include/rtmintrin.h +45 -0
  231. package/include/s390intrin.h +25 -0
  232. package/include/sanitizer/allocator_interface.h +106 -0
  233. package/include/sanitizer/asan_interface.h +348 -0
  234. package/include/sanitizer/common_interface_defs.h +544 -0
  235. package/include/sanitizer/coverage_interface.h +36 -0
  236. package/include/sanitizer/dfsan_interface.h +220 -0
  237. package/include/sanitizer/hwasan_interface.h +109 -0
  238. package/include/sanitizer/linux_syscall_hooks.h +3112 -0
  239. package/include/sanitizer/lsan_interface.h +89 -0
  240. package/include/sanitizer/msan_interface.h +135 -0
  241. package/include/sanitizer/netbsd_syscall_hooks.h +5005 -0
  242. package/include/sanitizer/rtsan_interface.h +75 -0
  243. package/include/sanitizer/scudo_interface.h +38 -0
  244. package/include/sanitizer/tsan_interface.h +316 -0
  245. package/include/sanitizer/tsan_interface_atomic.h +223 -0
  246. package/include/sanitizer/ubsan_interface.h +34 -0
  247. package/include/serializeintrin.h +30 -0
  248. package/include/sgxintrin.h +60 -0
  249. package/include/sha512intrin.h +200 -0
  250. package/include/shaintrin.h +190 -0
  251. package/include/sifive_vector.h +174 -0
  252. package/include/sm3intrin.h +238 -0
  253. package/include/sm4evexintrin.h +32 -0
  254. package/include/sm4intrin.h +269 -0
  255. package/include/smmintrin.h +2352 -0
  256. package/include/spirvintrin.h +194 -0
  257. package/include/stdalign.h +24 -0
  258. package/include/stdarg.h +75 -0
  259. package/include/stdatomic.h +204 -0
  260. package/include/stdbool.h +39 -0
  261. package/include/stdckdint.h +42 -0
  262. package/include/stdcountof.h +15 -0
  263. package/include/stddef.h +139 -0
  264. package/include/stddefer.h +19 -0
  265. package/include/stdint.h +844 -0
  266. package/include/stdnoreturn.h +35 -0
  267. package/include/tbmintrin.h +128 -0
  268. package/include/tgmath.h +1368 -0
  269. package/include/tmmintrin.h +779 -0
  270. package/include/tsxldtrkintrin.h +56 -0
  271. package/include/uintrintrin.h +157 -0
  272. package/include/unwind.h +332 -0
  273. package/include/usermsrintrin.h +51 -0
  274. package/include/vadefs.h +51 -0
  275. package/include/vaesintrin.h +86 -0
  276. package/include/varargs.h +16 -0
  277. package/include/vecintrin.h +12868 -0
  278. package/include/velintrin.h +71 -0
  279. package/include/velintrin_approx.h +120 -0
  280. package/include/velintrin_gen.h +1257 -0
  281. package/include/vpclmulqdqintrin.h +30 -0
  282. package/include/waitpkgintrin.h +42 -0
  283. package/include/wasm_simd128.h +2143 -0
  284. package/include/wbnoinvdintrin.h +24 -0
  285. package/include/wmmintrin.h +23 -0
  286. package/include/x86gprintrin.h +49 -0
  287. package/include/x86intrin.h +35 -0
  288. package/include/xmmintrin.h +3175 -0
  289. package/include/xopintrin.h +780 -0
  290. package/include/xsavecintrin.h +84 -0
  291. package/include/xsaveintrin.h +63 -0
  292. package/include/xsaveoptintrin.h +34 -0
  293. package/include/xsavesintrin.h +44 -0
  294. package/include/xtestintrin.h +27 -0
  295. package/include/yvals_core.h +25 -0
  296. package/include/zos_wrappers/builtins.h +18 -0
  297. package/index.js +5 -0
  298. package/lib/darwin/libclang_rt.asan_abi_ios.a +0 -0
  299. package/lib/darwin/libclang_rt.asan_abi_iossim.a +0 -0
  300. package/lib/darwin/libclang_rt.asan_abi_osx.a +0 -0
  301. package/lib/darwin/libclang_rt.asan_ios_dynamic.dylib +0 -0
  302. package/lib/darwin/libclang_rt.asan_iossim_dynamic.dylib +0 -0
  303. package/lib/darwin/libclang_rt.asan_osx_dynamic.dylib +0 -0
  304. package/lib/darwin/libclang_rt.cc_kext.a +0 -0
  305. package/lib/darwin/libclang_rt.cc_kext_ios.a +0 -0
  306. package/lib/darwin/libclang_rt.fuzzer_interceptors_ios.a +0 -0
  307. package/lib/darwin/libclang_rt.fuzzer_interceptors_iossim.a +0 -0
  308. package/lib/darwin/libclang_rt.fuzzer_interceptors_osx.a +0 -0
  309. package/lib/darwin/libclang_rt.fuzzer_ios.a +0 -0
  310. package/lib/darwin/libclang_rt.fuzzer_iossim.a +0 -0
  311. package/lib/darwin/libclang_rt.fuzzer_no_main_ios.a +0 -0
  312. package/lib/darwin/libclang_rt.fuzzer_no_main_iossim.a +0 -0
  313. package/lib/darwin/libclang_rt.fuzzer_no_main_osx.a +0 -0
  314. package/lib/darwin/libclang_rt.fuzzer_osx.a +0 -0
  315. package/lib/darwin/libclang_rt.ios.a +0 -0
  316. package/lib/darwin/libclang_rt.iossim.a +0 -0
  317. package/lib/darwin/libclang_rt.lsan_ios_dynamic.dylib +0 -0
  318. package/lib/darwin/libclang_rt.lsan_iossim_dynamic.dylib +0 -0
  319. package/lib/darwin/libclang_rt.lsan_osx_dynamic.dylib +0 -0
  320. package/lib/darwin/libclang_rt.osx.a +0 -0
  321. package/lib/darwin/libclang_rt.profile_ios.a +0 -0
  322. package/lib/darwin/libclang_rt.profile_iossim.a +0 -0
  323. package/lib/darwin/libclang_rt.profile_osx.a +0 -0
  324. package/lib/darwin/libclang_rt.rtsan_ios_dynamic.dylib +0 -0
  325. package/lib/darwin/libclang_rt.rtsan_iossim_dynamic.dylib +0 -0
  326. package/lib/darwin/libclang_rt.rtsan_osx_dynamic.dylib +0 -0
  327. package/lib/darwin/libclang_rt.stats_client_ios.a +0 -0
  328. package/lib/darwin/libclang_rt.stats_client_iossim.a +0 -0
  329. package/lib/darwin/libclang_rt.stats_client_osx.a +0 -0
  330. package/lib/darwin/libclang_rt.stats_ios_dynamic.dylib +0 -0
  331. package/lib/darwin/libclang_rt.stats_iossim_dynamic.dylib +0 -0
  332. package/lib/darwin/libclang_rt.stats_osx_dynamic.dylib +0 -0
  333. package/lib/darwin/libclang_rt.tsan_ios_dynamic.dylib +0 -0
  334. package/lib/darwin/libclang_rt.tsan_iossim_dynamic.dylib +0 -0
  335. package/lib/darwin/libclang_rt.tsan_osx_dynamic.dylib +0 -0
  336. package/lib/darwin/libclang_rt.tysan_ios_dynamic.dylib +0 -0
  337. package/lib/darwin/libclang_rt.tysan_iossim_dynamic.dylib +0 -0
  338. package/lib/darwin/libclang_rt.tysan_osx_dynamic.dylib +0 -0
  339. package/lib/darwin/libclang_rt.ubsan_ios_dynamic.dylib +0 -0
  340. package/lib/darwin/libclang_rt.ubsan_iossim_dynamic.dylib +0 -0
  341. package/lib/darwin/libclang_rt.ubsan_minimal_ios.a +0 -0
  342. package/lib/darwin/libclang_rt.ubsan_minimal_ios_dynamic.dylib +0 -0
  343. package/lib/darwin/libclang_rt.ubsan_minimal_iossim.a +0 -0
  344. package/lib/darwin/libclang_rt.ubsan_minimal_iossim_dynamic.dylib +0 -0
  345. package/lib/darwin/libclang_rt.ubsan_minimal_osx.a +0 -0
  346. package/lib/darwin/libclang_rt.ubsan_minimal_osx_dynamic.dylib +0 -0
  347. package/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib +0 -0
  348. package/package.json +40 -1
  349. package/share/asan_ignorelist.txt +14 -0
  350. package/share/cfi_ignorelist.txt +17 -0
@@ -0,0 +1,779 @@
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
+ #if !defined(__i386__) && !defined(__x86_64__)
14
+ #error "This header is only meant to be used on x86 and x64 architecture"
15
+ #endif
16
+
17
+ #include <pmmintrin.h>
18
+
19
+ /* Define the default attributes for the functions in this file. */
20
+ #define __DEFAULT_FN_ATTRS \
21
+ __attribute__((__always_inline__, __nodebug__, __target__("ssse3"), \
22
+ __min_vector_width__(128)))
23
+
24
+ #define __trunc64(x) \
25
+ (__m64) __builtin_shufflevector((__v2di)(x), __extension__(__v2di){}, 0)
26
+ #define __zext128(x) \
27
+ (__m128i) __builtin_shufflevector((__v2si)(x), __extension__(__v2si){}, 0, \
28
+ 1, 2, 3)
29
+
30
+ #if defined(__cplusplus) && (__cplusplus >= 201103L)
31
+ #define __DEFAULT_FN_ATTRS_CONSTEXPR __DEFAULT_FN_ATTRS constexpr
32
+ #else
33
+ #define __DEFAULT_FN_ATTRS_CONSTEXPR __DEFAULT_FN_ATTRS
34
+ #endif
35
+
36
+ /// Computes the absolute value of each of the packed 8-bit signed
37
+ /// integers in the source operand and stores the 8-bit unsigned integer
38
+ /// results in the destination.
39
+ ///
40
+ /// \headerfile <x86intrin.h>
41
+ ///
42
+ /// This intrinsic corresponds to the \c PABSB instruction.
43
+ ///
44
+ /// \param __a
45
+ /// A 64-bit vector of [8 x i8].
46
+ /// \returns A 64-bit integer vector containing the absolute values of the
47
+ /// elements in the operand.
48
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_CONSTEXPR _mm_abs_pi8(__m64 __a) {
49
+ return (__m64)__builtin_elementwise_abs((__v8qs)__a);
50
+ }
51
+
52
+ /// Computes the absolute value of each of the packed 8-bit signed
53
+ /// integers in the source operand and stores the 8-bit unsigned integer
54
+ /// results in the destination.
55
+ ///
56
+ /// \headerfile <x86intrin.h>
57
+ ///
58
+ /// This intrinsic corresponds to the \c VPABSB instruction.
59
+ ///
60
+ /// \param __a
61
+ /// A 128-bit vector of [16 x i8].
62
+ /// \returns A 128-bit integer vector containing the absolute values of the
63
+ /// elements in the operand.
64
+ static __inline__ __m128i __DEFAULT_FN_ATTRS_CONSTEXPR
65
+ _mm_abs_epi8(__m128i __a) {
66
+ return (__m128i)__builtin_elementwise_abs((__v16qs)__a);
67
+ }
68
+
69
+ /// Computes the absolute value of each of the packed 16-bit signed
70
+ /// integers in the source operand and stores the 16-bit unsigned integer
71
+ /// results in the destination.
72
+ ///
73
+ /// \headerfile <x86intrin.h>
74
+ ///
75
+ /// This intrinsic corresponds to the \c PABSW instruction.
76
+ ///
77
+ /// \param __a
78
+ /// A 64-bit vector of [4 x i16].
79
+ /// \returns A 64-bit integer vector containing the absolute values of the
80
+ /// elements in the operand.
81
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_CONSTEXPR _mm_abs_pi16(__m64 __a) {
82
+ return (__m64)__builtin_elementwise_abs((__v4hi)__a);
83
+ }
84
+
85
+ /// Computes the absolute value of each of the packed 16-bit signed
86
+ /// integers in the source operand and stores the 16-bit unsigned integer
87
+ /// results in the destination.
88
+ ///
89
+ /// \headerfile <x86intrin.h>
90
+ ///
91
+ /// This intrinsic corresponds to the \c VPABSW instruction.
92
+ ///
93
+ /// \param __a
94
+ /// A 128-bit vector of [8 x i16].
95
+ /// \returns A 128-bit integer vector containing the absolute values of the
96
+ /// elements in the operand.
97
+ static __inline__ __m128i __DEFAULT_FN_ATTRS_CONSTEXPR
98
+ _mm_abs_epi16(__m128i __a) {
99
+ return (__m128i)__builtin_elementwise_abs((__v8hi)__a);
100
+ }
101
+
102
+ /// Computes the absolute value of each of the packed 32-bit signed
103
+ /// integers in the source operand and stores the 32-bit unsigned integer
104
+ /// results in the destination.
105
+ ///
106
+ /// \headerfile <x86intrin.h>
107
+ ///
108
+ /// This intrinsic corresponds to the \c PABSD instruction.
109
+ ///
110
+ /// \param __a
111
+ /// A 64-bit vector of [2 x i32].
112
+ /// \returns A 64-bit integer vector containing the absolute values of the
113
+ /// elements in the operand.
114
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_CONSTEXPR _mm_abs_pi32(__m64 __a) {
115
+ return (__m64)__builtin_elementwise_abs((__v2si)__a);
116
+ }
117
+
118
+ /// Computes the absolute value of each of the packed 32-bit signed
119
+ /// integers in the source operand and stores the 32-bit unsigned integer
120
+ /// results in the destination.
121
+ ///
122
+ /// \headerfile <x86intrin.h>
123
+ ///
124
+ /// This intrinsic corresponds to the \c VPABSD instruction.
125
+ ///
126
+ /// \param __a
127
+ /// A 128-bit vector of [4 x i32].
128
+ /// \returns A 128-bit integer vector containing the absolute values of the
129
+ /// elements in the operand.
130
+ static __inline__ __m128i __DEFAULT_FN_ATTRS_CONSTEXPR
131
+ _mm_abs_epi32(__m128i __a) {
132
+ return (__m128i)__builtin_elementwise_abs((__v4si)__a);
133
+ }
134
+
135
+ /// Concatenates the two 128-bit integer vector operands, and
136
+ /// right-shifts the result by the number of bytes specified in the immediate
137
+ /// operand.
138
+ ///
139
+ /// \headerfile <x86intrin.h>
140
+ ///
141
+ /// \code
142
+ /// __m128i _mm_alignr_epi8(__m128i a, __m128i b, const int n);
143
+ /// \endcode
144
+ ///
145
+ /// This intrinsic corresponds to the \c PALIGNR instruction.
146
+ ///
147
+ /// \param a
148
+ /// A 128-bit vector of [16 x i8] containing one of the source operands.
149
+ /// \param b
150
+ /// A 128-bit vector of [16 x i8] containing one of the source operands.
151
+ /// \param n
152
+ /// An immediate operand specifying how many bytes to right-shift the result.
153
+ /// \returns A 128-bit integer vector containing the concatenated right-shifted
154
+ /// value.
155
+ #define _mm_alignr_epi8(a, b, n) \
156
+ ((__m128i)__builtin_ia32_palignr128((__v16qi)(__m128i)(a), \
157
+ (__v16qi)(__m128i)(b), (n)))
158
+
159
+ /// Concatenates the two 64-bit integer vector operands, and right-shifts
160
+ /// the result by the number of bytes specified in the immediate operand.
161
+ ///
162
+ /// \headerfile <x86intrin.h>
163
+ ///
164
+ /// \code
165
+ /// __m64 _mm_alignr_pi8(__m64 a, __m64 b, const int n);
166
+ /// \endcode
167
+ ///
168
+ /// This intrinsic corresponds to the \c PALIGNR instruction.
169
+ ///
170
+ /// \param a
171
+ /// A 64-bit vector of [8 x i8] containing one of the source operands.
172
+ /// \param b
173
+ /// A 64-bit vector of [8 x i8] containing one of the source operands.
174
+ /// \param n
175
+ /// An immediate operand specifying how many bytes to right-shift the result.
176
+ /// \returns A 64-bit integer vector containing the concatenated right-shifted
177
+ /// value.
178
+ #define _mm_alignr_pi8(a, b, n) \
179
+ ((__m64)__builtin_shufflevector( \
180
+ (__v2di)__builtin_ia32_psrldqi128_byteshift( \
181
+ (__v16qi)__builtin_shufflevector((__v1di)(a), (__v1di)(b), 1, 0), \
182
+ (n)), \
183
+ __extension__(__v2di){}, 0))
184
+
185
+ /// Horizontally adds the adjacent pairs of values contained in 2 packed
186
+ /// 128-bit vectors of [8 x i16].
187
+ ///
188
+ /// \headerfile <x86intrin.h>
189
+ ///
190
+ /// This intrinsic corresponds to the \c VPHADDW instruction.
191
+ ///
192
+ /// \param __a
193
+ /// A 128-bit vector of [8 x i16] containing one of the source operands. The
194
+ /// horizontal sums of the values are stored in the lower bits of the
195
+ /// destination.
196
+ /// \param __b
197
+ /// A 128-bit vector of [8 x i16] containing one of the source operands. The
198
+ /// horizontal sums of the values are stored in the upper bits of the
199
+ /// destination.
200
+ /// \returns A 128-bit vector of [8 x i16] containing the horizontal sums of
201
+ /// both operands.
202
+ static __inline__ __m128i __DEFAULT_FN_ATTRS_CONSTEXPR
203
+ _mm_hadd_epi16(__m128i __a, __m128i __b) {
204
+ return (__m128i)__builtin_ia32_phaddw128((__v8hi)__a, (__v8hi)__b);
205
+ }
206
+
207
+ /// Horizontally adds the adjacent pairs of values contained in 2 packed
208
+ /// 128-bit vectors of [4 x i32].
209
+ ///
210
+ /// \headerfile <x86intrin.h>
211
+ ///
212
+ /// This intrinsic corresponds to the \c VPHADDD instruction.
213
+ ///
214
+ /// \param __a
215
+ /// A 128-bit vector of [4 x i32] containing one of the source operands. The
216
+ /// horizontal sums of the values are stored in the lower bits of the
217
+ /// destination.
218
+ /// \param __b
219
+ /// A 128-bit vector of [4 x i32] containing one of the source operands. The
220
+ /// horizontal sums of the values are stored in the upper bits of the
221
+ /// destination.
222
+ /// \returns A 128-bit vector of [4 x i32] containing the horizontal sums of
223
+ /// both operands.
224
+ static __inline__ __m128i __DEFAULT_FN_ATTRS_CONSTEXPR
225
+ _mm_hadd_epi32(__m128i __a, __m128i __b) {
226
+ return (__m128i)__builtin_ia32_phaddd128((__v4si)__a, (__v4si)__b);
227
+ }
228
+
229
+ /// Horizontally adds the adjacent pairs of values contained in 2 packed
230
+ /// 64-bit vectors of [4 x i16].
231
+ ///
232
+ /// \headerfile <x86intrin.h>
233
+ ///
234
+ /// This intrinsic corresponds to the \c PHADDW instruction.
235
+ ///
236
+ /// \param __a
237
+ /// A 64-bit vector of [4 x i16] containing one of the source operands. The
238
+ /// horizontal sums of the values are stored in the lower bits of the
239
+ /// destination.
240
+ /// \param __b
241
+ /// A 64-bit vector of [4 x i16] containing one of the source operands. The
242
+ /// horizontal sums of the values are stored in the upper bits of the
243
+ /// destination.
244
+ /// \returns A 64-bit vector of [4 x i16] containing the horizontal sums of both
245
+ /// operands.
246
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_CONSTEXPR _mm_hadd_pi16(__m64 __a,
247
+ __m64 __b) {
248
+ return __trunc64(__builtin_ia32_phaddw128(
249
+ (__v8hi)__builtin_shufflevector(__a, __b, 0, 1), (__v8hi){}));
250
+ }
251
+
252
+ /// Horizontally adds the adjacent pairs of values contained in 2 packed
253
+ /// 64-bit vectors of [2 x i32].
254
+ ///
255
+ /// \headerfile <x86intrin.h>
256
+ ///
257
+ /// This intrinsic corresponds to the \c PHADDD instruction.
258
+ ///
259
+ /// \param __a
260
+ /// A 64-bit vector of [2 x i32] containing one of the source operands. The
261
+ /// horizontal sums of the values are stored in the lower bits of the
262
+ /// destination.
263
+ /// \param __b
264
+ /// A 64-bit vector of [2 x i32] containing one of the source operands. The
265
+ /// horizontal sums of the values are stored in the upper bits of the
266
+ /// destination.
267
+ /// \returns A 64-bit vector of [2 x i32] containing the horizontal sums of both
268
+ /// operands.
269
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_CONSTEXPR _mm_hadd_pi32(__m64 __a,
270
+ __m64 __b) {
271
+ return __trunc64(__builtin_ia32_phaddd128(
272
+ (__v4si)__builtin_shufflevector(__a, __b, 0, 1), (__v4si){}));
273
+ }
274
+
275
+ /// Horizontally adds, with saturation, the adjacent pairs of values contained
276
+ /// in two packed 128-bit vectors of [8 x i16].
277
+ ///
278
+ /// Positive sums greater than 0x7FFF are saturated to 0x7FFF. Negative sums
279
+ /// less than 0x8000 are saturated to 0x8000.
280
+ ///
281
+ /// \headerfile <x86intrin.h>
282
+ ///
283
+ /// This intrinsic corresponds to the \c VPHADDSW instruction.
284
+ ///
285
+ /// \param __a
286
+ /// A 128-bit vector of [8 x i16] containing one of the source operands. The
287
+ /// horizontal sums of the values are stored in the lower bits of the
288
+ /// destination.
289
+ /// \param __b
290
+ /// A 128-bit vector of [8 x i16] containing one of the source operands. The
291
+ /// horizontal sums of the values are stored in the upper bits of the
292
+ /// destination.
293
+ /// \returns A 128-bit vector of [8 x i16] containing the horizontal saturated
294
+ /// sums of both operands.
295
+ static __inline__ __m128i __DEFAULT_FN_ATTRS_CONSTEXPR
296
+ _mm_hadds_epi16(__m128i __a, __m128i __b) {
297
+ return (__m128i)__builtin_ia32_phaddsw128((__v8hi)__a, (__v8hi)__b);
298
+ }
299
+
300
+ /// Horizontally adds, with saturation, the adjacent pairs of values contained
301
+ /// in two packed 64-bit vectors of [4 x i16].
302
+ ///
303
+ /// Positive sums greater than 0x7FFF are saturated to 0x7FFF. Negative sums
304
+ /// less than 0x8000 are saturated to 0x8000.
305
+ ///
306
+ /// \headerfile <x86intrin.h>
307
+ ///
308
+ /// This intrinsic corresponds to the \c PHADDSW instruction.
309
+ ///
310
+ /// \param __a
311
+ /// A 64-bit vector of [4 x i16] containing one of the source operands. The
312
+ /// horizontal sums of the values are stored in the lower bits of the
313
+ /// destination.
314
+ /// \param __b
315
+ /// A 64-bit vector of [4 x i16] containing one of the source operands. The
316
+ /// horizontal sums of the values are stored in the upper bits of the
317
+ /// destination.
318
+ /// \returns A 64-bit vector of [4 x i16] containing the horizontal saturated
319
+ /// sums of both operands.
320
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_CONSTEXPR _mm_hadds_pi16(__m64 __a,
321
+ __m64 __b) {
322
+ return __trunc64(__builtin_ia32_phaddsw128(
323
+ (__v8hi)__builtin_shufflevector(__a, __b, 0, 1), (__v8hi){}));
324
+ }
325
+
326
+ /// Horizontally subtracts the adjacent pairs of values contained in 2
327
+ /// packed 128-bit vectors of [8 x i16].
328
+ ///
329
+ /// \headerfile <x86intrin.h>
330
+ ///
331
+ /// This intrinsic corresponds to the \c VPHSUBW instruction.
332
+ ///
333
+ /// \param __a
334
+ /// A 128-bit vector of [8 x i16] containing one of the source operands. The
335
+ /// horizontal differences between the values are stored in the lower bits of
336
+ /// the destination.
337
+ /// \param __b
338
+ /// A 128-bit vector of [8 x i16] containing one of the source operands. The
339
+ /// horizontal differences between the values are stored in the upper bits of
340
+ /// the destination.
341
+ /// \returns A 128-bit vector of [8 x i16] containing the horizontal differences
342
+ /// of both operands.
343
+ static __inline__ __m128i __DEFAULT_FN_ATTRS_CONSTEXPR
344
+ _mm_hsub_epi16(__m128i __a, __m128i __b) {
345
+ return (__m128i)__builtin_ia32_phsubw128((__v8hi)__a, (__v8hi)__b);
346
+ }
347
+
348
+ /// Horizontally subtracts the adjacent pairs of values contained in 2
349
+ /// packed 128-bit vectors of [4 x i32].
350
+ ///
351
+ /// \headerfile <x86intrin.h>
352
+ ///
353
+ /// This intrinsic corresponds to the \c VPHSUBD instruction.
354
+ ///
355
+ /// \param __a
356
+ /// A 128-bit vector of [4 x i32] containing one of the source operands. The
357
+ /// horizontal differences between the values are stored in the lower bits of
358
+ /// the destination.
359
+ /// \param __b
360
+ /// A 128-bit vector of [4 x i32] containing one of the source operands. The
361
+ /// horizontal differences between the values are stored in the upper bits of
362
+ /// the destination.
363
+ /// \returns A 128-bit vector of [4 x i32] containing the horizontal differences
364
+ /// of both operands.
365
+ static __inline__ __m128i __DEFAULT_FN_ATTRS_CONSTEXPR
366
+ _mm_hsub_epi32(__m128i __a, __m128i __b) {
367
+ return (__m128i)__builtin_ia32_phsubd128((__v4si)__a, (__v4si)__b);
368
+ }
369
+
370
+ /// Horizontally subtracts the adjacent pairs of values contained in 2
371
+ /// packed 64-bit vectors of [4 x i16].
372
+ ///
373
+ /// \headerfile <x86intrin.h>
374
+ ///
375
+ /// This intrinsic corresponds to the \c PHSUBW instruction.
376
+ ///
377
+ /// \param __a
378
+ /// A 64-bit vector of [4 x i16] containing one of the source operands. The
379
+ /// horizontal differences between the values are stored in the lower bits of
380
+ /// the destination.
381
+ /// \param __b
382
+ /// A 64-bit vector of [4 x i16] containing one of the source operands. The
383
+ /// horizontal differences between the values are stored in the upper bits of
384
+ /// the destination.
385
+ /// \returns A 64-bit vector of [4 x i16] containing the horizontal differences
386
+ /// of both operands.
387
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_CONSTEXPR _mm_hsub_pi16(__m64 __a,
388
+ __m64 __b) {
389
+ return __trunc64(__builtin_ia32_phsubw128(
390
+ (__v8hi)__builtin_shufflevector(__a, __b, 0, 1), (__v8hi){}));
391
+ }
392
+
393
+ /// Horizontally subtracts the adjacent pairs of values contained in 2
394
+ /// packed 64-bit vectors of [2 x i32].
395
+ ///
396
+ /// \headerfile <x86intrin.h>
397
+ ///
398
+ /// This intrinsic corresponds to the \c PHSUBD instruction.
399
+ ///
400
+ /// \param __a
401
+ /// A 64-bit vector of [2 x i32] containing one of the source operands. The
402
+ /// horizontal differences between the values are stored in the lower bits of
403
+ /// the destination.
404
+ /// \param __b
405
+ /// A 64-bit vector of [2 x i32] containing one of the source operands. The
406
+ /// horizontal differences between the values are stored in the upper bits of
407
+ /// the destination.
408
+ /// \returns A 64-bit vector of [2 x i32] containing the horizontal differences
409
+ /// of both operands.
410
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_CONSTEXPR _mm_hsub_pi32(__m64 __a,
411
+ __m64 __b) {
412
+ return __trunc64(__builtin_ia32_phsubd128(
413
+ (__v4si)__builtin_shufflevector(__a, __b, 0, 1), (__v4si){}));
414
+ }
415
+
416
+ /// Horizontally subtracts, with saturation, the adjacent pairs of values
417
+ /// contained in two packed 128-bit vectors of [8 x i16].
418
+ ///
419
+ /// Positive differences greater than 0x7FFF are saturated to 0x7FFF.
420
+ /// Negative differences less than 0x8000 are saturated to 0x8000.
421
+ ///
422
+ /// \headerfile <x86intrin.h>
423
+ ///
424
+ /// This intrinsic corresponds to the \c VPHSUBSW instruction.
425
+ ///
426
+ /// \param __a
427
+ /// A 128-bit vector of [8 x i16] containing one of the source operands. The
428
+ /// horizontal differences between the values are stored in the lower bits of
429
+ /// the destination.
430
+ /// \param __b
431
+ /// A 128-bit vector of [8 x i16] containing one of the source operands. The
432
+ /// horizontal differences between the values are stored in the upper bits of
433
+ /// the destination.
434
+ /// \returns A 128-bit vector of [8 x i16] containing the horizontal saturated
435
+ /// differences of both operands.
436
+ static __inline__ __m128i __DEFAULT_FN_ATTRS_CONSTEXPR
437
+ _mm_hsubs_epi16(__m128i __a, __m128i __b) {
438
+ return (__m128i)__builtin_ia32_phsubsw128((__v8hi)__a, (__v8hi)__b);
439
+ }
440
+
441
+ /// Horizontally subtracts, with saturation, the adjacent pairs of values
442
+ /// contained in two packed 64-bit vectors of [4 x i16].
443
+ ///
444
+ /// Positive differences greater than 0x7FFF are saturated to 0x7FFF.
445
+ /// Negative differences less than 0x8000 are saturated to 0x8000.
446
+ ///
447
+ /// \headerfile <x86intrin.h>
448
+ ///
449
+ /// This intrinsic corresponds to the \c PHSUBSW instruction.
450
+ ///
451
+ /// \param __a
452
+ /// A 64-bit vector of [4 x i16] containing one of the source operands. The
453
+ /// horizontal differences between the values are stored in the lower bits of
454
+ /// the destination.
455
+ /// \param __b
456
+ /// A 64-bit vector of [4 x i16] containing one of the source operands. The
457
+ /// horizontal differences between the values are stored in the upper bits of
458
+ /// the destination.
459
+ /// \returns A 64-bit vector of [4 x i16] containing the horizontal saturated
460
+ /// differences of both operands.
461
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_CONSTEXPR _mm_hsubs_pi16(__m64 __a,
462
+ __m64 __b) {
463
+ return __trunc64(__builtin_ia32_phsubsw128(
464
+ (__v8hi)__builtin_shufflevector(__a, __b, 0, 1), (__v8hi){}));
465
+ }
466
+
467
+ /// Multiplies corresponding pairs of packed 8-bit unsigned integer
468
+ /// values contained in the first source operand and packed 8-bit signed
469
+ /// integer values contained in the second source operand, adds pairs of
470
+ /// contiguous products with signed saturation, and writes the 16-bit sums to
471
+ /// the corresponding bits in the destination.
472
+ ///
473
+ /// For example, bits [7:0] of both operands are multiplied, bits [15:8] of
474
+ /// both operands are multiplied, and the sum of both results is written to
475
+ /// bits [15:0] of the destination.
476
+ ///
477
+ /// \headerfile <x86intrin.h>
478
+ ///
479
+ /// This intrinsic corresponds to the \c VPMADDUBSW instruction.
480
+ ///
481
+ /// \param __a
482
+ /// A 128-bit integer vector containing the first source operand.
483
+ /// \param __b
484
+ /// A 128-bit integer vector containing the second source operand.
485
+ /// \returns A 128-bit integer vector containing the sums of products of both
486
+ /// operands: \n
487
+ /// \a R0 := (\a __a0 * \a __b0) + (\a __a1 * \a __b1) \n
488
+ /// \a R1 := (\a __a2 * \a __b2) + (\a __a3 * \a __b3) \n
489
+ /// \a R2 := (\a __a4 * \a __b4) + (\a __a5 * \a __b5) \n
490
+ /// \a R3 := (\a __a6 * \a __b6) + (\a __a7 * \a __b7) \n
491
+ /// \a R4 := (\a __a8 * \a __b8) + (\a __a9 * \a __b9) \n
492
+ /// \a R5 := (\a __a10 * \a __b10) + (\a __a11 * \a __b11) \n
493
+ /// \a R6 := (\a __a12 * \a __b12) + (\a __a13 * \a __b13) \n
494
+ /// \a R7 := (\a __a14 * \a __b14) + (\a __a15 * \a __b15)
495
+ static __inline__ __m128i __DEFAULT_FN_ATTRS_CONSTEXPR
496
+ _mm_maddubs_epi16(__m128i __a, __m128i __b) {
497
+ return (__m128i)__builtin_ia32_pmaddubsw128((__v16qi)__a, (__v16qi)__b);
498
+ }
499
+
500
+ /// Multiplies corresponding pairs of packed 8-bit unsigned integer
501
+ /// values contained in the first source operand and packed 8-bit signed
502
+ /// integer values contained in the second source operand, adds pairs of
503
+ /// contiguous products with signed saturation, and writes the 16-bit sums to
504
+ /// the corresponding bits in the destination.
505
+ ///
506
+ /// For example, bits [7:0] of both operands are multiplied, bits [15:8] of
507
+ /// both operands are multiplied, and the sum of both results is written to
508
+ /// bits [15:0] of the destination.
509
+ ///
510
+ /// \headerfile <x86intrin.h>
511
+ ///
512
+ /// This intrinsic corresponds to the \c PMADDUBSW instruction.
513
+ ///
514
+ /// \param __a
515
+ /// A 64-bit integer vector containing the first source operand.
516
+ /// \param __b
517
+ /// A 64-bit integer vector containing the second source operand.
518
+ /// \returns A 64-bit integer vector containing the sums of products of both
519
+ /// operands: \n
520
+ /// \a R0 := (\a __a0 * \a __b0) + (\a __a1 * \a __b1) \n
521
+ /// \a R1 := (\a __a2 * \a __b2) + (\a __a3 * \a __b3) \n
522
+ /// \a R2 := (\a __a4 * \a __b4) + (\a __a5 * \a __b5) \n
523
+ /// \a R3 := (\a __a6 * \a __b6) + (\a __a7 * \a __b7)
524
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_CONSTEXPR
525
+ _mm_maddubs_pi16(__m64 __a, __m64 __b) {
526
+ return __trunc64(__builtin_ia32_pmaddubsw128((__v16qi)__zext128(__a),
527
+ (__v16qi)__zext128(__b)));
528
+ }
529
+
530
+ /// Multiplies packed 16-bit signed integer values, truncates the 32-bit
531
+ /// products to the 18 most significant bits by right-shifting, rounds the
532
+ /// truncated value by adding 1, and writes bits [16:1] to the destination.
533
+ ///
534
+ /// \headerfile <x86intrin.h>
535
+ ///
536
+ /// This intrinsic corresponds to the \c VPMULHRSW instruction.
537
+ ///
538
+ /// \param __a
539
+ /// A 128-bit vector of [8 x i16] containing one of the source operands.
540
+ /// \param __b
541
+ /// A 128-bit vector of [8 x i16] containing one of the source operands.
542
+ /// \returns A 128-bit vector of [8 x i16] containing the rounded and scaled
543
+ /// products of both operands.
544
+ static __inline__ __m128i __DEFAULT_FN_ATTRS_CONSTEXPR
545
+ _mm_mulhrs_epi16(__m128i __a, __m128i __b) {
546
+ return (__m128i)__builtin_ia32_pmulhrsw128((__v8hi)__a, (__v8hi)__b);
547
+ }
548
+
549
+ /// Multiplies packed 16-bit signed integer values, truncates the 32-bit
550
+ /// products to the 18 most significant bits by right-shifting, rounds the
551
+ /// truncated value by adding 1, and writes bits [16:1] to the destination.
552
+ ///
553
+ /// \headerfile <x86intrin.h>
554
+ ///
555
+ /// This intrinsic corresponds to the \c PMULHRSW instruction.
556
+ ///
557
+ /// \param __a
558
+ /// A 64-bit vector of [4 x i16] containing one of the source operands.
559
+ /// \param __b
560
+ /// A 64-bit vector of [4 x i16] containing one of the source operands.
561
+ /// \returns A 64-bit vector of [4 x i16] containing the rounded and scaled
562
+ /// products of both operands.
563
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_CONSTEXPR
564
+ _mm_mulhrs_pi16(__m64 __a, __m64 __b) {
565
+ return __trunc64(__builtin_ia32_pmulhrsw128((__v8hi)__zext128(__a),
566
+ (__v8hi)__zext128(__b)));
567
+ }
568
+
569
+ /// Copies the 8-bit integers from a 128-bit integer vector to the
570
+ /// destination or clears 8-bit values in the destination, as specified by
571
+ /// the second source operand.
572
+ ///
573
+ /// \headerfile <x86intrin.h>
574
+ ///
575
+ /// This intrinsic corresponds to the \c VPSHUFB instruction.
576
+ ///
577
+ /// \param __a
578
+ /// A 128-bit integer vector containing the values to be copied.
579
+ /// \param __b
580
+ /// A 128-bit integer vector containing control bytes corresponding to
581
+ /// positions in the destination:
582
+ /// Bit 7: \n
583
+ /// 1: Clear the corresponding byte in the destination. \n
584
+ /// 0: Copy the selected source byte to the corresponding byte in the
585
+ /// destination. \n
586
+ /// Bits [6:4] Reserved. \n
587
+ /// Bits [3:0] select the source byte to be copied.
588
+ /// \returns A 128-bit integer vector containing the copied or cleared values.
589
+ static __inline__ __m128i __DEFAULT_FN_ATTRS_CONSTEXPR
590
+ _mm_shuffle_epi8(__m128i __a, __m128i __b) {
591
+ return (__m128i)__builtin_ia32_pshufb128((__v16qi)__a, (__v16qi)__b);
592
+ }
593
+
594
+ /// Copies the 8-bit integers from a 64-bit integer vector to the
595
+ /// destination or clears 8-bit values in the destination, as specified by
596
+ /// the second source operand.
597
+ ///
598
+ /// \headerfile <x86intrin.h>
599
+ ///
600
+ /// This intrinsic corresponds to the \c PSHUFB instruction.
601
+ ///
602
+ /// \param __a
603
+ /// A 64-bit integer vector containing the values to be copied.
604
+ /// \param __b
605
+ /// A 64-bit integer vector containing control bytes corresponding to
606
+ /// positions in the destination:
607
+ /// Bit 7: \n
608
+ /// 1: Clear the corresponding byte in the destination. \n
609
+ /// 0: Copy the selected source byte to the corresponding byte in the
610
+ /// destination. \n
611
+ /// Bits [2:0] select the source byte to be copied.
612
+ /// \returns A 64-bit integer vector containing the copied or cleared values.
613
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_CONSTEXPR
614
+ _mm_shuffle_pi8(__m64 __a, __m64 __b) {
615
+ return __trunc64(__builtin_ia32_pshufb128(
616
+ (__v16qi)__builtin_shufflevector((__v2si)(__a), __extension__(__v2si){},
617
+ 0, 1, 0, 1),
618
+ (__v16qi)__zext128(__b)));
619
+ }
620
+
621
+ /// For each 8-bit integer in the first source operand, perform one of
622
+ /// the following actions as specified by the second source operand.
623
+ ///
624
+ /// If the byte in the second source is negative, calculate the two's
625
+ /// complement of the corresponding byte in the first source, and write that
626
+ /// value to the destination. If the byte in the second source is positive,
627
+ /// copy the corresponding byte from the first source to the destination. If
628
+ /// the byte in the second source is zero, clear the corresponding byte in
629
+ /// the destination.
630
+ ///
631
+ /// \headerfile <x86intrin.h>
632
+ ///
633
+ /// This intrinsic corresponds to the \c VPSIGNB instruction.
634
+ ///
635
+ /// \param __a
636
+ /// A 128-bit integer vector containing the values to be copied.
637
+ /// \param __b
638
+ /// A 128-bit integer vector containing control bytes corresponding to
639
+ /// positions in the destination.
640
+ /// \returns A 128-bit integer vector containing the resultant values.
641
+ static __inline__ __m128i __DEFAULT_FN_ATTRS_CONSTEXPR
642
+ _mm_sign_epi8(__m128i __a, __m128i __b) {
643
+ return (__m128i)__builtin_ia32_psignb128((__v16qi)__a, (__v16qi)__b);
644
+ }
645
+
646
+ /// For each 16-bit integer in the first source operand, perform one of
647
+ /// the following actions as specified by the second source operand.
648
+ ///
649
+ /// If the word in the second source is negative, calculate the two's
650
+ /// complement of the corresponding word in the first source, and write that
651
+ /// value to the destination. If the word in the second source is positive,
652
+ /// copy the corresponding word from the first source to the destination. If
653
+ /// the word in the second source is zero, clear the corresponding word in
654
+ /// the destination.
655
+ ///
656
+ /// \headerfile <x86intrin.h>
657
+ ///
658
+ /// This intrinsic corresponds to the \c VPSIGNW instruction.
659
+ ///
660
+ /// \param __a
661
+ /// A 128-bit integer vector containing the values to be copied.
662
+ /// \param __b
663
+ /// A 128-bit integer vector containing control words corresponding to
664
+ /// positions in the destination.
665
+ /// \returns A 128-bit integer vector containing the resultant values.
666
+ static __inline__ __m128i __DEFAULT_FN_ATTRS_CONSTEXPR
667
+ _mm_sign_epi16(__m128i __a, __m128i __b) {
668
+ return (__m128i)__builtin_ia32_psignw128((__v8hi)__a, (__v8hi)__b);
669
+ }
670
+
671
+ /// For each 32-bit integer in the first source operand, perform one of
672
+ /// the following actions as specified by the second source operand.
673
+ ///
674
+ /// If the doubleword in the second source is negative, calculate the two's
675
+ /// complement of the corresponding word in the first source, and write that
676
+ /// value to the destination. If the doubleword in the second source is
677
+ /// positive, copy the corresponding word from the first source to the
678
+ /// destination. If the doubleword in the second source is zero, clear the
679
+ /// corresponding word in the destination.
680
+ ///
681
+ /// \headerfile <x86intrin.h>
682
+ ///
683
+ /// This intrinsic corresponds to the \c VPSIGND instruction.
684
+ ///
685
+ /// \param __a
686
+ /// A 128-bit integer vector containing the values to be copied.
687
+ /// \param __b
688
+ /// A 128-bit integer vector containing control doublewords corresponding to
689
+ /// positions in the destination.
690
+ /// \returns A 128-bit integer vector containing the resultant values.
691
+ static __inline__ __m128i __DEFAULT_FN_ATTRS_CONSTEXPR
692
+ _mm_sign_epi32(__m128i __a, __m128i __b) {
693
+ return (__m128i)__builtin_ia32_psignd128((__v4si)__a, (__v4si)__b);
694
+ }
695
+
696
+ /// For each 8-bit integer in the first source operand, perform one of
697
+ /// the following actions as specified by the second source operand.
698
+ ///
699
+ /// If the byte in the second source is negative, calculate the two's
700
+ /// complement of the corresponding byte in the first source, and write that
701
+ /// value to the destination. If the byte in the second source is positive,
702
+ /// copy the corresponding byte from the first source to the destination. If
703
+ /// the byte in the second source is zero, clear the corresponding byte in
704
+ /// the destination.
705
+ ///
706
+ /// \headerfile <x86intrin.h>
707
+ ///
708
+ /// This intrinsic corresponds to the \c PSIGNB instruction.
709
+ ///
710
+ /// \param __a
711
+ /// A 64-bit integer vector containing the values to be copied.
712
+ /// \param __b
713
+ /// A 64-bit integer vector containing control bytes corresponding to
714
+ /// positions in the destination.
715
+ /// \returns A 64-bit integer vector containing the resultant values.
716
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_CONSTEXPR _mm_sign_pi8(__m64 __a,
717
+ __m64 __b) {
718
+ return __trunc64(__builtin_ia32_psignb128((__v16qi)__zext128(__a),
719
+ (__v16qi)__zext128(__b)));
720
+ }
721
+
722
+ /// For each 16-bit integer in the first source operand, perform one of
723
+ /// the following actions as specified by the second source operand.
724
+ ///
725
+ /// If the word in the second source is negative, calculate the two's
726
+ /// complement of the corresponding word in the first source, and write that
727
+ /// value to the destination. If the word in the second source is positive,
728
+ /// copy the corresponding word from the first source to the destination. If
729
+ /// the word in the second source is zero, clear the corresponding word in
730
+ /// the destination.
731
+ ///
732
+ /// \headerfile <x86intrin.h>
733
+ ///
734
+ /// This intrinsic corresponds to the \c PSIGNW instruction.
735
+ ///
736
+ /// \param __a
737
+ /// A 64-bit integer vector containing the values to be copied.
738
+ /// \param __b
739
+ /// A 64-bit integer vector containing control words corresponding to
740
+ /// positions in the destination.
741
+ /// \returns A 64-bit integer vector containing the resultant values.
742
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_CONSTEXPR _mm_sign_pi16(__m64 __a,
743
+ __m64 __b) {
744
+ return __trunc64(
745
+ __builtin_ia32_psignw128((__v8hi)__zext128(__a), (__v8hi)__zext128(__b)));
746
+ }
747
+
748
+ /// For each 32-bit integer in the first source operand, perform one of
749
+ /// the following actions as specified by the second source operand.
750
+ ///
751
+ /// If the doubleword in the second source is negative, calculate the two's
752
+ /// complement of the corresponding doubleword in the first source, and
753
+ /// write that value to the destination. If the doubleword in the second
754
+ /// source is positive, copy the corresponding doubleword from the first
755
+ /// source to the destination. If the doubleword in the second source is
756
+ /// zero, clear the corresponding doubleword in the destination.
757
+ ///
758
+ /// \headerfile <x86intrin.h>
759
+ ///
760
+ /// This intrinsic corresponds to the \c PSIGND instruction.
761
+ ///
762
+ /// \param __a
763
+ /// A 64-bit integer vector containing the values to be copied.
764
+ /// \param __b
765
+ /// A 64-bit integer vector containing two control doublewords corresponding
766
+ /// to positions in the destination.
767
+ /// \returns A 64-bit integer vector containing the resultant values.
768
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_CONSTEXPR _mm_sign_pi32(__m64 __a,
769
+ __m64 __b) {
770
+ return __trunc64(
771
+ __builtin_ia32_psignd128((__v4si)__zext128(__a), (__v4si)__zext128(__b)));
772
+ }
773
+
774
+ #undef __zext128
775
+ #undef __trunc64
776
+ #undef __DEFAULT_FN_ATTRS
777
+ #undef __DEFAULT_FN_ATTRS_CONSTEXPR
778
+
779
+ #endif /* __TMMINTRIN_H */