@cpp-linter/clang-tidy-darwin-x64 14.0.0 → 17.0.6

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 (227) hide show
  1. package/README.md +2 -2
  2. package/bin/clang-tidy +2 -2
  3. package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_intrinsics.h +198 -7
  4. package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_math.h +1 -1
  5. package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_texture_intrinsics.h +2 -0
  6. package/lib/clang/{14.0.0 → 17}/include/__clang_hip_cmath.h +1 -1
  7. package/lib/clang/{14.0.0 → 17}/include/__clang_hip_libdevice_declares.h +37 -30
  8. package/lib/clang/{14.0.0 → 17}/include/__clang_hip_math.h +66 -84
  9. package/lib/clang/{14.0.0 → 17}/include/__clang_hip_runtime_wrapper.h +14 -0
  10. package/lib/clang/17/include/__clang_hip_stdlib.h +43 -0
  11. package/lib/clang/{14.0.0 → 17}/include/__wmmintrin_pclmul.h +10 -10
  12. package/lib/clang/17/include/adxintrin.h +227 -0
  13. package/lib/clang/{14.0.0 → 17}/include/altivec.h +597 -346
  14. package/lib/clang/17/include/amxcomplexintrin.h +169 -0
  15. package/lib/clang/17/include/amxfp16intrin.h +58 -0
  16. package/lib/clang/{14.0.0 → 17}/include/amxintrin.h +32 -2
  17. package/lib/clang/{14.0.0 → 17}/include/arm_acle.h +86 -81
  18. package/lib/clang/{14.0.0 → 17}/include/arm_fp16.h +90 -90
  19. package/lib/clang/{14.0.0 → 17}/include/arm_neon.h +28567 -28574
  20. package/lib/clang/{14.0.0 → 17}/include/arm_neon_sve_bridge.h +0 -2
  21. package/lib/clang/17/include/arm_sme_draft_spec_subject_to_change.h +642 -0
  22. package/lib/clang/{14.0.0 → 17}/include/arm_sve.h +7916 -8009
  23. package/lib/clang/17/include/avx2intrin.h +5263 -0
  24. package/lib/clang/{14.0.0 → 17}/include/avx512bf16intrin.h +18 -15
  25. package/lib/clang/{14.0.0 → 17}/include/avx512bwintrin.h +12 -12
  26. package/lib/clang/{14.0.0 → 17}/include/avx512fintrin.h +95 -82
  27. package/lib/clang/{14.0.0 → 17}/include/avx512fp16intrin.h +18 -17
  28. package/lib/clang/{14.0.0 → 17}/include/avx512ifmavlintrin.h +13 -27
  29. package/lib/clang/{14.0.0 → 17}/include/avx512vlbf16intrin.h +31 -38
  30. package/lib/clang/{14.0.0 → 17}/include/avx512vlbwintrin.h +360 -8
  31. package/lib/clang/{14.0.0 → 17}/include/avx512vlfp16intrin.h +3 -0
  32. package/lib/clang/{14.0.0 → 17}/include/avx512vlintrin.h +81 -95
  33. package/lib/clang/{14.0.0 → 17}/include/avx512vlvnniintrin.h +16 -16
  34. package/lib/clang/17/include/avxifmaintrin.h +177 -0
  35. package/lib/clang/{14.0.0 → 17}/include/avxintrin.h +97 -39
  36. package/lib/clang/17/include/avxneconvertintrin.h +484 -0
  37. package/lib/clang/17/include/avxvnniint16intrin.h +473 -0
  38. package/lib/clang/17/include/avxvnniint8intrin.h +471 -0
  39. package/lib/clang/{14.0.0 → 17}/include/avxvnniintrin.h +16 -16
  40. package/lib/clang/17/include/bmi2intrin.h +255 -0
  41. package/lib/clang/{14.0.0 → 17}/include/bmiintrin.h +6 -2
  42. package/lib/clang/{14.0.0 → 17}/include/cetintrin.h +12 -6
  43. package/lib/clang/{14.0.0 → 17}/include/clflushoptintrin.h +9 -0
  44. package/lib/clang/{14.0.0 → 17}/include/clzerointrin.h +7 -5
  45. package/lib/clang/17/include/cmpccxaddintrin.h +70 -0
  46. package/lib/clang/{14.0.0 → 17}/include/cpuid.h +12 -1
  47. package/lib/clang/17/include/cuda_wrappers/bits/basic_string.h +9 -0
  48. package/lib/clang/17/include/cuda_wrappers/bits/basic_string.tcc +9 -0
  49. package/lib/clang/17/include/cuda_wrappers/bits/shared_ptr_base.h +9 -0
  50. package/lib/clang/17/include/cuda_wrappers/cmath +90 -0
  51. package/lib/clang/{14.0.0 → 17}/include/emmintrin.h +559 -769
  52. package/lib/clang/{14.0.0 → 17}/include/f16cintrin.h +3 -3
  53. package/lib/clang/{14.0.0 → 17}/include/float.h +17 -10
  54. package/lib/clang/17/include/fmaintrin.h +780 -0
  55. package/lib/clang/{14.0.0 → 17}/include/gfniintrin.h +7 -5
  56. package/lib/clang/17/include/hlsl/hlsl_basic_types.h +67 -0
  57. package/lib/clang/17/include/hlsl/hlsl_intrinsics.h +480 -0
  58. package/lib/clang/17/include/hlsl.h +15 -0
  59. package/lib/clang/{14.0.0 → 17}/include/hresetintrin.h +2 -2
  60. package/lib/clang/{14.0.0 → 17}/include/ia32intrin.h +11 -11
  61. package/lib/clang/{14.0.0 → 17}/include/immintrin.h +166 -26
  62. package/lib/clang/{14.0.0 → 17}/include/intrin.h +12 -21
  63. package/lib/clang/{14.0.0 → 17}/include/keylockerintrin.h +22 -22
  64. package/lib/clang/17/include/larchintrin.h +234 -0
  65. package/lib/clang/{14.0.0 → 17}/include/limits.h +8 -3
  66. package/lib/clang/17/include/llvm_libc_wrappers/ctype.h +85 -0
  67. package/lib/clang/17/include/llvm_libc_wrappers/inttypes.h +34 -0
  68. package/lib/clang/17/include/llvm_libc_wrappers/stdio.h +34 -0
  69. package/lib/clang/17/include/llvm_libc_wrappers/stdlib.h +42 -0
  70. package/lib/clang/17/include/llvm_libc_wrappers/string.h +37 -0
  71. package/lib/clang/{14.0.0 → 17}/include/mm_malloc.h +3 -3
  72. package/lib/clang/17/include/mwaitxintrin.h +62 -0
  73. package/lib/clang/{14.0.0 → 17}/include/opencl-c-base.h +32 -0
  74. package/lib/clang/{14.0.0 → 17}/include/opencl-c.h +6904 -7100
  75. package/lib/clang/{14.0.0 → 17}/include/openmp_wrappers/__clang_openmp_device_functions.h +0 -1
  76. package/lib/clang/{14.0.0 → 17}/include/openmp_wrappers/new +1 -1
  77. package/lib/clang/{14.0.0 → 17}/include/pmmintrin.h +13 -7
  78. package/lib/clang/17/include/ppc_wrappers/bmi2intrin.h +134 -0
  79. package/lib/clang/17/include/ppc_wrappers/bmiintrin.h +165 -0
  80. package/lib/clang/17/include/ppc_wrappers/emmintrin.h +2269 -0
  81. package/lib/clang/17/include/ppc_wrappers/immintrin.h +27 -0
  82. package/lib/clang/{14.0.0 → 17}/include/ppc_wrappers/mm_malloc.h +12 -17
  83. package/lib/clang/{14.0.0 → 17}/include/ppc_wrappers/mmintrin.h +389 -387
  84. package/lib/clang/17/include/ppc_wrappers/pmmintrin.h +145 -0
  85. package/lib/clang/17/include/ppc_wrappers/smmintrin.h +663 -0
  86. package/lib/clang/17/include/ppc_wrappers/tmmintrin.h +453 -0
  87. package/lib/clang/{14.0.0/include/stdnoreturn.h → 17/include/ppc_wrappers/x86gprintrin.h} +7 -6
  88. package/lib/clang/17/include/ppc_wrappers/x86intrin.h +28 -0
  89. package/lib/clang/17/include/ppc_wrappers/xmmintrin.h +1827 -0
  90. package/lib/clang/17/include/prfchiintrin.h +61 -0
  91. package/lib/clang/17/include/raointintrin.h +203 -0
  92. package/lib/clang/17/include/rdpruintrin.h +57 -0
  93. package/lib/clang/17/include/rdseedintrin.h +105 -0
  94. package/lib/clang/17/include/riscv_ntlh.h +28 -0
  95. package/lib/clang/17/include/riscv_vector.h +400 -0
  96. package/lib/clang/{14.0.0 → 17}/include/rtmintrin.h +1 -1
  97. package/lib/clang/17/include/sha512intrin.h +200 -0
  98. package/lib/clang/17/include/shaintrin.h +189 -0
  99. package/lib/clang/17/include/sifive_vector.h +16 -0
  100. package/lib/clang/17/include/sm3intrin.h +238 -0
  101. package/lib/clang/17/include/sm4intrin.h +269 -0
  102. package/lib/clang/{14.0.0 → 17}/include/smmintrin.h +236 -259
  103. package/lib/clang/{14.0.0 → 17}/include/stdalign.h +5 -0
  104. package/lib/clang/{14.0.0 → 17}/include/stdarg.h +23 -7
  105. package/lib/clang/{14.0.0 → 17}/include/stdatomic.h +15 -8
  106. package/lib/clang/{14.0.0 → 17}/include/stdbool.h +10 -7
  107. package/lib/clang/{14.0.0 → 17}/include/stddef.h +14 -2
  108. package/lib/clang/{14.0.0 → 17}/include/stdint.h +158 -40
  109. package/lib/clang/17/include/stdnoreturn.h +29 -0
  110. package/lib/clang/{14.0.0 → 17}/include/uintrintrin.h +8 -8
  111. package/lib/clang/{14.0.0 → 17}/include/unwind.h +10 -6
  112. package/lib/clang/17/include/velintrin.h +71 -0
  113. package/lib/clang/17/include/velintrin_approx.h +120 -0
  114. package/lib/clang/17/include/velintrin_gen.h +1257 -0
  115. package/lib/clang/{14.0.0 → 17}/include/wasm_simd128.h +134 -14
  116. package/lib/clang/17/include/x86gprintrin.h +65 -0
  117. package/lib/clang/{14.0.0 → 17}/include/x86intrin.h +4 -0
  118. package/lib/clang/{14.0.0 → 17}/include/xmmintrin.h +10 -5
  119. package/lib/clang/17/include/xsavecintrin.h +84 -0
  120. package/package.json +6 -6
  121. package/lib/clang/14.0.0/include/adxintrin.h +0 -72
  122. package/lib/clang/14.0.0/include/avx2intrin.h +0 -1148
  123. package/lib/clang/14.0.0/include/bmi2intrin.h +0 -81
  124. package/lib/clang/14.0.0/include/fmaintrin.h +0 -216
  125. package/lib/clang/14.0.0/include/mwaitxintrin.h +0 -33
  126. package/lib/clang/14.0.0/include/ppc_wrappers/emmintrin.h +0 -2325
  127. package/lib/clang/14.0.0/include/ppc_wrappers/pmmintrin.h +0 -151
  128. package/lib/clang/14.0.0/include/ppc_wrappers/smmintrin.h +0 -110
  129. package/lib/clang/14.0.0/include/ppc_wrappers/tmmintrin.h +0 -496
  130. package/lib/clang/14.0.0/include/ppc_wrappers/xmmintrin.h +0 -1844
  131. package/lib/clang/14.0.0/include/rdseedintrin.h +0 -42
  132. package/lib/clang/14.0.0/include/riscv_vector.h +0 -95423
  133. package/lib/clang/14.0.0/include/shaintrin.h +0 -61
  134. package/lib/clang/14.0.0/include/x86gprintrin.h +0 -35
  135. package/lib/clang/14.0.0/include/xsavecintrin.h +0 -34
  136. /package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_builtin_vars.h +0 -0
  137. /package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_cmath.h +0 -0
  138. /package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_complex_builtins.h +0 -0
  139. /package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_device_functions.h +0 -0
  140. /package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_libdevice_declares.h +0 -0
  141. /package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_math_forward_declares.h +0 -0
  142. /package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_runtime_wrapper.h +0 -0
  143. /package/lib/clang/{14.0.0 → 17}/include/__stddef_max_align_t.h +0 -0
  144. /package/lib/clang/{14.0.0 → 17}/include/__wmmintrin_aes.h +0 -0
  145. /package/lib/clang/{14.0.0 → 17}/include/ammintrin.h +0 -0
  146. /package/lib/clang/{14.0.0 → 17}/include/arm64intr.h +0 -0
  147. /package/lib/clang/{14.0.0 → 17}/include/arm_bf16.h +0 -0
  148. /package/lib/clang/{14.0.0 → 17}/include/arm_cde.h +0 -0
  149. /package/lib/clang/{14.0.0 → 17}/include/arm_cmse.h +0 -0
  150. /package/lib/clang/{14.0.0 → 17}/include/arm_mve.h +0 -0
  151. /package/lib/clang/{14.0.0 → 17}/include/armintr.h +0 -0
  152. /package/lib/clang/{14.0.0 → 17}/include/avx512bitalgintrin.h +0 -0
  153. /package/lib/clang/{14.0.0 → 17}/include/avx512cdintrin.h +0 -0
  154. /package/lib/clang/{14.0.0 → 17}/include/avx512dqintrin.h +0 -0
  155. /package/lib/clang/{14.0.0 → 17}/include/avx512erintrin.h +0 -0
  156. /package/lib/clang/{14.0.0 → 17}/include/avx512ifmaintrin.h +0 -0
  157. /package/lib/clang/{14.0.0 → 17}/include/avx512pfintrin.h +0 -0
  158. /package/lib/clang/{14.0.0 → 17}/include/avx512vbmi2intrin.h +0 -0
  159. /package/lib/clang/{14.0.0 → 17}/include/avx512vbmiintrin.h +0 -0
  160. /package/lib/clang/{14.0.0 → 17}/include/avx512vbmivlintrin.h +0 -0
  161. /package/lib/clang/{14.0.0 → 17}/include/avx512vlbitalgintrin.h +0 -0
  162. /package/lib/clang/{14.0.0 → 17}/include/avx512vlcdintrin.h +0 -0
  163. /package/lib/clang/{14.0.0 → 17}/include/avx512vldqintrin.h +0 -0
  164. /package/lib/clang/{14.0.0 → 17}/include/avx512vlvbmi2intrin.h +0 -0
  165. /package/lib/clang/{14.0.0 → 17}/include/avx512vlvp2intersectintrin.h +0 -0
  166. /package/lib/clang/{14.0.0 → 17}/include/avx512vnniintrin.h +0 -0
  167. /package/lib/clang/{14.0.0 → 17}/include/avx512vp2intersectintrin.h +0 -0
  168. /package/lib/clang/{14.0.0 → 17}/include/avx512vpopcntdqintrin.h +0 -0
  169. /package/lib/clang/{14.0.0 → 17}/include/avx512vpopcntdqvlintrin.h +0 -0
  170. /package/lib/clang/{14.0.0 → 17}/include/builtins.h +0 -0
  171. /package/lib/clang/{14.0.0 → 17}/include/cet.h +0 -0
  172. /package/lib/clang/{14.0.0 → 17}/include/cldemoteintrin.h +0 -0
  173. /package/lib/clang/{14.0.0 → 17}/include/clwbintrin.h +0 -0
  174. /package/lib/clang/{14.0.0 → 17}/include/crc32intrin.h +0 -0
  175. /package/lib/clang/{14.0.0 → 17}/include/cuda_wrappers/algorithm +0 -0
  176. /package/lib/clang/{14.0.0 → 17}/include/cuda_wrappers/complex +0 -0
  177. /package/lib/clang/{14.0.0 → 17}/include/cuda_wrappers/new +0 -0
  178. /package/lib/clang/{14.0.0 → 17}/include/enqcmdintrin.h +0 -0
  179. /package/lib/clang/{14.0.0 → 17}/include/fma4intrin.h +0 -0
  180. /package/lib/clang/{14.0.0 → 17}/include/fxsrintrin.h +0 -0
  181. /package/lib/clang/{14.0.0 → 17}/include/hexagon_circ_brev_intrinsics.h +0 -0
  182. /package/lib/clang/{14.0.0 → 17}/include/hexagon_protos.h +0 -0
  183. /package/lib/clang/{14.0.0 → 17}/include/hexagon_types.h +0 -0
  184. /package/lib/clang/{14.0.0 → 17}/include/htmintrin.h +0 -0
  185. /package/lib/clang/{14.0.0 → 17}/include/htmxlintrin.h +0 -0
  186. /package/lib/clang/{14.0.0 → 17}/include/hvx_hexagon_protos.h +0 -0
  187. /package/lib/clang/{14.0.0 → 17}/include/inttypes.h +0 -0
  188. /package/lib/clang/{14.0.0 → 17}/include/invpcidintrin.h +0 -0
  189. /package/lib/clang/{14.0.0 → 17}/include/iso646.h +0 -0
  190. /package/lib/clang/{14.0.0 → 17}/include/lwpintrin.h +0 -0
  191. /package/lib/clang/{14.0.0 → 17}/include/lzcntintrin.h +0 -0
  192. /package/lib/clang/{14.0.0 → 17}/include/mm3dnow.h +0 -0
  193. /package/lib/clang/{14.0.0 → 17}/include/mmintrin.h +0 -0
  194. /package/lib/clang/{14.0.0 → 17}/include/module.modulemap +0 -0
  195. /package/lib/clang/{14.0.0 → 17}/include/movdirintrin.h +0 -0
  196. /package/lib/clang/{14.0.0 → 17}/include/msa.h +0 -0
  197. /package/lib/clang/{14.0.0 → 17}/include/nmmintrin.h +0 -0
  198. /package/lib/clang/{14.0.0 → 17}/include/openmp_wrappers/cmath +0 -0
  199. /package/lib/clang/{14.0.0 → 17}/include/openmp_wrappers/complex +0 -0
  200. /package/lib/clang/{14.0.0 → 17}/include/openmp_wrappers/complex.h +0 -0
  201. /package/lib/clang/{14.0.0 → 17}/include/openmp_wrappers/complex_cmath.h +0 -0
  202. /package/lib/clang/{14.0.0 → 17}/include/openmp_wrappers/math.h +0 -0
  203. /package/lib/clang/{14.0.0 → 17}/include/pconfigintrin.h +0 -0
  204. /package/lib/clang/{14.0.0 → 17}/include/pkuintrin.h +0 -0
  205. /package/lib/clang/{14.0.0 → 17}/include/popcntintrin.h +0 -0
  206. /package/lib/clang/{14.0.0 → 17}/include/prfchwintrin.h +0 -0
  207. /package/lib/clang/{14.0.0 → 17}/include/ptwriteintrin.h +0 -0
  208. /package/lib/clang/{14.0.0 → 17}/include/s390intrin.h +0 -0
  209. /package/lib/clang/{14.0.0 → 17}/include/serializeintrin.h +0 -0
  210. /package/lib/clang/{14.0.0 → 17}/include/sgxintrin.h +0 -0
  211. /package/lib/clang/{14.0.0 → 17}/include/tbmintrin.h +0 -0
  212. /package/lib/clang/{14.0.0 → 17}/include/tgmath.h +0 -0
  213. /package/lib/clang/{14.0.0 → 17}/include/tmmintrin.h +0 -0
  214. /package/lib/clang/{14.0.0 → 17}/include/tsxldtrkintrin.h +0 -0
  215. /package/lib/clang/{14.0.0 → 17}/include/vadefs.h +0 -0
  216. /package/lib/clang/{14.0.0 → 17}/include/vaesintrin.h +0 -0
  217. /package/lib/clang/{14.0.0 → 17}/include/varargs.h +0 -0
  218. /package/lib/clang/{14.0.0 → 17}/include/vecintrin.h +0 -0
  219. /package/lib/clang/{14.0.0 → 17}/include/vpclmulqdqintrin.h +0 -0
  220. /package/lib/clang/{14.0.0 → 17}/include/waitpkgintrin.h +0 -0
  221. /package/lib/clang/{14.0.0 → 17}/include/wbnoinvdintrin.h +0 -0
  222. /package/lib/clang/{14.0.0 → 17}/include/wmmintrin.h +0 -0
  223. /package/lib/clang/{14.0.0 → 17}/include/xopintrin.h +0 -0
  224. /package/lib/clang/{14.0.0 → 17}/include/xsaveintrin.h +0 -0
  225. /package/lib/clang/{14.0.0 → 17}/include/xsaveoptintrin.h +0 -0
  226. /package/lib/clang/{14.0.0 → 17}/include/xsavesintrin.h +0 -0
  227. /package/lib/clang/{14.0.0 → 17}/include/xtestintrin.h +0 -0
