@cpp-linter/clang-tidy-win32-x64 18.1.5 → 20.1.0

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 (282) hide show
  1. package/README.md +2 -2
  2. package/bin/clang-tidy.exe +2 -2
  3. package/lib/clang/{18 → 20}/include/__clang_cuda_device_functions.h +14 -0
  4. package/lib/clang/{18 → 20}/include/__clang_cuda_intrinsics.h +1 -3
  5. package/lib/clang/{18 → 20}/include/__clang_cuda_math.h +5 -0
  6. package/lib/clang/{18 → 20}/include/__clang_hip_cmath.h +6 -1
  7. package/lib/clang/{18 → 20}/include/__clang_hip_math.h +5 -0
  8. package/lib/clang/20/include/__stdarg_header_macro.h +12 -0
  9. package/lib/clang/20/include/__stddef_header_macro.h +12 -0
  10. package/lib/clang/{18 → 20}/include/adcintrin.h +5 -0
  11. package/lib/clang/{18 → 20}/include/adxintrin.h +5 -0
  12. package/lib/clang/{18 → 20}/include/altivec.h +8 -8
  13. package/lib/clang/20/include/amdgpuintrin.h +194 -0
  14. package/lib/clang/20/include/amxavx512intrin.h +382 -0
  15. package/lib/clang/20/include/amxbf16transposeintrin.h +94 -0
  16. package/lib/clang/20/include/amxcomplextransposeintrin.h +303 -0
  17. package/lib/clang/{18 → 20}/include/amxfp16intrin.h +35 -0
  18. package/lib/clang/20/include/amxfp16transposeintrin.h +94 -0
  19. package/lib/clang/20/include/amxfp8intrin.h +230 -0
  20. package/lib/clang/{18 → 20}/include/amxintrin.h +5 -35
  21. package/lib/clang/20/include/amxmovrsintrin.h +48 -0
  22. package/lib/clang/20/include/amxmovrstransposeintrin.h +200 -0
  23. package/lib/clang/20/include/amxtf32intrin.h +108 -0
  24. package/lib/clang/20/include/amxtf32transposeintrin.h +105 -0
  25. package/lib/clang/20/include/amxtransposeintrin.h +248 -0
  26. package/lib/clang/{18 → 20}/include/arm_acle.h +49 -26
  27. package/lib/clang/{18 → 20}/include/arm_fp16.h +1 -1
  28. package/lib/clang/{18 → 20}/include/arm_neon.h +45631 -43745
  29. package/lib/clang/{18 → 20}/include/arm_sme.h +641 -6
  30. package/lib/clang/{18 → 20}/include/arm_sve.h +28311 -27738
  31. package/lib/clang/{18 → 20}/include/arm_vector_types.h +92 -5
  32. package/lib/clang/20/include/avx10_2_512bf16intrin.h +561 -0
  33. package/lib/clang/20/include/avx10_2_512convertintrin.h +320 -0
  34. package/lib/clang/20/include/avx10_2_512minmaxintrin.h +127 -0
  35. package/lib/clang/20/include/avx10_2_512niintrin.h +314 -0
  36. package/lib/clang/20/include/avx10_2_512satcvtdsintrin.h +303 -0
  37. package/lib/clang/20/include/avx10_2_512satcvtintrin.h +301 -0
  38. package/lib/clang/20/include/avx10_2bf16intrin.h +1085 -0
  39. package/lib/clang/20/include/avx10_2convertintrin.h +589 -0
  40. package/lib/clang/20/include/avx10_2copyintrin.h +66 -0
  41. package/lib/clang/20/include/avx10_2minmaxintrin.h +277 -0
  42. package/lib/clang/20/include/avx10_2niintrin.h +2075 -0
  43. package/lib/clang/20/include/avx10_2satcvtdsintrin.h +496 -0
  44. package/lib/clang/20/include/avx10_2satcvtintrin.h +444 -0
  45. package/lib/clang/{18 → 20}/include/avx2intrin.h +9 -0
  46. package/lib/clang/{18 → 20}/include/avx512bitalgintrin.h +2 -2
  47. package/lib/clang/{18 → 20}/include/avx512fintrin.h +22 -14
  48. package/lib/clang/{18 → 20}/include/avx512fp16intrin.h +38 -38
  49. package/lib/clang/{18 → 20}/include/avx512vlbitalgintrin.h +4 -4
  50. package/lib/clang/{18 → 20}/include/avx512vpopcntdqintrin.h +12 -4
  51. package/lib/clang/{18 → 20}/include/avx512vpopcntdqvlintrin.h +16 -8
  52. package/lib/clang/{18 → 20}/include/avxintrin.h +88 -60
  53. package/lib/clang/{18 → 20}/include/avxvnniint16intrin.h +36 -77
  54. package/lib/clang/{18 → 20}/include/avxvnniint8intrin.h +36 -77
  55. package/lib/clang/{18 → 20}/include/bmi2intrin.h +15 -17
  56. package/lib/clang/{18 → 20}/include/bmiintrin.h +33 -41
  57. package/lib/clang/{18 → 20}/include/builtins.h +3 -0
  58. package/lib/clang/{18 → 20}/include/cmpccxaddintrin.h +1 -1
  59. package/lib/clang/{18 → 20}/include/cpuid.h +35 -14
  60. package/lib/clang/{18 → 20}/include/cuda_wrappers/algorithm +1 -1
  61. package/lib/clang/{18 → 20}/include/cuda_wrappers/cmath +4 -0
  62. package/lib/clang/{18 → 20}/include/cuda_wrappers/new +2 -0
  63. package/lib/clang/{18 → 20}/include/emmintrin.h +442 -277
  64. package/lib/clang/{18 → 20}/include/float.h +28 -0
  65. package/lib/clang/{18 → 20}/include/fmaintrin.h +32 -16
  66. package/lib/clang/{18 → 20}/include/gfniintrin.h +32 -10
  67. package/lib/clang/20/include/gpuintrin.h +224 -0
  68. package/lib/clang/{18 → 20}/include/hexagon_types.h +8 -4
  69. package/lib/clang/{18 → 20}/include/hlsl/hlsl_basic_types.h +57 -4
  70. package/lib/clang/20/include/hlsl/hlsl_detail.h +84 -0
  71. package/lib/clang/20/include/hlsl/hlsl_intrinsics.h +2814 -0
  72. package/lib/clang/{18 → 20}/include/hlsl.h +11 -0
  73. package/lib/clang/{18 → 20}/include/hvx_hexagon_protos.h +427 -0
  74. package/lib/clang/{18 → 20}/include/ia32intrin.h +36 -36
  75. package/lib/clang/{18 → 20}/include/immintrin.h +171 -161
  76. package/lib/clang/{18 → 20}/include/intrin.h +62 -228
  77. package/lib/clang/20/include/intrin0.h +256 -0
  78. package/lib/clang/{18 → 20}/include/inttypes.h +4 -0
  79. package/lib/clang/{18 → 20}/include/iso646.h +4 -0
  80. package/lib/clang/{18 → 20}/include/keylockerintrin.h +5 -8
  81. package/lib/clang/{18 → 20}/include/larchintrin.h +22 -8
  82. package/lib/clang/{18 → 20}/include/lasxintrin.h +27 -25
  83. package/lib/clang/{18 → 20}/include/limits.h +12 -4
  84. package/lib/clang/{18 → 20}/include/llvm_libc_wrappers/assert.h +1 -1
  85. package/lib/clang/{18 → 20}/include/llvm_libc_wrappers/ctype.h +38 -0
  86. package/lib/clang/{18 → 20}/include/llvm_libc_wrappers/stdlib.h +8 -0
  87. package/lib/clang/20/include/llvm_offload_wrappers/__llvm_offload.h +31 -0
  88. package/lib/clang/20/include/llvm_offload_wrappers/__llvm_offload_device.h +10 -0
  89. package/lib/clang/20/include/llvm_offload_wrappers/__llvm_offload_host.h +15 -0
  90. package/lib/clang/{18 → 20}/include/lsxintrin.h +27 -25
  91. package/lib/clang/{18 → 20}/include/lzcntintrin.h +10 -7
  92. package/lib/clang/20/include/mm3dnow.h +22 -0
  93. package/lib/clang/{18 → 20}/include/mmintrin.h +285 -239
  94. package/lib/clang/{18 → 20}/include/module.modulemap +16 -5
  95. package/lib/clang/20/include/movrs_avx10_2_512intrin.h +98 -0
  96. package/lib/clang/20/include/movrs_avx10_2intrin.h +174 -0
  97. package/lib/clang/20/include/movrsintrin.h +59 -0
  98. package/lib/clang/20/include/nvptxintrin.h +202 -0
  99. package/lib/clang/{18 → 20}/include/opencl-c-base.h +8 -0
  100. package/lib/clang/{18 → 20}/include/opencl-c.h +15 -0
  101. package/lib/clang/{18 → 20}/include/openmp_wrappers/__clang_openmp_device_functions.h +4 -5
  102. package/lib/clang/{18 → 20}/include/openmp_wrappers/complex_cmath.h +7 -2
  103. package/lib/clang/{18 → 20}/include/pmmintrin.h +16 -3
  104. package/lib/clang/{18 → 20}/include/popcntintrin.h +7 -7
  105. package/lib/clang/{18 → 20}/include/prfchwintrin.h +10 -8
  106. package/lib/clang/20/include/ptrauth.h +336 -0
  107. package/lib/clang/20/include/riscv_corev_alu.h +128 -0
  108. package/lib/clang/{18 → 20}/include/riscv_vector.h +0 -5
  109. package/lib/clang/20/include/sifive_vector.h +118 -0
  110. package/lib/clang/20/include/sm4evexintrin.h +32 -0
  111. package/lib/clang/{18 → 20}/include/smmintrin.h +18 -12
  112. package/lib/clang/{18 → 20}/include/stdarg.h +15 -19
  113. package/lib/clang/{18 → 20}/include/stdatomic.h +11 -1
  114. package/lib/clang/{18 → 20}/include/stdbool.h +5 -0
  115. package/lib/clang/{18 → 20}/include/stddef.h +38 -22
  116. package/lib/clang/{18 → 20}/include/stdint.h +5 -0
  117. package/lib/clang/{18 → 20}/include/stdnoreturn.h +6 -0
  118. package/lib/clang/{18 → 20}/include/tbmintrin.h +25 -37
  119. package/lib/clang/{18 → 20}/include/tmmintrin.h +84 -54
  120. package/lib/clang/{18 → 20}/include/varargs.h +5 -1
  121. package/lib/clang/{18 → 20}/include/vecintrin.h +1778 -60
  122. package/lib/clang/{18 → 20}/include/wasm_simd128.h +167 -21
  123. package/lib/clang/{18 → 20}/include/x86gprintrin.h +7 -14
  124. package/lib/clang/20/include/x86intrin.h +53 -0
  125. package/lib/clang/{18 → 20}/include/xmmintrin.h +455 -276
  126. package/lib/clang/20/include/yvals_core.h +25 -0
  127. package/lib/clang/20/include/zos_wrappers/builtins.h +18 -0
  128. package/package.json +6 -6
  129. package/lib/clang/18/include/avx512erintrin.h +0 -271
  130. package/lib/clang/18/include/avx512pfintrin.h +0 -92
  131. package/lib/clang/18/include/hlsl/hlsl_intrinsics.h +0 -624
  132. package/lib/clang/18/include/mm3dnow.h +0 -157
  133. package/lib/clang/18/include/sifive_vector.h +0 -16
  134. package/lib/clang/18/include/x86intrin.h +0 -67
  135. /package/lib/clang/{18 → 20}/include/__clang_cuda_builtin_vars.h +0 -0
  136. /package/lib/clang/{18 → 20}/include/__clang_cuda_cmath.h +0 -0
  137. /package/lib/clang/{18 → 20}/include/__clang_cuda_complex_builtins.h +0 -0
  138. /package/lib/clang/{18 → 20}/include/__clang_cuda_libdevice_declares.h +0 -0
  139. /package/lib/clang/{18 → 20}/include/__clang_cuda_math_forward_declares.h +0 -0
  140. /package/lib/clang/{18 → 20}/include/__clang_cuda_runtime_wrapper.h +0 -0
  141. /package/lib/clang/{18 → 20}/include/__clang_cuda_texture_intrinsics.h +0 -0
  142. /package/lib/clang/{18 → 20}/include/__clang_hip_libdevice_declares.h +0 -0
  143. /package/lib/clang/{18 → 20}/include/__clang_hip_runtime_wrapper.h +0 -0
  144. /package/lib/clang/{18 → 20}/include/__clang_hip_stdlib.h +0 -0
  145. /package/lib/clang/{18 → 20}/include/__stdarg___gnuc_va_list.h +0 -0
  146. /package/lib/clang/{18 → 20}/include/__stdarg___va_copy.h +0 -0
  147. /package/lib/clang/{18 → 20}/include/__stdarg_va_arg.h +0 -0
  148. /package/lib/clang/{18 → 20}/include/__stdarg_va_copy.h +0 -0
  149. /package/lib/clang/{18 → 20}/include/__stdarg_va_list.h +0 -0
  150. /package/lib/clang/{18 → 20}/include/__stddef_max_align_t.h +0 -0
  151. /package/lib/clang/{18 → 20}/include/__stddef_null.h +0 -0
  152. /package/lib/clang/{18 → 20}/include/__stddef_nullptr_t.h +0 -0
  153. /package/lib/clang/{18 → 20}/include/__stddef_offsetof.h +0 -0
  154. /package/lib/clang/{18 → 20}/include/__stddef_ptrdiff_t.h +0 -0
  155. /package/lib/clang/{18 → 20}/include/__stddef_rsize_t.h +0 -0
  156. /package/lib/clang/{18 → 20}/include/__stddef_size_t.h +0 -0
  157. /package/lib/clang/{18 → 20}/include/__stddef_unreachable.h +0 -0
  158. /package/lib/clang/{18 → 20}/include/__stddef_wchar_t.h +0 -0
  159. /package/lib/clang/{18 → 20}/include/__stddef_wint_t.h +0 -0
  160. /package/lib/clang/{18 → 20}/include/__wmmintrin_aes.h +0 -0
  161. /package/lib/clang/{18 → 20}/include/__wmmintrin_pclmul.h +0 -0
  162. /package/lib/clang/{18 → 20}/include/ammintrin.h +0 -0
  163. /package/lib/clang/{18 → 20}/include/amxcomplexintrin.h +0 -0
  164. /package/lib/clang/{18 → 20}/include/arm64intr.h +0 -0
  165. /package/lib/clang/{18 → 20}/include/arm_bf16.h +0 -0
  166. /package/lib/clang/{18 → 20}/include/arm_cde.h +0 -0
  167. /package/lib/clang/{18 → 20}/include/arm_cmse.h +0 -0
  168. /package/lib/clang/{18 → 20}/include/arm_mve.h +0 -0
  169. /package/lib/clang/{18 → 20}/include/arm_neon_sve_bridge.h +0 -0
  170. /package/lib/clang/{18 → 20}/include/armintr.h +0 -0
  171. /package/lib/clang/{18 → 20}/include/avx512bf16intrin.h +0 -0
  172. /package/lib/clang/{18 → 20}/include/avx512bwintrin.h +0 -0
  173. /package/lib/clang/{18 → 20}/include/avx512cdintrin.h +0 -0
  174. /package/lib/clang/{18 → 20}/include/avx512dqintrin.h +0 -0
  175. /package/lib/clang/{18 → 20}/include/avx512ifmaintrin.h +0 -0
  176. /package/lib/clang/{18 → 20}/include/avx512ifmavlintrin.h +0 -0
  177. /package/lib/clang/{18 → 20}/include/avx512vbmi2intrin.h +0 -0
  178. /package/lib/clang/{18 → 20}/include/avx512vbmiintrin.h +0 -0
  179. /package/lib/clang/{18 → 20}/include/avx512vbmivlintrin.h +0 -0
  180. /package/lib/clang/{18 → 20}/include/avx512vlbf16intrin.h +0 -0
  181. /package/lib/clang/{18 → 20}/include/avx512vlbwintrin.h +0 -0
  182. /package/lib/clang/{18 → 20}/include/avx512vlcdintrin.h +0 -0
  183. /package/lib/clang/{18 → 20}/include/avx512vldqintrin.h +0 -0
  184. /package/lib/clang/{18 → 20}/include/avx512vlfp16intrin.h +0 -0
  185. /package/lib/clang/{18 → 20}/include/avx512vlintrin.h +0 -0
  186. /package/lib/clang/{18 → 20}/include/avx512vlvbmi2intrin.h +0 -0
  187. /package/lib/clang/{18 → 20}/include/avx512vlvnniintrin.h +0 -0
  188. /package/lib/clang/{18 → 20}/include/avx512vlvp2intersectintrin.h +0 -0
  189. /package/lib/clang/{18 → 20}/include/avx512vnniintrin.h +0 -0
  190. /package/lib/clang/{18 → 20}/include/avx512vp2intersectintrin.h +0 -0
  191. /package/lib/clang/{18 → 20}/include/avxifmaintrin.h +0 -0
  192. /package/lib/clang/{18 → 20}/include/avxneconvertintrin.h +0 -0
  193. /package/lib/clang/{18 → 20}/include/avxvnniintrin.h +0 -0
  194. /package/lib/clang/{18 → 20}/include/cet.h +0 -0
  195. /package/lib/clang/{18 → 20}/include/cetintrin.h +0 -0
  196. /package/lib/clang/{18 → 20}/include/cldemoteintrin.h +0 -0
  197. /package/lib/clang/{18 → 20}/include/clflushoptintrin.h +0 -0
  198. /package/lib/clang/{18 → 20}/include/clwbintrin.h +0 -0
  199. /package/lib/clang/{18 → 20}/include/clzerointrin.h +0 -0
  200. /package/lib/clang/{18 → 20}/include/crc32intrin.h +0 -0
  201. /package/lib/clang/{18 → 20}/include/cuda_wrappers/bits/basic_string.h +0 -0
  202. /package/lib/clang/{18 → 20}/include/cuda_wrappers/bits/basic_string.tcc +0 -0
  203. /package/lib/clang/{18 → 20}/include/cuda_wrappers/bits/shared_ptr_base.h +0 -0
  204. /package/lib/clang/{18 → 20}/include/cuda_wrappers/complex +0 -0
  205. /package/lib/clang/{18 → 20}/include/enqcmdintrin.h +0 -0
  206. /package/lib/clang/{18 → 20}/include/f16cintrin.h +0 -0
  207. /package/lib/clang/{18 → 20}/include/fma4intrin.h +0 -0
  208. /package/lib/clang/{18 → 20}/include/fxsrintrin.h +0 -0
  209. /package/lib/clang/{18 → 20}/include/hexagon_circ_brev_intrinsics.h +0 -0
  210. /package/lib/clang/{18 → 20}/include/hexagon_protos.h +0 -0
  211. /package/lib/clang/{18 → 20}/include/hresetintrin.h +0 -0
  212. /package/lib/clang/{18 → 20}/include/htmintrin.h +0 -0
  213. /package/lib/clang/{18 → 20}/include/htmxlintrin.h +0 -0
  214. /package/lib/clang/{18 → 20}/include/invpcidintrin.h +0 -0
  215. /package/lib/clang/{18 → 20}/include/llvm_libc_wrappers/inttypes.h +0 -0
  216. /package/lib/clang/{18 → 20}/include/llvm_libc_wrappers/stdio.h +0 -0
  217. /package/lib/clang/{18 → 20}/include/llvm_libc_wrappers/string.h +0 -0
  218. /package/lib/clang/{18 → 20}/include/llvm_libc_wrappers/time.h +0 -0
  219. /package/lib/clang/{18 → 20}/include/lwpintrin.h +0 -0
  220. /package/lib/clang/{18 → 20}/include/mm_malloc.h +0 -0
  221. /package/lib/clang/{18 → 20}/include/movdirintrin.h +0 -0
  222. /package/lib/clang/{18 → 20}/include/msa.h +0 -0
  223. /package/lib/clang/{18 → 20}/include/mwaitxintrin.h +0 -0
  224. /package/lib/clang/{18 → 20}/include/nmmintrin.h +0 -0
  225. /package/lib/clang/{18 → 20}/include/openmp_wrappers/cmath +0 -0
  226. /package/lib/clang/{18 → 20}/include/openmp_wrappers/complex +0 -0
  227. /package/lib/clang/{18 → 20}/include/openmp_wrappers/complex.h +0 -0
  228. /package/lib/clang/{18 → 20}/include/openmp_wrappers/math.h +0 -0
  229. /package/lib/clang/{18 → 20}/include/openmp_wrappers/new +0 -0
  230. /package/lib/clang/{18 → 20}/include/pconfigintrin.h +0 -0
  231. /package/lib/clang/{18 → 20}/include/pkuintrin.h +0 -0
  232. /package/lib/clang/{18 → 20}/include/ppc_wrappers/bmi2intrin.h +0 -0
  233. /package/lib/clang/{18 → 20}/include/ppc_wrappers/bmiintrin.h +0 -0
  234. /package/lib/clang/{18 → 20}/include/ppc_wrappers/emmintrin.h +0 -0
  235. /package/lib/clang/{18 → 20}/include/ppc_wrappers/immintrin.h +0 -0
  236. /package/lib/clang/{18 → 20}/include/ppc_wrappers/mm_malloc.h +0 -0
  237. /package/lib/clang/{18 → 20}/include/ppc_wrappers/mmintrin.h +0 -0
  238. /package/lib/clang/{18 → 20}/include/ppc_wrappers/nmmintrin.h +0 -0
  239. /package/lib/clang/{18 → 20}/include/ppc_wrappers/pmmintrin.h +0 -0
  240. /package/lib/clang/{18 → 20}/include/ppc_wrappers/smmintrin.h +0 -0
  241. /package/lib/clang/{18 → 20}/include/ppc_wrappers/tmmintrin.h +0 -0
  242. /package/lib/clang/{18 → 20}/include/ppc_wrappers/x86gprintrin.h +0 -0
  243. /package/lib/clang/{18 → 20}/include/ppc_wrappers/x86intrin.h +0 -0
  244. /package/lib/clang/{18 → 20}/include/ppc_wrappers/xmmintrin.h +0 -0
  245. /package/lib/clang/{18 → 20}/include/prfchiintrin.h +0 -0
  246. /package/lib/clang/{18 → 20}/include/ptwriteintrin.h +0 -0
  247. /package/lib/clang/{18 → 20}/include/raointintrin.h +0 -0
  248. /package/lib/clang/{18 → 20}/include/rdpruintrin.h +0 -0
  249. /package/lib/clang/{18 → 20}/include/rdseedintrin.h +0 -0
  250. /package/lib/clang/{18 → 20}/include/riscv_bitmanip.h +0 -0
  251. /package/lib/clang/{18 → 20}/include/riscv_crypto.h +0 -0
  252. /package/lib/clang/{18 → 20}/include/riscv_ntlh.h +0 -0
  253. /package/lib/clang/{18 → 20}/include/rtmintrin.h +0 -0
  254. /package/lib/clang/{18 → 20}/include/s390intrin.h +0 -0
  255. /package/lib/clang/{18 → 20}/include/serializeintrin.h +0 -0
  256. /package/lib/clang/{18 → 20}/include/sgxintrin.h +0 -0
  257. /package/lib/clang/{18 → 20}/include/sha512intrin.h +0 -0
  258. /package/lib/clang/{18 → 20}/include/shaintrin.h +0 -0
  259. /package/lib/clang/{18 → 20}/include/sm3intrin.h +0 -0
  260. /package/lib/clang/{18 → 20}/include/sm4intrin.h +0 -0
  261. /package/lib/clang/{18 → 20}/include/stdalign.h +0 -0
  262. /package/lib/clang/{18 → 20}/include/stdckdint.h +0 -0
  263. /package/lib/clang/{18 → 20}/include/tgmath.h +0 -0
  264. /package/lib/clang/{18 → 20}/include/tsxldtrkintrin.h +0 -0
  265. /package/lib/clang/{18 → 20}/include/uintrintrin.h +0 -0
  266. /package/lib/clang/{18 → 20}/include/unwind.h +0 -0
  267. /package/lib/clang/{18 → 20}/include/usermsrintrin.h +0 -0
  268. /package/lib/clang/{18 → 20}/include/vadefs.h +0 -0
  269. /package/lib/clang/{18 → 20}/include/vaesintrin.h +0 -0
  270. /package/lib/clang/{18 → 20}/include/velintrin.h +0 -0
  271. /package/lib/clang/{18 → 20}/include/velintrin_approx.h +0 -0
  272. /package/lib/clang/{18 → 20}/include/velintrin_gen.h +0 -0
  273. /package/lib/clang/{18 → 20}/include/vpclmulqdqintrin.h +0 -0
  274. /package/lib/clang/{18 → 20}/include/waitpkgintrin.h +0 -0
  275. /package/lib/clang/{18 → 20}/include/wbnoinvdintrin.h +0 -0
  276. /package/lib/clang/{18 → 20}/include/wmmintrin.h +0 -0
  277. /package/lib/clang/{18 → 20}/include/xopintrin.h +0 -0
  278. /package/lib/clang/{18 → 20}/include/xsavecintrin.h +0 -0
  279. /package/lib/clang/{18 → 20}/include/xsaveintrin.h +0 -0
  280. /package/lib/clang/{18 → 20}/include/xsaveoptintrin.h +0 -0
  281. /package/lib/clang/{18 → 20}/include/xsavesintrin.h +0 -0
  282. /package/lib/clang/{18 → 20}/include/xtestintrin.h +0 -0