@@ -311,7 +311,7 @@ vec_add(vector unsigned __int128 __a, vector unsigned __int128 __b) {
311
311
 
312
312
  static __inline__ vector unsigned char __attribute__((__always_inline__))
313
313
  vec_add_u128(vector unsigned char __a, vector unsigned char __b) {
314
- return __builtin_altivec_vadduqm(__a, __b);
314
+ return (vector unsigned char)__builtin_altivec_vadduqm(__a, __b);
315
315
  }
316
316
  #elif defined(__VSX__)
317
317
  static __inline__ vector signed long long __ATTRS_o_ai
@@ -325,9 +325,9 @@ vec_add(vector signed long long __a, vector signed long long __b) {
325
325
  (vector unsigned int)__a + (vector unsigned int)__b;
326
326
  vector unsigned int __carry = __builtin_altivec_vaddcuw(
327
327
  (vector unsigned int)__a, (vector unsigned int)__b);
328
- __carry = __builtin_shufflevector((vector unsigned char)__carry,
329
- (vector unsigned char)__carry, 0, 0, 0, 7,
330
- 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0);
328
+ __carry = (vector unsigned int)__builtin_shufflevector(
329
+ (vector unsigned char)__carry, (vector unsigned char)__carry, 0, 0, 0, 7,
330
+ 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0);
331
331
  return (vector signed long long)(__res + __carry);
332
332
  #endif
333
333
  }
@@ -358,7 +358,9 @@ static __inline__ vector double __ATTRS_o_ai vec_add(vector double __a,
358
358
  static __inline__ vector signed __int128 __ATTRS_o_ai
359
359
  vec_adde(vector signed __int128 __a, vector signed __int128 __b,
360
360
  vector signed __int128 __c) {
361
- return __builtin_altivec_vaddeuqm(__a, __b, __c);
361
+ return (vector signed __int128)__builtin_altivec_vaddeuqm(
362
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b,
363
+ (vector unsigned __int128)__c);
362
364
  }
363
365
 
364
366
  static __inline__ vector unsigned __int128 __ATTRS_o_ai
@@ -371,7 +373,9 @@ vec_adde(vector unsigned __int128 __a, vector unsigned __int128 __b,
371
373
  static __inline__ vector unsigned char __attribute__((__always_inline__))
372
374
  vec_adde_u128(vector unsigned char __a, vector unsigned char __b,
373
375
  vector unsigned char __c) {
374
- return (vector unsigned char)__builtin_altivec_vaddeuqm(__a, __b, __c);
376
+ return (vector unsigned char)__builtin_altivec_vaddeuqm_c(
377
+ (vector unsigned char)__a, (vector unsigned char)__b,
378
+ (vector unsigned char)__c);
375
379
  }
376
380
  #endif
377
381
 
@@ -398,7 +402,9 @@ vec_adde(vector unsigned int __a, vector unsigned int __b,
398
402
  static __inline__ vector signed __int128 __ATTRS_o_ai
399
403
  vec_addec(vector signed __int128 __a, vector signed __int128 __b,
400
404
  vector signed __int128 __c) {
401
- return __builtin_altivec_vaddecuq(__a, __b, __c);
405
+ return (vector signed __int128)__builtin_altivec_vaddecuq(
406
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b,
407
+ (vector unsigned __int128)__c);
402
408
  }
403
409
 
404
410
  static __inline__ vector unsigned __int128 __ATTRS_o_ai
@@ -411,7 +417,9 @@ vec_addec(vector unsigned __int128 __a, vector unsigned __int128 __b,
411
417
  static __inline__ vector unsigned char __attribute__((__always_inline__))
412
418
  vec_addec_u128(vector unsigned char __a, vector unsigned char __b,
413
419
  vector unsigned char __c) {
414
- return (vector unsigned char)__builtin_altivec_vaddecuq(__a, __b, __c);
420
+ return (vector unsigned char)__builtin_altivec_vaddecuq_c(
421
+ (vector unsigned char)__a, (vector unsigned char)__b,
422
+ (vector unsigned char)__c);
415
423
  }
416
424
 
417
425
  #ifdef __powerpc64__
@@ -600,7 +608,8 @@ vec_addc(vector unsigned __int128 __a, vector unsigned __int128 __b) {
600
608
 
601
609
  static __inline__ vector unsigned char __attribute__((__always_inline__))
602
610
  vec_addc_u128(vector unsigned char __a, vector unsigned char __b) {
603
- return (vector unsigned char)__builtin_altivec_vaddcuq(__a, __b);
611
+ return (vector unsigned char)__builtin_altivec_vaddcuq_c(
612
+ (vector unsigned char)__a, (vector unsigned char)__b);
604
613
  }
605
614
  #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
606
615
 
@@ -824,7 +833,9 @@ vec_vadduqm(vector unsigned __int128 __a, vector unsigned __int128 __b) {
824
833
  static __inline__ vector signed __int128 __ATTRS_o_ai
825
834
  vec_vaddeuqm(vector signed __int128 __a, vector signed __int128 __b,
826
835
  vector signed __int128 __c) {
827
- return __builtin_altivec_vaddeuqm(__a, __b, __c);
836
+ return (vector signed __int128)__builtin_altivec_vaddeuqm(
837
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b,
838
+ (vector unsigned __int128)__c);
828
839
  }
829
840
 
830
841
  static __inline__ vector unsigned __int128 __ATTRS_o_ai
@@ -837,7 +848,8 @@ vec_vaddeuqm(vector unsigned __int128 __a, vector unsigned __int128 __b,
837
848
 
838
849
  static __inline__ vector signed __int128 __ATTRS_o_ai
839
850
  vec_vaddcuq(vector signed __int128 __a, vector signed __int128 __b) {
840
- return __builtin_altivec_vaddcuq(__a, __b);
851
+ return (vector signed __int128)__builtin_altivec_vaddcuq(
852
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b);
841
853
  }
842
854
 
843
855
  static __inline__ vector unsigned __int128 __ATTRS_o_ai
@@ -850,7 +862,9 @@ vec_vaddcuq(vector unsigned __int128 __a, vector unsigned __int128 __b) {
850
862
  static __inline__ vector signed __int128 __ATTRS_o_ai
851
863
  vec_vaddecuq(vector signed __int128 __a, vector signed __int128 __b,
852
864
  vector signed __int128 __c) {
853
- return __builtin_altivec_vaddecuq(__a, __b, __c);
865
+ return (vector signed __int128)__builtin_altivec_vaddecuq(
866
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b,
867
+ (vector unsigned __int128)__c);
854
868
  }
855
869
 
856
870
  static __inline__ vector unsigned __int128 __ATTRS_o_ai
@@ -1806,18 +1820,19 @@ vec_cmpeq(vector double __a, vector double __b) {
1806
1820
  static __inline__ vector bool __int128 __ATTRS_o_ai
1807
1821
  vec_cmpeq(vector signed __int128 __a, vector signed __int128 __b) {
1808
1822
  return (vector bool __int128)__builtin_altivec_vcmpequq(
1809
- (vector bool __int128)__a, (vector bool __int128)__b);
1823
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b);
1810
1824
  }
1811
1825
 
1812
1826
  static __inline__ vector bool __int128 __ATTRS_o_ai
1813
1827
  vec_cmpeq(vector unsigned __int128 __a, vector unsigned __int128 __b) {
1814
1828
  return (vector bool __int128)__builtin_altivec_vcmpequq(
1815
- (vector bool __int128)__a, (vector bool __int128)__b);
1829
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b);
1816
1830
  }
1817
1831
 
1818
1832
  static __inline__ vector bool __int128 __ATTRS_o_ai
1819
1833
  vec_cmpeq(vector bool __int128 __a, vector bool __int128 __b) {
1820
- return (vector bool __int128)__builtin_altivec_vcmpequq(__a, __b);
1834
+ return (vector bool __int128)__builtin_altivec_vcmpequq(
1835
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b);
1821
1836
  }
1822
1837
  #endif
1823
1838
 
@@ -1887,19 +1902,20 @@ vec_cmpne(vector float __a, vector float __b) {
1887
1902
  #if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
1888
1903
  static __inline__ vector bool __int128 __ATTRS_o_ai
1889
1904
  vec_cmpne(vector unsigned __int128 __a, vector unsigned __int128 __b) {
1890
- return (vector bool __int128) ~(__builtin_altivec_vcmpequq(
1891
- (vector bool __int128)__a, (vector bool __int128)__b));
1905
+ return (vector bool __int128)~(__builtin_altivec_vcmpequq(
1906
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b));
1892
1907
  }
1893
1908
 
1894
1909
  static __inline__ vector bool __int128 __ATTRS_o_ai
1895
1910
  vec_cmpne(vector signed __int128 __a, vector signed __int128 __b) {
1896
- return (vector bool __int128) ~(__builtin_altivec_vcmpequq(
1897
- (vector bool __int128)__a, (vector bool __int128)__b));
1911
+ return (vector bool __int128)~(__builtin_altivec_vcmpequq(
1912
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b));
1898
1913
  }
1899
1914
 
1900
1915
  static __inline__ vector bool __int128 __ATTRS_o_ai
1901
1916
  vec_cmpne(vector bool __int128 __a, vector bool __int128 __b) {
1902
- return (vector bool __int128) ~(__builtin_altivec_vcmpequq(__a, __b));
1917
+ return (vector bool __int128)~(__builtin_altivec_vcmpequq(
1918
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b));
1903
1919
  }
1904
1920
  #endif
1905
1921
 
@@ -1944,16 +1960,16 @@ vec_cmpnez(vector unsigned int __a, vector unsigned int __b) {
1944
1960
  static __inline__ signed int __ATTRS_o_ai
1945
1961
  vec_cntlz_lsbb(vector signed char __a) {
1946
1962
  #ifdef __LITTLE_ENDIAN__
1947
- return __builtin_altivec_vctzlsbb(__a);
1963
+ return __builtin_altivec_vctzlsbb((vector unsigned char)__a);
1948
1964
  #else
1949
- return __builtin_altivec_vclzlsbb(__a);
1965
+ return __builtin_altivec_vclzlsbb((vector unsigned char)__a);
1950
1966
  #endif
1951
1967
  }
1952
1968
 
1953
1969
  static __inline__ signed int __ATTRS_o_ai
1954
1970
  vec_cntlz_lsbb(vector unsigned char __a) {
1955
1971
  #ifdef __LITTLE_ENDIAN__
1956
- return __builtin_altivec_vctzlsbb(__a);
1972
+ return __builtin_altivec_vctzlsbb((vector unsigned char)__a);
1957
1973
  #else
1958
1974
  return __builtin_altivec_vclzlsbb(__a);
1959
1975
  #endif
@@ -1962,9 +1978,9 @@ vec_cntlz_lsbb(vector unsigned char __a) {
1962
1978
  static __inline__ signed int __ATTRS_o_ai
1963
1979
  vec_cnttz_lsbb(vector signed char __a) {
1964
1980
  #ifdef __LITTLE_ENDIAN__
1965
- return __builtin_altivec_vclzlsbb(__a);
1981
+ return __builtin_altivec_vclzlsbb((vector unsigned char)__a);
1966
1982
  #else
1967
- return __builtin_altivec_vctzlsbb(__a);
1983
+ return __builtin_altivec_vctzlsbb((vector unsigned char)__a);
1968
1984
  #endif
1969
1985
  }
1970
1986
 
@@ -1984,7 +2000,7 @@ vec_parity_lsbb(vector unsigned int __a) {
1984
2000
 
1985
2001
  static __inline__ vector unsigned int __ATTRS_o_ai
1986
2002
  vec_parity_lsbb(vector signed int __a) {
1987
- return __builtin_altivec_vprtybw(__a);
2003
+ return __builtin_altivec_vprtybw((vector unsigned int)__a);
1988
2004
  }
1989
2005
 
1990
2006
  #ifdef __SIZEOF_INT128__
@@ -1995,7 +2011,7 @@ vec_parity_lsbb(vector unsigned __int128 __a) {
1995
2011
 
1996
2012
  static __inline__ vector unsigned __int128 __ATTRS_o_ai
1997
2013
  vec_parity_lsbb(vector signed __int128 __a) {
1998
- return __builtin_altivec_vprtybq(__a);
2014
+ return __builtin_altivec_vprtybq((vector unsigned __int128)__a);
1999
2015
  }
2000
2016
  #endif
2001
2017
 
@@ -2006,7 +2022,7 @@ vec_parity_lsbb(vector unsigned long long __a) {
2006
2022
 
2007
2023
  static __inline__ vector unsigned long long __ATTRS_o_ai
2008
2024
  vec_parity_lsbb(vector signed long long __a) {
2009
- return __builtin_altivec_vprtybd(__a);
2025
+ return __builtin_altivec_vprtybd((vector unsigned long long)__a);
2010
2026
  }
2011
2027
 
2012
2028
  #else
@@ -2212,14 +2228,12 @@ vec_cmpgt(vector double __a, vector double __b) {
2212
2228
  #if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
2213
2229
  static __inline__ vector bool __int128 __ATTRS_o_ai
2214
2230
  vec_cmpgt(vector signed __int128 __a, vector signed __int128 __b) {
2215
- return (vector bool __int128)__builtin_altivec_vcmpgtsq(
2216
- (vector bool __int128)__a, (vector bool __int128)__b);
2231
+ return (vector bool __int128)__builtin_altivec_vcmpgtsq(__a, __b);
2217
2232
  }
2218
2233
 
2219
2234
  static __inline__ vector bool __int128 __ATTRS_o_ai
2220
2235
  vec_cmpgt(vector unsigned __int128 __a, vector unsigned __int128 __b) {
2221
- return (vector bool __int128)__builtin_altivec_vcmpgtuq(
2222
- (vector bool __int128)__a, (vector bool __int128)__b);
2236
+ return (vector bool __int128)__builtin_altivec_vcmpgtuq(__a, __b);
2223
2237
  }
2224
2238
  #endif
2225
2239
 
@@ -2488,7 +2502,8 @@ vec_cmplt(vector unsigned long long __a, vector unsigned long long __b) {
2488
2502
 
2489
2503
  static __inline__ vector unsigned char __ATTRS_o_ai
2490
2504
  vec_popcnt(vector signed char __a) {
2491
- return __builtin_altivec_vpopcntb(__a);
2505
+ return (vector unsigned char)__builtin_altivec_vpopcntb(
2506
+ (vector unsigned char)__a);
2492
2507
  }
2493
2508
  static __inline__ vector unsigned char __ATTRS_o_ai
2494
2509
  vec_popcnt(vector unsigned char __a) {
@@ -2496,7 +2511,8 @@ vec_popcnt(vector unsigned char __a) {
2496
2511
  }
2497
2512
  static __inline__ vector unsigned short __ATTRS_o_ai
2498
2513
  vec_popcnt(vector signed short __a) {
2499
- return __builtin_altivec_vpopcnth(__a);
2514
+ return (vector unsigned short)__builtin_altivec_vpopcnth(
2515
+ (vector unsigned short)__a);
2500
2516
  }
2501
2517
  static __inline__ vector unsigned short __ATTRS_o_ai
2502
2518
  vec_popcnt(vector unsigned short __a) {
@@ -2504,7 +2520,7 @@ vec_popcnt(vector unsigned short __a) {
2504
2520
  }
2505
2521
  static __inline__ vector unsigned int __ATTRS_o_ai
2506
2522
  vec_popcnt(vector signed int __a) {
2507
- return __builtin_altivec_vpopcntw(__a);
2523
+ return __builtin_altivec_vpopcntw((vector unsigned int)__a);
2508
2524
  }
2509
2525
  static __inline__ vector unsigned int __ATTRS_o_ai
2510
2526
  vec_popcnt(vector unsigned int __a) {
@@ -2512,7 +2528,7 @@ vec_popcnt(vector unsigned int __a) {
2512
2528
  }
2513
2529
  static __inline__ vector unsigned long long __ATTRS_o_ai
2514
2530
  vec_popcnt(vector signed long long __a) {
2515
- return __builtin_altivec_vpopcntd(__a);
2531
+ return __builtin_altivec_vpopcntd((vector unsigned long long)__a);
2516
2532
  }
2517
2533
  static __inline__ vector unsigned long long __ATTRS_o_ai
2518
2534
  vec_popcnt(vector unsigned long long __a) {
@@ -2524,7 +2540,7 @@ vec_popcnt(vector unsigned long long __a) {
2524
2540
 
2525
2541
  static __inline__ vector signed char __ATTRS_o_ai
2526
2542
  vec_cntlz(vector signed char __a) {
2527
- return __builtin_altivec_vclzb(__a);
2543
+ return (vector signed char)__builtin_altivec_vclzb((vector unsigned char)__a);
2528
2544
  }
2529
2545
  static __inline__ vector unsigned char __ATTRS_o_ai
2530
2546
  vec_cntlz(vector unsigned char __a) {
@@ -2532,7 +2548,8 @@ vec_cntlz(vector unsigned char __a) {
2532
2548
  }
2533
2549
  static __inline__ vector signed short __ATTRS_o_ai
2534
2550
  vec_cntlz(vector signed short __a) {
2535
- return __builtin_altivec_vclzh(__a);
2551
+ return (vector signed short)__builtin_altivec_vclzh(
2552
+ (vector unsigned short)__a);
2536
2553
  }
2537
2554
  static __inline__ vector unsigned short __ATTRS_o_ai
2538
2555
  vec_cntlz(vector unsigned short __a) {
@@ -2540,7 +2557,7 @@ vec_cntlz(vector unsigned short __a) {
2540
2557
  }
2541
2558
  static __inline__ vector signed int __ATTRS_o_ai
2542
2559
  vec_cntlz(vector signed int __a) {
2543
- return __builtin_altivec_vclzw(__a);
2560
+ return (vector signed int)__builtin_altivec_vclzw((vector unsigned int)__a);
2544
2561
  }
2545
2562
  static __inline__ vector unsigned int __ATTRS_o_ai
2546
2563
  vec_cntlz(vector unsigned int __a) {
@@ -2548,7 +2565,8 @@ vec_cntlz(vector unsigned int __a) {
2548
2565
  }
2549
2566
  static __inline__ vector signed long long __ATTRS_o_ai
2550
2567
  vec_cntlz(vector signed long long __a) {
2551
- return __builtin_altivec_vclzd(__a);
2568
+ return (vector signed long long)__builtin_altivec_vclzd(
2569
+ (vector unsigned long long)__a);
2552
2570
  }
2553
2571
  static __inline__ vector unsigned long long __ATTRS_o_ai
2554
2572
  vec_cntlz(vector unsigned long long __a) {
@@ -2562,7 +2580,7 @@ vec_cntlz(vector unsigned long long __a) {
2562
2580
 
2563
2581
  static __inline__ vector signed char __ATTRS_o_ai
2564
2582
  vec_cnttz(vector signed char __a) {
2565
- return __builtin_altivec_vctzb(__a);
2583
+ return (vector signed char)__builtin_altivec_vctzb((vector unsigned char)__a);
2566
2584
  }
2567
2585
  static __inline__ vector unsigned char __ATTRS_o_ai
2568
2586
  vec_cnttz(vector unsigned char __a) {
@@ -2570,7 +2588,8 @@ vec_cnttz(vector unsigned char __a) {
2570
2588
  }
2571
2589
  static __inline__ vector signed short __ATTRS_o_ai
2572
2590
  vec_cnttz(vector signed short __a) {
2573
- return __builtin_altivec_vctzh(__a);
2591
+ return (vector signed short)__builtin_altivec_vctzh(
2592
+ (vector unsigned short)__a);
2574
2593
  }
2575
2594
  static __inline__ vector unsigned short __ATTRS_o_ai
2576
2595
  vec_cnttz(vector unsigned short __a) {
@@ -2578,7 +2597,7 @@ vec_cnttz(vector unsigned short __a) {
2578
2597
  }
2579
2598
  static __inline__ vector signed int __ATTRS_o_ai
2580
2599
  vec_cnttz(vector signed int __a) {
2581
- return __builtin_altivec_vctzw(__a);
2600
+ return (vector signed int)__builtin_altivec_vctzw((vector unsigned int)__a);
2582
2601
  }
2583
2602
  static __inline__ vector unsigned int __ATTRS_o_ai
2584
2603
  vec_cnttz(vector unsigned int __a) {
@@ -2586,7 +2605,8 @@ vec_cnttz(vector unsigned int __a) {
2586
2605
  }
2587
2606
  static __inline__ vector signed long long __ATTRS_o_ai
2588
2607
  vec_cnttz(vector signed long long __a) {
2589
- return __builtin_altivec_vctzd(__a);
2608
+ return (vector signed long long)__builtin_altivec_vctzd(
2609
+ (vector unsigned long long)__a);
2590
2610
  }
2591
2611
  static __inline__ vector unsigned long long __ATTRS_o_ai
2592
2612
  vec_cnttz(vector unsigned long long __a) {
@@ -3144,7 +3164,8 @@ static __inline__ void __ATTRS_o_ai vec_xst_len_r(vector unsigned char __a,
3144
3164
  vector unsigned char __mask =
3145
3165
  (vector unsigned char)__builtin_altivec_lvsl(16 - __c, (int *)NULL);
3146
3166
  vector unsigned char __res =
3147
- __builtin_altivec_vperm_4si((vector int)__a, (vector int)__a, __mask);
3167
+ (vector unsigned char)__builtin_altivec_vperm_4si(
3168
+ (vector int)__a, (vector int)__a, __mask);
3148
3169
  return __builtin_vsx_stxvll((vector int)__res, __b, (__c << 56));
3149
3170
  }
3150
3171
  #endif
@@ -3181,65 +3202,79 @@ static __inline__ vector double __ATTRS_o_ai vec_cpsgn(vector double __a,
3181
3202
  // the XL-compatible signatures are used for those functions.
3182
3203
  #ifdef __XL_COMPAT_ALTIVEC__
3183
3204
  #define vec_ctf(__a, __b) \
3184
- _Generic((__a), vector int \
3185
- : (vector float)__builtin_altivec_vcfsx((vector int)(__a), (__b)), \
3186
- vector unsigned int \
3187
- : (vector float)__builtin_altivec_vcfux((vector unsigned int)(__a), \
3188
- (__b)), \
3189
- vector unsigned long long \
3190
- : (__builtin_vsx_xvcvuxdsp((vector unsigned long long)(__a)) * \
3191
- (vector float)(vector unsigned)((0x7f - (__b)) << 23)), \
3192
- vector signed long long \
3193
- : (__builtin_vsx_xvcvsxdsp((vector signed long long)(__a)) * \
3194
- (vector float)(vector unsigned)((0x7f - (__b)) << 23)))
3205
+ _Generic((__a), \
3206
+ vector int: (vector float)__builtin_altivec_vcfsx((vector int)(__a), \
3207
+ ((__b)&0x1F)), \
3208
+ vector unsigned int: (vector float)__builtin_altivec_vcfux( \
3209
+ (vector unsigned int)(__a), ((__b)&0x1F)), \
3210
+ vector unsigned long long: ( \
3211
+ vector float)(__builtin_vsx_xvcvuxdsp( \
3212
+ (vector unsigned long long)(__a)) * \
3213
+ (vector float)(vector unsigned)((0x7f - \
3214
+ ((__b)&0x1F)) \
3215
+ << 23)), \
3216
+ vector signed long long: ( \
3217
+ vector float)(__builtin_vsx_xvcvsxdsp( \
3218
+ (vector signed long long)(__a)) * \
3219
+ (vector float)(vector unsigned)((0x7f - \
3220
+ ((__b)&0x1F)) \
3221
+ << 23)))
3195
3222
  #else // __XL_COMPAT_ALTIVEC__
3196
- #define vec_ctf(__a, __b) \
3197
- _Generic((__a), vector int \
3198
- : (vector float)__builtin_altivec_vcfsx((vector int)(__a), (__b)), \
3199
- vector unsigned int \
3200
- : (vector float)__builtin_altivec_vcfux((vector unsigned int)(__a), \
3201
- (__b)), \
3202
- vector unsigned long long \
3203
- : (__builtin_convertvector((vector unsigned long long)(__a), \
3204
- vector double) * \
3205
- (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \
3206
- << 52)), \
3207
- vector signed long long \
3208
- : (__builtin_convertvector((vector signed long long)(__a), \
3209
- vector double) * \
3210
- (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \
3211
- << 52)))
3223
+ #define vec_ctf(__a, __b) \
3224
+ _Generic( \
3225
+ (__a), \
3226
+ vector int: (vector float)__builtin_altivec_vcfsx((vector int)(__a), \
3227
+ ((__b)&0x1F)), \
3228
+ vector unsigned int: (vector float)__builtin_altivec_vcfux( \
3229
+ (vector unsigned int)(__a), ((__b)&0x1F)), \
3230
+ vector unsigned long long: ( \
3231
+ vector float)(__builtin_convertvector( \
3232
+ (vector unsigned long long)(__a), vector double) * \
3233
+ (vector double)(vector unsigned long long)((0x3ffULL - \
3234
+ ((__b)&0x1F)) \
3235
+ << 52)), \
3236
+ vector signed long long: ( \
3237
+ vector float)(__builtin_convertvector( \
3238
+ (vector signed long long)(__a), vector double) * \
3239
+ (vector double)(vector unsigned long long)((0x3ffULL - \
3240
+ ((__b)&0x1F)) \
3241
+ << 52)))
3212
3242
  #endif // __XL_COMPAT_ALTIVEC__
3213
3243
  #else
3214
3244
  #define vec_ctf(__a, __b) \
3215
- _Generic((__a), vector int \
3216
- : (vector float)__builtin_altivec_vcfsx((vector int)(__a), (__b)), \
3217
- vector unsigned int \
3218
- : (vector float)__builtin_altivec_vcfux((vector unsigned int)(__a), \
3219
- (__b)))
3245
+ _Generic((__a), \
3246
+ vector int: (vector float)__builtin_altivec_vcfsx((vector int)(__a), \
3247
+ ((__b)&0x1F)), \
3248
+ vector unsigned int: (vector float)__builtin_altivec_vcfux( \
3249
+ (vector unsigned int)(__a), ((__b)&0x1F)))
3220
3250
  #endif
3221
3251
 
3222
3252
  /* vec_ctd */
3223
3253
  #ifdef __VSX__
3224
3254
  #define vec_ctd(__a, __b) \
3225
- _Generic((__a), vector signed int \
3226
- : (vec_doublee((vector signed int)(__a)) * \
3227
- (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \
3228
- << 52)), \
3229
- vector unsigned int \
3230
- : (vec_doublee((vector unsigned int)(__a)) * \
3231
- (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \
3232
- << 52)), \
3233
- vector unsigned long long \
3234
- : (__builtin_convertvector((vector unsigned long long)(__a), \
3235
- vector double) * \
3236
- (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \
3237
- << 52)), \
3238
- vector signed long long \
3239
- : (__builtin_convertvector((vector signed long long)(__a), \
3240
- vector double) * \
3241
- (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \
3242
- << 52)))
3255
+ _Generic((__a), \
3256
+ vector signed int: ( \
3257
+ vec_doublee((vector signed int)(__a)) * \
3258
+ (vector double)(vector unsigned long long)((0x3ffULL - \
3259
+ ((__b)&0x1F)) \
3260
+ << 52)), \
3261
+ vector unsigned int: ( \
3262
+ vec_doublee((vector unsigned int)(__a)) * \
3263
+ (vector double)(vector unsigned long long)((0x3ffULL - \
3264
+ ((__b)&0x1F)) \
3265
+ << 52)), \
3266
+ vector unsigned long long: ( \
3267
+ __builtin_convertvector((vector unsigned long long)(__a), \
3268
+ vector double) * \
3269
+ (vector double)(vector unsigned long long)((0x3ffULL - \
3270
+ ((__b)&0x1F)) \
3271
+ << 52)), \
3272
+ vector signed long long: ( \
3273
+ __builtin_convertvector((vector signed long long)(__a), \
3274
+ vector double) * \
3275
+ (vector double)(vector unsigned long long)((0x3ffULL - \
3276
+ ((__b)&0x1F)) \
3277
+ << 52)))
3243
3278
  #endif // __VSX__
3244
3279
 
3245
3280
  /* vec_vcfsx */
@@ -3254,27 +3289,30 @@ static __inline__ vector double __ATTRS_o_ai vec_cpsgn(vector double __a,
3254
3289
  #ifdef __VSX__
3255
3290
  #ifdef __XL_COMPAT_ALTIVEC__
3256
3291
  #define vec_cts(__a, __b) \
3257
- _Generic((__a), vector float \
3258
- : __builtin_altivec_vctsxs((vector float)(__a), (__b)), \
3259
- vector double \
3260
- : __extension__({ \
3292
+ _Generic((__a), \
3293
+ vector float: (vector signed int)__builtin_altivec_vctsxs( \
3294
+ (vector float)(__a), ((__b)&0x1F)), \
3295
+ vector double: __extension__({ \
3261
3296
  vector double __ret = \
3262
3297
  (vector double)(__a) * \
3263
- (vector double)(vector unsigned long long)((0x3ffULL + (__b)) \
3298
+ (vector double)(vector unsigned long long)((0x3ffULL + \
3299
+ ((__b)&0x1F)) \
3264
3300
  << 52); \
3265
- __builtin_vsx_xvcvdpsxws(__ret); \
3301
+ (vector signed long long)__builtin_vsx_xvcvdpsxws(__ret); \
3266
3302
  }))
3267
3303
  #else // __XL_COMPAT_ALTIVEC__
3268
3304
  #define vec_cts(__a, __b) \
3269
- _Generic((__a), vector float \
3270
- : __builtin_altivec_vctsxs((vector float)(__a), (__b)), \
3271
- vector double \
3272
- : __extension__({ \
3305
+ _Generic((__a), \
3306
+ vector float: (vector signed int)__builtin_altivec_vctsxs( \
3307
+ (vector float)(__a), ((__b)&0x1F)), \
3308
+ vector double: __extension__({ \
3273
3309
  vector double __ret = \
3274
3310
  (vector double)(__a) * \
3275
- (vector double)(vector unsigned long long)((0x3ffULL + (__b)) \
3311
+ (vector double)(vector unsigned long long)((0x3ffULL + \
3312
+ ((__b)&0x1F)) \
3276
3313
  << 52); \
3277
- __builtin_convertvector(__ret, vector signed long long); \
3314
+ (vector signed long long)__builtin_convertvector( \
3315
+ __ret, vector signed long long); \
3278
3316
  }))
3279
3317
  #endif // __XL_COMPAT_ALTIVEC__
3280
3318
  #else
@@ -3290,27 +3328,30 @@ static __inline__ vector double __ATTRS_o_ai vec_cpsgn(vector double __a,
3290
3328
  #ifdef __VSX__
3291
3329
  #ifdef __XL_COMPAT_ALTIVEC__
3292
3330
  #define vec_ctu(__a, __b) \
3293
- _Generic((__a), vector float \
3294
- : __builtin_altivec_vctuxs((vector float)(__a), (__b)), \
3295
- vector double \
3296
- : __extension__({ \
3331
+ _Generic((__a), \
3332
+ vector float: (vector unsigned int)__builtin_altivec_vctuxs( \
3333
+ (vector float)(__a), ((__b)&0x1F)), \
3334
+ vector double: __extension__({ \
3297
3335
  vector double __ret = \
3298
3336
  (vector double)(__a) * \
3299
- (vector double)(vector unsigned long long)((0x3ffULL + __b) \
3337
+ (vector double)(vector unsigned long long)((0x3ffULL + \
3338
+ ((__b)&0x1F)) \
3300
3339
  << 52); \
3301
- __builtin_vsx_xvcvdpuxws(__ret); \
3340
+ (vector unsigned long long)__builtin_vsx_xvcvdpuxws(__ret); \
3302
3341
  }))
3303
3342
  #else // __XL_COMPAT_ALTIVEC__
3304
3343
  #define vec_ctu(__a, __b) \
3305
- _Generic((__a), vector float \
3306
- : __builtin_altivec_vctuxs((vector float)(__a), (__b)), \
3307
- vector double \
3308
- : __extension__({ \
3344
+ _Generic((__a), \
3345
+ vector float: (vector unsigned int)__builtin_altivec_vctuxs( \
3346
+ (vector float)(__a), ((__b)&0x1F)), \
3347
+ vector double: __extension__({ \
3309
3348
  vector double __ret = \
3310
3349
  (vector double)(__a) * \
3311
- (vector double)(vector unsigned long long)((0x3ffULL + __b) \
3350
+ (vector double)(vector unsigned long long)((0x3ffULL + \
3351
+ ((__b)&0x1F)) \
3312
3352
  << 52); \
3313
- __builtin_convertvector(__ret, vector unsigned long long); \
3353
+ (vector unsigned long long)__builtin_convertvector( \
3354
+ __ret, vector unsigned long long); \
3314
3355
  }))
3315
3356
  #endif // __XL_COMPAT_ALTIVEC__
3316
3357
  #else
@@ -3322,60 +3363,62 @@ static __inline__ vector double __ATTRS_o_ai vec_cpsgn(vector double __a,
3322
3363
 
3323
3364
  #ifdef __VSX__
3324
3365
  #define vec_ctsl(__a, __b) \
3325
- _Generic((__a), vector float \
3326
- : __extension__({ \
3327
- vector float __ret = \
3328
- (vector float)(__a) * \
3329
- (vector float)(vector unsigned)((0x7f + (__b)) << 23); \
3330
- __builtin_vsx_xvcvspsxds( \
3331
- __builtin_vsx_xxsldwi(__ret, __ret, 1)); \
3332
- }), \
3333
- vector double \
3334
- : __extension__({ \
3335
- vector double __ret = \
3336
- (vector double)(__a) * \
3337
- (vector double)(vector unsigned long long)((0x3ffULL + __b) \
3338
- << 52); \
3339
- __builtin_convertvector(__ret, vector signed long long); \
3340
- }))
3366
+ _Generic( \
3367
+ (__a), vector float \
3368
+ : __extension__({ \
3369
+ vector float __ret = \
3370
+ (vector float)(__a) * \
3371
+ (vector float)(vector unsigned)((0x7f + ((__b)&0x1F)) << 23); \
3372
+ __builtin_vsx_xvcvspsxds(__builtin_vsx_xxsldwi(__ret, __ret, 1)); \
3373
+ }), \
3374
+ vector double \
3375
+ : __extension__({ \
3376
+ vector double __ret = \
3377
+ (vector double)(__a) * \
3378
+ (vector double)(vector unsigned long long)((0x3ffULL + \
3379
+ ((__b)&0x1F)) \
3380
+ << 52); \
3381
+ __builtin_convertvector(__ret, vector signed long long); \
3382
+ }))
3341
3383
 
3342
3384
  /* vec_ctul */
3343
3385
 
3344
3386
  #define vec_ctul(__a, __b) \
3345
- _Generic((__a), vector float \
3346
- : __extension__({ \
3347
- vector float __ret = \
3348
- (vector float)(__a) * \
3349
- (vector float)(vector unsigned)((0x7f + (__b)) << 23); \
3350
- __builtin_vsx_xvcvspuxds( \
3351
- __builtin_vsx_xxsldwi(__ret, __ret, 1)); \
3352
- }), \
3353
- vector double \
3354
- : __extension__({ \
3355
- vector double __ret = \
3356
- (vector double)(__a) * \
3357
- (vector double)(vector unsigned long long)((0x3ffULL + __b) \
3358
- << 52); \
3359
- __builtin_convertvector(__ret, vector unsigned long long); \
3360
- }))
3387
+ _Generic( \
3388
+ (__a), vector float \
3389
+ : __extension__({ \
3390
+ vector float __ret = \
3391
+ (vector float)(__a) * \
3392
+ (vector float)(vector unsigned)((0x7f + ((__b)&0x1F)) << 23); \
3393
+ __builtin_vsx_xvcvspuxds(__builtin_vsx_xxsldwi(__ret, __ret, 1)); \
3394
+ }), \
3395
+ vector double \
3396
+ : __extension__({ \
3397
+ vector double __ret = \
3398
+ (vector double)(__a) * \
3399
+ (vector double)(vector unsigned long long)((0x3ffULL + \
3400
+ ((__b)&0x1F)) \
3401
+ << 52); \
3402
+ __builtin_convertvector(__ret, vector unsigned long long); \
3403
+ }))
3361
3404
  #endif
3362
3405
  #else // __LITTLE_ENDIAN__
3363
3406
  /* vec_ctsl */
3364
3407
 
3365
3408
  #ifdef __VSX__
3366
3409
  #define vec_ctsl(__a, __b) \
3367
- _Generic((__a), vector float \
3368
- : __extension__({ \
3369
- vector float __ret = \
3370
- (vector float)(__a) * \
3371
- (vector float)(vector unsigned)((0x7f + (__b)) << 23); \
3372
- __builtin_vsx_xvcvspsxds(__ret); \
3373
- }), \
3374
- vector double \
3375
- : __extension__({ \
3410
+ _Generic((__a), \
3411
+ vector float: __extension__({ \
3412
+ vector float __ret = \
3413
+ (vector float)(__a) * \
3414
+ (vector float)(vector unsigned)((0x7f + ((__b)&0x1F)) << 23); \
3415
+ __builtin_vsx_xvcvspsxds(__ret); \
3416
+ }), \
3417
+ vector double: __extension__({ \
3376
3418
  vector double __ret = \
3377
3419
  (vector double)(__a) * \
3378
- (vector double)(vector unsigned long long)((0x3ffULL + __b) \
3420
+ (vector double)(vector unsigned long long)((0x3ffULL + \
3421
+ ((__b)&0x1F)) \
3379
3422
  << 52); \
3380
3423
  __builtin_convertvector(__ret, vector signed long long); \
3381
3424
  }))
@@ -3387,14 +3430,16 @@ static __inline__ vector double __ATTRS_o_ai vec_cpsgn(vector double __a,
3387
3430
  : __extension__({ \
3388
3431
  vector float __ret = \
3389
3432
  (vector float)(__a) * \
3390
- (vector float)(vector unsigned)((0x7f + (__b)) << 23); \
3433
+ (vector float)(vector unsigned)((0x7f + ((__b)&0x1F)) \
3434
+ << 23); \
3391
3435
  __builtin_vsx_xvcvspuxds(__ret); \
3392
3436
  }), \
3393
3437
  vector double \
3394
3438
  : __extension__({ \
3395
3439
  vector double __ret = \
3396
3440
  (vector double)(__a) * \
3397
- (vector double)(vector unsigned long long)((0x3ffULL + __b) \
3441
+ (vector double)(vector unsigned long long)((0x3ffULL + \
3442
+ ((__b)&0x1F)) \
3398
3443
  << 52); \
3399
3444
  __builtin_convertvector(__ret, vector unsigned long long); \
3400
3445
  }))
@@ -6491,12 +6536,12 @@ vec_nand(vector signed char __a, vector signed char __b) {
6491
6536
 
6492
6537
  static __inline__ vector signed char __ATTRS_o_ai
6493
6538
  vec_nand(vector signed char __a, vector bool char __b) {
6494
- return ~(__a & __b);
6539
+ return ~(__a & (vector signed char)__b);
6495
6540
  }
6496
6541
 
6497
6542
  static __inline__ vector signed char __ATTRS_o_ai
6498
6543
  vec_nand(vector bool char __a, vector signed char __b) {
6499
- return ~(__a & __b);
6544
+ return (vector signed char)~(__a & (vector bool char)__b);
6500
6545
  }
6501
6546
 
6502
6547
  static __inline__ vector unsigned char __ATTRS_o_ai
@@ -6506,12 +6551,12 @@ vec_nand(vector unsigned char __a, vector unsigned char __b) {
6506
6551
 
6507
6552
  static __inline__ vector unsigned char __ATTRS_o_ai
6508
6553
  vec_nand(vector unsigned char __a, vector bool char __b) {
6509
- return ~(__a & __b);
6554
+ return ~(__a & (vector unsigned char)__b);
6510
6555
  }
6511
6556
 
6512
6557
  static __inline__ vector unsigned char __ATTRS_o_ai
6513
6558
  vec_nand(vector bool char __a, vector unsigned char __b) {
6514
- return ~(__a & __b);
6559
+ return (vector unsigned char)~(__a & (vector bool char)__b);
6515
6560
  }
6516
6561
 
6517
6562
  static __inline__ vector bool char __ATTRS_o_ai vec_nand(vector bool char __a,
@@ -6526,12 +6571,12 @@ vec_nand(vector signed short __a, vector signed short __b) {
6526
6571
 
6527
6572
  static __inline__ vector signed short __ATTRS_o_ai
6528
6573
  vec_nand(vector signed short __a, vector bool short __b) {
6529
- return ~(__a & __b);
6574
+ return ~(__a & (vector signed short)__b);
6530
6575
  }
6531
6576
 
6532
6577
  static __inline__ vector signed short __ATTRS_o_ai
6533
6578
  vec_nand(vector bool short __a, vector signed short __b) {
6534
- return ~(__a & __b);
6579
+ return (vector signed short)~(__a & (vector bool short)__b);
6535
6580
  }
6536
6581
 
6537
6582
  static __inline__ vector unsigned short __ATTRS_o_ai
@@ -6541,7 +6586,7 @@ vec_nand(vector unsigned short __a, vector unsigned short __b) {
6541
6586
 
6542
6587
  static __inline__ vector unsigned short __ATTRS_o_ai
6543
6588
  vec_nand(vector unsigned short __a, vector bool short __b) {
6544
- return ~(__a & __b);
6589
+ return ~(__a & (vector unsigned short)__b);
6545
6590
  }
6546
6591
 
6547
6592
  static __inline__ vector bool short __ATTRS_o_ai
@@ -6556,12 +6601,12 @@ vec_nand(vector signed int __a, vector signed int __b) {
6556
6601
 
6557
6602
  static __inline__ vector signed int __ATTRS_o_ai vec_nand(vector signed int __a,
6558
6603
  vector bool int __b) {
6559
- return ~(__a & __b);
6604
+ return ~(__a & (vector signed int)__b);
6560
6605
  }
6561
6606
 
6562
6607
  static __inline__ vector signed int __ATTRS_o_ai
6563
6608
  vec_nand(vector bool int __a, vector signed int __b) {
6564
- return ~(__a & __b);
6609
+ return (vector signed int)~(__a & (vector bool int)__b);
6565
6610
  }
6566
6611
 
6567
6612
  static __inline__ vector unsigned int __ATTRS_o_ai
@@ -6571,12 +6616,12 @@ vec_nand(vector unsigned int __a, vector unsigned int __b) {
6571
6616
 
6572
6617
  static __inline__ vector unsigned int __ATTRS_o_ai
6573
6618
  vec_nand(vector unsigned int __a, vector bool int __b) {
6574
- return ~(__a & __b);
6619
+ return ~(__a & (vector unsigned int)__b);
6575
6620
  }
6576
6621
 
6577
6622
  static __inline__ vector unsigned int __ATTRS_o_ai
6578
6623
  vec_nand(vector bool int __a, vector unsigned int __b) {
6579
- return ~(__a & __b);
6624
+ return (vector unsigned int)~(__a & (vector bool int)__b);
6580
6625
  }
6581
6626
 
6582
6627
  static __inline__ vector bool int __ATTRS_o_ai vec_nand(vector bool int __a,
@@ -6597,12 +6642,12 @@ vec_nand(vector signed long long __a, vector signed long long __b) {
6597
6642
 
6598
6643
  static __inline__ vector signed long long __ATTRS_o_ai
6599
6644
  vec_nand(vector signed long long __a, vector bool long long __b) {
6600
- return ~(__a & __b);
6645
+ return ~(__a & (vector signed long long)__b);
6601
6646
  }
6602
6647
 
6603
6648
  static __inline__ vector signed long long __ATTRS_o_ai
6604
6649
  vec_nand(vector bool long long __a, vector signed long long __b) {
6605
- return ~(__a & __b);
6650
+ return (vector signed long long)~(__a & (vector bool long long)__b);
6606
6651
  }
6607
6652
 
6608
6653
  static __inline__ vector unsigned long long __ATTRS_o_ai
@@ -6612,12 +6657,12 @@ vec_nand(vector unsigned long long __a, vector unsigned long long __b) {
6612
6657
 
6613
6658
  static __inline__ vector unsigned long long __ATTRS_o_ai
6614
6659
  vec_nand(vector unsigned long long __a, vector bool long long __b) {
6615
- return ~(__a & __b);
6660
+ return ~(__a & (vector unsigned long long)__b);
6616
6661
  }
6617
6662
 
6618
6663
  static __inline__ vector unsigned long long __ATTRS_o_ai
6619
6664
  vec_nand(vector bool long long __a, vector unsigned long long __b) {
6620
- return ~(__a & __b);
6665
+ return (vector unsigned long long)~(__a & (vector bool long long)__b);
6621
6666
  }
6622
6667
 
6623
6668
  static __inline__ vector bool long long __ATTRS_o_ai
@@ -7005,12 +7050,12 @@ vec_orc(vector signed char __a, vector signed char __b) {
7005
7050
 
7006
7051
  static __inline__ vector signed char __ATTRS_o_ai
7007
7052
  vec_orc(vector signed char __a, vector bool char __b) {
7008
- return __a | ~__b;
7053
+ return __a | (vector signed char)~__b;
7009
7054
  }
7010
7055
 
7011
7056
  static __inline__ vector signed char __ATTRS_o_ai
7012
7057
  vec_orc(vector bool char __a, vector signed char __b) {
7013
- return __a | ~__b;
7058
+ return (vector signed char)(__a | (vector bool char)~__b);
7014
7059
  }
7015
7060
 
7016
7061
  static __inline__ vector unsigned char __ATTRS_o_ai
@@ -7020,12 +7065,12 @@ vec_orc(vector unsigned char __a, vector unsigned char __b) {
7020
7065
 
7021
7066
  static __inline__ vector unsigned char __ATTRS_o_ai
7022
7067
  vec_orc(vector unsigned char __a, vector bool char __b) {
7023
- return __a | ~__b;
7068
+ return __a | (vector unsigned char)~__b;
7024
7069
  }
7025
7070
 
7026
7071
  static __inline__ vector unsigned char __ATTRS_o_ai
7027
7072
  vec_orc(vector bool char __a, vector unsigned char __b) {
7028
- return __a | ~__b;
7073
+ return (vector unsigned char)(__a | (vector bool char)~__b);
7029
7074
  }
7030
7075
 
7031
7076
  static __inline__ vector bool char __ATTRS_o_ai vec_orc(vector bool char __a,
@@ -7040,12 +7085,12 @@ vec_orc(vector signed short __a, vector signed short __b) {
7040
7085
 
7041
7086
  static __inline__ vector signed short __ATTRS_o_ai
7042
7087
  vec_orc(vector signed short __a, vector bool short __b) {
7043
- return __a | ~__b;
7088
+ return __a | (vector signed short)~__b;
7044
7089
  }
7045
7090
 
7046
7091
  static __inline__ vector signed short __ATTRS_o_ai
7047
7092
  vec_orc(vector bool short __a, vector signed short __b) {
7048
- return __a | ~__b;
7093
+ return (vector signed short)(__a | (vector bool short)~__b);
7049
7094
  }
7050
7095
 
7051
7096
  static __inline__ vector unsigned short __ATTRS_o_ai
@@ -7055,12 +7100,12 @@ vec_orc(vector unsigned short __a, vector unsigned short __b) {
7055
7100
 
7056
7101
  static __inline__ vector unsigned short __ATTRS_o_ai
7057
7102
  vec_orc(vector unsigned short __a, vector bool short __b) {
7058
- return __a | ~__b;
7103
+ return __a | (vector unsigned short)~__b;
7059
7104
  }
7060
7105
 
7061
7106
  static __inline__ vector unsigned short __ATTRS_o_ai
7062
7107
  vec_orc(vector bool short __a, vector unsigned short __b) {
7063
- return __a | ~__b;
7108
+ return (vector unsigned short)(__a | (vector bool short)~__b);
7064
7109
  }
7065
7110
 
7066
7111
  static __inline__ vector bool short __ATTRS_o_ai
@@ -7075,12 +7120,12 @@ vec_orc(vector signed int __a, vector signed int __b) {
7075
7120
 
7076
7121
  static __inline__ vector signed int __ATTRS_o_ai vec_orc(vector signed int __a,
7077
7122
  vector bool int __b) {
7078
- return __a | ~__b;
7123
+ return __a | (vector signed int)~__b;
7079
7124
  }
7080
7125
 
7081
7126
  static __inline__ vector signed int __ATTRS_o_ai
7082
7127
  vec_orc(vector bool int __a, vector signed int __b) {
7083
- return __a | ~__b;
7128
+ return (vector signed int)(__a | (vector bool int)~__b);
7084
7129
  }
7085
7130
 
7086
7131
  static __inline__ vector unsigned int __ATTRS_o_ai
@@ -7090,12 +7135,12 @@ vec_orc(vector unsigned int __a, vector unsigned int __b) {
7090
7135
 
7091
7136
  static __inline__ vector unsigned int __ATTRS_o_ai
7092
7137
  vec_orc(vector unsigned int __a, vector bool int __b) {
7093
- return __a | ~__b;
7138
+ return __a | (vector unsigned int)~__b;
7094
7139
  }
7095
7140
 
7096
7141
  static __inline__ vector unsigned int __ATTRS_o_ai
7097
7142
  vec_orc(vector bool int __a, vector unsigned int __b) {
7098
- return __a | ~__b;
7143
+ return (vector unsigned int)(__a | (vector bool int)~__b);
7099
7144
  }
7100
7145
 
7101
7146
  static __inline__ vector bool int __ATTRS_o_ai vec_orc(vector bool int __a,
@@ -7105,12 +7150,12 @@ static __inline__ vector bool int __ATTRS_o_ai vec_orc(vector bool int __a,
7105
7150
 
7106
7151
  static __inline__ vector float __ATTRS_o_ai
7107
7152
  vec_orc(vector bool int __a, vector float __b) {
7108
- return (vector float)(__a | ~(vector unsigned int)__b);
7153
+ return (vector float)(__a | ~(vector bool int)__b);
7109
7154
  }
7110
7155
 
7111
7156
  static __inline__ vector float __ATTRS_o_ai
7112
7157
  vec_orc(vector float __a, vector bool int __b) {
7113
- return (vector float)((vector unsigned int)__a | ~__b);
7158
+ return (vector float)((vector bool int)__a | ~__b);
7114
7159
  }
7115
7160
 
7116
7161
  static __inline__ vector float __ATTRS_o_ai vec_orc(vector float __a,
@@ -7125,12 +7170,12 @@ vec_orc(vector signed long long __a, vector signed long long __b) {
7125
7170
 
7126
7171
  static __inline__ vector signed long long __ATTRS_o_ai
7127
7172
  vec_orc(vector signed long long __a, vector bool long long __b) {
7128
- return __a | ~__b;
7173
+ return __a | (vector signed long long)~__b;
7129
7174
  }
7130
7175
 
7131
7176
  static __inline__ vector signed long long __ATTRS_o_ai
7132
7177
  vec_orc(vector bool long long __a, vector signed long long __b) {
7133
- return __a | ~__b;
7178
+ return (vector signed long long)(__a | (vector bool long long)~__b);
7134
7179
  }
7135
7180
 
7136
7181
  static __inline__ vector unsigned long long __ATTRS_o_ai
@@ -7140,12 +7185,12 @@ vec_orc(vector unsigned long long __a, vector unsigned long long __b) {
7140
7185
 
7141
7186
  static __inline__ vector unsigned long long __ATTRS_o_ai
7142
7187
  vec_orc(vector unsigned long long __a, vector bool long long __b) {
7143
- return __a | ~__b;
7188
+ return __a | (vector unsigned long long)~__b;
7144
7189
  }
7145
7190
 
7146
7191
  static __inline__ vector unsigned long long __ATTRS_o_ai
7147
7192
  vec_orc(vector bool long long __a, vector unsigned long long __b) {
7148
- return __a | ~__b;
7193
+ return (vector unsigned long long)(__a | (vector bool long long)~__b);
7149
7194
  }
7150
7195
 
7151
7196
  static __inline__ vector bool long long __ATTRS_o_ai
@@ -7155,17 +7200,17 @@ vec_orc(vector bool long long __a, vector bool long long __b) {
7155
7200
 
7156
7201
  static __inline__ vector double __ATTRS_o_ai
7157
7202
  vec_orc(vector double __a, vector bool long long __b) {
7158
- return (vector double)((vector unsigned long long)__a | ~__b);
7203
+ return (vector double)((vector bool long long)__a | ~__b);
7159
7204
  }
7160
7205
 
7161
7206
  static __inline__ vector double __ATTRS_o_ai
7162
7207
  vec_orc(vector bool long long __a, vector double __b) {
7163
- return (vector double)(__a | ~(vector unsigned long long)__b);
7208
+ return (vector double)(__a | ~(vector bool long long)__b);
7164
7209
  }
7165
7210
 
7166
7211
  static __inline__ vector double __ATTRS_o_ai vec_orc(vector double __a,
7167
7212
  vector double __b) {
7168
- return (vector double)((vector bool long long)__a |
7213
+ return (vector double)((vector unsigned long long)__a |
7169
7214
  ~(vector unsigned long long)__b);
7170
7215
  }
7171
7216
  #endif
@@ -8276,14 +8321,20 @@ vec_rl(vector signed long long __a, vector unsigned long long __b) {
8276
8321
 
8277
8322
  static __inline__ vector unsigned long long __ATTRS_o_ai
8278
8323
  vec_rl(vector unsigned long long __a, vector unsigned long long __b) {
8279
- return __builtin_altivec_vrld(__a, __b);
8324
+ return (vector unsigned long long)__builtin_altivec_vrld(
8325
+ (vector long long)__a, __b);
8280
8326
  }
8281
8327
  #endif
8282
8328
 
8283
8329
  #if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
8284
8330
  static __inline__ vector signed __int128 __ATTRS_o_ai
8285
8331
  vec_rl(vector signed __int128 __a, vector unsigned __int128 __b) {
8286
- return (__b << __a)|(__b >> ((__CHAR_BIT__ * sizeof(vector signed __int128)) - __a));
8332
+ return (vector signed __int128)(((vector unsigned __int128)__b
8333
+ << (vector unsigned __int128)__a) |
8334
+ ((vector unsigned __int128)__b >>
8335
+ ((__CHAR_BIT__ *
8336
+ sizeof(vector unsigned __int128)) -
8337
+ (vector unsigned __int128)__a)));
8287
8338
  }
8288
8339
 
8289
8340
  static __inline__ vector unsigned __int128 __ATTRS_o_ai
@@ -8317,7 +8368,9 @@ vec_rlmi(vector unsigned __int128 __a, vector unsigned __int128 __b,
8317
8368
  static __inline__ vector signed __int128 __ATTRS_o_ai
8318
8369
  vec_rlmi(vector signed __int128 __a, vector signed __int128 __b,
8319
8370
  vector signed __int128 __c) {
8320
- return __builtin_altivec_vrlqmi(__a, __c, __b);
8371
+ return (vector signed __int128)__builtin_altivec_vrlqmi(
8372
+ (vector unsigned __int128)__a, (vector unsigned __int128)__c,
8373
+ (vector unsigned __int128)__b);
8321
8374
  }
8322
8375
  #endif
8323
8376
 
@@ -8370,7 +8423,8 @@ vec_rlnm(vector signed __int128 __a, vector signed __int128 __b,
8370
8423
  __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, 31, 30, 15, -1,
8371
8424
  -1, -1, -1, -1, -1, -1, -1);
8372
8425
  #endif
8373
- return __builtin_altivec_vrlqnm(__a, (vector unsigned __int128) MaskAndShift);
8426
+ return (vector signed __int128)__builtin_altivec_vrlqnm(
8427
+ (vector unsigned __int128)__a, (vector unsigned __int128)MaskAndShift);
8374
8428
  }
8375
8429
  #endif
8376
8430
 
@@ -12070,13 +12124,15 @@ vec_subc(vector unsigned __int128 __a, vector unsigned __int128 __b) {
12070
12124
 
12071
12125
  static __inline__ vector signed __int128 __ATTRS_o_ai
12072
12126
  vec_subc(vector signed __int128 __a, vector signed __int128 __b) {
12073
- return __builtin_altivec_vsubcuq(__a, __b);
12127
+ return (vector signed __int128)__builtin_altivec_vsubcuq(
12128
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b);
12074
12129
  }
12075
12130
  #endif
12076
12131
 
12077
12132
  static __inline__ vector unsigned char __attribute__((__always_inline__))
12078
12133
  vec_subc_u128(vector unsigned char __a, vector unsigned char __b) {
12079
- return (vector unsigned char)__builtin_altivec_vsubcuq(__a, __b);
12134
+ return (vector unsigned char)__builtin_altivec_vsubcuq_c(
12135
+ (vector unsigned char)__a, (vector unsigned char)__b);
12080
12136
  }
12081
12137
  #endif // __POWER8_VECTOR__
12082
12138
 
@@ -12298,7 +12354,7 @@ vec_vsubuqm(vector unsigned __int128 __a, vector unsigned __int128 __b) {
12298
12354
 
12299
12355
  static __inline__ vector unsigned char __attribute__((__always_inline__))
12300
12356
  vec_sub_u128(vector unsigned char __a, vector unsigned char __b) {
12301
- return __builtin_altivec_vsubuqm(__a, __b);
12357
+ return (vector unsigned char)__builtin_altivec_vsubuqm(__a, __b);
12302
12358
  }
12303
12359
 
12304
12360
  /* vec_vsubeuqm */
@@ -12307,7 +12363,9 @@ vec_sub_u128(vector unsigned char __a, vector unsigned char __b) {
12307
12363
  static __inline__ vector signed __int128 __ATTRS_o_ai
12308
12364
  vec_vsubeuqm(vector signed __int128 __a, vector signed __int128 __b,
12309
12365
  vector signed __int128 __c) {
12310
- return __builtin_altivec_vsubeuqm(__a, __b, __c);
12366
+ return (vector signed __int128)__builtin_altivec_vsubeuqm(
12367
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b,
12368
+ (vector unsigned __int128)__c);
12311
12369
  }
12312
12370
 
12313
12371
  static __inline__ vector unsigned __int128 __ATTRS_o_ai
@@ -12319,7 +12377,9 @@ vec_vsubeuqm(vector unsigned __int128 __a, vector unsigned __int128 __b,
12319
12377
  static __inline__ vector signed __int128 __ATTRS_o_ai
12320
12378
  vec_sube(vector signed __int128 __a, vector signed __int128 __b,
12321
12379
  vector signed __int128 __c) {
12322
- return __builtin_altivec_vsubeuqm(__a, __b, __c);
12380
+ return (vector signed __int128)__builtin_altivec_vsubeuqm(
12381
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b,
12382
+ (vector unsigned __int128)__c);
12323
12383
  }
12324
12384
 
12325
12385
  static __inline__ vector unsigned __int128 __ATTRS_o_ai
@@ -12332,7 +12392,9 @@ vec_sube(vector unsigned __int128 __a, vector unsigned __int128 __b,
12332
12392
  static __inline__ vector unsigned char __attribute__((__always_inline__))
12333
12393
  vec_sube_u128(vector unsigned char __a, vector unsigned char __b,
12334
12394
  vector unsigned char __c) {
12335
- return (vector unsigned char)__builtin_altivec_vsubeuqm(__a, __b, __c);
12395
+ return (vector unsigned char)__builtin_altivec_vsubeuqm_c(
12396
+ (vector unsigned char)__a, (vector unsigned char)__b,
12397
+ (vector unsigned char)__c);
12336
12398
  }
12337
12399
 
12338
12400
  /* vec_vsubcuq */
@@ -12340,7 +12402,8 @@ vec_sube_u128(vector unsigned char __a, vector unsigned char __b,
12340
12402
  #ifdef __SIZEOF_INT128__
12341
12403
  static __inline__ vector signed __int128 __ATTRS_o_ai
12342
12404
  vec_vsubcuq(vector signed __int128 __a, vector signed __int128 __b) {
12343
- return __builtin_altivec_vsubcuq(__a, __b);
12405
+ return (vector signed __int128)__builtin_altivec_vsubcuq(
12406
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b);
12344
12407
  }
12345
12408
 
12346
12409
  static __inline__ vector unsigned __int128 __ATTRS_o_ai
@@ -12353,7 +12416,9 @@ vec_vsubcuq(vector unsigned __int128 __a, vector unsigned __int128 __b) {
12353
12416
  static __inline__ vector signed __int128 __ATTRS_o_ai
12354
12417
  vec_vsubecuq(vector signed __int128 __a, vector signed __int128 __b,
12355
12418
  vector signed __int128 __c) {
12356
- return __builtin_altivec_vsubecuq(__a, __b, __c);
12419
+ return (vector signed __int128)__builtin_altivec_vsubecuq(
12420
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b,
12421
+ (vector unsigned __int128)__c);
12357
12422
  }
12358
12423
 
12359
12424
  static __inline__ vector unsigned __int128 __ATTRS_o_ai
@@ -12381,7 +12446,9 @@ vec_subec(vector unsigned int __a, vector unsigned int __b,
12381
12446
  static __inline__ vector signed __int128 __ATTRS_o_ai
12382
12447
  vec_subec(vector signed __int128 __a, vector signed __int128 __b,
12383
12448
  vector signed __int128 __c) {
12384
- return __builtin_altivec_vsubecuq(__a, __b, __c);
12449
+ return (vector signed __int128)__builtin_altivec_vsubecuq(
12450
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b,
12451
+ (vector unsigned __int128)__c);
12385
12452
  }
12386
12453
 
12387
12454
  static __inline__ vector unsigned __int128 __ATTRS_o_ai
@@ -12394,7 +12461,9 @@ vec_subec(vector unsigned __int128 __a, vector unsigned __int128 __b,
12394
12461
  static __inline__ vector unsigned char __attribute__((__always_inline__))
12395
12462
  vec_subec_u128(vector unsigned char __a, vector unsigned char __b,
12396
12463
  vector unsigned char __c) {
12397
- return (vector unsigned char)__builtin_altivec_vsubecuq(__a, __b, __c);
12464
+ return (vector unsigned char)__builtin_altivec_vsubecuq_c(
12465
+ (vector unsigned char)__a, (vector unsigned char)__b,
12466
+ (vector unsigned char)__c);
12398
12467
  }
12399
12468
  #endif // __POWER8_VECTOR__
12400
12469
 
@@ -14900,17 +14969,20 @@ static __inline__ int __ATTRS_o_ai vec_all_eq(vector double __a,
14900
14969
  #if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
14901
14970
  static __inline__ int __ATTRS_o_ai vec_all_eq(vector signed __int128 __a,
14902
14971
  vector signed __int128 __b) {
14903
- return __builtin_altivec_vcmpequq_p(__CR6_LT, __a, __b);
14972
+ return __builtin_altivec_vcmpequq_p(__CR6_LT, (vector unsigned __int128)__a,
14973
+ (vector signed __int128)__b);
14904
14974
  }
14905
14975
 
14906
14976
  static __inline__ int __ATTRS_o_ai vec_all_eq(vector unsigned __int128 __a,
14907
14977
  vector unsigned __int128 __b) {
14908
- return __builtin_altivec_vcmpequq_p(__CR6_LT, __a, __b);
14978
+ return __builtin_altivec_vcmpequq_p(__CR6_LT, __a,
14979
+ (vector signed __int128)__b);
14909
14980
  }
14910
14981
 
14911
14982
  static __inline__ int __ATTRS_o_ai vec_all_eq(vector bool __int128 __a,
14912
14983
  vector bool __int128 __b) {
14913
- return __builtin_altivec_vcmpequq_p(__CR6_LT, __a, __b);
14984
+ return __builtin_altivec_vcmpequq_p(__CR6_LT, (vector unsigned __int128)__a,
14985
+ (vector signed __int128)__b);
14914
14986
  }
14915
14987
  #endif
14916
14988
 
@@ -15850,17 +15922,20 @@ static __inline__ int __ATTRS_o_ai vec_all_ne(vector double __a,
15850
15922
  #if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15851
15923
  static __inline__ int __ATTRS_o_ai vec_all_ne(vector signed __int128 __a,
15852
15924
  vector signed __int128 __b) {
15853
- return __builtin_altivec_vcmpequq_p(__CR6_EQ, __a, __b);
15925
+ return __builtin_altivec_vcmpequq_p(__CR6_EQ, (vector unsigned __int128)__a,
15926
+ __b);
15854
15927
  }
15855
15928
 
15856
15929
  static __inline__ int __ATTRS_o_ai vec_all_ne(vector unsigned __int128 __a,
15857
15930
  vector unsigned __int128 __b) {
15858
- return __builtin_altivec_vcmpequq_p(__CR6_EQ, __a, __b);
15931
+ return __builtin_altivec_vcmpequq_p(__CR6_EQ, __a,
15932
+ (vector signed __int128)__b);
15859
15933
  }
15860
15934
 
15861
15935
  static __inline__ int __ATTRS_o_ai vec_all_ne(vector bool __int128 __a,
15862
15936
  vector bool __int128 __b) {
15863
- return __builtin_altivec_vcmpequq_p(__CR6_EQ, __a, __b);
15937
+ return __builtin_altivec_vcmpequq_p(__CR6_EQ, (vector unsigned __int128)__a,
15938
+ (vector signed __int128)__b);
15864
15939
  }
15865
15940
  #endif
15866
15941
 
@@ -16144,17 +16219,20 @@ static __inline__ int __ATTRS_o_ai vec_any_eq(vector double __a,
16144
16219
  #if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
16145
16220
  static __inline__ int __ATTRS_o_ai vec_any_eq(vector signed __int128 __a,
16146
16221
  vector signed __int128 __b) {
16147
- return __builtin_altivec_vcmpequq_p(__CR6_EQ_REV, __a, __b);
16222
+ return __builtin_altivec_vcmpequq_p(__CR6_EQ_REV,
16223
+ (vector unsigned __int128)__a, __b);
16148
16224
  }
16149
16225
 
16150
16226
  static __inline__ int __ATTRS_o_ai vec_any_eq(vector unsigned __int128 __a,
16151
16227
  vector unsigned __int128 __b) {
16152
- return __builtin_altivec_vcmpequq_p(__CR6_EQ_REV, __a, __b);
16228
+ return __builtin_altivec_vcmpequq_p(__CR6_EQ_REV, __a,
16229
+ (vector signed __int128)__b);
16153
16230
  }
16154
16231
 
16155
16232
  static __inline__ int __ATTRS_o_ai vec_any_eq(vector bool __int128 __a,
16156
16233
  vector bool __int128 __b) {
16157
- return __builtin_altivec_vcmpequq_p(__CR6_EQ_REV, __a, __b);
16234
+ return __builtin_altivec_vcmpequq_p(
16235
+ __CR6_EQ_REV, (vector unsigned __int128)__a, (vector signed __int128)__b);
16158
16236
  }
16159
16237
  #endif
16160
16238
 
@@ -17124,17 +17202,20 @@ static __inline__ int __ATTRS_o_ai vec_any_ne(vector double __a,
17124
17202
  #if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
17125
17203
  static __inline__ int __ATTRS_o_ai vec_any_ne(vector signed __int128 __a,
17126
17204
  vector signed __int128 __b) {
17127
- return __builtin_altivec_vcmpequq_p(__CR6_LT_REV, __a, __b);
17205
+ return __builtin_altivec_vcmpequq_p(__CR6_LT_REV,
17206
+ (vector unsigned __int128)__a, __b);
17128
17207
  }
17129
17208
 
17130
17209
  static __inline__ int __ATTRS_o_ai vec_any_ne(vector unsigned __int128 __a,
17131
17210
  vector unsigned __int128 __b) {
17132
- return __builtin_altivec_vcmpequq_p(__CR6_LT_REV, __a, __b);
17211
+ return __builtin_altivec_vcmpequq_p(__CR6_LT_REV, __a,
17212
+ (vector signed __int128)__b);
17133
17213
  }
17134
17214
 
17135
17215
  static __inline__ int __ATTRS_o_ai vec_any_ne(vector bool __int128 __a,
17136
17216
  vector bool __int128 __b) {
17137
- return __builtin_altivec_vcmpequq_p(__CR6_LT_REV, __a, __b);
17217
+ return __builtin_altivec_vcmpequq_p(
17218
+ __CR6_LT_REV, (vector unsigned __int128)__a, (vector signed __int128)__b);
17138
17219
  }
17139
17220
  #endif
17140
17221
 
@@ -17254,32 +17335,32 @@ provided.
17254
17335
  #define vec_ncipherlast_be __builtin_altivec_crypto_vncipherlast
17255
17336
 
17256
17337
  #ifdef __VSX__
17257
- static __inline__ vector unsigned long long __attribute__((__always_inline__))
17258
- __builtin_crypto_vsbox(vector unsigned long long __a) {
17338
+ static __inline__ vector unsigned char __attribute__((__always_inline__))
17339
+ __builtin_crypto_vsbox(vector unsigned char __a) {
17259
17340
  return __builtin_altivec_crypto_vsbox(__a);
17260
17341
  }
17261
17342
 
17262
- static __inline__ vector unsigned long long __attribute__((__always_inline__))
17263
- __builtin_crypto_vcipher(vector unsigned long long __a,
17264
- vector unsigned long long __b) {
17343
+ static __inline__ vector unsigned char __attribute__((__always_inline__))
17344
+ __builtin_crypto_vcipher(vector unsigned char __a,
17345
+ vector unsigned char __b) {
17265
17346
  return __builtin_altivec_crypto_vcipher(__a, __b);
17266
17347
  }
17267
17348
 
17268
- static __inline__ vector unsigned long long __attribute__((__always_inline__))
17269
- __builtin_crypto_vcipherlast(vector unsigned long long __a,
17270
- vector unsigned long long __b) {
17349
+ static __inline__ vector unsigned char __attribute__((__always_inline__))
17350
+ __builtin_crypto_vcipherlast(vector unsigned char __a,
17351
+ vector unsigned char __b) {
17271
17352
  return __builtin_altivec_crypto_vcipherlast(__a, __b);
17272
17353
  }
17273
17354
 
17274
- static __inline__ vector unsigned long long __attribute__((__always_inline__))
17275
- __builtin_crypto_vncipher(vector unsigned long long __a,
17276
- vector unsigned long long __b) {
17355
+ static __inline__ vector unsigned char __attribute__((__always_inline__))
17356
+ __builtin_crypto_vncipher(vector unsigned char __a,
17357
+ vector unsigned char __b) {
17277
17358
  return __builtin_altivec_crypto_vncipher(__a, __b);
17278
17359
  }
17279
17360
 
17280
- static __inline__ vector unsigned long long __attribute__((__always_inline__))
17281
- __builtin_crypto_vncipherlast(vector unsigned long long __a,
17282
- vector unsigned long long __b) {
17361
+ static __inline__ vector unsigned char __attribute__((__always_inline__))
17362
+ __builtin_crypto_vncipherlast(vector unsigned char __a,
17363
+ vector unsigned char __b) {
17283
17364
  return __builtin_altivec_crypto_vncipherlast(__a, __b);
17284
17365
  }
17285
17366
  #endif /* __VSX__ */
@@ -17297,13 +17378,17 @@ __builtin_crypto_vncipherlast(vector unsigned long long __a,
17297
17378
  static __inline__ vector bool char __ATTRS_o_ai
17298
17379
  vec_permxor(vector bool char __a, vector bool char __b,
17299
17380
  vector bool char __c) {
17300
- return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
17381
+ return (vector bool char)__builtin_altivec_crypto_vpermxor(
17382
+ (vector unsigned char)__a, (vector unsigned char)__b,
17383
+ (vector unsigned char)__c);
17301
17384
  }
17302
17385
 
17303
17386
  static __inline__ vector signed char __ATTRS_o_ai
17304
17387
  vec_permxor(vector signed char __a, vector signed char __b,
17305
17388
  vector signed char __c) {
17306
- return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
17389
+ return (vector signed char)__builtin_altivec_crypto_vpermxor(
17390
+ (vector unsigned char)__a, (vector unsigned char)__b,
17391
+ (vector unsigned char)__c);
17307
17392
  }
17308
17393
 
17309
17394
  static __inline__ vector unsigned char __ATTRS_o_ai
@@ -17365,7 +17450,7 @@ __builtin_crypto_vpmsumb(vector unsigned long long __a,
17365
17450
 
17366
17451
  static __inline__ vector signed char __ATTRS_o_ai
17367
17452
  vec_vgbbd(vector signed char __a) {
17368
- return __builtin_altivec_vgbbd((vector unsigned char)__a);
17453
+ return (vector signed char)__builtin_altivec_vgbbd((vector unsigned char)__a);
17369
17454
  }
17370
17455
 
17371
17456
  #define vec_pmsum_be __builtin_crypto_vpmsumb
@@ -17378,23 +17463,25 @@ vec_vgbbd(vector unsigned char __a) {
17378
17463
 
17379
17464
  static __inline__ vector signed long long __ATTRS_o_ai
17380
17465
  vec_gbb(vector signed long long __a) {
17381
- return __builtin_altivec_vgbbd((vector unsigned char)__a);
17466
+ return (vector signed long long)__builtin_altivec_vgbbd(
17467
+ (vector unsigned char)__a);
17382
17468
  }
17383
17469
 
17384
17470
  static __inline__ vector unsigned long long __ATTRS_o_ai
17385
17471
  vec_gbb(vector unsigned long long __a) {
17386
- return __builtin_altivec_vgbbd((vector unsigned char)__a);
17472
+ return (vector unsigned long long)__builtin_altivec_vgbbd(
17473
+ (vector unsigned char)__a);
17387
17474
  }
17388
17475
 
17389
17476
  static __inline__ vector long long __ATTRS_o_ai
17390
17477
  vec_vbpermq(vector signed char __a, vector signed char __b) {
17391
- return __builtin_altivec_vbpermq((vector unsigned char)__a,
17392
- (vector unsigned char)__b);
17478
+ return (vector long long)__builtin_altivec_vbpermq((vector unsigned char)__a,
17479
+ (vector unsigned char)__b);
17393
17480
  }
17394
17481
 
17395
17482
  static __inline__ vector long long __ATTRS_o_ai
17396
17483
  vec_vbpermq(vector unsigned char __a, vector unsigned char __b) {
17397
- return __builtin_altivec_vbpermq(__a, __b);
17484
+ return (vector long long)__builtin_altivec_vbpermq(__a, __b);
17398
17485
  }
17399
17486
 
17400
17487
  #if defined(__powerpc64__) && defined(__SIZEOF_INT128__)
@@ -17406,7 +17493,7 @@ vec_bperm(vector unsigned __int128 __a, vector unsigned char __b) {
17406
17493
  #endif
17407
17494
  static __inline__ vector unsigned char __ATTRS_o_ai
17408
17495
  vec_bperm(vector unsigned char __a, vector unsigned char __b) {
17409
- return __builtin_altivec_vbpermq(__a, __b);
17496
+ return (vector unsigned char)__builtin_altivec_vbpermq(__a, __b);
17410
17497
  }
17411
17498
  #endif // __POWER8_VECTOR__
17412
17499
  #ifdef __POWER9_VECTOR__
@@ -17777,26 +17864,26 @@ vec_xl_be(signed long long __offset, const unsigned __int128 *__ptr) {
17777
17864
  #if defined(__POWER10_VECTOR__) && defined(__VSX__) && \
17778
17865
  defined(__SIZEOF_INT128__)
17779
17866
 
17780
- /* vect_xl_sext */
17867
+ /* vec_xl_sext */
17781
17868
 
17782
- static __inline__ vector unsigned __int128 __ATTRS_o_ai
17869
+ static __inline__ vector signed __int128 __ATTRS_o_ai
17783
17870
  vec_xl_sext(ptrdiff_t __offset, const signed char *__pointer) {
17784
- return (vector unsigned __int128)*(__pointer + __offset);
17871
+ return (vector signed __int128)*(__pointer + __offset);
17785
17872
  }
17786
17873
 
17787
- static __inline__ vector unsigned __int128 __ATTRS_o_ai
17874
+ static __inline__ vector signed __int128 __ATTRS_o_ai
17788
17875
  vec_xl_sext(ptrdiff_t __offset, const signed short *__pointer) {
17789
- return (vector unsigned __int128)*(__pointer + __offset);
17876
+ return (vector signed __int128)*(__pointer + __offset);
17790
17877
  }
17791
17878
 
17792
- static __inline__ vector unsigned __int128 __ATTRS_o_ai
17879
+ static __inline__ vector signed __int128 __ATTRS_o_ai
17793
17880
  vec_xl_sext(ptrdiff_t __offset, const signed int *__pointer) {
17794
- return (vector unsigned __int128)*(__pointer + __offset);
17881
+ return (vector signed __int128)*(__pointer + __offset);
17795
17882
  }
17796
17883
 
17797
- static __inline__ vector unsigned __int128 __ATTRS_o_ai
17884
+ static __inline__ vector signed __int128 __ATTRS_o_ai
17798
17885
  vec_xl_sext(ptrdiff_t __offset, const signed long long *__pointer) {
17799
- return (vector unsigned __int128)*(__pointer + __offset);
17886
+ return (vector signed __int128)*(__pointer + __offset);
17800
17887
  }
17801
17888
 
17802
17889
  /* vec_xl_zext */
@@ -18260,13 +18347,17 @@ vec_expandm(vector unsigned __int128 __a) {
18260
18347
 
18261
18348
  #define vec_cntm(__a, __mp) \
18262
18349
  _Generic((__a), vector unsigned char \
18263
- : __builtin_altivec_vcntmbb((__a), (unsigned char)(__mp)), \
18350
+ : __builtin_altivec_vcntmbb((vector unsigned char)(__a), \
18351
+ (unsigned char)(__mp)), \
18264
18352
  vector unsigned short \
18265
- : __builtin_altivec_vcntmbh((__a), (unsigned char)(__mp)), \
18353
+ : __builtin_altivec_vcntmbh((vector unsigned short)(__a), \
18354
+ (unsigned char)(__mp)), \
18266
18355
  vector unsigned int \
18267
- : __builtin_altivec_vcntmbw((__a), (unsigned char)(__mp)), \
18356
+ : __builtin_altivec_vcntmbw((vector unsigned int)(__a), \
18357
+ (unsigned char)(__mp)), \
18268
18358
  vector unsigned long long \
18269
- : __builtin_altivec_vcntmbd((__a), (unsigned char)(__mp)))
18359
+ : __builtin_altivec_vcntmbd((vector unsigned long long)(__a), \
18360
+ (unsigned char)(__mp)))
18270
18361
 
18271
18362
  /* vec_gen[b|h|w|d|q]m */
18272
18363
 
@@ -18327,43 +18418,52 @@ vec_cfuge(vector unsigned long long __a, vector unsigned long long __b) {
18327
18418
  #ifdef __SIZEOF_INT128__
18328
18419
  #define vec_ternarylogic(__a, __b, __c, __imm) \
18329
18420
  _Generic((__a), vector unsigned char \
18330
- : __builtin_vsx_xxeval((vector unsigned long long)(__a), \
18331
- (vector unsigned long long)(__b), \
18332
- (vector unsigned long long)(__c), (__imm)), \
18421
+ : (vector unsigned char)__builtin_vsx_xxeval( \
18422
+ (vector unsigned long long)(__a), \
18423
+ (vector unsigned long long)(__b), \
18424
+ (vector unsigned long long)(__c), (__imm)), \
18333
18425
  vector unsigned short \
18334
- : __builtin_vsx_xxeval((vector unsigned long long)(__a), \
18335
- (vector unsigned long long)(__b), \
18336
- (vector unsigned long long)(__c), (__imm)), \
18426
+ : (vector unsigned short)__builtin_vsx_xxeval( \
18427
+ (vector unsigned long long)(__a), \
18428
+ (vector unsigned long long)(__b), \
18429
+ (vector unsigned long long)(__c), (__imm)), \
18337
18430
  vector unsigned int \
18338
- : __builtin_vsx_xxeval((vector unsigned long long)(__a), \
18339
- (vector unsigned long long)(__b), \
18340
- (vector unsigned long long)(__c), (__imm)), \
18431
+ : (vector unsigned int)__builtin_vsx_xxeval( \
18432
+ (vector unsigned long long)(__a), \
18433
+ (vector unsigned long long)(__b), \
18434
+ (vector unsigned long long)(__c), (__imm)), \
18341
18435
  vector unsigned long long \
18342
- : __builtin_vsx_xxeval((vector unsigned long long)(__a), \
18343
- (vector unsigned long long)(__b), \
18344
- (vector unsigned long long)(__c), (__imm)), \
18436
+ : (vector unsigned long long)__builtin_vsx_xxeval( \
18437
+ (vector unsigned long long)(__a), \
18438
+ (vector unsigned long long)(__b), \
18439
+ (vector unsigned long long)(__c), (__imm)), \
18345
18440
  vector unsigned __int128 \
18346
- : __builtin_vsx_xxeval((vector unsigned long long)(__a), \
18347
- (vector unsigned long long)(__b), \
18348
- (vector unsigned long long)(__c), (__imm)))
18441
+ : (vector unsigned __int128)__builtin_vsx_xxeval( \
18442
+ (vector unsigned long long)(__a), \
18443
+ (vector unsigned long long)(__b), \
18444
+ (vector unsigned long long)(__c), (__imm)))
18349
18445
  #else
18350
18446
  #define vec_ternarylogic(__a, __b, __c, __imm) \
18351
18447
  _Generic((__a), vector unsigned char \
18352
- : __builtin_vsx_xxeval((vector unsigned long long)(__a), \
18353
- (vector unsigned long long)(__b), \
18354
- (vector unsigned long long)(__c), (__imm)), \
18448
+ : (vector unsigned char)__builtin_vsx_xxeval( \
18449
+ (vector unsigned long long)(__a), \
18450
+ (vector unsigned long long)(__b), \
18451
+ (vector unsigned long long)(__c), (__imm)), \
18355
18452
  vector unsigned short \
18356
- : __builtin_vsx_xxeval((vector unsigned long long)(__a), \
18357
- (vector unsigned long long)(__b), \
18358
- (vector unsigned long long)(__c), (__imm)), \
18453
+ : (vector unsigned short)__builtin_vsx_xxeval( \
18454
+ (vector unsigned long long)(__a), \
18455
+ (vector unsigned long long)(__b), \
18456
+ (vector unsigned long long)(__c), (__imm)), \
18359
18457
  vector unsigned int \
18360
- : __builtin_vsx_xxeval((vector unsigned long long)(__a), \
18361
- (vector unsigned long long)(__b), \
18362
- (vector unsigned long long)(__c), (__imm)), \
18458
+ : (vector unsigned int)__builtin_vsx_xxeval( \
18459
+ (vector unsigned long long)(__a), \
18460
+ (vector unsigned long long)(__b), \
18461
+ (vector unsigned long long)(__c), (__imm)), \
18363
18462
  vector unsigned long long \
18364
- : __builtin_vsx_xxeval((vector unsigned long long)(__a), \
18365
- (vector unsigned long long)(__b), \
18366
- (vector unsigned long long)(__c), (__imm)))
18463
+ : (vector unsigned long long)__builtin_vsx_xxeval( \
18464
+ (vector unsigned long long)(__a), \
18465
+ (vector unsigned long long)(__b), \
18466
+ (vector unsigned long long)(__c), (__imm)))
18367
18467
  #endif /* __SIZEOF_INT128__ */
18368
18468
  #endif /* __VSX__ */
18369
18469
 
@@ -18371,14 +18471,16 @@ vec_cfuge(vector unsigned long long __a, vector unsigned long long __b) {
18371
18471
 
18372
18472
  #ifdef __VSX__
18373
18473
  #define vec_genpcvm(__a, __imm) \
18374
- _Generic((__a), vector unsigned char \
18375
- : __builtin_vsx_xxgenpcvbm((__a), (int)(__imm)), \
18376
- vector unsigned short \
18377
- : __builtin_vsx_xxgenpcvhm((__a), (int)(__imm)), \
18378
- vector unsigned int \
18379
- : __builtin_vsx_xxgenpcvwm((__a), (int)(__imm)), \
18380
- vector unsigned long long \
18381
- : __builtin_vsx_xxgenpcvdm((__a), (int)(__imm)))
18474
+ _Generic( \
18475
+ (__a), vector unsigned char \
18476
+ : __builtin_vsx_xxgenpcvbm((vector unsigned char)(__a), (int)(__imm)), \
18477
+ vector unsigned short \
18478
+ : __builtin_vsx_xxgenpcvhm((vector unsigned short)(__a), (int)(__imm)), \
18479
+ vector unsigned int \
18480
+ : __builtin_vsx_xxgenpcvwm((vector unsigned int)(__a), (int)(__imm)), \
18481
+ vector unsigned long long \
18482
+ : __builtin_vsx_xxgenpcvdm((vector unsigned long long)(__a), \
18483
+ (int)(__imm)))
18382
18484
  #endif /* __VSX__ */
18383
18485
 
18384
18486
  /* vec_clr_first */
@@ -18386,18 +18488,22 @@ vec_cfuge(vector unsigned long long __a, vector unsigned long long __b) {
18386
18488
  static __inline__ vector signed char __ATTRS_o_ai
18387
18489
  vec_clr_first(vector signed char __a, unsigned int __n) {
18388
18490
  #ifdef __LITTLE_ENDIAN__
18389
- return __builtin_altivec_vclrrb(__a, __n);
18491
+ return (vector signed char)__builtin_altivec_vclrrb((vector unsigned char)__a,
18492
+ __n);
18390
18493
  #else
18391
- return __builtin_altivec_vclrlb( __a, __n);
18494
+ return (vector signed char)__builtin_altivec_vclrlb((vector unsigned char)__a,
18495
+ __n);
18392
18496
  #endif
18393
18497
  }
18394
18498
 
18395
18499
  static __inline__ vector unsigned char __ATTRS_o_ai
18396
18500
  vec_clr_first(vector unsigned char __a, unsigned int __n) {
18397
18501
  #ifdef __LITTLE_ENDIAN__
18398
- return __builtin_altivec_vclrrb((vector signed char)__a, __n);
18502
+ return (vector unsigned char)__builtin_altivec_vclrrb(
18503
+ (vector unsigned char)__a, __n);
18399
18504
  #else
18400
- return __builtin_altivec_vclrlb((vector signed char)__a, __n);
18505
+ return (vector unsigned char)__builtin_altivec_vclrlb(
18506
+ (vector unsigned char)__a, __n);
18401
18507
  #endif
18402
18508
  }
18403
18509
 
@@ -18406,18 +18512,22 @@ vec_clr_first(vector unsigned char __a, unsigned int __n) {
18406
18512
  static __inline__ vector signed char __ATTRS_o_ai
18407
18513
  vec_clr_last(vector signed char __a, unsigned int __n) {
18408
18514
  #ifdef __LITTLE_ENDIAN__
18409
- return __builtin_altivec_vclrlb(__a, __n);
18515
+ return (vector signed char)__builtin_altivec_vclrlb((vector unsigned char)__a,
18516
+ __n);
18410
18517
  #else
18411
- return __builtin_altivec_vclrrb( __a, __n);
18518
+ return (vector signed char)__builtin_altivec_vclrrb((vector unsigned char)__a,
18519
+ __n);
18412
18520
  #endif
18413
18521
  }
18414
18522
 
18415
18523
  static __inline__ vector unsigned char __ATTRS_o_ai
18416
18524
  vec_clr_last(vector unsigned char __a, unsigned int __n) {
18417
18525
  #ifdef __LITTLE_ENDIAN__
18418
- return __builtin_altivec_vclrlb((vector signed char)__a, __n);
18526
+ return (vector unsigned char)__builtin_altivec_vclrlb(
18527
+ (vector unsigned char)__a, __n);
18419
18528
  #else
18420
- return __builtin_altivec_vclrrb((vector signed char)__a, __n);
18529
+ return (vector unsigned char)__builtin_altivec_vclrrb(
18530
+ (vector unsigned char)__a, __n);
18421
18531
  #endif
18422
18532
  }
18423
18533
 
@@ -18469,13 +18579,75 @@ vec_mod(vector unsigned __int128 __a, vector unsigned __int128 __b) {
18469
18579
  }
18470
18580
  #endif
18471
18581
 
18472
- /* vec_sldbi */
18473
-
18474
- #define vec_sldb(__a, __b, __c) __builtin_altivec_vsldbi(__a, __b, (__c & 0x7))
18475
-
18476
- /* vec_srdbi */
18477
-
18478
- #define vec_srdb(__a, __b, __c) __builtin_altivec_vsrdbi(__a, __b, (__c & 0x7))
18582
+ /* vec_sldb */
18583
+ #define vec_sldb(__a, __b, __c) \
18584
+ _Generic( \
18585
+ (__a), vector unsigned char \
18586
+ : (vector unsigned char)__builtin_altivec_vsldbi( \
18587
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18588
+ (__c & 0x7)), \
18589
+ vector signed char \
18590
+ : (vector signed char)__builtin_altivec_vsldbi( \
18591
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18592
+ (__c & 0x7)), \
18593
+ vector unsigned short \
18594
+ : (vector unsigned short)__builtin_altivec_vsldbi( \
18595
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18596
+ (__c & 0x7)), \
18597
+ vector signed short \
18598
+ : (vector signed short)__builtin_altivec_vsldbi( \
18599
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18600
+ (__c & 0x7)), \
18601
+ vector unsigned int \
18602
+ : (vector unsigned int)__builtin_altivec_vsldbi( \
18603
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18604
+ (__c & 0x7)), \
18605
+ vector signed int \
18606
+ : (vector signed int)__builtin_altivec_vsldbi((vector unsigned char)__a, \
18607
+ (vector unsigned char)__b, \
18608
+ (__c & 0x7)), \
18609
+ vector unsigned long long \
18610
+ : (vector unsigned long long)__builtin_altivec_vsldbi( \
18611
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18612
+ (__c & 0x7)), \
18613
+ vector signed long long \
18614
+ : (vector signed long long)__builtin_altivec_vsldbi( \
18615
+ (vector unsigned char)__a, (vector unsigned char)__b, (__c & 0x7)))
18616
+
18617
+ /* vec_srdb */
18618
+ #define vec_srdb(__a, __b, __c) \
18619
+ _Generic( \
18620
+ (__a), vector unsigned char \
18621
+ : (vector unsigned char)__builtin_altivec_vsrdbi( \
18622
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18623
+ (__c & 0x7)), \
18624
+ vector signed char \
18625
+ : (vector signed char)__builtin_altivec_vsrdbi( \
18626
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18627
+ (__c & 0x7)), \
18628
+ vector unsigned short \
18629
+ : (vector unsigned short)__builtin_altivec_vsrdbi( \
18630
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18631
+ (__c & 0x7)), \
18632
+ vector signed short \
18633
+ : (vector signed short)__builtin_altivec_vsrdbi( \
18634
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18635
+ (__c & 0x7)), \
18636
+ vector unsigned int \
18637
+ : (vector unsigned int)__builtin_altivec_vsrdbi( \
18638
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18639
+ (__c & 0x7)), \
18640
+ vector signed int \
18641
+ : (vector signed int)__builtin_altivec_vsrdbi((vector unsigned char)__a, \
18642
+ (vector unsigned char)__b, \
18643
+ (__c & 0x7)), \
18644
+ vector unsigned long long \
18645
+ : (vector unsigned long long)__builtin_altivec_vsrdbi( \
18646
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18647
+ (__c & 0x7)), \
18648
+ vector signed long long \
18649
+ : (vector signed long long)__builtin_altivec_vsrdbi( \
18650
+ (vector unsigned char)__a, (vector unsigned char)__b, (__c & 0x7)))
18479
18651
 
18480
18652
  /* vec_insertl */
18481
18653
 
@@ -18704,16 +18876,46 @@ vec_extracth(vector unsigned long long __a, vector unsigned long long __b,
18704
18876
  #ifdef __VSX__
18705
18877
 
18706
18878
  /* vec_permx */
18707
-
18708
18879
  #define vec_permx(__a, __b, __c, __d) \
18709
- __builtin_vsx_xxpermx((__a), (__b), (__c), (__d))
18880
+ _Generic( \
18881
+ (__a), vector unsigned char \
18882
+ : (vector unsigned char)__builtin_vsx_xxpermx( \
18883
+ (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18884
+ vector signed char \
18885
+ : (vector signed char)__builtin_vsx_xxpermx( \
18886
+ (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18887
+ vector unsigned short \
18888
+ : (vector unsigned short)__builtin_vsx_xxpermx( \
18889
+ (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18890
+ vector signed short \
18891
+ : (vector signed short)__builtin_vsx_xxpermx( \
18892
+ (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18893
+ vector unsigned int \
18894
+ : (vector unsigned int)__builtin_vsx_xxpermx( \
18895
+ (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18896
+ vector signed int \
18897
+ : (vector signed int)__builtin_vsx_xxpermx( \
18898
+ (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18899
+ vector unsigned long long \
18900
+ : (vector unsigned long long)__builtin_vsx_xxpermx( \
18901
+ (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18902
+ vector signed long long \
18903
+ : (vector signed long long)__builtin_vsx_xxpermx( \
18904
+ (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18905
+ vector float \
18906
+ : (vector float)__builtin_vsx_xxpermx( \
18907
+ (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18908
+ vector double \
18909
+ : (vector double)__builtin_vsx_xxpermx( \
18910
+ (vector unsigned char)__a, (vector unsigned char)__b, __c, __d))
18710
18911
 
18711
18912
  /* vec_blendv */
18712
18913
 
18713
18914
  static __inline__ vector signed char __ATTRS_o_ai
18714
18915
  vec_blendv(vector signed char __a, vector signed char __b,
18715
18916
  vector unsigned char __c) {
18716
- return __builtin_vsx_xxblendvb(__a, __b, __c);
18917
+ return (vector signed char)__builtin_vsx_xxblendvb(
18918
+ (vector unsigned char)__a, (vector unsigned char)__b, __c);
18717
18919
  }
18718
18920
 
18719
18921
  static __inline__ vector unsigned char __ATTRS_o_ai
@@ -18725,7 +18927,8 @@ vec_blendv(vector unsigned char __a, vector unsigned char __b,
18725
18927
  static __inline__ vector signed short __ATTRS_o_ai
18726
18928
  vec_blendv(vector signed short __a, vector signed short __b,
18727
18929
  vector unsigned short __c) {
18728
- return __builtin_vsx_xxblendvh(__a, __b, __c);
18930
+ return (vector signed short)__builtin_vsx_xxblendvh(
18931
+ (vector unsigned short)__a, (vector unsigned short)__b, __c);
18729
18932
  }
18730
18933
 
18731
18934
  static __inline__ vector unsigned short __ATTRS_o_ai
@@ -18737,7 +18940,8 @@ vec_blendv(vector unsigned short __a, vector unsigned short __b,
18737
18940
  static __inline__ vector signed int __ATTRS_o_ai
18738
18941
  vec_blendv(vector signed int __a, vector signed int __b,
18739
18942
  vector unsigned int __c) {
18740
- return __builtin_vsx_xxblendvw(__a, __b, __c);
18943
+ return (vector signed int)__builtin_vsx_xxblendvw(
18944
+ (vector unsigned int)__a, (vector unsigned int)__b, __c);
18741
18945
  }
18742
18946
 
18743
18947
  static __inline__ vector unsigned int __ATTRS_o_ai
@@ -18749,33 +18953,68 @@ vec_blendv(vector unsigned int __a, vector unsigned int __b,
18749
18953
  static __inline__ vector signed long long __ATTRS_o_ai
18750
18954
  vec_blendv(vector signed long long __a, vector signed long long __b,
18751
18955
  vector unsigned long long __c) {
18752
- return __builtin_vsx_xxblendvd(__a, __b, __c);
18956
+ return (vector signed long long)__builtin_vsx_xxblendvd(
18957
+ (vector unsigned long long)__a, (vector unsigned long long)__b, __c);
18753
18958
  }
18754
18959
 
18755
18960
  static __inline__ vector unsigned long long __ATTRS_o_ai
18756
18961
  vec_blendv(vector unsigned long long __a, vector unsigned long long __b,
18757
18962
  vector unsigned long long __c) {
18758
- return __builtin_vsx_xxblendvd(__a, __b, __c);
18963
+ return (vector unsigned long long)__builtin_vsx_xxblendvd(__a, __b, __c);
18759
18964
  }
18760
18965
 
18761
18966
  static __inline__ vector float __ATTRS_o_ai
18762
18967
  vec_blendv(vector float __a, vector float __b, vector unsigned int __c) {
18763
- return __builtin_vsx_xxblendvw(__a, __b, __c);
18968
+ return (vector float)__builtin_vsx_xxblendvw((vector unsigned int)__a,
18969
+ (vector unsigned int)__b, __c);
18764
18970
  }
18765
18971
 
18766
18972
  static __inline__ vector double __ATTRS_o_ai
18767
18973
  vec_blendv(vector double __a, vector double __b,
18768
18974
  vector unsigned long long __c) {
18769
- return __builtin_vsx_xxblendvd(__a, __b, __c);
18975
+ return (vector double)__builtin_vsx_xxblendvd(
18976
+ (vector unsigned long long)__a, (vector unsigned long long)__b, __c);
18770
18977
  }
18771
18978
 
18772
- /* vec_replace_elt */
18773
-
18774
- #define vec_replace_elt __builtin_altivec_vec_replace_elt
18775
-
18776
- /* vec_replace_unaligned */
18979
+ #define vec_replace_unaligned(__a, __b, __c) \
18980
+ _Generic((__a), vector signed int \
18981
+ : __builtin_altivec_vinsw((vector unsigned char)__a, \
18982
+ (unsigned int)__b, __c), \
18983
+ vector unsigned int \
18984
+ : __builtin_altivec_vinsw((vector unsigned char)__a, \
18985
+ (unsigned int)__b, __c), \
18986
+ vector unsigned long long \
18987
+ : __builtin_altivec_vinsd((vector unsigned char)__a, \
18988
+ (unsigned long long)__b, __c), \
18989
+ vector signed long long \
18990
+ : __builtin_altivec_vinsd((vector unsigned char)__a, \
18991
+ (unsigned long long)__b, __c), \
18992
+ vector float \
18993
+ : __builtin_altivec_vinsw((vector unsigned char)__a, \
18994
+ (unsigned int)__b, __c), \
18995
+ vector double \
18996
+ : __builtin_altivec_vinsd((vector unsigned char)__a, \
18997
+ (unsigned long long)__b, __c))
18777
18998
 
18778
- #define vec_replace_unaligned __builtin_altivec_vec_replace_unaligned
18999
+ #define vec_replace_elt(__a, __b, __c) \
19000
+ _Generic((__a), vector signed int \
19001
+ : (vector signed int)__builtin_altivec_vinsw_elt( \
19002
+ (vector unsigned char)__a, (unsigned int)__b, __c), \
19003
+ vector unsigned int \
19004
+ : (vector unsigned int)__builtin_altivec_vinsw_elt( \
19005
+ (vector unsigned char)__a, (unsigned int)__b, __c), \
19006
+ vector unsigned long long \
19007
+ : (vector unsigned long long)__builtin_altivec_vinsd_elt( \
19008
+ (vector unsigned char)__a, (unsigned long long)__b, __c), \
19009
+ vector signed long long \
19010
+ : (vector signed long long)__builtin_altivec_vinsd_elt( \
19011
+ (vector unsigned char)__a, (unsigned long long)__b, __c), \
19012
+ vector float \
19013
+ : (vector float)__builtin_altivec_vinsw_elt( \
19014
+ (vector unsigned char)__a, (unsigned int)__b, __c), \
19015
+ vector double \
19016
+ : (vector double)__builtin_altivec_vinsd_elt( \
19017
+ (vector unsigned char)__a, (unsigned long long)__b, __c))
18779
19018
 
18780
19019
  /* vec_splati */
18781
19020
 
@@ -18852,27 +19091,33 @@ vec_test_lsbb_all_zeros(vector unsigned char __a) {
18852
19091
  static __inline__ vector unsigned char __ATTRS_o_ai
18853
19092
  vec_stril(vector unsigned char __a) {
18854
19093
  #ifdef __LITTLE_ENDIAN__
18855
- return __builtin_altivec_vstribr((vector signed char)__a);
19094
+ return (vector unsigned char)__builtin_altivec_vstribr(
19095
+ (vector unsigned char)__a);
18856
19096
  #else
18857
- return __builtin_altivec_vstribl((vector signed char)__a);
19097
+ return (vector unsigned char)__builtin_altivec_vstribl(
19098
+ (vector unsigned char)__a);
18858
19099
  #endif
18859
19100
  }
18860
19101
 
18861
19102
  static __inline__ vector signed char __ATTRS_o_ai
18862
19103
  vec_stril(vector signed char __a) {
18863
19104
  #ifdef __LITTLE_ENDIAN__
18864
- return __builtin_altivec_vstribr(__a);
19105
+ return (vector signed char)__builtin_altivec_vstribr(
19106
+ (vector unsigned char)__a);
18865
19107
  #else
18866
- return __builtin_altivec_vstribl(__a);
19108
+ return (vector signed char)__builtin_altivec_vstribl(
19109
+ (vector unsigned char)__a);
18867
19110
  #endif
18868
19111
  }
18869
19112
 
18870
19113
  static __inline__ vector unsigned short __ATTRS_o_ai
18871
19114
  vec_stril(vector unsigned short __a) {
18872
19115
  #ifdef __LITTLE_ENDIAN__
18873
- return __builtin_altivec_vstrihr((vector signed short)__a);
19116
+ return (vector unsigned short)__builtin_altivec_vstrihr(
19117
+ (vector signed short)__a);
18874
19118
  #else
18875
- return __builtin_altivec_vstrihl((vector signed short)__a);
19119
+ return (vector unsigned short)__builtin_altivec_vstrihl(
19120
+ (vector signed short)__a);
18876
19121
  #endif
18877
19122
  }
18878
19123
 
@@ -18889,17 +19134,17 @@ vec_stril(vector signed short __a) {
18889
19134
 
18890
19135
  static __inline__ int __ATTRS_o_ai vec_stril_p(vector unsigned char __a) {
18891
19136
  #ifdef __LITTLE_ENDIAN__
18892
- return __builtin_altivec_vstribr_p(__CR6_EQ, (vector signed char)__a);
19137
+ return __builtin_altivec_vstribr_p(__CR6_EQ, (vector unsigned char)__a);
18893
19138
  #else
18894
- return __builtin_altivec_vstribl_p(__CR6_EQ, (vector signed char)__a);
19139
+ return __builtin_altivec_vstribl_p(__CR6_EQ, (vector unsigned char)__a);
18895
19140
  #endif
18896
19141
  }
18897
19142
 
18898
19143
  static __inline__ int __ATTRS_o_ai vec_stril_p(vector signed char __a) {
18899
19144
  #ifdef __LITTLE_ENDIAN__
18900
- return __builtin_altivec_vstribr_p(__CR6_EQ, __a);
19145
+ return __builtin_altivec_vstribr_p(__CR6_EQ, (vector unsigned char)__a);
18901
19146
  #else
18902
- return __builtin_altivec_vstribl_p(__CR6_EQ, __a);
19147
+ return __builtin_altivec_vstribl_p(__CR6_EQ, (vector unsigned char)__a);
18903
19148
  #endif
18904
19149
  }
18905
19150
 
@@ -18924,27 +19169,33 @@ static __inline__ int __ATTRS_o_ai vec_stril_p(vector signed short __a) {
18924
19169
  static __inline__ vector unsigned char __ATTRS_o_ai
18925
19170
  vec_strir(vector unsigned char __a) {
18926
19171
  #ifdef __LITTLE_ENDIAN__
18927
- return __builtin_altivec_vstribl((vector signed char)__a);
19172
+ return (vector unsigned char)__builtin_altivec_vstribl(
19173
+ (vector unsigned char)__a);
18928
19174
  #else
18929
- return __builtin_altivec_vstribr((vector signed char)__a);
19175
+ return (vector unsigned char)__builtin_altivec_vstribr(
19176
+ (vector unsigned char)__a);
18930
19177
  #endif
18931
19178
  }
18932
19179
 
18933
19180
  static __inline__ vector signed char __ATTRS_o_ai
18934
19181
  vec_strir(vector signed char __a) {
18935
19182
  #ifdef __LITTLE_ENDIAN__
18936
- return __builtin_altivec_vstribl(__a);
19183
+ return (vector signed char)__builtin_altivec_vstribl(
19184
+ (vector unsigned char)__a);
18937
19185
  #else
18938
- return __builtin_altivec_vstribr(__a);
19186
+ return (vector signed char)__builtin_altivec_vstribr(
19187
+ (vector unsigned char)__a);
18939
19188
  #endif
18940
19189
  }
18941
19190
 
18942
19191
  static __inline__ vector unsigned short __ATTRS_o_ai
18943
19192
  vec_strir(vector unsigned short __a) {
18944
19193
  #ifdef __LITTLE_ENDIAN__
18945
- return __builtin_altivec_vstrihl((vector signed short)__a);
19194
+ return (vector unsigned short)__builtin_altivec_vstrihl(
19195
+ (vector signed short)__a);
18946
19196
  #else
18947
- return __builtin_altivec_vstrihr((vector signed short)__a);
19197
+ return (vector unsigned short)__builtin_altivec_vstrihr(
19198
+ (vector signed short)__a);
18948
19199
  #endif
18949
19200
  }
18950
19201
 
@@ -18961,17 +19212,17 @@ vec_strir(vector signed short __a) {
18961
19212
 
18962
19213
  static __inline__ int __ATTRS_o_ai vec_strir_p(vector unsigned char __a) {
18963
19214
  #ifdef __LITTLE_ENDIAN__
18964
- return __builtin_altivec_vstribl_p(__CR6_EQ, (vector signed char)__a);
19215
+ return __builtin_altivec_vstribl_p(__CR6_EQ, (vector unsigned char)__a);
18965
19216
  #else
18966
- return __builtin_altivec_vstribr_p(__CR6_EQ, (vector signed char)__a);
19217
+ return __builtin_altivec_vstribr_p(__CR6_EQ, (vector unsigned char)__a);
18967
19218
  #endif
18968
19219
  }
18969
19220
 
18970
19221
  static __inline__ int __ATTRS_o_ai vec_strir_p(vector signed char __a) {
18971
19222
  #ifdef __LITTLE_ENDIAN__
18972
- return __builtin_altivec_vstribl_p(__CR6_EQ, __a);
19223
+ return __builtin_altivec_vstribl_p(__CR6_EQ, (vector unsigned char)__a);
18973
19224
  #else
18974
- return __builtin_altivec_vstribr_p(__CR6_EQ, __a);
19225
+ return __builtin_altivec_vstribr_p(__CR6_EQ, (vector unsigned char)__a);
18975
19226
  #endif
18976
19227
  }
18977
19228