@@ -32,12 +32,41 @@ typedef unsigned int __v4su __attribute__((__vector_size__(16)));
32
32
  #endif
33
33
 
34
34
  /* Define the default attributes for the functions in this file. */
35
+ #if defined(__EVEX512__) && !defined(__AVX10_1_512__)
35
36
  #define __DEFAULT_FN_ATTRS \
36
37
  __attribute__((__always_inline__, __nodebug__, __target__("sse,no-evex512"), \
37
38
  __min_vector_width__(128)))
38
- #define __DEFAULT_FN_ATTRS_MMX \
39
+ #define __DEFAULT_FN_ATTRS_SSE2 \
39
40
  __attribute__((__always_inline__, __nodebug__, \
40
- __target__("mmx,sse,no-evex512"), __min_vector_width__(64)))
41
+ __target__("sse2,no-evex512"), __min_vector_width__(128)))
42
+ #else
43
+ #define __DEFAULT_FN_ATTRS \
44
+ __attribute__((__always_inline__, __nodebug__, __target__("sse"), \
45
+ __min_vector_width__(128)))
46
+ #define __DEFAULT_FN_ATTRS_SSE2 \
47
+ __attribute__((__always_inline__, __nodebug__, __target__("sse2"), \
48
+ __min_vector_width__(128)))
49
+ #endif
50
+
51
+ #if defined(__cplusplus) && (__cplusplus >= 201103L)
52
+ #define __DEFAULT_FN_ATTRS_CONSTEXPR __DEFAULT_FN_ATTRS constexpr
53
+ #define __DEFAULT_FN_ATTRS_SSE2_CONSTEXPR __DEFAULT_FN_ATTRS_SSE2 constexpr
54
+ #else
55
+ #define __DEFAULT_FN_ATTRS_CONSTEXPR __DEFAULT_FN_ATTRS
56
+ #define __DEFAULT_FN_ATTRS_SSE2_CONSTEXPR __DEFAULT_FN_ATTRS_SSE2
57
+ #endif
58
+
59
+ #define __trunc64(x) \
60
+ (__m64) __builtin_shufflevector((__v2di)(x), __extension__(__v2di){}, 0)
61
+ #define __zext128(x) \
62
+ (__m128i) __builtin_shufflevector((__v2si)(x), __extension__(__v2si){}, 0, \
63
+ 1, 2, 3)
64
+ #define __anyext128(x) \
65
+ (__m128i) __builtin_shufflevector((__v2si)(x), __extension__(__v2si){}, 0, \
66
+ 1, -1, -1)
67
+ #define __zeroupper64(x) \
68
+ (__m128i) __builtin_shufflevector((__v4si)(x), __extension__(__v4si){}, 0, \
69
+ 1, 4, 5)
41
70
 
42
71
  /// Adds the 32-bit float values in the low-order bits of the operands.
43
72
  ///
@@ -54,9 +83,8 @@ typedef unsigned int __v4su __attribute__((__vector_size__(16)));
54
83
  /// \returns A 128-bit vector of [4 x float] whose lower 32 bits contain the sum
55
84
  /// of the lower 32 bits of both operands. The upper 96 bits are copied from
56
85
  /// the upper 96 bits of the first source operand.
57
- static __inline__ __m128 __DEFAULT_FN_ATTRS
58
- _mm_add_ss(__m128 __a, __m128 __b)
59
- {
86
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
87
+ _mm_add_ss(__m128 __a, __m128 __b) {
60
88
  __a[0] += __b[0];
61
89
  return __a;
62
90
  }
@@ -74,9 +102,8 @@ _mm_add_ss(__m128 __a, __m128 __b)
74
102
  /// A 128-bit vector of [4 x float] containing one of the source operands.
75
103
  /// \returns A 128-bit vector of [4 x float] containing the sums of both
76
104
  /// operands.
77
- static __inline__ __m128 __DEFAULT_FN_ATTRS
78
- _mm_add_ps(__m128 __a, __m128 __b)
79
- {
105
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
106
+ _mm_add_ps(__m128 __a, __m128 __b) {
80
107
  return (__m128)((__v4sf)__a + (__v4sf)__b);
81
108
  }
82
109
 
@@ -96,9 +123,8 @@ _mm_add_ps(__m128 __a, __m128 __b)
96
123
  /// \returns A 128-bit vector of [4 x float] whose lower 32 bits contain the
97
124
  /// difference of the lower 32 bits of both operands. The upper 96 bits are
98
125
  /// copied from the upper 96 bits of the first source operand.
99
- static __inline__ __m128 __DEFAULT_FN_ATTRS
100
- _mm_sub_ss(__m128 __a, __m128 __b)
101
- {
126
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
127
+ _mm_sub_ss(__m128 __a, __m128 __b) {
102
128
  __a[0] -= __b[0];
103
129
  return __a;
104
130
  }
@@ -117,9 +143,8 @@ _mm_sub_ss(__m128 __a, __m128 __b)
117
143
  /// A 128-bit vector of [4 x float] containing the subtrahend.
118
144
  /// \returns A 128-bit vector of [4 x float] containing the differences between
119
145
  /// both operands.
120
- static __inline__ __m128 __DEFAULT_FN_ATTRS
121
- _mm_sub_ps(__m128 __a, __m128 __b)
122
- {
146
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
147
+ _mm_sub_ps(__m128 __a, __m128 __b) {
123
148
  return (__m128)((__v4sf)__a - (__v4sf)__b);
124
149
  }
125
150
 
@@ -139,9 +164,8 @@ _mm_sub_ps(__m128 __a, __m128 __b)
139
164
  /// \returns A 128-bit vector of [4 x float] containing the product of the lower
140
165
  /// 32 bits of both operands. The upper 96 bits are copied from the upper 96
141
166
  /// bits of the first source operand.
142
- static __inline__ __m128 __DEFAULT_FN_ATTRS
143
- _mm_mul_ss(__m128 __a, __m128 __b)
144
- {
167
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
168
+ _mm_mul_ss(__m128 __a, __m128 __b) {
145
169
  __a[0] *= __b[0];
146
170
  return __a;
147
171
  }
@@ -159,9 +183,8 @@ _mm_mul_ss(__m128 __a, __m128 __b)
159
183
  /// A 128-bit vector of [4 x float] containing one of the source operands.
160
184
  /// \returns A 128-bit vector of [4 x float] containing the products of both
161
185
  /// operands.
162
- static __inline__ __m128 __DEFAULT_FN_ATTRS
163
- _mm_mul_ps(__m128 __a, __m128 __b)
164
- {
186
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
187
+ _mm_mul_ps(__m128 __a, __m128 __b) {
165
188
  return (__m128)((__v4sf)__a * (__v4sf)__b);
166
189
  }
167
190
 
@@ -181,9 +204,8 @@ _mm_mul_ps(__m128 __a, __m128 __b)
181
204
  /// \returns A 128-bit vector of [4 x float] containing the quotients of the
182
205
  /// lower 32 bits of both operands. The upper 96 bits are copied from the
183
206
  /// upper 96 bits of the first source operand.
184
- static __inline__ __m128 __DEFAULT_FN_ATTRS
185
- _mm_div_ss(__m128 __a, __m128 __b)
186
- {
207
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
208
+ _mm_div_ss(__m128 __a, __m128 __b) {
187
209
  __a[0] /= __b[0];
188
210
  return __a;
189
211
  }
@@ -200,9 +222,8 @@ _mm_div_ss(__m128 __a, __m128 __b)
200
222
  /// A 128-bit vector of [4 x float] containing the divisor.
201
223
  /// \returns A 128-bit vector of [4 x float] containing the quotients of both
202
224
  /// operands.
203
- static __inline__ __m128 __DEFAULT_FN_ATTRS
204
- _mm_div_ps(__m128 __a, __m128 __b)
205
- {
225
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
226
+ _mm_div_ps(__m128 __a, __m128 __b) {
206
227
  return (__m128)((__v4sf)__a / (__v4sf)__b);
207
228
  }
208
229
 
@@ -316,6 +337,8 @@ _mm_rsqrt_ps(__m128 __a)
316
337
  /// operands and returns the lesser value in the low-order bits of the
317
338
  /// vector of [4 x float].
318
339
  ///
340
+ /// If either value in a comparison is NaN, returns the value from \a __b.
341
+ ///
319
342
  /// \headerfile <x86intrin.h>
320
343
  ///
321
344
  /// This intrinsic corresponds to the <c> VMINSS / MINSS </c> instructions.
@@ -338,6 +361,8 @@ _mm_min_ss(__m128 __a, __m128 __b)
338
361
  /// Compares two 128-bit vectors of [4 x float] and returns the lesser
339
362
  /// of each pair of values.
340
363
  ///
364
+ /// If either value in a comparison is NaN, returns the value from \a __b.
365
+ ///
341
366
  /// \headerfile <x86intrin.h>
342
367
  ///
343
368
  /// This intrinsic corresponds to the <c> VMINPS / MINPS </c> instructions.
@@ -358,6 +383,8 @@ _mm_min_ps(__m128 __a, __m128 __b)
358
383
  /// operands and returns the greater value in the low-order bits of a 128-bit
359
384
  /// vector of [4 x float].
360
385
  ///
386
+ /// If either value in a comparison is NaN, returns the value from \a __b.
387
+ ///
361
388
  /// \headerfile <x86intrin.h>
362
389
  ///
363
390
  /// This intrinsic corresponds to the <c> VMAXSS / MAXSS </c> instructions.
@@ -380,6 +407,8 @@ _mm_max_ss(__m128 __a, __m128 __b)
380
407
  /// Compares two 128-bit vectors of [4 x float] and returns the greater
381
408
  /// of each pair of values.
382
409
  ///
410
+ /// If either value in a comparison is NaN, returns the value from \a __b.
411
+ ///
383
412
  /// \headerfile <x86intrin.h>
384
413
  ///
385
414
  /// This intrinsic corresponds to the <c> VMAXPS / MAXPS </c> instructions.
@@ -408,9 +437,8 @@ _mm_max_ps(__m128 __a, __m128 __b)
408
437
  /// A 128-bit vector containing one of the source operands.
409
438
  /// \returns A 128-bit vector of [4 x float] containing the bitwise AND of the
410
439
  /// values between both operands.
411
- static __inline__ __m128 __DEFAULT_FN_ATTRS
412
- _mm_and_ps(__m128 __a, __m128 __b)
413
- {
440
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
441
+ _mm_and_ps(__m128 __a, __m128 __b) {
414
442
  return (__m128)((__v4su)__a & (__v4su)__b);
415
443
  }
416
444
 
@@ -430,9 +458,8 @@ _mm_and_ps(__m128 __a, __m128 __b)
430
458
  /// \returns A 128-bit vector of [4 x float] containing the bitwise AND of the
431
459
  /// one's complement of the first operand and the values in the second
432
460
  /// operand.
433
- static __inline__ __m128 __DEFAULT_FN_ATTRS
434
- _mm_andnot_ps(__m128 __a, __m128 __b)
435
- {
461
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
462
+ _mm_andnot_ps(__m128 __a, __m128 __b) {
436
463
  return (__m128)(~(__v4su)__a & (__v4su)__b);
437
464
  }
438
465
 
@@ -448,9 +475,8 @@ _mm_andnot_ps(__m128 __a, __m128 __b)
448
475
  /// A 128-bit vector of [4 x float] containing one of the source operands.
449
476
  /// \returns A 128-bit vector of [4 x float] containing the bitwise OR of the
450
477
  /// values between both operands.
451
- static __inline__ __m128 __DEFAULT_FN_ATTRS
452
- _mm_or_ps(__m128 __a, __m128 __b)
453
- {
478
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
479
+ _mm_or_ps(__m128 __a, __m128 __b) {
454
480
  return (__m128)((__v4su)__a | (__v4su)__b);
455
481
  }
456
482
 
@@ -467,15 +493,17 @@ _mm_or_ps(__m128 __a, __m128 __b)
467
493
  /// A 128-bit vector of [4 x float] containing one of the source operands.
468
494
  /// \returns A 128-bit vector of [4 x float] containing the bitwise exclusive OR
469
495
  /// of the values between both operands.
470
- static __inline__ __m128 __DEFAULT_FN_ATTRS
471
- _mm_xor_ps(__m128 __a, __m128 __b)
472
- {
496
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
497
+ _mm_xor_ps(__m128 __a, __m128 __b) {
473
498
  return (__m128)((__v4su)__a ^ (__v4su)__b);
474
499
  }
475
500
 
476
501
  /// Compares two 32-bit float values in the low-order bits of both
477
- /// operands for equality and returns the result of the comparison in the
502
+ /// operands for equality.
503
+ ///
504
+ /// The comparison returns 0x0 for false, 0xFFFFFFFF for true, in the
478
505
  /// low-order bits of a vector [4 x float].
506
+ /// If either value in a comparison is NaN, returns false.
479
507
  ///
480
508
  /// \headerfile <x86intrin.h>
481
509
  ///
@@ -498,6 +526,9 @@ _mm_cmpeq_ss(__m128 __a, __m128 __b)
498
526
  /// Compares each of the corresponding 32-bit float values of the
499
527
  /// 128-bit vectors of [4 x float] for equality.
500
528
  ///
529
+ /// Each comparison returns 0x0 for false, 0xFFFFFFFF for true.
530
+ /// If either value in a comparison is NaN, returns false.
531
+ ///
501
532
  /// \headerfile <x86intrin.h>
502
533
  ///
503
534
  /// This intrinsic corresponds to the <c> VCMPEQPS / CMPEQPS </c> instructions.
@@ -515,8 +546,11 @@ _mm_cmpeq_ps(__m128 __a, __m128 __b)
515
546
 
516
547
  /// Compares two 32-bit float values in the low-order bits of both
517
548
  /// operands to determine if the value in the first operand is less than the
518
- /// corresponding value in the second operand and returns the result of the
519
- /// comparison in the low-order bits of a vector of [4 x float].
549
+ /// corresponding value in the second operand.
550
+ ///
551
+ /// The comparison returns 0x0 for false, 0xFFFFFFFF for true, in the
552
+ /// low-order bits of a vector of [4 x float].
553
+ /// If either value in a comparison is NaN, returns false.
520
554
  ///
521
555
  /// \headerfile <x86intrin.h>
522
556
  ///
@@ -540,6 +574,9 @@ _mm_cmplt_ss(__m128 __a, __m128 __b)
540
574
  /// 128-bit vectors of [4 x float] to determine if the values in the first
541
575
  /// operand are less than those in the second operand.
542
576
  ///
577
+ /// Each comparison returns 0x0 for false, 0xFFFFFFFFFFFFFFFF for true.
578
+ /// If either value in a comparison is NaN, returns false.
579
+ ///
543
580
  /// \headerfile <x86intrin.h>
544
581
  ///
545
582
  /// This intrinsic corresponds to the <c> VCMPLTPS / CMPLTPS </c> instructions.
@@ -557,9 +594,11 @@ _mm_cmplt_ps(__m128 __a, __m128 __b)
557
594
 
558
595
  /// Compares two 32-bit float values in the low-order bits of both
559
596
  /// operands to determine if the value in the first operand is less than or
560
- /// equal to the corresponding value in the second operand and returns the
561
- /// result of the comparison in the low-order bits of a vector of
562
- /// [4 x float].
597
+ /// equal to the corresponding value in the second operand.
598
+ ///
599
+ /// The comparison returns 0x0 for false, 0xFFFFFFFFFFFFFFFF for true, in
600
+ /// the low-order bits of a vector of [4 x float].
601
+ /// If either value in a comparison is NaN, returns false.
563
602
  ///
564
603
  /// \headerfile <x86intrin.h>
565
604
  ///
@@ -583,6 +622,9 @@ _mm_cmple_ss(__m128 __a, __m128 __b)
583
622
  /// 128-bit vectors of [4 x float] to determine if the values in the first
584
623
  /// operand are less than or equal to those in the second operand.
585
624
  ///
625
+ /// Each comparison returns 0x0 for false, 0xFFFFFFFF for true.
626
+ /// If either value in a comparison is NaN, returns false.
627
+ ///
586
628
  /// \headerfile <x86intrin.h>
587
629
  ///
588
630
  /// This intrinsic corresponds to the <c> VCMPLEPS / CMPLEPS </c> instructions.
@@ -600,8 +642,11 @@ _mm_cmple_ps(__m128 __a, __m128 __b)
600
642
 
601
643
  /// Compares two 32-bit float values in the low-order bits of both
602
644
  /// operands to determine if the value in the first operand is greater than
603
- /// the corresponding value in the second operand and returns the result of
604
- /// the comparison in the low-order bits of a vector of [4 x float].
645
+ /// the corresponding value in the second operand.
646
+ ///
647
+ /// The comparison returns 0x0 for false, 0xFFFFFFFF for true, in the
648
+ /// low-order bits of a vector of [4 x float].
649
+ /// If either value in a comparison is NaN, returns false.
605
650
  ///
606
651
  /// \headerfile <x86intrin.h>
607
652
  ///
@@ -627,6 +672,9 @@ _mm_cmpgt_ss(__m128 __a, __m128 __b)
627
672
  /// 128-bit vectors of [4 x float] to determine if the values in the first
628
673
  /// operand are greater than those in the second operand.
629
674
  ///
675
+ /// Each comparison returns 0x0 for false, 0xFFFFFFFF for true.
676
+ /// If either value in a comparison is NaN, returns false.
677
+ ///
630
678
  /// \headerfile <x86intrin.h>
631
679
  ///
632
680
  /// This intrinsic corresponds to the <c> VCMPLTPS / CMPLTPS </c> instructions.
@@ -644,9 +692,11 @@ _mm_cmpgt_ps(__m128 __a, __m128 __b)
644
692
 
645
693
  /// Compares two 32-bit float values in the low-order bits of both
646
694
  /// operands to determine if the value in the first operand is greater than
647
- /// or equal to the corresponding value in the second operand and returns
648
- /// the result of the comparison in the low-order bits of a vector of
649
- /// [4 x float].
695
+ /// or equal to the corresponding value in the second operand.
696
+ ///
697
+ /// Each comparison returns 0x0 for false, 0xFFFFFFFF for true, in the
698
+ /// low-order bits of a vector of [4 x float].
699
+ /// If either value in a comparison is NaN, returns false.
650
700
  ///
651
701
  /// \headerfile <x86intrin.h>
652
702
  ///
@@ -672,6 +722,9 @@ _mm_cmpge_ss(__m128 __a, __m128 __b)
672
722
  /// 128-bit vectors of [4 x float] to determine if the values in the first
673
723
  /// operand are greater than or equal to those in the second operand.
674
724
  ///
725
+ /// Each comparison returns 0x0 for false, 0xFFFFFFFFFFFFFFFF for true.
726
+ /// If either value in a comparison is NaN, returns false.
727
+ ///
675
728
  /// \headerfile <x86intrin.h>
676
729
  ///
677
730
  /// This intrinsic corresponds to the <c> VCMPLEPS / CMPLEPS </c> instructions.
@@ -687,9 +740,12 @@ _mm_cmpge_ps(__m128 __a, __m128 __b)
687
740
  return (__m128)__builtin_ia32_cmpleps((__v4sf)__b, (__v4sf)__a);
688
741
  }
689
742
 
690
- /// Compares two 32-bit float values in the low-order bits of both
691
- /// operands for inequality and returns the result of the comparison in the
743
+ /// Compares two 32-bit float values in the low-order bits of both operands
744
+ /// for inequality.
745
+ ///
746
+ /// The comparison returns 0x0 for false, 0xFFFFFFFF for true, in the
692
747
  /// low-order bits of a vector of [4 x float].
748
+ /// If either value in a comparison is NaN, returns true.
693
749
  ///
694
750
  /// \headerfile <x86intrin.h>
695
751
  ///
@@ -713,6 +769,9 @@ _mm_cmpneq_ss(__m128 __a, __m128 __b)
713
769
  /// Compares each of the corresponding 32-bit float values of the
714
770
  /// 128-bit vectors of [4 x float] for inequality.
715
771
  ///
772
+ /// Each comparison returns 0x0 for false, 0xFFFFFFFF for true.
773
+ /// If either value in a comparison is NaN, returns true.
774
+ ///
716
775
  /// \headerfile <x86intrin.h>
717
776
  ///
718
777
  /// This intrinsic corresponds to the <c> VCMPNEQPS / CMPNEQPS </c>
@@ -731,8 +790,11 @@ _mm_cmpneq_ps(__m128 __a, __m128 __b)
731
790
 
732
791
  /// Compares two 32-bit float values in the low-order bits of both
733
792
  /// operands to determine if the value in the first operand is not less than
734
- /// the corresponding value in the second operand and returns the result of
735
- /// the comparison in the low-order bits of a vector of [4 x float].
793
+ /// the corresponding value in the second operand.
794
+ ///
795
+ /// Each comparison returns 0x0 for false, 0xFFFFFFFF for true, in the
796
+ /// low-order bits of a vector of [4 x float].
797
+ /// If either value in a comparison is NaN, returns true.
736
798
  ///
737
799
  /// \headerfile <x86intrin.h>
738
800
  ///
@@ -757,6 +819,9 @@ _mm_cmpnlt_ss(__m128 __a, __m128 __b)
757
819
  /// 128-bit vectors of [4 x float] to determine if the values in the first
758
820
  /// operand are not less than those in the second operand.
759
821
  ///
822
+ /// Each comparison returns 0x0 for false, 0xFFFFFFFF for true.
823
+ /// If either value in a comparison is NaN, returns true.
824
+ ///
760
825
  /// \headerfile <x86intrin.h>
761
826
  ///
762
827
  /// This intrinsic corresponds to the <c> VCMPNLTPS / CMPNLTPS </c>
@@ -775,9 +840,11 @@ _mm_cmpnlt_ps(__m128 __a, __m128 __b)
775
840
 
776
841
  /// Compares two 32-bit float values in the low-order bits of both
777
842
  /// operands to determine if the value in the first operand is not less than
778
- /// or equal to the corresponding value in the second operand and returns
779
- /// the result of the comparison in the low-order bits of a vector of
780
- /// [4 x float].
843
+ /// or equal to the corresponding value in the second operand.
844
+ ///
845
+ /// Each comparison returns 0x0 for false, 0xFFFFFFFF for true, in the
846
+ /// low-order bits of a vector of [4 x float].
847
+ /// If either value in a comparison is NaN, returns true.
781
848
  ///
782
849
  /// \headerfile <x86intrin.h>
783
850
  ///
@@ -802,6 +869,9 @@ _mm_cmpnle_ss(__m128 __a, __m128 __b)
802
869
  /// 128-bit vectors of [4 x float] to determine if the values in the first
803
870
  /// operand are not less than or equal to those in the second operand.
804
871
  ///
872
+ /// Each comparison returns 0x0 for false, 0xFFFFFFFF for true.
873
+ /// If either value in a comparison is NaN, returns true.
874
+ ///
805
875
  /// \headerfile <x86intrin.h>
806
876
  ///
807
877
  /// This intrinsic corresponds to the <c> VCMPNLEPS / CMPNLEPS </c>
@@ -820,9 +890,11 @@ _mm_cmpnle_ps(__m128 __a, __m128 __b)
820
890
 
821
891
  /// Compares two 32-bit float values in the low-order bits of both
822
892
  /// operands to determine if the value in the first operand is not greater
823
- /// than the corresponding value in the second operand and returns the
824
- /// result of the comparison in the low-order bits of a vector of
825
- /// [4 x float].
893
+ /// than the corresponding value in the second operand.
894
+ ///
895
+ /// Each comparison returns 0x0 for false, 0xFFFFFFFF for true, in the
896
+ /// low-order bits of a vector of [4 x float].
897
+ /// If either value in a comparison is NaN, returns true.
826
898
  ///
827
899
  /// \headerfile <x86intrin.h>
828
900
  ///
@@ -849,6 +921,9 @@ _mm_cmpngt_ss(__m128 __a, __m128 __b)
849
921
  /// 128-bit vectors of [4 x float] to determine if the values in the first
850
922
  /// operand are not greater than those in the second operand.
851
923
  ///
924
+ /// Each comparison returns 0x0 for false, 0xFFFFFFFF for true.
925
+ /// If either value in a comparison is NaN, returns true.
926
+ ///
852
927
  /// \headerfile <x86intrin.h>
853
928
  ///
854
929
  /// This intrinsic corresponds to the <c> VCMPNLTPS / CMPNLTPS </c>
@@ -867,9 +942,11 @@ _mm_cmpngt_ps(__m128 __a, __m128 __b)
867
942
 
868
943
  /// Compares two 32-bit float values in the low-order bits of both
869
944
  /// operands to determine if the value in the first operand is not greater
870
- /// than or equal to the corresponding value in the second operand and
871
- /// returns the result of the comparison in the low-order bits of a vector
872
- /// of [4 x float].
945
+ /// than or equal to the corresponding value in the second operand.
946
+ ///
947
+ /// Each comparison returns 0x0 for false, 0xFFFFFFFF for true, in the
948
+ /// low-order bits of a vector of [4 x float].
949
+ /// If either value in a comparison is NaN, returns true.
873
950
  ///
874
951
  /// \headerfile <x86intrin.h>
875
952
  ///
@@ -896,6 +973,9 @@ _mm_cmpnge_ss(__m128 __a, __m128 __b)
896
973
  /// 128-bit vectors of [4 x float] to determine if the values in the first
897
974
  /// operand are not greater than or equal to those in the second operand.
898
975
  ///
976
+ /// Each comparison returns 0x0 for false, 0xFFFFFFFF for true.
977
+ /// If either value in a comparison is NaN, returns true.
978
+ ///
899
979
  /// \headerfile <x86intrin.h>
900
980
  ///
901
981
  /// This intrinsic corresponds to the <c> VCMPNLEPS / CMPNLEPS </c>
@@ -914,9 +994,11 @@ _mm_cmpnge_ps(__m128 __a, __m128 __b)
914
994
 
915
995
  /// Compares two 32-bit float values in the low-order bits of both
916
996
  /// operands to determine if the value in the first operand is ordered with
917
- /// respect to the corresponding value in the second operand and returns the
918
- /// result of the comparison in the low-order bits of a vector of
919
- /// [4 x float].
997
+ /// respect to the corresponding value in the second operand.
998
+ ///
999
+ /// A pair of floating-point values are ordered with respect to each
1000
+ /// other if neither value is a NaN. Each comparison returns 0x0 for false,
1001
+ /// 0xFFFFFFFF for true.
920
1002
  ///
921
1003
  /// \headerfile <x86intrin.h>
922
1004
  ///
@@ -941,6 +1023,10 @@ _mm_cmpord_ss(__m128 __a, __m128 __b)
941
1023
  /// 128-bit vectors of [4 x float] to determine if the values in the first
942
1024
  /// operand are ordered with respect to those in the second operand.
943
1025
  ///
1026
+ /// A pair of floating-point values are ordered with respect to each
1027
+ /// other if neither value is a NaN. Each comparison returns 0x0 for false,
1028
+ /// 0xFFFFFFFF for true.
1029
+ ///
944
1030
  /// \headerfile <x86intrin.h>
945
1031
  ///
946
1032
  /// This intrinsic corresponds to the <c> VCMPORDPS / CMPORDPS </c>
@@ -959,9 +1045,11 @@ _mm_cmpord_ps(__m128 __a, __m128 __b)
959
1045
 
960
1046
  /// Compares two 32-bit float values in the low-order bits of both
961
1047
  /// operands to determine if the value in the first operand is unordered
962
- /// with respect to the corresponding value in the second operand and
963
- /// returns the result of the comparison in the low-order bits of a vector
964
- /// of [4 x float].
1048
+ /// with respect to the corresponding value in the second operand.
1049
+ ///
1050
+ /// A pair of double-precision values are unordered with respect to each
1051
+ /// other if one or both values are NaN. Each comparison returns 0x0 for
1052
+ /// false, 0xFFFFFFFF for true.
965
1053
  ///
966
1054
  /// \headerfile <x86intrin.h>
967
1055
  ///
@@ -986,6 +1074,10 @@ _mm_cmpunord_ss(__m128 __a, __m128 __b)
986
1074
  /// 128-bit vectors of [4 x float] to determine if the values in the first
987
1075
  /// operand are unordered with respect to those in the second operand.
988
1076
  ///
1077
+ /// A pair of double-precision values are unordered with respect to each
1078
+ /// other if one or both values are NaN. Each comparison returns 0x0 for
1079
+ /// false, 0xFFFFFFFFFFFFFFFF for true.
1080
+ ///
989
1081
  /// \headerfile <x86intrin.h>
990
1082
  ///
991
1083
  /// This intrinsic corresponds to the <c> VCMPUNORDPS / CMPUNORDPS </c>
@@ -1003,9 +1095,10 @@ _mm_cmpunord_ps(__m128 __a, __m128 __b)
1003
1095
  }
1004
1096
 
1005
1097
  /// Compares two 32-bit float values in the low-order bits of both
1006
- /// operands for equality and returns the result of the comparison.
1098
+ /// operands for equality.
1007
1099
  ///
1008
- /// If either of the two lower 32-bit values is NaN, 0 is returned.
1100
+ /// The comparison returns 0 for false, 1 for true. If either value in a
1101
+ /// comparison is NaN, returns 0.
1009
1102
  ///
1010
1103
  /// \headerfile <x86intrin.h>
1011
1104
  ///
@@ -1018,8 +1111,7 @@ _mm_cmpunord_ps(__m128 __a, __m128 __b)
1018
1111
  /// \param __b
1019
1112
  /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
1020
1113
  /// used in the comparison.
1021
- /// \returns An integer containing the comparison results. If either of the
1022
- /// two lower 32-bit values is NaN, 0 is returned.
1114
+ /// \returns An integer containing the comparison results.
1023
1115
  static __inline__ int __DEFAULT_FN_ATTRS
1024
1116
  _mm_comieq_ss(__m128 __a, __m128 __b)
1025
1117
  {
@@ -1028,9 +1120,10 @@ _mm_comieq_ss(__m128 __a, __m128 __b)
1028
1120
 
1029
1121
  /// Compares two 32-bit float values in the low-order bits of both
1030
1122
  /// operands to determine if the first operand is less than the second
1031
- /// operand and returns the result of the comparison.
1123
+ /// operand.
1032
1124
  ///
1033
- /// If either of the two lower 32-bit values is NaN, 0 is returned.
1125
+ /// The comparison returns 0 for false, 1 for true. If either value in a
1126
+ /// comparison is NaN, returns 0.
1034
1127
  ///
1035
1128
  /// \headerfile <x86intrin.h>
1036
1129
  ///
@@ -1043,8 +1136,7 @@ _mm_comieq_ss(__m128 __a, __m128 __b)
1043
1136
  /// \param __b
1044
1137
  /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
1045
1138
  /// used in the comparison.
1046
- /// \returns An integer containing the comparison results. If either of the two
1047
- /// lower 32-bit values is NaN, 0 is returned.
1139
+ /// \returns An integer containing the comparison results.
1048
1140
  static __inline__ int __DEFAULT_FN_ATTRS
1049
1141
  _mm_comilt_ss(__m128 __a, __m128 __b)
1050
1142
  {
@@ -1053,9 +1145,10 @@ _mm_comilt_ss(__m128 __a, __m128 __b)
1053
1145
 
1054
1146
  /// Compares two 32-bit float values in the low-order bits of both
1055
1147
  /// operands to determine if the first operand is less than or equal to the
1056
- /// second operand and returns the result of the comparison.
1148
+ /// second operand.
1057
1149
  ///
1058
- /// If either of the two lower 32-bit values is NaN, 0 is returned.
1150
+ /// The comparison returns 0 for false, 1 for true. If either value in a
1151
+ /// comparison is NaN, returns 0.
1059
1152
  ///
1060
1153
  /// \headerfile <x86intrin.h>
1061
1154
  ///
@@ -1067,8 +1160,7 @@ _mm_comilt_ss(__m128 __a, __m128 __b)
1067
1160
  /// \param __b
1068
1161
  /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
1069
1162
  /// used in the comparison.
1070
- /// \returns An integer containing the comparison results. If either of the two
1071
- /// lower 32-bit values is NaN, 0 is returned.
1163
+ /// \returns An integer containing the comparison results.
1072
1164
  static __inline__ int __DEFAULT_FN_ATTRS
1073
1165
  _mm_comile_ss(__m128 __a, __m128 __b)
1074
1166
  {
@@ -1077,9 +1169,10 @@ _mm_comile_ss(__m128 __a, __m128 __b)
1077
1169
 
1078
1170
  /// Compares two 32-bit float values in the low-order bits of both
1079
1171
  /// operands to determine if the first operand is greater than the second
1080
- /// operand and returns the result of the comparison.
1172
+ /// operand.
1081
1173
  ///
1082
- /// If either of the two lower 32-bit values is NaN, 0 is returned.
1174
+ /// The comparison returns 0 for false, 1 for true. If either value in a
1175
+ /// comparison is NaN, returns 0.
1083
1176
  ///
1084
1177
  /// \headerfile <x86intrin.h>
1085
1178
  ///
@@ -1091,8 +1184,7 @@ _mm_comile_ss(__m128 __a, __m128 __b)
1091
1184
  /// \param __b
1092
1185
  /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
1093
1186
  /// used in the comparison.
1094
- /// \returns An integer containing the comparison results. If either of the
1095
- /// two lower 32-bit values is NaN, 0 is returned.
1187
+ /// \returns An integer containing the comparison results.
1096
1188
  static __inline__ int __DEFAULT_FN_ATTRS
1097
1189
  _mm_comigt_ss(__m128 __a, __m128 __b)
1098
1190
  {
@@ -1101,9 +1193,10 @@ _mm_comigt_ss(__m128 __a, __m128 __b)
1101
1193
 
1102
1194
  /// Compares two 32-bit float values in the low-order bits of both
1103
1195
  /// operands to determine if the first operand is greater than or equal to
1104
- /// the second operand and returns the result of the comparison.
1196
+ /// the second operand.
1105
1197
  ///
1106
- /// If either of the two lower 32-bit values is NaN, 0 is returned.
1198
+ /// The comparison returns 0 for false, 1 for true. If either value in a
1199
+ /// comparison is NaN, returns 0.
1107
1200
  ///
1108
1201
  /// \headerfile <x86intrin.h>
1109
1202
  ///
@@ -1115,8 +1208,7 @@ _mm_comigt_ss(__m128 __a, __m128 __b)
1115
1208
  /// \param __b
1116
1209
  /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
1117
1210
  /// used in the comparison.
1118
- /// \returns An integer containing the comparison results. If either of the two
1119
- /// lower 32-bit values is NaN, 0 is returned.
1211
+ /// \returns An integer containing the comparison results.
1120
1212
  static __inline__ int __DEFAULT_FN_ATTRS
1121
1213
  _mm_comige_ss(__m128 __a, __m128 __b)
1122
1214
  {
@@ -1125,9 +1217,10 @@ _mm_comige_ss(__m128 __a, __m128 __b)
1125
1217
 
1126
1218
  /// Compares two 32-bit float values in the low-order bits of both
1127
1219
  /// operands to determine if the first operand is not equal to the second
1128
- /// operand and returns the result of the comparison.
1220
+ /// operand.
1129
1221
  ///
1130
- /// If either of the two lower 32-bit values is NaN, 1 is returned.
1222
+ /// The comparison returns 0 for false, 1 for true. If either value in a
1223
+ /// comparison is NaN, returns 1.
1131
1224
  ///
1132
1225
  /// \headerfile <x86intrin.h>
1133
1226
  ///
@@ -1139,8 +1232,7 @@ _mm_comige_ss(__m128 __a, __m128 __b)
1139
1232
  /// \param __b
1140
1233
  /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
1141
1234
  /// used in the comparison.
1142
- /// \returns An integer containing the comparison results. If either of the
1143
- /// two lower 32-bit values is NaN, 1 is returned.
1235
+ /// \returns An integer containing the comparison results.
1144
1236
  static __inline__ int __DEFAULT_FN_ATTRS
1145
1237
  _mm_comineq_ss(__m128 __a, __m128 __b)
1146
1238
  {
@@ -1148,10 +1240,10 @@ _mm_comineq_ss(__m128 __a, __m128 __b)
1148
1240
  }
1149
1241
 
1150
1242
  /// Performs an unordered comparison of two 32-bit float values using
1151
- /// the low-order bits of both operands to determine equality and returns
1152
- /// the result of the comparison.
1243
+ /// the low-order bits of both operands to determine equality.
1153
1244
  ///
1154
- /// If either of the two lower 32-bit values is NaN, 0 is returned.
1245
+ /// The comparison returns 0 for false, 1 for true. If either value in a
1246
+ /// comparison is NaN, returns 0.
1155
1247
  ///
1156
1248
  /// \headerfile <x86intrin.h>
1157
1249
  ///
@@ -1163,8 +1255,7 @@ _mm_comineq_ss(__m128 __a, __m128 __b)
1163
1255
  /// \param __b
1164
1256
  /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
1165
1257
  /// used in the comparison.
1166
- /// \returns An integer containing the comparison results. If either of the two
1167
- /// lower 32-bit values is NaN, 0 is returned.
1258
+ /// \returns An integer containing the comparison results.
1168
1259
  static __inline__ int __DEFAULT_FN_ATTRS
1169
1260
  _mm_ucomieq_ss(__m128 __a, __m128 __b)
1170
1261
  {
@@ -1173,9 +1264,10 @@ _mm_ucomieq_ss(__m128 __a, __m128 __b)
1173
1264
 
1174
1265
  /// Performs an unordered comparison of two 32-bit float values using
1175
1266
  /// the low-order bits of both operands to determine if the first operand is
1176
- /// less than the second operand and returns the result of the comparison.
1267
+ /// less than the second operand.
1177
1268
  ///
1178
- /// If either of the two lower 32-bit values is NaN, 0 is returned.
1269
+ /// The comparison returns 0 for false, 1 for true. If either value in a
1270
+ /// comparison is NaN, returns 0.
1179
1271
  ///
1180
1272
  /// \headerfile <x86intrin.h>
1181
1273
  ///
@@ -1187,8 +1279,7 @@ _mm_ucomieq_ss(__m128 __a, __m128 __b)
1187
1279
  /// \param __b
1188
1280
  /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
1189
1281
  /// used in the comparison.
1190
- /// \returns An integer containing the comparison results. If either of the two
1191
- /// lower 32-bit values is NaN, 0 is returned.
1282
+ /// \returns An integer containing the comparison results.
1192
1283
  static __inline__ int __DEFAULT_FN_ATTRS
1193
1284
  _mm_ucomilt_ss(__m128 __a, __m128 __b)
1194
1285
  {
@@ -1197,10 +1288,10 @@ _mm_ucomilt_ss(__m128 __a, __m128 __b)
1197
1288
 
1198
1289
  /// Performs an unordered comparison of two 32-bit float values using
1199
1290
  /// the low-order bits of both operands to determine if the first operand is
1200
- /// less than or equal to the second operand and returns the result of the
1201
- /// comparison.
1291
+ /// less than or equal to the second operand.
1202
1292
  ///
1203
- /// If either of the two lower 32-bit values is NaN, 0 is returned.
1293
+ /// The comparison returns 0 for false, 1 for true. If either value in a
1294
+ /// comparison is NaN, returns 0.
1204
1295
  ///
1205
1296
  /// \headerfile <x86intrin.h>
1206
1297
  ///
@@ -1212,8 +1303,7 @@ _mm_ucomilt_ss(__m128 __a, __m128 __b)
1212
1303
  /// \param __b
1213
1304
  /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
1214
1305
  /// used in the comparison.
1215
- /// \returns An integer containing the comparison results. If either of the two
1216
- /// lower 32-bit values is NaN, 0 is returned.
1306
+ /// \returns An integer containing the comparison results.
1217
1307
  static __inline__ int __DEFAULT_FN_ATTRS
1218
1308
  _mm_ucomile_ss(__m128 __a, __m128 __b)
1219
1309
  {
@@ -1222,10 +1312,10 @@ _mm_ucomile_ss(__m128 __a, __m128 __b)
1222
1312
 
1223
1313
  /// Performs an unordered comparison of two 32-bit float values using
1224
1314
  /// the low-order bits of both operands to determine if the first operand is
1225
- /// greater than the second operand and returns the result of the
1226
- /// comparison.
1315
+ /// greater than the second operand.
1227
1316
  ///
1228
- /// If either of the two lower 32-bit values is NaN, 0 is returned.
1317
+ /// The comparison returns 0 for false, 1 for true. If either value in a
1318
+ /// comparison is NaN, returns 0.
1229
1319
  ///
1230
1320
  /// \headerfile <x86intrin.h>
1231
1321
  ///
@@ -1237,8 +1327,7 @@ _mm_ucomile_ss(__m128 __a, __m128 __b)
1237
1327
  /// \param __b
1238
1328
  /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
1239
1329
  /// used in the comparison.
1240
- /// \returns An integer containing the comparison results. If either of the two
1241
- /// lower 32-bit values is NaN, 0 is returned.
1330
+ /// \returns An integer containing the comparison results.
1242
1331
  static __inline__ int __DEFAULT_FN_ATTRS
1243
1332
  _mm_ucomigt_ss(__m128 __a, __m128 __b)
1244
1333
  {
@@ -1247,10 +1336,10 @@ _mm_ucomigt_ss(__m128 __a, __m128 __b)
1247
1336
 
1248
1337
  /// Performs an unordered comparison of two 32-bit float values using
1249
1338
  /// the low-order bits of both operands to determine if the first operand is
1250
- /// greater than or equal to the second operand and returns the result of
1251
- /// the comparison.
1339
+ /// greater than or equal to the second operand.
1252
1340
  ///
1253
- /// If either of the two lower 32-bit values is NaN, 0 is returned.
1341
+ /// The comparison returns 0 for false, 1 for true. If either value in a
1342
+ /// comparison is NaN, returns 0.
1254
1343
  ///
1255
1344
  /// \headerfile <x86intrin.h>
1256
1345
  ///
@@ -1262,8 +1351,7 @@ _mm_ucomigt_ss(__m128 __a, __m128 __b)
1262
1351
  /// \param __b
1263
1352
  /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
1264
1353
  /// used in the comparison.
1265
- /// \returns An integer containing the comparison results. If either of the two
1266
- /// lower 32-bit values is NaN, 0 is returned.
1354
+ /// \returns An integer containing the comparison results.
1267
1355
  static __inline__ int __DEFAULT_FN_ATTRS
1268
1356
  _mm_ucomige_ss(__m128 __a, __m128 __b)
1269
1357
  {
@@ -1271,10 +1359,10 @@ _mm_ucomige_ss(__m128 __a, __m128 __b)
1271
1359
  }
1272
1360
 
1273
1361
  /// Performs an unordered comparison of two 32-bit float values using
1274
- /// the low-order bits of both operands to determine inequality and returns
1275
- /// the result of the comparison.
1362
+ /// the low-order bits of both operands to determine inequality.
1276
1363
  ///
1277
- /// If either of the two lower 32-bit values is NaN, 1 is returned.
1364
+ /// The comparison returns 0 for false, 1 for true. If either value in a
1365
+ /// comparison is NaN, returns 0.
1278
1366
  ///
1279
1367
  /// \headerfile <x86intrin.h>
1280
1368
  ///
@@ -1286,8 +1374,7 @@ _mm_ucomige_ss(__m128 __a, __m128 __b)
1286
1374
  /// \param __b
1287
1375
  /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
1288
1376
  /// used in the comparison.
1289
- /// \returns An integer containing the comparison results. If either of the two
1290
- /// lower 32-bit values is NaN, 1 is returned.
1377
+ /// \returns An integer containing the comparison results.
1291
1378
  static __inline__ int __DEFAULT_FN_ATTRS
1292
1379
  _mm_ucomineq_ss(__m128 __a, __m128 __b)
1293
1380
  {
@@ -1297,6 +1384,10 @@ _mm_ucomineq_ss(__m128 __a, __m128 __b)
1297
1384
  /// Converts a float value contained in the lower 32 bits of a vector of
1298
1385
  /// [4 x float] into a 32-bit integer.
1299
1386
  ///
1387
+ /// If the converted value does not fit in a 32-bit integer, raises a
1388
+ /// floating-point invalid exception. If the exception is masked, returns
1389
+ /// the most negative integer.
1390
+ ///
1300
1391
  /// \headerfile <x86intrin.h>
1301
1392
  ///
1302
1393
  /// This intrinsic corresponds to the <c> VCVTSS2SI / CVTSS2SI </c>
@@ -1315,6 +1406,10 @@ _mm_cvtss_si32(__m128 __a)
1315
1406
  /// Converts a float value contained in the lower 32 bits of a vector of
1316
1407
  /// [4 x float] into a 32-bit integer.
1317
1408
  ///
1409
+ /// If the converted value does not fit in a 32-bit integer, raises a
1410
+ /// floating-point invalid exception. If the exception is masked, returns
1411
+ /// the most negative integer.
1412
+ ///
1318
1413
  /// \headerfile <x86intrin.h>
1319
1414
  ///
1320
1415
  /// This intrinsic corresponds to the <c> VCVTSS2SI / CVTSS2SI </c>
@@ -1335,6 +1430,10 @@ _mm_cvt_ss2si(__m128 __a)
1335
1430
  /// Converts a float value contained in the lower 32 bits of a vector of
1336
1431
  /// [4 x float] into a 64-bit integer.
1337
1432
  ///
1433
+ /// If the converted value does not fit in a 32-bit integer, raises a
1434
+ /// floating-point invalid exception. If the exception is masked, returns
1435
+ /// the most negative integer.
1436
+ ///
1338
1437
  /// \headerfile <x86intrin.h>
1339
1438
  ///
1340
1439
  /// This intrinsic corresponds to the <c> VCVTSS2SI / CVTSS2SI </c>
@@ -1355,6 +1454,10 @@ _mm_cvtss_si64(__m128 __a)
1355
1454
  /// Converts two low-order float values in a 128-bit vector of
1356
1455
  /// [4 x float] into a 64-bit vector of [2 x i32].
1357
1456
  ///
1457
+ /// If a converted value does not fit in a 32-bit integer, raises a
1458
+ /// floating-point invalid exception. If the exception is masked, returns
1459
+ /// the most negative integer.
1460
+ ///
1358
1461
  /// \headerfile <x86intrin.h>
1359
1462
  ///
1360
1463
  /// This intrinsic corresponds to the <c> CVTPS2PI </c> instruction.
@@ -1362,15 +1465,19 @@ _mm_cvtss_si64(__m128 __a)
1362
1465
  /// \param __a
1363
1466
  /// A 128-bit vector of [4 x float].
1364
1467
  /// \returns A 64-bit integer vector containing the converted values.
1365
- static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
1468
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_SSE2
1366
1469
  _mm_cvtps_pi32(__m128 __a)
1367
1470
  {
1368
- return (__m64)__builtin_ia32_cvtps2pi((__v4sf)__a);
1471
+ return __trunc64(__builtin_ia32_cvtps2dq((__v4sf)__zeroupper64(__a)));
1369
1472
  }
1370
1473
 
1371
1474
  /// Converts two low-order float values in a 128-bit vector of
1372
1475
  /// [4 x float] into a 64-bit vector of [2 x i32].
1373
1476
  ///
1477
+ /// If a converted value does not fit in a 32-bit integer, raises a
1478
+ /// floating-point invalid exception. If the exception is masked, returns
1479
+ /// the most negative integer.
1480
+ ///
1374
1481
  /// \headerfile <x86intrin.h>
1375
1482
  ///
1376
1483
  /// This intrinsic corresponds to the <c> CVTPS2PI </c> instruction.
@@ -1378,15 +1485,18 @@ _mm_cvtps_pi32(__m128 __a)
1378
1485
  /// \param __a
1379
1486
  /// A 128-bit vector of [4 x float].
1380
1487
  /// \returns A 64-bit integer vector containing the converted values.
1381
- static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
1488
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_SSE2
1382
1489
  _mm_cvt_ps2pi(__m128 __a)
1383
1490
  {
1384
1491
  return _mm_cvtps_pi32(__a);
1385
1492
  }
1386
1493
 
1387
- /// Converts a float value contained in the lower 32 bits of a vector of
1388
- /// [4 x float] into a 32-bit integer, truncating the result when it is
1389
- /// inexact.
1494
+ /// Converts the lower (first) element of a vector of [4 x float] into a signed
1495
+ /// truncated (rounded toward zero) 32-bit integer.
1496
+ ///
1497
+ /// If the converted value does not fit in a 32-bit integer, raises a
1498
+ /// floating-point invalid exception. If the exception is masked, returns
1499
+ /// the most negative integer.
1390
1500
  ///
1391
1501
  /// \headerfile <x86intrin.h>
1392
1502
  ///
@@ -1403,9 +1513,12 @@ _mm_cvttss_si32(__m128 __a)
1403
1513
  return __builtin_ia32_cvttss2si((__v4sf)__a);
1404
1514
  }
1405
1515
 
1406
- /// Converts a float value contained in the lower 32 bits of a vector of
1407
- /// [4 x float] into a 32-bit integer, truncating the result when it is
1408
- /// inexact.
1516
+ /// Converts the lower (first) element of a vector of [4 x float] into a signed
1517
+ /// truncated (rounded toward zero) 32-bit integer.
1518
+ ///
1519
+ /// If the converted value does not fit in a 32-bit integer, raises a
1520
+ /// floating-point invalid exception. If the exception is masked, returns
1521
+ /// the most negative integer.
1409
1522
  ///
1410
1523
  /// \headerfile <x86intrin.h>
1411
1524
  ///
@@ -1423,9 +1536,12 @@ _mm_cvtt_ss2si(__m128 __a)
1423
1536
  }
1424
1537
 
1425
1538
  #ifdef __x86_64__
1426
- /// Converts a float value contained in the lower 32 bits of a vector of
1427
- /// [4 x float] into a 64-bit integer, truncating the result when it is
1428
- /// inexact.
1539
+ /// Converts the lower (first) element of a vector of [4 x float] into a signed
1540
+ /// truncated (rounded toward zero) 64-bit integer.
1541
+ ///
1542
+ /// If the converted value does not fit in a 64-bit integer, raises a
1543
+ /// floating-point invalid exception. If the exception is masked, returns
1544
+ /// the most negative integer.
1429
1545
  ///
1430
1546
  /// \headerfile <x86intrin.h>
1431
1547
  ///
@@ -1443,9 +1559,13 @@ _mm_cvttss_si64(__m128 __a)
1443
1559
  }
1444
1560
  #endif
1445
1561
 
1446
- /// Converts two low-order float values in a 128-bit vector of
1447
- /// [4 x float] into a 64-bit vector of [2 x i32], truncating the result
1448
- /// when it is inexact.
1562
+ /// Converts the lower (first) two elements of a 128-bit vector of [4 x float]
1563
+ /// into two signed truncated (rounded toward zero) 32-bit integers,
1564
+ /// returned in a 64-bit vector of [2 x i32].
1565
+ ///
1566
+ /// If a converted value does not fit in a 32-bit integer, raises a
1567
+ /// floating-point invalid exception. If the exception is masked, returns
1568
+ /// the most negative integer.
1449
1569
  ///
1450
1570
  /// \headerfile <x86intrin.h>
1451
1571
  ///
@@ -1455,15 +1575,19 @@ _mm_cvttss_si64(__m128 __a)
1455
1575
  /// \param __a
1456
1576
  /// A 128-bit vector of [4 x float].
1457
1577
  /// \returns A 64-bit integer vector containing the converted values.
1458
- static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
1578
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_SSE2
1459
1579
  _mm_cvttps_pi32(__m128 __a)
1460
1580
  {
1461
- return (__m64)__builtin_ia32_cvttps2pi((__v4sf)__a);
1581
+ return __trunc64(__builtin_ia32_cvttps2dq((__v4sf)__zeroupper64(__a)));
1462
1582
  }
1463
1583
 
1464
- /// Converts two low-order float values in a 128-bit vector of [4 x
1465
- /// float] into a 64-bit vector of [2 x i32], truncating the result when it
1466
- /// is inexact.
1584
+ /// Converts the lower (first) two elements of a 128-bit vector of [4 x float]
1585
+ /// into two signed truncated (rounded toward zero) 64-bit integers,
1586
+ /// returned in a 64-bit vector of [2 x i32].
1587
+ ///
1588
+ /// If a converted value does not fit in a 32-bit integer, raises a
1589
+ /// floating-point invalid exception. If the exception is masked, returns
1590
+ /// the most negative integer.
1467
1591
  ///
1468
1592
  /// \headerfile <x86intrin.h>
1469
1593
  ///
@@ -1472,7 +1596,7 @@ _mm_cvttps_pi32(__m128 __a)
1472
1596
  /// \param __a
1473
1597
  /// A 128-bit vector of [4 x float].
1474
1598
  /// \returns A 64-bit integer vector containing the converted values.
1475
- static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
1599
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_SSE2
1476
1600
  _mm_cvtt_ps2pi(__m128 __a)
1477
1601
  {
1478
1602
  return _mm_cvttps_pi32(__a);
@@ -1494,9 +1618,8 @@ _mm_cvtt_ps2pi(__m128 __a)
1494
1618
  /// \returns A 128-bit vector of [4 x float] whose lower 32 bits contain the
1495
1619
  /// converted value of the second operand. The upper 96 bits are copied from
1496
1620
  /// the upper 96 bits of the first operand.
1497
- static __inline__ __m128 __DEFAULT_FN_ATTRS
1498
- _mm_cvtsi32_ss(__m128 __a, int __b)
1499
- {
1621
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR _mm_cvtsi32_ss(__m128 __a,
1622
+ int __b) {
1500
1623
  __a[0] = __b;
1501
1624
  return __a;
1502
1625
  }
@@ -1517,9 +1640,8 @@ _mm_cvtsi32_ss(__m128 __a, int __b)
1517
1640
  /// \returns A 128-bit vector of [4 x float] whose lower 32 bits contain the
1518
1641
  /// converted value of the second operand. The upper 96 bits are copied from
1519
1642
  /// the upper 96 bits of the first operand.
1520
- static __inline__ __m128 __DEFAULT_FN_ATTRS
1521
- _mm_cvt_si2ss(__m128 __a, int __b)
1522
- {
1643
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR _mm_cvt_si2ss(__m128 __a,
1644
+ int __b) {
1523
1645
  return _mm_cvtsi32_ss(__a, __b);
1524
1646
  }
1525
1647
 
@@ -1541,9 +1663,8 @@ _mm_cvt_si2ss(__m128 __a, int __b)
1541
1663
  /// \returns A 128-bit vector of [4 x float] whose lower 32 bits contain the
1542
1664
  /// converted value of the second operand. The upper 96 bits are copied from
1543
1665
  /// the upper 96 bits of the first operand.
1544
- static __inline__ __m128 __DEFAULT_FN_ATTRS
1545
- _mm_cvtsi64_ss(__m128 __a, long long __b)
1546
- {
1666
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
1667
+ _mm_cvtsi64_ss(__m128 __a, long long __b) {
1547
1668
  __a[0] = __b;
1548
1669
  return __a;
1549
1670
  }
@@ -1567,10 +1688,13 @@ _mm_cvtsi64_ss(__m128 __a, long long __b)
1567
1688
  /// \returns A 128-bit vector of [4 x float] whose lower 64 bits contain the
1568
1689
  /// converted value of the second operand. The upper 64 bits are copied from
1569
1690
  /// the upper 64 bits of the first operand.
1570
- static __inline__ __m128 __DEFAULT_FN_ATTRS_MMX
1691
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_SSE2
1571
1692
  _mm_cvtpi32_ps(__m128 __a, __m64 __b)
1572
1693
  {
1573
- return __builtin_ia32_cvtpi2ps((__v4sf)__a, (__v2si)__b);
1694
+ return (__m128)__builtin_shufflevector(
1695
+ (__v4sf)__a,
1696
+ __builtin_convertvector((__v4si)__zext128(__b), __v4sf),
1697
+ 4, 5, 2, 3);
1574
1698
  }
1575
1699
 
1576
1700
  /// Converts two elements of a 64-bit vector of [2 x i32] into two
@@ -1590,7 +1714,7 @@ _mm_cvtpi32_ps(__m128 __a, __m64 __b)
1590
1714
  /// \returns A 128-bit vector of [4 x float] whose lower 64 bits contain the
1591
1715
  /// converted value from the second operand. The upper 64 bits are copied
1592
1716
  /// from the upper 64 bits of the first operand.
1593
- static __inline__ __m128 __DEFAULT_FN_ATTRS_MMX
1717
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_SSE2
1594
1718
  _mm_cvt_pi2ps(__m128 __a, __m64 __b)
1595
1719
  {
1596
1720
  return _mm_cvtpi32_ps(__a, __b);
@@ -1607,9 +1731,8 @@ _mm_cvt_pi2ps(__m128 __a, __m64 __b)
1607
1731
  /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
1608
1732
  /// used in the extraction.
1609
1733
  /// \returns A 32-bit float containing the extracted value.
1610
- static __inline__ float __DEFAULT_FN_ATTRS
1611
- _mm_cvtss_f32(__m128 __a)
1612
- {
1734
+ static __inline__ float __DEFAULT_FN_ATTRS_CONSTEXPR
1735
+ _mm_cvtss_f32(__m128 __a) {
1613
1736
  return __a[0];
1614
1737
  }
1615
1738
 
@@ -1800,10 +1923,9 @@ _mm_undefined_ps(void)
1800
1923
  /// \returns An initialized 128-bit floating-point vector of [4 x float]. The
1801
1924
  /// lower 32 bits contain the value provided in the source operand. The
1802
1925
  /// upper 96 bits are set to zero.
1803
- static __inline__ __m128 __DEFAULT_FN_ATTRS
1804
- _mm_set_ss(float __w)
1805
- {
1806
- return __extension__ (__m128){ __w, 0, 0, 0 };
1926
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
1927
+ _mm_set_ss(float __w) {
1928
+ return __extension__ (__m128){ __w, 0.0f, 0.0f, 0.0f };
1807
1929
  }
1808
1930
 
1809
1931
  /// Constructs a 128-bit floating-point vector of [4 x float], with each
@@ -1818,9 +1940,8 @@ _mm_set_ss(float __w)
1818
1940
  /// A single-precision floating-point value used to initialize each vector
1819
1941
  /// element of the result.
1820
1942
  /// \returns An initialized 128-bit floating-point vector of [4 x float].
1821
- static __inline__ __m128 __DEFAULT_FN_ATTRS
1822
- _mm_set1_ps(float __w)
1823
- {
1943
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
1944
+ _mm_set1_ps(float __w) {
1824
1945
  return __extension__ (__m128){ __w, __w, __w, __w };
1825
1946
  }
1826
1947
 
@@ -1837,9 +1958,8 @@ _mm_set1_ps(float __w)
1837
1958
  /// A single-precision floating-point value used to initialize each vector
1838
1959
  /// element of the result.
1839
1960
  /// \returns An initialized 128-bit floating-point vector of [4 x float].
1840
- static __inline__ __m128 __DEFAULT_FN_ATTRS
1841
- _mm_set_ps1(float __w)
1842
- {
1961
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
1962
+ _mm_set_ps1(float __w) {
1843
1963
  return _mm_set1_ps(__w);
1844
1964
  }
1845
1965
 
@@ -1864,9 +1984,8 @@ _mm_set_ps1(float __w)
1864
1984
  /// A single-precision floating-point value used to initialize bits [31:0]
1865
1985
  /// of the result.
1866
1986
  /// \returns An initialized 128-bit floating-point vector of [4 x float].
1867
- static __inline__ __m128 __DEFAULT_FN_ATTRS
1868
- _mm_set_ps(float __z, float __y, float __x, float __w)
1869
- {
1987
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
1988
+ _mm_set_ps(float __z, float __y, float __x, float __w) {
1870
1989
  return __extension__ (__m128){ __w, __x, __y, __z };
1871
1990
  }
1872
1991
 
@@ -1892,9 +2011,8 @@ _mm_set_ps(float __z, float __y, float __x, float __w)
1892
2011
  /// A single-precision floating-point value used to initialize bits [127:96]
1893
2012
  /// of the result.
1894
2013
  /// \returns An initialized 128-bit floating-point vector of [4 x float].
1895
- static __inline__ __m128 __DEFAULT_FN_ATTRS
1896
- _mm_setr_ps(float __z, float __y, float __x, float __w)
1897
- {
2014
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
2015
+ _mm_setr_ps(float __z, float __y, float __x, float __w) {
1898
2016
  return __extension__ (__m128){ __z, __y, __x, __w };
1899
2017
  }
1900
2018
 
@@ -1907,9 +2025,8 @@ _mm_setr_ps(float __z, float __y, float __x, float __w)
1907
2025
  ///
1908
2026
  /// \returns An initialized 128-bit floating-point vector of [4 x float] with
1909
2027
  /// all elements set to zero.
1910
- static __inline__ __m128 __DEFAULT_FN_ATTRS
1911
- _mm_setzero_ps(void)
1912
- {
2028
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
2029
+ _mm_setzero_ps(void) {
1913
2030
  return __extension__ (__m128){ 0.0f, 0.0f, 0.0f, 0.0f };
1914
2031
  }
1915
2032
 
@@ -2124,10 +2241,10 @@ _mm_storer_ps(float *__p, __m128 __a)
2124
2241
  /// A pointer to an aligned memory location used to store the register value.
2125
2242
  /// \param __a
2126
2243
  /// A 64-bit integer containing the value to be stored.
2127
- static __inline__ void __DEFAULT_FN_ATTRS_MMX
2244
+ static __inline__ void __DEFAULT_FN_ATTRS
2128
2245
  _mm_stream_pi(void *__p, __m64 __a)
2129
2246
  {
2130
- __builtin_ia32_movntq((__m64 *)__p, __a);
2247
+ __builtin_nontemporal_store(__a, (__m64 *)__p);
2131
2248
  }
2132
2249
 
2133
2250
  /// Moves packed float values from a 128-bit vector of [4 x float] to a
@@ -2189,7 +2306,7 @@ void _mm_sfence(void);
2189
2306
  /// 3: Bits [63:48] are copied to the destination.
2190
2307
  /// \returns A 16-bit integer containing the extracted 16 bits of packed data.
2191
2308
  #define _mm_extract_pi16(a, n) \
2192
- ((int)__builtin_ia32_vec_ext_v4hi((__v4hi)a, (int)n))
2309
+ ((int)(unsigned short)__builtin_ia32_vec_ext_v4hi((__v4hi)a, (int)n))
2193
2310
 
2194
2311
  /// Copies data from the 64-bit vector of [4 x i16] to the destination,
2195
2312
  /// and inserts the lower 16-bits of an integer operand at the 16-bit offset
@@ -2235,10 +2352,10 @@ void _mm_sfence(void);
2235
2352
  /// \param __b
2236
2353
  /// A 64-bit integer vector containing one of the source operands.
2237
2354
  /// \returns A 64-bit integer vector containing the comparison results.
2238
- static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
2355
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_SSE2
2239
2356
  _mm_max_pi16(__m64 __a, __m64 __b)
2240
2357
  {
2241
- return (__m64)__builtin_ia32_pmaxsw((__v4hi)__a, (__v4hi)__b);
2358
+ return (__m64)__builtin_elementwise_max((__v4hi)__a, (__v4hi)__b);
2242
2359
  }
2243
2360
 
2244
2361
  /// Compares each of the corresponding packed 8-bit unsigned integer
@@ -2254,10 +2371,10 @@ _mm_max_pi16(__m64 __a, __m64 __b)
2254
2371
  /// \param __b
2255
2372
  /// A 64-bit integer vector containing one of the source operands.
2256
2373
  /// \returns A 64-bit integer vector containing the comparison results.
2257
- static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
2374
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_SSE2
2258
2375
  _mm_max_pu8(__m64 __a, __m64 __b)
2259
2376
  {
2260
- return (__m64)__builtin_ia32_pmaxub((__v8qi)__a, (__v8qi)__b);
2377
+ return (__m64)__builtin_elementwise_max((__v8qu)__a, (__v8qu)__b);
2261
2378
  }
2262
2379
 
2263
2380
  /// Compares each of the corresponding packed 16-bit integer values of
@@ -2273,10 +2390,10 @@ _mm_max_pu8(__m64 __a, __m64 __b)
2273
2390
  /// \param __b
2274
2391
  /// A 64-bit integer vector containing one of the source operands.
2275
2392
  /// \returns A 64-bit integer vector containing the comparison results.
2276
- static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
2393
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_SSE2
2277
2394
  _mm_min_pi16(__m64 __a, __m64 __b)
2278
2395
  {
2279
- return (__m64)__builtin_ia32_pminsw((__v4hi)__a, (__v4hi)__b);
2396
+ return (__m64)__builtin_elementwise_min((__v4hi)__a, (__v4hi)__b);
2280
2397
  }
2281
2398
 
2282
2399
  /// Compares each of the corresponding packed 8-bit unsigned integer
@@ -2292,10 +2409,10 @@ _mm_min_pi16(__m64 __a, __m64 __b)
2292
2409
  /// \param __b
2293
2410
  /// A 64-bit integer vector containing one of the source operands.
2294
2411
  /// \returns A 64-bit integer vector containing the comparison results.
2295
- static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
2412
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_SSE2
2296
2413
  _mm_min_pu8(__m64 __a, __m64 __b)
2297
2414
  {
2298
- return (__m64)__builtin_ia32_pminub((__v8qi)__a, (__v8qi)__b);
2415
+ return (__m64)__builtin_elementwise_min((__v8qu)__a, (__v8qu)__b);
2299
2416
  }
2300
2417
 
2301
2418
  /// Takes the most significant bit from each 8-bit element in a 64-bit
@@ -2310,10 +2427,10 @@ _mm_min_pu8(__m64 __a, __m64 __b)
2310
2427
  /// A 64-bit integer vector containing the values with bits to be extracted.
2311
2428
  /// \returns The most significant bit from each 8-bit element in \a __a,
2312
2429
  /// written to bits [7:0].
2313
- static __inline__ int __DEFAULT_FN_ATTRS_MMX
2430
+ static __inline__ int __DEFAULT_FN_ATTRS_SSE2
2314
2431
  _mm_movemask_pi8(__m64 __a)
2315
2432
  {
2316
- return __builtin_ia32_pmovmskb((__v8qi)__a);
2433
+ return __builtin_ia32_pmovmskb128((__v16qi)__zext128(__a));
2317
2434
  }
2318
2435
 
2319
2436
  /// Multiplies packed 16-bit unsigned integer values and writes the
@@ -2329,10 +2446,11 @@ _mm_movemask_pi8(__m64 __a)
2329
2446
  /// \param __b
2330
2447
  /// A 64-bit integer vector containing one of the source operands.
2331
2448
  /// \returns A 64-bit integer vector containing the products of both operands.
2332
- static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
2449
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_SSE2
2333
2450
  _mm_mulhi_pu16(__m64 __a, __m64 __b)
2334
2451
  {
2335
- return (__m64)__builtin_ia32_pmulhuw((__v4hi)__a, (__v4hi)__b);
2452
+ return __trunc64(__builtin_ia32_pmulhuw128((__v8hi)__anyext128(__a),
2453
+ (__v8hi)__anyext128(__b)));
2336
2454
  }
2337
2455
 
2338
2456
  /// Shuffles the 4 16-bit integers from a 64-bit integer vector to the
@@ -2369,8 +2487,10 @@ _mm_mulhi_pu16(__m64 __a, __m64 __b)
2369
2487
  /// <c>_MM_SHUFFLE(b6, b4, b2, b0)</c> can create an 8-bit mask of the form
2370
2488
  /// <c>[b6, b4, b2, b0]</c>.
2371
2489
  /// \returns A 64-bit integer vector containing the shuffled values.
2372
- #define _mm_shuffle_pi16(a, n) \
2373
- ((__m64)__builtin_ia32_pshufw((__v4hi)(__m64)(a), (n)))
2490
+ #define _mm_shuffle_pi16(a, n) \
2491
+ ((__m64)__builtin_shufflevector((__v4hi)(__m64)(a), __extension__(__v4hi){}, \
2492
+ (n) & 0x3, ((n) >> 2) & 0x3, \
2493
+ ((n) >> 4) & 0x3, ((n) >> 6) & 0x3))
2374
2494
 
2375
2495
  /// Conditionally copies the values from each 8-bit element in the first
2376
2496
  /// 64-bit integer vector operand to the specified memory location, as
@@ -2395,10 +2515,25 @@ _mm_mulhi_pu16(__m64 __a, __m64 __b)
2395
2515
  /// A pointer to a 64-bit memory location that will receive the conditionally
2396
2516
  /// copied integer values. The address of the memory location does not have
2397
2517
  /// to be aligned.
2398
- static __inline__ void __DEFAULT_FN_ATTRS_MMX
2518
+ static __inline__ void __DEFAULT_FN_ATTRS_SSE2
2399
2519
  _mm_maskmove_si64(__m64 __d, __m64 __n, char *__p)
2400
2520
  {
2401
- __builtin_ia32_maskmovq((__v8qi)__d, (__v8qi)__n, __p);
2521
+ // This is complex, because we need to support the case where __p is pointing
2522
+ // within the last 15 to 8 bytes of a page. In that case, using a 128-bit
2523
+ // write might cause a trap where a 64-bit maskmovq would not. (Memory
2524
+ // locations not selected by the mask bits might still cause traps.)
2525
+ __m128i __d128 = __anyext128(__d);
2526
+ __m128i __n128 = __zext128(__n);
2527
+ if (((__SIZE_TYPE__)__p & 0xfff) >= 4096-15 &&
2528
+ ((__SIZE_TYPE__)__p & 0xfff) <= 4096-8) {
2529
+ // If there's a risk of spurious trap due to a 128-bit write, back up the
2530
+ // pointer by 8 bytes and shift values in registers to match.
2531
+ __p -= 8;
2532
+ __d128 = __builtin_ia32_pslldqi128_byteshift((__v2di)__d128, 8);
2533
+ __n128 = __builtin_ia32_pslldqi128_byteshift((__v2di)__n128, 8);
2534
+ }
2535
+
2536
+ __builtin_ia32_maskmovdqu((__v16qi)__d128, (__v16qi)__n128, __p);
2402
2537
  }
2403
2538
 
2404
2539
  /// Computes the rounded averages of the packed unsigned 8-bit integer
@@ -2414,10 +2549,11 @@ _mm_maskmove_si64(__m64 __d, __m64 __n, char *__p)
2414
2549
  /// \param __b
2415
2550
  /// A 64-bit integer vector containing one of the source operands.
2416
2551
  /// \returns A 64-bit integer vector containing the averages of both operands.
2417
- static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
2552
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_SSE2
2418
2553
  _mm_avg_pu8(__m64 __a, __m64 __b)
2419
2554
  {
2420
- return (__m64)__builtin_ia32_pavgb((__v8qi)__a, (__v8qi)__b);
2555
+ return __trunc64(__builtin_ia32_pavgb128((__v16qi)__anyext128(__a),
2556
+ (__v16qi)__anyext128(__b)));
2421
2557
  }
2422
2558
 
2423
2559
  /// Computes the rounded averages of the packed unsigned 16-bit integer
@@ -2433,10 +2569,11 @@ _mm_avg_pu8(__m64 __a, __m64 __b)
2433
2569
  /// \param __b
2434
2570
  /// A 64-bit integer vector containing one of the source operands.
2435
2571
  /// \returns A 64-bit integer vector containing the averages of both operands.
2436
- static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
2572
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_SSE2
2437
2573
  _mm_avg_pu16(__m64 __a, __m64 __b)
2438
2574
  {
2439
- return (__m64)__builtin_ia32_pavgw((__v4hi)__a, (__v4hi)__b);
2575
+ return __trunc64(__builtin_ia32_pavgw128((__v8hi)__anyext128(__a),
2576
+ (__v8hi)__anyext128(__b)));
2440
2577
  }
2441
2578
 
2442
2579
  /// Subtracts the corresponding 8-bit unsigned integer values of the two
@@ -2455,10 +2592,11 @@ _mm_avg_pu16(__m64 __a, __m64 __b)
2455
2592
  /// \returns A 64-bit integer vector whose lower 16 bits contain the sums of the
2456
2593
  /// sets of absolute differences between both operands. The upper bits are
2457
2594
  /// cleared.
2458
- static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
2595
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_SSE2
2459
2596
  _mm_sad_pu8(__m64 __a, __m64 __b)
2460
2597
  {
2461
- return (__m64)__builtin_ia32_psadbw((__v8qi)__a, (__v8qi)__b);
2598
+ return __trunc64(__builtin_ia32_psadbw128((__v16qi)__zext128(__a),
2599
+ (__v16qi)__zext128(__b)));
2462
2600
  }
2463
2601
 
2464
2602
  #if defined(__cplusplus)
@@ -2634,9 +2772,8 @@ void _mm_setcsr(unsigned int __i);
2634
2772
  /// Bits [95:64] are written to bits [63:32] of the destination. \n
2635
2773
  /// Bits [127:96] are written to bits [127:96] of the destination.
2636
2774
  /// \returns A 128-bit vector of [4 x float] containing the interleaved values.
2637
- static __inline__ __m128 __DEFAULT_FN_ATTRS
2638
- _mm_unpackhi_ps(__m128 __a, __m128 __b)
2639
- {
2775
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
2776
+ _mm_unpackhi_ps(__m128 __a, __m128 __b) {
2640
2777
  return __builtin_shufflevector((__v4sf)__a, (__v4sf)__b, 2, 6, 3, 7);
2641
2778
  }
2642
2779
 
@@ -2656,9 +2793,8 @@ _mm_unpackhi_ps(__m128 __a, __m128 __b)
2656
2793
  /// Bits [31:0] are written to bits [63:32] of the destination. \n
2657
2794
  /// Bits [63:32] are written to bits [127:96] of the destination.
2658
2795
  /// \returns A 128-bit vector of [4 x float] containing the interleaved values.
2659
- static __inline__ __m128 __DEFAULT_FN_ATTRS
2660
- _mm_unpacklo_ps(__m128 __a, __m128 __b)
2661
- {
2796
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
2797
+ _mm_unpacklo_ps(__m128 __a, __m128 __b) {
2662
2798
  return __builtin_shufflevector((__v4sf)__a, (__v4sf)__b, 0, 4, 1, 5);
2663
2799
  }
2664
2800
 
@@ -2678,9 +2814,8 @@ _mm_unpacklo_ps(__m128 __a, __m128 __b)
2678
2814
  /// A 128-bit floating-point vector of [4 x float]. The lower 32 bits are
2679
2815
  /// written to the lower 32 bits of the result.
2680
2816
  /// \returns A 128-bit floating-point vector of [4 x float].
2681
- static __inline__ __m128 __DEFAULT_FN_ATTRS
2682
- _mm_move_ss(__m128 __a, __m128 __b)
2683
- {
2817
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
2818
+ _mm_move_ss(__m128 __a, __m128 __b) {
2684
2819
  __a[0] = __b[0];
2685
2820
  return __a;
2686
2821
  }
@@ -2700,9 +2835,8 @@ _mm_move_ss(__m128 __a, __m128 __b)
2700
2835
  /// A 128-bit floating-point vector of [4 x float]. The upper 64 bits are
2701
2836
  /// written to the lower 64 bits of the result.
2702
2837
  /// \returns A 128-bit floating-point vector of [4 x float].
2703
- static __inline__ __m128 __DEFAULT_FN_ATTRS
2704
- _mm_movehl_ps(__m128 __a, __m128 __b)
2705
- {
2838
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
2839
+ _mm_movehl_ps(__m128 __a, __m128 __b) {
2706
2840
  return __builtin_shufflevector((__v4sf)__a, (__v4sf)__b, 6, 7, 2, 3);
2707
2841
  }
2708
2842
 
@@ -2721,9 +2855,8 @@ _mm_movehl_ps(__m128 __a, __m128 __b)
2721
2855
  /// A 128-bit floating-point vector of [4 x float]. The lower 64 bits are
2722
2856
  /// written to the upper 64 bits of the result.
2723
2857
  /// \returns A 128-bit floating-point vector of [4 x float].
2724
- static __inline__ __m128 __DEFAULT_FN_ATTRS
2725
- _mm_movelh_ps(__m128 __a, __m128 __b)
2726
- {
2858
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_CONSTEXPR
2859
+ _mm_movelh_ps(__m128 __a, __m128 __b) {
2727
2860
  return __builtin_shufflevector((__v4sf)__a, (__v4sf)__b, 0, 1, 4, 5);
2728
2861
  }
2729
2862
 
@@ -2739,22 +2872,10 @@ _mm_movelh_ps(__m128 __a, __m128 __b)
2739
2872
  /// from the corresponding elements in this operand.
2740
2873
  /// \returns A 128-bit vector of [4 x float] containing the copied and converted
2741
2874
  /// values from the operand.
2742
- static __inline__ __m128 __DEFAULT_FN_ATTRS_MMX
2875
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_SSE2
2743
2876
  _mm_cvtpi16_ps(__m64 __a)
2744
2877
  {
2745
- __m64 __b, __c;
2746
- __m128 __r;
2747
-
2748
- __b = _mm_setzero_si64();
2749
- __b = _mm_cmpgt_pi16(__b, __a);
2750
- __c = _mm_unpackhi_pi16(__a, __b);
2751
- __r = _mm_setzero_ps();
2752
- __r = _mm_cvtpi32_ps(__r, __c);
2753
- __r = _mm_movelh_ps(__r, __r);
2754
- __c = _mm_unpacklo_pi16(__a, __b);
2755
- __r = _mm_cvtpi32_ps(__r, __c);
2756
-
2757
- return __r;
2878
+ return __builtin_convertvector((__v4hi)__a, __v4sf);
2758
2879
  }
2759
2880
 
2760
2881
  /// Converts a 64-bit vector of 16-bit unsigned integer values into a
@@ -2769,21 +2890,10 @@ _mm_cvtpi16_ps(__m64 __a)
2769
2890
  /// destination are copied from the corresponding elements in this operand.
2770
2891
  /// \returns A 128-bit vector of [4 x float] containing the copied and converted
2771
2892
  /// values from the operand.
2772
- static __inline__ __m128 __DEFAULT_FN_ATTRS_MMX
2893
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_SSE2
2773
2894
  _mm_cvtpu16_ps(__m64 __a)
2774
2895
  {
2775
- __m64 __b, __c;
2776
- __m128 __r;
2777
-
2778
- __b = _mm_setzero_si64();
2779
- __c = _mm_unpackhi_pi16(__a, __b);
2780
- __r = _mm_setzero_ps();
2781
- __r = _mm_cvtpi32_ps(__r, __c);
2782
- __r = _mm_movelh_ps(__r, __r);
2783
- __c = _mm_unpacklo_pi16(__a, __b);
2784
- __r = _mm_cvtpi32_ps(__r, __c);
2785
-
2786
- return __r;
2896
+ return __builtin_convertvector((__v4hu)__a, __v4sf);
2787
2897
  }
2788
2898
 
2789
2899
  /// Converts the lower four 8-bit values from a 64-bit vector of [8 x i8]
@@ -2798,16 +2908,12 @@ _mm_cvtpu16_ps(__m64 __a)
2798
2908
  /// from the corresponding lower 4 elements in this operand.
2799
2909
  /// \returns A 128-bit vector of [4 x float] containing the copied and converted
2800
2910
  /// values from the operand.
2801
- static __inline__ __m128 __DEFAULT_FN_ATTRS_MMX
2911
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_SSE2
2802
2912
  _mm_cvtpi8_ps(__m64 __a)
2803
2913
  {
2804
- __m64 __b;
2805
-
2806
- __b = _mm_setzero_si64();
2807
- __b = _mm_cmpgt_pi8(__b, __a);
2808
- __b = _mm_unpacklo_pi8(__a, __b);
2809
-
2810
- return _mm_cvtpi16_ps(__b);
2914
+ return __builtin_convertvector(
2915
+ __builtin_shufflevector((__v8qs)__a, __extension__ (__v8qs){},
2916
+ 0, 1, 2, 3), __v4sf);
2811
2917
  }
2812
2918
 
2813
2919
  /// Converts the lower four unsigned 8-bit integer values from a 64-bit
@@ -2823,15 +2929,12 @@ _mm_cvtpi8_ps(__m64 __a)
2823
2929
  /// operand.
2824
2930
  /// \returns A 128-bit vector of [4 x float] containing the copied and converted
2825
2931
  /// values from the source operand.
2826
- static __inline__ __m128 __DEFAULT_FN_ATTRS_MMX
2932
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_SSE2
2827
2933
  _mm_cvtpu8_ps(__m64 __a)
2828
2934
  {
2829
- __m64 __b;
2830
-
2831
- __b = _mm_setzero_si64();
2832
- __b = _mm_unpacklo_pi8(__a, __b);
2833
-
2834
- return _mm_cvtpi16_ps(__b);
2935
+ return __builtin_convertvector(
2936
+ __builtin_shufflevector((__v8qu)__a, __extension__ (__v8qu){},
2937
+ 0, 1, 2, 3), __v4sf);
2835
2938
  }
2836
2939
 
2837
2940
  /// Converts the two 32-bit signed integer values from each 64-bit vector
@@ -2850,16 +2953,12 @@ _mm_cvtpu8_ps(__m64 __a)
2850
2953
  /// \returns A 128-bit vector of [4 x float] whose lower 64 bits contain the
2851
2954
  /// copied and converted values from the first operand. The upper 64 bits
2852
2955
  /// contain the copied and converted values from the second operand.
2853
- static __inline__ __m128 __DEFAULT_FN_ATTRS_MMX
2956
+ static __inline__ __m128 __DEFAULT_FN_ATTRS_SSE2
2854
2957
  _mm_cvtpi32x2_ps(__m64 __a, __m64 __b)
2855
2958
  {
2856
- __m128 __c;
2857
-
2858
- __c = _mm_setzero_ps();
2859
- __c = _mm_cvtpi32_ps(__c, __b);
2860
- __c = _mm_movelh_ps(__c, __c);
2861
-
2862
- return _mm_cvtpi32_ps(__c, __a);
2959
+ return __builtin_convertvector(
2960
+ __builtin_shufflevector((__v2si)__a, (__v2si)__b,
2961
+ 0, 1, 2, 3), __v4sf);
2863
2962
  }
2864
2963
 
2865
2964
  /// Converts each single-precision floating-point element of a 128-bit
@@ -2879,16 +2978,11 @@ _mm_cvtpi32x2_ps(__m64 __a, __m64 __b)
2879
2978
  /// A 128-bit floating-point vector of [4 x float].
2880
2979
  /// \returns A 64-bit integer vector of [4 x i16] containing the converted
2881
2980
  /// values.
2882
- static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
2981
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_SSE2
2883
2982
  _mm_cvtps_pi16(__m128 __a)
2884
2983
  {
2885
- __m64 __b, __c;
2886
-
2887
- __b = _mm_cvtps_pi32(__a);
2888
- __a = _mm_movehl_ps(__a, __a);
2889
- __c = _mm_cvtps_pi32(__a);
2890
-
2891
- return _mm_packs_pi32(__b, __c);
2984
+ return __trunc64(__builtin_ia32_packssdw128(
2985
+ (__v4si)__builtin_ia32_cvtps2dq((__v4sf)__a), (__v4si)_mm_setzero_ps()));
2892
2986
  }
2893
2987
 
2894
2988
  /// Converts each single-precision floating-point element of a 128-bit
@@ -2909,7 +3003,7 @@ _mm_cvtps_pi16(__m128 __a)
2909
3003
  /// 128-bit floating-point vector of [4 x float].
2910
3004
  /// \returns A 64-bit integer vector of [8 x i8]. The lower 32 bits contain the
2911
3005
  /// converted values and the uppper 32 bits are set to zero.
2912
- static __inline__ __m64 __DEFAULT_FN_ATTRS_MMX
3006
+ static __inline__ __m64 __DEFAULT_FN_ATTRS_SSE2
2913
3007
  _mm_cvtps_pi8(__m128 __a)
2914
3008
  {
2915
3009
  __m64 __b, __c;
@@ -2940,6 +3034,85 @@ _mm_movemask_ps(__m128 __a)
2940
3034
  return __builtin_ia32_movmskps((__v4sf)__a);
2941
3035
  }
2942
3036
 
3037
+ /* Compare */
3038
+ #define _CMP_EQ_OQ 0x00 /* Equal (ordered, non-signaling) */
3039
+ #define _CMP_LT_OS 0x01 /* Less-than (ordered, signaling) */
3040
+ #define _CMP_LE_OS 0x02 /* Less-than-or-equal (ordered, signaling) */
3041
+ #define _CMP_UNORD_Q 0x03 /* Unordered (non-signaling) */
3042
+ #define _CMP_NEQ_UQ 0x04 /* Not-equal (unordered, non-signaling) */
3043
+ #define _CMP_NLT_US 0x05 /* Not-less-than (unordered, signaling) */
3044
+ #define _CMP_NLE_US 0x06 /* Not-less-than-or-equal (unordered, signaling) */
3045
+ #define _CMP_ORD_Q 0x07 /* Ordered (non-signaling) */
3046
+
3047
+ /// Compares each of the corresponding values of two 128-bit vectors of
3048
+ /// [4 x float], using the operation specified by the immediate integer
3049
+ /// operand.
3050
+ ///
3051
+ /// Each comparison returns 0x0 for false, 0xFFFFFFFF for true.
3052
+ /// If either value in a comparison is NaN, comparisons that are ordered
3053
+ /// return false, and comparisons that are unordered return true.
3054
+ ///
3055
+ /// \headerfile <x86intrin.h>
3056
+ ///
3057
+ /// \code
3058
+ /// __m128 _mm_cmp_ps(__m128 a, __m128 b, const int c);
3059
+ /// \endcode
3060
+ ///
3061
+ /// This intrinsic corresponds to the <c> (V)CMPPS </c> instruction.
3062
+ ///
3063
+ /// \param a
3064
+ /// A 128-bit vector of [4 x float].
3065
+ /// \param b
3066
+ /// A 128-bit vector of [4 x float].
3067
+ /// \param c
3068
+ /// An immediate integer operand, with bits [4:0] specifying which comparison
3069
+ /// operation to use: \n
3070
+ /// 0x00: Equal (ordered, non-signaling) \n
3071
+ /// 0x01: Less-than (ordered, signaling) \n
3072
+ /// 0x02: Less-than-or-equal (ordered, signaling) \n
3073
+ /// 0x03: Unordered (non-signaling) \n
3074
+ /// 0x04: Not-equal (unordered, non-signaling) \n
3075
+ /// 0x05: Not-less-than (unordered, signaling) \n
3076
+ /// 0x06: Not-less-than-or-equal (unordered, signaling) \n
3077
+ /// 0x07: Ordered (non-signaling) \n
3078
+ /// \returns A 128-bit vector of [4 x float] containing the comparison results.
3079
+ #define _mm_cmp_ps(a, b, c) \
3080
+ ((__m128)__builtin_ia32_cmpps((__v4sf)(__m128)(a), (__v4sf)(__m128)(b), (c)))
3081
+
3082
+ /// Compares each of the corresponding scalar values of two 128-bit
3083
+ /// vectors of [4 x float], using the operation specified by the immediate
3084
+ /// integer operand.
3085
+ ///
3086
+ /// Each comparison returns 0x0 for false, 0xFFFFFFFF for true.
3087
+ /// If either value in a comparison is NaN, comparisons that are ordered
3088
+ /// return false, and comparisons that are unordered return true.
3089
+ ///
3090
+ /// \headerfile <x86intrin.h>
3091
+ ///
3092
+ /// \code
3093
+ /// __m128 _mm_cmp_ss(__m128 a, __m128 b, const int c);
3094
+ /// \endcode
3095
+ ///
3096
+ /// This intrinsic corresponds to the <c> (V)CMPSS </c> instruction.
3097
+ ///
3098
+ /// \param a
3099
+ /// A 128-bit vector of [4 x float].
3100
+ /// \param b
3101
+ /// A 128-bit vector of [4 x float].
3102
+ /// \param c
3103
+ /// An immediate integer operand, with bits [4:0] specifying which comparison
3104
+ /// operation to use: \n
3105
+ /// 0x00: Equal (ordered, non-signaling) \n
3106
+ /// 0x01: Less-than (ordered, signaling) \n
3107
+ /// 0x02: Less-than-or-equal (ordered, signaling) \n
3108
+ /// 0x03: Unordered (non-signaling) \n
3109
+ /// 0x04: Not-equal (unordered, non-signaling) \n
3110
+ /// 0x05: Not-less-than (unordered, signaling) \n
3111
+ /// 0x06: Not-less-than-or-equal (unordered, signaling) \n
3112
+ /// 0x07: Ordered (non-signaling) \n
3113
+ /// \returns A 128-bit vector of [4 x float] containing the comparison results.
3114
+ #define _mm_cmp_ss(a, b, c) \
3115
+ ((__m128)__builtin_ia32_cmpss((__v4sf)(__m128)(a), (__v4sf)(__m128)(b), (c)))
2943
3116
 
2944
3117
  #define _MM_ALIGN16 __attribute__((aligned(16)))
2945
3118
 
@@ -3010,8 +3183,14 @@ do { \
3010
3183
  #define _m_psadbw _mm_sad_pu8
3011
3184
  #define _m_ _mm_
3012
3185
 
3186
+ #undef __trunc64
3187
+ #undef __zext128
3188
+ #undef __anyext128
3189
+ #undef __zeroupper64
3013
3190
  #undef __DEFAULT_FN_ATTRS
3014
- #undef __DEFAULT_FN_ATTRS_MMX
3191
+ #undef __DEFAULT_FN_ATTRS_CONSTEXPR
3192
+ #undef __DEFAULT_FN_ATTRS_SSE2
3193
+ #undef __DEFAULT_FN_ATTRS_SSE2_CONSTEXPR
3015
3194
 
3016
3195
  /* Ugly hack for backwards-compatibility (compatible with gcc) */
3017
3196
  #if defined(__SSE2__) && !__building_module(_Builtin_intrinsics)