@cpp-linter/clang-tidy-win32-x64 14.0.0 → 15.0.2

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 (192) hide show
  1. package/README.md +2 -2
  2. package/bin/clang-tidy.exe +2 -2
  3. package/lib/clang/{14.0.0 → 15.0.2}/include/__clang_cuda_intrinsics.h +7 -7
  4. package/lib/clang/{14.0.0 → 15.0.2}/include/__wmmintrin_pclmul.h +10 -10
  5. package/lib/clang/{14.0.0 → 15.0.2}/include/altivec.h +487 -248
  6. package/lib/clang/{14.0.0 → 15.0.2}/include/amxintrin.h +0 -2
  7. package/lib/clang/{14.0.0 → 15.0.2}/include/arm_sve.h +65 -61
  8. package/lib/clang/{14.0.0 → 15.0.2}/include/avx2intrin.h +8 -8
  9. package/lib/clang/{14.0.0 → 15.0.2}/include/avx512bwintrin.h +12 -12
  10. package/lib/clang/{14.0.0 → 15.0.2}/include/avx512fintrin.h +76 -73
  11. package/lib/clang/{14.0.0 → 15.0.2}/include/avx512vlbf16intrin.h +1 -1
  12. package/lib/clang/{14.0.0 → 15.0.2}/include/avx512vlbwintrin.h +8 -8
  13. package/lib/clang/{14.0.0 → 15.0.2}/include/avx512vlintrin.h +81 -95
  14. package/lib/clang/{14.0.0 → 15.0.2}/include/avx512vlvnniintrin.h +16 -16
  15. package/lib/clang/{14.0.0 → 15.0.2}/include/avxintrin.h +65 -30
  16. package/lib/clang/{14.0.0 → 15.0.2}/include/avxvnniintrin.h +16 -16
  17. package/lib/clang/{14.0.0 → 15.0.2}/include/bmiintrin.h +6 -2
  18. package/lib/clang/{14.0.0 → 15.0.2}/include/cetintrin.h +12 -6
  19. package/lib/clang/{14.0.0 → 15.0.2}/include/cpuid.h +1 -0
  20. package/lib/clang/{14.0.0 → 15.0.2}/include/emmintrin.h +549 -769
  21. package/lib/clang/{14.0.0 → 15.0.2}/include/f16cintrin.h +3 -3
  22. package/lib/clang/15.0.2/include/hlsl/hlsl_basic_types.h +64 -0
  23. package/lib/clang/15.0.2/include/hlsl/hlsl_intrinsics.h +15 -0
  24. package/lib/clang/15.0.2/include/hlsl.h +15 -0
  25. package/lib/clang/{14.0.0 → 15.0.2}/include/hresetintrin.h +2 -2
  26. package/lib/clang/{14.0.0 → 15.0.2}/include/ia32intrin.h +11 -11
  27. package/lib/clang/{14.0.0 → 15.0.2}/include/immintrin.h +15 -15
  28. package/lib/clang/{14.0.0 → 15.0.2}/include/intrin.h +12 -21
  29. package/lib/clang/{14.0.0 → 15.0.2}/include/keylockerintrin.h +22 -22
  30. package/lib/clang/{14.0.0 → 15.0.2}/include/mm_malloc.h +3 -3
  31. package/lib/clang/{14.0.0 → 15.0.2}/include/opencl-c-base.h +10 -0
  32. package/lib/clang/{14.0.0 → 15.0.2}/include/opencl-c.h +6794 -7020
  33. package/lib/clang/{14.0.0 → 15.0.2}/include/pmmintrin.h +1 -1
  34. package/lib/clang/15.0.2/include/ppc_wrappers/bmi2intrin.h +134 -0
  35. package/lib/clang/15.0.2/include/ppc_wrappers/bmiintrin.h +165 -0
  36. package/lib/clang/15.0.2/include/ppc_wrappers/emmintrin.h +2268 -0
  37. package/lib/clang/15.0.2/include/ppc_wrappers/immintrin.h +27 -0
  38. package/lib/clang/{14.0.0 → 15.0.2}/include/ppc_wrappers/mm_malloc.h +12 -17
  39. package/lib/clang/{14.0.0 → 15.0.2}/include/ppc_wrappers/mmintrin.h +389 -387
  40. package/lib/clang/15.0.2/include/ppc_wrappers/pmmintrin.h +145 -0
  41. package/lib/clang/15.0.2/include/ppc_wrappers/smmintrin.h +663 -0
  42. package/lib/clang/15.0.2/include/ppc_wrappers/tmmintrin.h +453 -0
  43. package/lib/clang/{14.0.0/include/stdnoreturn.h → 15.0.2/include/ppc_wrappers/x86gprintrin.h} +7 -6
  44. package/lib/clang/15.0.2/include/ppc_wrappers/x86intrin.h +28 -0
  45. package/lib/clang/15.0.2/include/ppc_wrappers/xmmintrin.h +1827 -0
  46. package/lib/clang/15.0.2/include/rdpruintrin.h +57 -0
  47. package/lib/clang/{14.0.0 → 15.0.2}/include/rdseedintrin.h +3 -3
  48. package/lib/clang/15.0.2/include/riscv_vector.h +202 -0
  49. package/lib/clang/{14.0.0 → 15.0.2}/include/rtmintrin.h +1 -1
  50. package/lib/clang/{14.0.0 → 15.0.2}/include/smmintrin.h +234 -257
  51. package/lib/clang/{14.0.0 → 15.0.2}/include/stdatomic.h +2 -5
  52. package/lib/clang/{14.0.0 → 15.0.2}/include/stdbool.h +9 -6
  53. package/lib/clang/{14.0.0 → 15.0.2}/include/stddef.h +1 -1
  54. package/lib/clang/15.0.2/include/stdnoreturn.h +29 -0
  55. package/lib/clang/{14.0.0 → 15.0.2}/include/uintrintrin.h +8 -8
  56. package/lib/clang/{14.0.0 → 15.0.2}/include/unwind.h +8 -5
  57. package/lib/clang/15.0.2/include/velintrin.h +71 -0
  58. package/lib/clang/15.0.2/include/velintrin_approx.h +120 -0
  59. package/lib/clang/15.0.2/include/velintrin_gen.h +1257 -0
  60. package/lib/clang/{14.0.0 → 15.0.2}/include/wasm_simd128.h +2 -2
  61. package/lib/clang/{14.0.0 → 15.0.2}/include/x86gprintrin.h +23 -5
  62. package/lib/clang/{14.0.0 → 15.0.2}/include/x86intrin.h +4 -0
  63. package/lib/clang/{14.0.0 → 15.0.2}/include/xmmintrin.h +9 -3
  64. package/package.json +6 -6
  65. package/lib/clang/14.0.0/include/ppc_wrappers/emmintrin.h +0 -2325
  66. package/lib/clang/14.0.0/include/ppc_wrappers/pmmintrin.h +0 -151
  67. package/lib/clang/14.0.0/include/ppc_wrappers/smmintrin.h +0 -110
  68. package/lib/clang/14.0.0/include/ppc_wrappers/tmmintrin.h +0 -496
  69. package/lib/clang/14.0.0/include/ppc_wrappers/xmmintrin.h +0 -1844
  70. package/lib/clang/14.0.0/include/riscv_vector.h +0 -95423
  71. package/lib/clang/{14.0.0 → 15.0.2}/include/__clang_cuda_builtin_vars.h +0 -0
  72. package/lib/clang/{14.0.0 → 15.0.2}/include/__clang_cuda_cmath.h +0 -0
  73. package/lib/clang/{14.0.0 → 15.0.2}/include/__clang_cuda_complex_builtins.h +0 -0
  74. package/lib/clang/{14.0.0 → 15.0.2}/include/__clang_cuda_device_functions.h +0 -0
  75. package/lib/clang/{14.0.0 → 15.0.2}/include/__clang_cuda_libdevice_declares.h +0 -0
  76. package/lib/clang/{14.0.0 → 15.0.2}/include/__clang_cuda_math.h +0 -0
  77. package/lib/clang/{14.0.0 → 15.0.2}/include/__clang_cuda_math_forward_declares.h +0 -0
  78. package/lib/clang/{14.0.0 → 15.0.2}/include/__clang_cuda_runtime_wrapper.h +0 -0
  79. package/lib/clang/{14.0.0 → 15.0.2}/include/__clang_cuda_texture_intrinsics.h +0 -0
  80. package/lib/clang/{14.0.0 → 15.0.2}/include/__clang_hip_cmath.h +0 -0
  81. package/lib/clang/{14.0.0 → 15.0.2}/include/__clang_hip_libdevice_declares.h +0 -0
  82. package/lib/clang/{14.0.0 → 15.0.2}/include/__clang_hip_math.h +0 -0
  83. package/lib/clang/{14.0.0 → 15.0.2}/include/__clang_hip_runtime_wrapper.h +0 -0
  84. package/lib/clang/{14.0.0 → 15.0.2}/include/__stddef_max_align_t.h +0 -0
  85. package/lib/clang/{14.0.0 → 15.0.2}/include/__wmmintrin_aes.h +0 -0
  86. package/lib/clang/{14.0.0 → 15.0.2}/include/adxintrin.h +0 -0
  87. package/lib/clang/{14.0.0 → 15.0.2}/include/ammintrin.h +0 -0
  88. package/lib/clang/{14.0.0 → 15.0.2}/include/arm64intr.h +0 -0
  89. package/lib/clang/{14.0.0 → 15.0.2}/include/arm_acle.h +0 -0
  90. package/lib/clang/{14.0.0 → 15.0.2}/include/arm_bf16.h +0 -0
  91. package/lib/clang/{14.0.0 → 15.0.2}/include/arm_cde.h +0 -0
  92. package/lib/clang/{14.0.0 → 15.0.2}/include/arm_cmse.h +0 -0
  93. package/lib/clang/{14.0.0 → 15.0.2}/include/arm_fp16.h +89 -89
  94. package/lib/clang/{14.0.0 → 15.0.2}/include/arm_mve.h +0 -0
  95. package/lib/clang/{14.0.0 → 15.0.2}/include/arm_neon.h +3999 -3999
  96. /package/lib/clang/{14.0.0 → 15.0.2}/include/arm_neon_sve_bridge.h +0 -0
  97. /package/lib/clang/{14.0.0 → 15.0.2}/include/armintr.h +0 -0
  98. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512bf16intrin.h +0 -0
  99. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512bitalgintrin.h +0 -0
  100. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512cdintrin.h +0 -0
  101. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512dqintrin.h +0 -0
  102. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512erintrin.h +0 -0
  103. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512fp16intrin.h +0 -0
  104. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512ifmaintrin.h +0 -0
  105. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512ifmavlintrin.h +0 -0
  106. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512pfintrin.h +0 -0
  107. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512vbmi2intrin.h +0 -0
  108. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512vbmiintrin.h +0 -0
  109. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512vbmivlintrin.h +0 -0
  110. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512vlbitalgintrin.h +0 -0
  111. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512vlcdintrin.h +0 -0
  112. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512vldqintrin.h +0 -0
  113. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512vlfp16intrin.h +0 -0
  114. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512vlvbmi2intrin.h +0 -0
  115. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512vlvp2intersectintrin.h +0 -0
  116. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512vnniintrin.h +0 -0
  117. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512vp2intersectintrin.h +0 -0
  118. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512vpopcntdqintrin.h +0 -0
  119. /package/lib/clang/{14.0.0 → 15.0.2}/include/avx512vpopcntdqvlintrin.h +0 -0
  120. /package/lib/clang/{14.0.0 → 15.0.2}/include/bmi2intrin.h +0 -0
  121. /package/lib/clang/{14.0.0 → 15.0.2}/include/builtins.h +0 -0
  122. /package/lib/clang/{14.0.0 → 15.0.2}/include/cet.h +0 -0
  123. /package/lib/clang/{14.0.0 → 15.0.2}/include/cldemoteintrin.h +0 -0
  124. /package/lib/clang/{14.0.0 → 15.0.2}/include/clflushoptintrin.h +0 -0
  125. /package/lib/clang/{14.0.0 → 15.0.2}/include/clwbintrin.h +0 -0
  126. /package/lib/clang/{14.0.0 → 15.0.2}/include/clzerointrin.h +0 -0
  127. /package/lib/clang/{14.0.0 → 15.0.2}/include/crc32intrin.h +0 -0
  128. /package/lib/clang/{14.0.0 → 15.0.2}/include/cuda_wrappers/algorithm +0 -0
  129. /package/lib/clang/{14.0.0 → 15.0.2}/include/cuda_wrappers/complex +0 -0
  130. /package/lib/clang/{14.0.0 → 15.0.2}/include/cuda_wrappers/new +0 -0
  131. /package/lib/clang/{14.0.0 → 15.0.2}/include/enqcmdintrin.h +0 -0
  132. /package/lib/clang/{14.0.0 → 15.0.2}/include/float.h +0 -0
  133. /package/lib/clang/{14.0.0 → 15.0.2}/include/fma4intrin.h +0 -0
  134. /package/lib/clang/{14.0.0 → 15.0.2}/include/fmaintrin.h +0 -0
  135. /package/lib/clang/{14.0.0 → 15.0.2}/include/fxsrintrin.h +0 -0
  136. /package/lib/clang/{14.0.0 → 15.0.2}/include/gfniintrin.h +0 -0
  137. /package/lib/clang/{14.0.0 → 15.0.2}/include/hexagon_circ_brev_intrinsics.h +0 -0
  138. /package/lib/clang/{14.0.0 → 15.0.2}/include/hexagon_protos.h +0 -0
  139. /package/lib/clang/{14.0.0 → 15.0.2}/include/hexagon_types.h +0 -0
  140. /package/lib/clang/{14.0.0 → 15.0.2}/include/htmintrin.h +0 -0
  141. /package/lib/clang/{14.0.0 → 15.0.2}/include/htmxlintrin.h +0 -0
  142. /package/lib/clang/{14.0.0 → 15.0.2}/include/hvx_hexagon_protos.h +0 -0
  143. /package/lib/clang/{14.0.0 → 15.0.2}/include/inttypes.h +0 -0
  144. /package/lib/clang/{14.0.0 → 15.0.2}/include/invpcidintrin.h +0 -0
  145. /package/lib/clang/{14.0.0 → 15.0.2}/include/iso646.h +0 -0
  146. /package/lib/clang/{14.0.0 → 15.0.2}/include/limits.h +0 -0
  147. /package/lib/clang/{14.0.0 → 15.0.2}/include/lwpintrin.h +0 -0
  148. /package/lib/clang/{14.0.0 → 15.0.2}/include/lzcntintrin.h +0 -0
  149. /package/lib/clang/{14.0.0 → 15.0.2}/include/mm3dnow.h +0 -0
  150. /package/lib/clang/{14.0.0 → 15.0.2}/include/mmintrin.h +0 -0
  151. /package/lib/clang/{14.0.0 → 15.0.2}/include/module.modulemap +0 -0
  152. /package/lib/clang/{14.0.0 → 15.0.2}/include/movdirintrin.h +0 -0
  153. /package/lib/clang/{14.0.0 → 15.0.2}/include/msa.h +0 -0
  154. /package/lib/clang/{14.0.0 → 15.0.2}/include/mwaitxintrin.h +0 -0
  155. /package/lib/clang/{14.0.0 → 15.0.2}/include/nmmintrin.h +0 -0
  156. /package/lib/clang/{14.0.0 → 15.0.2}/include/openmp_wrappers/__clang_openmp_device_functions.h +0 -0
  157. /package/lib/clang/{14.0.0 → 15.0.2}/include/openmp_wrappers/cmath +0 -0
  158. /package/lib/clang/{14.0.0 → 15.0.2}/include/openmp_wrappers/complex +0 -0
  159. /package/lib/clang/{14.0.0 → 15.0.2}/include/openmp_wrappers/complex.h +0 -0
  160. /package/lib/clang/{14.0.0 → 15.0.2}/include/openmp_wrappers/complex_cmath.h +0 -0
  161. /package/lib/clang/{14.0.0 → 15.0.2}/include/openmp_wrappers/math.h +0 -0
  162. /package/lib/clang/{14.0.0 → 15.0.2}/include/openmp_wrappers/new +0 -0
  163. /package/lib/clang/{14.0.0 → 15.0.2}/include/pconfigintrin.h +0 -0
  164. /package/lib/clang/{14.0.0 → 15.0.2}/include/pkuintrin.h +0 -0
  165. /package/lib/clang/{14.0.0 → 15.0.2}/include/popcntintrin.h +0 -0
  166. /package/lib/clang/{14.0.0 → 15.0.2}/include/prfchwintrin.h +0 -0
  167. /package/lib/clang/{14.0.0 → 15.0.2}/include/ptwriteintrin.h +0 -0
  168. /package/lib/clang/{14.0.0 → 15.0.2}/include/s390intrin.h +0 -0
  169. /package/lib/clang/{14.0.0 → 15.0.2}/include/serializeintrin.h +0 -0
  170. /package/lib/clang/{14.0.0 → 15.0.2}/include/sgxintrin.h +0 -0
  171. /package/lib/clang/{14.0.0 → 15.0.2}/include/shaintrin.h +0 -0
  172. /package/lib/clang/{14.0.0 → 15.0.2}/include/stdalign.h +0 -0
  173. /package/lib/clang/{14.0.0 → 15.0.2}/include/stdarg.h +0 -0
  174. /package/lib/clang/{14.0.0 → 15.0.2}/include/stdint.h +0 -0
  175. /package/lib/clang/{14.0.0 → 15.0.2}/include/tbmintrin.h +0 -0
  176. /package/lib/clang/{14.0.0 → 15.0.2}/include/tgmath.h +0 -0
  177. /package/lib/clang/{14.0.0 → 15.0.2}/include/tmmintrin.h +0 -0
  178. /package/lib/clang/{14.0.0 → 15.0.2}/include/tsxldtrkintrin.h +0 -0
  179. /package/lib/clang/{14.0.0 → 15.0.2}/include/vadefs.h +0 -0
  180. /package/lib/clang/{14.0.0 → 15.0.2}/include/vaesintrin.h +0 -0
  181. /package/lib/clang/{14.0.0 → 15.0.2}/include/varargs.h +0 -0
  182. /package/lib/clang/{14.0.0 → 15.0.2}/include/vecintrin.h +0 -0
  183. /package/lib/clang/{14.0.0 → 15.0.2}/include/vpclmulqdqintrin.h +0 -0
  184. /package/lib/clang/{14.0.0 → 15.0.2}/include/waitpkgintrin.h +0 -0
  185. /package/lib/clang/{14.0.0 → 15.0.2}/include/wbnoinvdintrin.h +0 -0
  186. /package/lib/clang/{14.0.0 → 15.0.2}/include/wmmintrin.h +0 -0
  187. /package/lib/clang/{14.0.0 → 15.0.2}/include/xopintrin.h +0 -0
  188. /package/lib/clang/{14.0.0 → 15.0.2}/include/xsavecintrin.h +0 -0
  189. /package/lib/clang/{14.0.0 → 15.0.2}/include/xsaveintrin.h +0 -0
  190. /package/lib/clang/{14.0.0 → 15.0.2}/include/xsaveoptintrin.h +0 -0
  191. /package/lib/clang/{14.0.0 → 15.0.2}/include/xsavesintrin.h +0 -0
  192. /package/lib/clang/{14.0.0 → 15.0.2}/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,34 +3202,40 @@ 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( \
3206
+ (__a), vector int \
3207
+ : (vector float)__builtin_altivec_vcfsx((vector int)(__a), (__b)), \
3208
+ vector unsigned int \
3209
+ : (vector float)__builtin_altivec_vcfux((vector unsigned int)(__a), \
3210
+ (__b)), \
3211
+ vector unsigned long long \
3212
+ : (vector float)(__builtin_vsx_xvcvuxdsp( \
3213
+ (vector unsigned long long)(__a)) * \
3214
+ (vector float)(vector unsigned)((0x7f - (__b)) << 23)), \
3215
+ vector signed long long \
3216
+ : (vector float)(__builtin_vsx_xvcvsxdsp( \
3217
+ (vector signed long long)(__a)) * \
3218
+ (vector float)(vector unsigned)((0x7f - (__b)) << 23)))
3195
3219
  #else // __XL_COMPAT_ALTIVEC__
3196
3220
  #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)))
3221
+ _Generic( \
3222
+ (__a), vector int \
3223
+ : (vector float)__builtin_altivec_vcfsx((vector int)(__a), (__b)), \
3224
+ vector unsigned int \
3225
+ : (vector float)__builtin_altivec_vcfux((vector unsigned int)(__a), \
3226
+ (__b)), \
3227
+ vector unsigned long long \
3228
+ : (vector float)(__builtin_convertvector( \
3229
+ (vector unsigned long long)(__a), vector double) * \
3230
+ (vector double)(vector unsigned long long)((0x3ffULL - \
3231
+ (__b)) \
3232
+ << 52)), \
3233
+ vector signed long long \
3234
+ : (vector float)(__builtin_convertvector((vector signed long long)(__a), \
3235
+ vector double) * \
3236
+ (vector double)(vector unsigned long long)((0x3ffULL - \
3237
+ (__b)) \
3238
+ << 52)))
3212
3239
  #endif // __XL_COMPAT_ALTIVEC__
3213
3240
  #else
3214
3241
  #define vec_ctf(__a, __b) \
@@ -3255,26 +3282,29 @@ static __inline__ vector double __ATTRS_o_ai vec_cpsgn(vector double __a,
3255
3282
  #ifdef __XL_COMPAT_ALTIVEC__
3256
3283
  #define vec_cts(__a, __b) \
3257
3284
  _Generic((__a), vector float \
3258
- : __builtin_altivec_vctsxs((vector float)(__a), (__b)), \
3285
+ : (vector signed int)__builtin_altivec_vctsxs((vector float)(__a), \
3286
+ (__b)), \
3259
3287
  vector double \
3260
3288
  : __extension__({ \
3261
3289
  vector double __ret = \
3262
3290
  (vector double)(__a) * \
3263
3291
  (vector double)(vector unsigned long long)((0x3ffULL + (__b)) \
3264
3292
  << 52); \
3265
- __builtin_vsx_xvcvdpsxws(__ret); \
3293
+ (vector signed long long)__builtin_vsx_xvcvdpsxws(__ret); \
3266
3294
  }))
3267
3295
  #else // __XL_COMPAT_ALTIVEC__
3268
3296
  #define vec_cts(__a, __b) \
3269
3297
  _Generic((__a), vector float \
3270
- : __builtin_altivec_vctsxs((vector float)(__a), (__b)), \
3298
+ : (vector signed int)__builtin_altivec_vctsxs((vector float)(__a), \
3299
+ (__b)), \
3271
3300
  vector double \
3272
3301
  : __extension__({ \
3273
3302
  vector double __ret = \
3274
3303
  (vector double)(__a) * \
3275
3304
  (vector double)(vector unsigned long long)((0x3ffULL + (__b)) \
3276
3305
  << 52); \
3277
- __builtin_convertvector(__ret, vector signed long long); \
3306
+ (vector signed long long)__builtin_convertvector( \
3307
+ __ret, vector signed long long); \
3278
3308
  }))
3279
3309
  #endif // __XL_COMPAT_ALTIVEC__
3280
3310
  #else
@@ -3291,26 +3321,29 @@ static __inline__ vector double __ATTRS_o_ai vec_cpsgn(vector double __a,
3291
3321
  #ifdef __XL_COMPAT_ALTIVEC__
3292
3322
  #define vec_ctu(__a, __b) \
3293
3323
  _Generic((__a), vector float \
3294
- : __builtin_altivec_vctuxs((vector float)(__a), (__b)), \
3324
+ : (vector unsigned int)__builtin_altivec_vctuxs( \
3325
+ (vector float)(__a), (__b)), \
3295
3326
  vector double \
3296
3327
  : __extension__({ \
3297
3328
  vector double __ret = \
3298
3329
  (vector double)(__a) * \
3299
3330
  (vector double)(vector unsigned long long)((0x3ffULL + __b) \
3300
3331
  << 52); \
3301
- __builtin_vsx_xvcvdpuxws(__ret); \
3332
+ (vector unsigned long long)__builtin_vsx_xvcvdpuxws(__ret); \
3302
3333
  }))
3303
3334
  #else // __XL_COMPAT_ALTIVEC__
3304
3335
  #define vec_ctu(__a, __b) \
3305
3336
  _Generic((__a), vector float \
3306
- : __builtin_altivec_vctuxs((vector float)(__a), (__b)), \
3337
+ : (vector unsigned int)__builtin_altivec_vctuxs( \
3338
+ (vector float)(__a), (__b)), \
3307
3339
  vector double \
3308
3340
  : __extension__({ \
3309
3341
  vector double __ret = \
3310
3342
  (vector double)(__a) * \
3311
3343
  (vector double)(vector unsigned long long)((0x3ffULL + __b) \
3312
3344
  << 52); \
3313
- __builtin_convertvector(__ret, vector unsigned long long); \
3345
+ (vector unsigned long long)__builtin_convertvector( \
3346
+ __ret, vector unsigned long long); \
3314
3347
  }))
3315
3348
  #endif // __XL_COMPAT_ALTIVEC__
3316
3349
  #else
@@ -6491,12 +6524,12 @@ vec_nand(vector signed char __a, vector signed char __b) {
6491
6524
 
6492
6525
  static __inline__ vector signed char __ATTRS_o_ai
6493
6526
  vec_nand(vector signed char __a, vector bool char __b) {
6494
- return ~(__a & __b);
6527
+ return ~(__a & (vector signed char)__b);
6495
6528
  }
6496
6529
 
6497
6530
  static __inline__ vector signed char __ATTRS_o_ai
6498
6531
  vec_nand(vector bool char __a, vector signed char __b) {
6499
- return ~(__a & __b);
6532
+ return (vector signed char)~(__a & (vector bool char)__b);
6500
6533
  }
6501
6534
 
6502
6535
  static __inline__ vector unsigned char __ATTRS_o_ai
@@ -6506,12 +6539,12 @@ vec_nand(vector unsigned char __a, vector unsigned char __b) {
6506
6539
 
6507
6540
  static __inline__ vector unsigned char __ATTRS_o_ai
6508
6541
  vec_nand(vector unsigned char __a, vector bool char __b) {
6509
- return ~(__a & __b);
6542
+ return ~(__a & (vector unsigned char)__b);
6510
6543
  }
6511
6544
 
6512
6545
  static __inline__ vector unsigned char __ATTRS_o_ai
6513
6546
  vec_nand(vector bool char __a, vector unsigned char __b) {
6514
- return ~(__a & __b);
6547
+ return (vector unsigned char)~(__a & (vector bool char)__b);
6515
6548
  }
6516
6549
 
6517
6550
  static __inline__ vector bool char __ATTRS_o_ai vec_nand(vector bool char __a,
@@ -6526,12 +6559,12 @@ vec_nand(vector signed short __a, vector signed short __b) {
6526
6559
 
6527
6560
  static __inline__ vector signed short __ATTRS_o_ai
6528
6561
  vec_nand(vector signed short __a, vector bool short __b) {
6529
- return ~(__a & __b);
6562
+ return ~(__a & (vector signed short)__b);
6530
6563
  }
6531
6564
 
6532
6565
  static __inline__ vector signed short __ATTRS_o_ai
6533
6566
  vec_nand(vector bool short __a, vector signed short __b) {
6534
- return ~(__a & __b);
6567
+ return (vector signed short)~(__a & (vector bool short)__b);
6535
6568
  }
6536
6569
 
6537
6570
  static __inline__ vector unsigned short __ATTRS_o_ai
@@ -6541,7 +6574,7 @@ vec_nand(vector unsigned short __a, vector unsigned short __b) {
6541
6574
 
6542
6575
  static __inline__ vector unsigned short __ATTRS_o_ai
6543
6576
  vec_nand(vector unsigned short __a, vector bool short __b) {
6544
- return ~(__a & __b);
6577
+ return ~(__a & (vector unsigned short)__b);
6545
6578
  }
6546
6579
 
6547
6580
  static __inline__ vector bool short __ATTRS_o_ai
@@ -6556,12 +6589,12 @@ vec_nand(vector signed int __a, vector signed int __b) {
6556
6589
 
6557
6590
  static __inline__ vector signed int __ATTRS_o_ai vec_nand(vector signed int __a,
6558
6591
  vector bool int __b) {
6559
- return ~(__a & __b);
6592
+ return ~(__a & (vector signed int)__b);
6560
6593
  }
6561
6594
 
6562
6595
  static __inline__ vector signed int __ATTRS_o_ai
6563
6596
  vec_nand(vector bool int __a, vector signed int __b) {
6564
- return ~(__a & __b);
6597
+ return (vector signed int)~(__a & (vector bool int)__b);
6565
6598
  }
6566
6599
 
6567
6600
  static __inline__ vector unsigned int __ATTRS_o_ai
@@ -6571,12 +6604,12 @@ vec_nand(vector unsigned int __a, vector unsigned int __b) {
6571
6604
 
6572
6605
  static __inline__ vector unsigned int __ATTRS_o_ai
6573
6606
  vec_nand(vector unsigned int __a, vector bool int __b) {
6574
- return ~(__a & __b);
6607
+ return ~(__a & (vector unsigned int)__b);
6575
6608
  }
6576
6609
 
6577
6610
  static __inline__ vector unsigned int __ATTRS_o_ai
6578
6611
  vec_nand(vector bool int __a, vector unsigned int __b) {
6579
- return ~(__a & __b);
6612
+ return (vector unsigned int)~(__a & (vector bool int)__b);
6580
6613
  }
6581
6614
 
6582
6615
  static __inline__ vector bool int __ATTRS_o_ai vec_nand(vector bool int __a,
@@ -6597,12 +6630,12 @@ vec_nand(vector signed long long __a, vector signed long long __b) {
6597
6630
 
6598
6631
  static __inline__ vector signed long long __ATTRS_o_ai
6599
6632
  vec_nand(vector signed long long __a, vector bool long long __b) {
6600
- return ~(__a & __b);
6633
+ return ~(__a & (vector signed long long)__b);
6601
6634
  }
6602
6635
 
6603
6636
  static __inline__ vector signed long long __ATTRS_o_ai
6604
6637
  vec_nand(vector bool long long __a, vector signed long long __b) {
6605
- return ~(__a & __b);
6638
+ return (vector signed long long)~(__a & (vector bool long long)__b);
6606
6639
  }
6607
6640
 
6608
6641
  static __inline__ vector unsigned long long __ATTRS_o_ai
@@ -6612,12 +6645,12 @@ vec_nand(vector unsigned long long __a, vector unsigned long long __b) {
6612
6645
 
6613
6646
  static __inline__ vector unsigned long long __ATTRS_o_ai
6614
6647
  vec_nand(vector unsigned long long __a, vector bool long long __b) {
6615
- return ~(__a & __b);
6648
+ return ~(__a & (vector unsigned long long)__b);
6616
6649
  }
6617
6650
 
6618
6651
  static __inline__ vector unsigned long long __ATTRS_o_ai
6619
6652
  vec_nand(vector bool long long __a, vector unsigned long long __b) {
6620
- return ~(__a & __b);
6653
+ return (vector unsigned long long)~(__a & (vector bool long long)__b);
6621
6654
  }
6622
6655
 
6623
6656
  static __inline__ vector bool long long __ATTRS_o_ai
@@ -7005,12 +7038,12 @@ vec_orc(vector signed char __a, vector signed char __b) {
7005
7038
 
7006
7039
  static __inline__ vector signed char __ATTRS_o_ai
7007
7040
  vec_orc(vector signed char __a, vector bool char __b) {
7008
- return __a | ~__b;
7041
+ return __a | (vector signed char)~__b;
7009
7042
  }
7010
7043
 
7011
7044
  static __inline__ vector signed char __ATTRS_o_ai
7012
7045
  vec_orc(vector bool char __a, vector signed char __b) {
7013
- return __a | ~__b;
7046
+ return (vector signed char)(__a | (vector bool char)~__b);
7014
7047
  }
7015
7048
 
7016
7049
  static __inline__ vector unsigned char __ATTRS_o_ai
@@ -7020,12 +7053,12 @@ vec_orc(vector unsigned char __a, vector unsigned char __b) {
7020
7053
 
7021
7054
  static __inline__ vector unsigned char __ATTRS_o_ai
7022
7055
  vec_orc(vector unsigned char __a, vector bool char __b) {
7023
- return __a | ~__b;
7056
+ return __a | (vector unsigned char)~__b;
7024
7057
  }
7025
7058
 
7026
7059
  static __inline__ vector unsigned char __ATTRS_o_ai
7027
7060
  vec_orc(vector bool char __a, vector unsigned char __b) {
7028
- return __a | ~__b;
7061
+ return (vector unsigned char)(__a | (vector bool char)~__b);
7029
7062
  }
7030
7063
 
7031
7064
  static __inline__ vector bool char __ATTRS_o_ai vec_orc(vector bool char __a,
@@ -7040,12 +7073,12 @@ vec_orc(vector signed short __a, vector signed short __b) {
7040
7073
 
7041
7074
  static __inline__ vector signed short __ATTRS_o_ai
7042
7075
  vec_orc(vector signed short __a, vector bool short __b) {
7043
- return __a | ~__b;
7076
+ return __a | (vector signed short)~__b;
7044
7077
  }
7045
7078
 
7046
7079
  static __inline__ vector signed short __ATTRS_o_ai
7047
7080
  vec_orc(vector bool short __a, vector signed short __b) {
7048
- return __a | ~__b;
7081
+ return (vector signed short)(__a | (vector bool short)~__b);
7049
7082
  }
7050
7083
 
7051
7084
  static __inline__ vector unsigned short __ATTRS_o_ai
@@ -7055,12 +7088,12 @@ vec_orc(vector unsigned short __a, vector unsigned short __b) {
7055
7088
 
7056
7089
  static __inline__ vector unsigned short __ATTRS_o_ai
7057
7090
  vec_orc(vector unsigned short __a, vector bool short __b) {
7058
- return __a | ~__b;
7091
+ return __a | (vector unsigned short)~__b;
7059
7092
  }
7060
7093
 
7061
7094
  static __inline__ vector unsigned short __ATTRS_o_ai
7062
7095
  vec_orc(vector bool short __a, vector unsigned short __b) {
7063
- return __a | ~__b;
7096
+ return (vector unsigned short)(__a | (vector bool short)~__b);
7064
7097
  }
7065
7098
 
7066
7099
  static __inline__ vector bool short __ATTRS_o_ai
@@ -7075,12 +7108,12 @@ vec_orc(vector signed int __a, vector signed int __b) {
7075
7108
 
7076
7109
  static __inline__ vector signed int __ATTRS_o_ai vec_orc(vector signed int __a,
7077
7110
  vector bool int __b) {
7078
- return __a | ~__b;
7111
+ return __a | (vector signed int)~__b;
7079
7112
  }
7080
7113
 
7081
7114
  static __inline__ vector signed int __ATTRS_o_ai
7082
7115
  vec_orc(vector bool int __a, vector signed int __b) {
7083
- return __a | ~__b;
7116
+ return (vector signed int)(__a | (vector bool int)~__b);
7084
7117
  }
7085
7118
 
7086
7119
  static __inline__ vector unsigned int __ATTRS_o_ai
@@ -7090,12 +7123,12 @@ vec_orc(vector unsigned int __a, vector unsigned int __b) {
7090
7123
 
7091
7124
  static __inline__ vector unsigned int __ATTRS_o_ai
7092
7125
  vec_orc(vector unsigned int __a, vector bool int __b) {
7093
- return __a | ~__b;
7126
+ return __a | (vector unsigned int)~__b;
7094
7127
  }
7095
7128
 
7096
7129
  static __inline__ vector unsigned int __ATTRS_o_ai
7097
7130
  vec_orc(vector bool int __a, vector unsigned int __b) {
7098
- return __a | ~__b;
7131
+ return (vector unsigned int)(__a | (vector bool int)~__b);
7099
7132
  }
7100
7133
 
7101
7134
  static __inline__ vector bool int __ATTRS_o_ai vec_orc(vector bool int __a,
@@ -7105,12 +7138,12 @@ static __inline__ vector bool int __ATTRS_o_ai vec_orc(vector bool int __a,
7105
7138
 
7106
7139
  static __inline__ vector float __ATTRS_o_ai
7107
7140
  vec_orc(vector bool int __a, vector float __b) {
7108
- return (vector float)(__a | ~(vector unsigned int)__b);
7141
+ return (vector float)(__a | ~(vector bool int)__b);
7109
7142
  }
7110
7143
 
7111
7144
  static __inline__ vector float __ATTRS_o_ai
7112
7145
  vec_orc(vector float __a, vector bool int __b) {
7113
- return (vector float)((vector unsigned int)__a | ~__b);
7146
+ return (vector float)((vector bool int)__a | ~__b);
7114
7147
  }
7115
7148
 
7116
7149
  static __inline__ vector float __ATTRS_o_ai vec_orc(vector float __a,
@@ -7125,12 +7158,12 @@ vec_orc(vector signed long long __a, vector signed long long __b) {
7125
7158
 
7126
7159
  static __inline__ vector signed long long __ATTRS_o_ai
7127
7160
  vec_orc(vector signed long long __a, vector bool long long __b) {
7128
- return __a | ~__b;
7161
+ return __a | (vector signed long long)~__b;
7129
7162
  }
7130
7163
 
7131
7164
  static __inline__ vector signed long long __ATTRS_o_ai
7132
7165
  vec_orc(vector bool long long __a, vector signed long long __b) {
7133
- return __a | ~__b;
7166
+ return (vector signed long long)(__a | (vector bool long long)~__b);
7134
7167
  }
7135
7168
 
7136
7169
  static __inline__ vector unsigned long long __ATTRS_o_ai
@@ -7140,12 +7173,12 @@ vec_orc(vector unsigned long long __a, vector unsigned long long __b) {
7140
7173
 
7141
7174
  static __inline__ vector unsigned long long __ATTRS_o_ai
7142
7175
  vec_orc(vector unsigned long long __a, vector bool long long __b) {
7143
- return __a | ~__b;
7176
+ return __a | (vector unsigned long long)~__b;
7144
7177
  }
7145
7178
 
7146
7179
  static __inline__ vector unsigned long long __ATTRS_o_ai
7147
7180
  vec_orc(vector bool long long __a, vector unsigned long long __b) {
7148
- return __a | ~__b;
7181
+ return (vector unsigned long long)(__a | (vector bool long long)~__b);
7149
7182
  }
7150
7183
 
7151
7184
  static __inline__ vector bool long long __ATTRS_o_ai
@@ -7155,17 +7188,17 @@ vec_orc(vector bool long long __a, vector bool long long __b) {
7155
7188
 
7156
7189
  static __inline__ vector double __ATTRS_o_ai
7157
7190
  vec_orc(vector double __a, vector bool long long __b) {
7158
- return (vector double)((vector unsigned long long)__a | ~__b);
7191
+ return (vector double)((vector bool long long)__a | ~__b);
7159
7192
  }
7160
7193
 
7161
7194
  static __inline__ vector double __ATTRS_o_ai
7162
7195
  vec_orc(vector bool long long __a, vector double __b) {
7163
- return (vector double)(__a | ~(vector unsigned long long)__b);
7196
+ return (vector double)(__a | ~(vector bool long long)__b);
7164
7197
  }
7165
7198
 
7166
7199
  static __inline__ vector double __ATTRS_o_ai vec_orc(vector double __a,
7167
7200
  vector double __b) {
7168
- return (vector double)((vector bool long long)__a |
7201
+ return (vector double)((vector unsigned long long)__a |
7169
7202
  ~(vector unsigned long long)__b);
7170
7203
  }
7171
7204
  #endif
@@ -8276,14 +8309,20 @@ vec_rl(vector signed long long __a, vector unsigned long long __b) {
8276
8309
 
8277
8310
  static __inline__ vector unsigned long long __ATTRS_o_ai
8278
8311
  vec_rl(vector unsigned long long __a, vector unsigned long long __b) {
8279
- return __builtin_altivec_vrld(__a, __b);
8312
+ return (vector unsigned long long)__builtin_altivec_vrld(
8313
+ (vector long long)__a, __b);
8280
8314
  }
8281
8315
  #endif
8282
8316
 
8283
8317
  #if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
8284
8318
  static __inline__ vector signed __int128 __ATTRS_o_ai
8285
8319
  vec_rl(vector signed __int128 __a, vector unsigned __int128 __b) {
8286
- return (__b << __a)|(__b >> ((__CHAR_BIT__ * sizeof(vector signed __int128)) - __a));
8320
+ return (vector signed __int128)(((vector unsigned __int128)__b
8321
+ << (vector unsigned __int128)__a) |
8322
+ ((vector unsigned __int128)__b >>
8323
+ ((__CHAR_BIT__ *
8324
+ sizeof(vector unsigned __int128)) -
8325
+ (vector unsigned __int128)__a)));
8287
8326
  }
8288
8327
 
8289
8328
  static __inline__ vector unsigned __int128 __ATTRS_o_ai
@@ -8317,7 +8356,9 @@ vec_rlmi(vector unsigned __int128 __a, vector unsigned __int128 __b,
8317
8356
  static __inline__ vector signed __int128 __ATTRS_o_ai
8318
8357
  vec_rlmi(vector signed __int128 __a, vector signed __int128 __b,
8319
8358
  vector signed __int128 __c) {
8320
- return __builtin_altivec_vrlqmi(__a, __c, __b);
8359
+ return (vector signed __int128)__builtin_altivec_vrlqmi(
8360
+ (vector unsigned __int128)__a, (vector unsigned __int128)__c,
8361
+ (vector unsigned __int128)__b);
8321
8362
  }
8322
8363
  #endif
8323
8364
 
@@ -8370,7 +8411,8 @@ vec_rlnm(vector signed __int128 __a, vector signed __int128 __b,
8370
8411
  __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, 31, 30, 15, -1,
8371
8412
  -1, -1, -1, -1, -1, -1, -1);
8372
8413
  #endif
8373
- return __builtin_altivec_vrlqnm(__a, (vector unsigned __int128) MaskAndShift);
8414
+ return (vector signed __int128)__builtin_altivec_vrlqnm(
8415
+ (vector unsigned __int128)__a, (vector unsigned __int128)MaskAndShift);
8374
8416
  }
8375
8417
  #endif
8376
8418
 
@@ -12070,13 +12112,15 @@ vec_subc(vector unsigned __int128 __a, vector unsigned __int128 __b) {
12070
12112
 
12071
12113
  static __inline__ vector signed __int128 __ATTRS_o_ai
12072
12114
  vec_subc(vector signed __int128 __a, vector signed __int128 __b) {
12073
- return __builtin_altivec_vsubcuq(__a, __b);
12115
+ return (vector signed __int128)__builtin_altivec_vsubcuq(
12116
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b);
12074
12117
  }
12075
12118
  #endif
12076
12119
 
12077
12120
  static __inline__ vector unsigned char __attribute__((__always_inline__))
12078
12121
  vec_subc_u128(vector unsigned char __a, vector unsigned char __b) {
12079
- return (vector unsigned char)__builtin_altivec_vsubcuq(__a, __b);
12122
+ return (vector unsigned char)__builtin_altivec_vsubcuq_c(
12123
+ (vector unsigned char)__a, (vector unsigned char)__b);
12080
12124
  }
12081
12125
  #endif // __POWER8_VECTOR__
12082
12126
 
@@ -12298,7 +12342,7 @@ vec_vsubuqm(vector unsigned __int128 __a, vector unsigned __int128 __b) {
12298
12342
 
12299
12343
  static __inline__ vector unsigned char __attribute__((__always_inline__))
12300
12344
  vec_sub_u128(vector unsigned char __a, vector unsigned char __b) {
12301
- return __builtin_altivec_vsubuqm(__a, __b);
12345
+ return (vector unsigned char)__builtin_altivec_vsubuqm(__a, __b);
12302
12346
  }
12303
12347
 
12304
12348
  /* vec_vsubeuqm */
@@ -12307,7 +12351,9 @@ vec_sub_u128(vector unsigned char __a, vector unsigned char __b) {
12307
12351
  static __inline__ vector signed __int128 __ATTRS_o_ai
12308
12352
  vec_vsubeuqm(vector signed __int128 __a, vector signed __int128 __b,
12309
12353
  vector signed __int128 __c) {
12310
- return __builtin_altivec_vsubeuqm(__a, __b, __c);
12354
+ return (vector signed __int128)__builtin_altivec_vsubeuqm(
12355
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b,
12356
+ (vector unsigned __int128)__c);
12311
12357
  }
12312
12358
 
12313
12359
  static __inline__ vector unsigned __int128 __ATTRS_o_ai
@@ -12319,7 +12365,9 @@ vec_vsubeuqm(vector unsigned __int128 __a, vector unsigned __int128 __b,
12319
12365
  static __inline__ vector signed __int128 __ATTRS_o_ai
12320
12366
  vec_sube(vector signed __int128 __a, vector signed __int128 __b,
12321
12367
  vector signed __int128 __c) {
12322
- return __builtin_altivec_vsubeuqm(__a, __b, __c);
12368
+ return (vector signed __int128)__builtin_altivec_vsubeuqm(
12369
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b,
12370
+ (vector unsigned __int128)__c);
12323
12371
  }
12324
12372
 
12325
12373
  static __inline__ vector unsigned __int128 __ATTRS_o_ai
@@ -12332,7 +12380,9 @@ vec_sube(vector unsigned __int128 __a, vector unsigned __int128 __b,
12332
12380
  static __inline__ vector unsigned char __attribute__((__always_inline__))
12333
12381
  vec_sube_u128(vector unsigned char __a, vector unsigned char __b,
12334
12382
  vector unsigned char __c) {
12335
- return (vector unsigned char)__builtin_altivec_vsubeuqm(__a, __b, __c);
12383
+ return (vector unsigned char)__builtin_altivec_vsubeuqm_c(
12384
+ (vector unsigned char)__a, (vector unsigned char)__b,
12385
+ (vector unsigned char)__c);
12336
12386
  }
12337
12387
 
12338
12388
  /* vec_vsubcuq */
@@ -12340,7 +12390,8 @@ vec_sube_u128(vector unsigned char __a, vector unsigned char __b,
12340
12390
  #ifdef __SIZEOF_INT128__
12341
12391
  static __inline__ vector signed __int128 __ATTRS_o_ai
12342
12392
  vec_vsubcuq(vector signed __int128 __a, vector signed __int128 __b) {
12343
- return __builtin_altivec_vsubcuq(__a, __b);
12393
+ return (vector signed __int128)__builtin_altivec_vsubcuq(
12394
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b);
12344
12395
  }
12345
12396
 
12346
12397
  static __inline__ vector unsigned __int128 __ATTRS_o_ai
@@ -12353,7 +12404,9 @@ vec_vsubcuq(vector unsigned __int128 __a, vector unsigned __int128 __b) {
12353
12404
  static __inline__ vector signed __int128 __ATTRS_o_ai
12354
12405
  vec_vsubecuq(vector signed __int128 __a, vector signed __int128 __b,
12355
12406
  vector signed __int128 __c) {
12356
- return __builtin_altivec_vsubecuq(__a, __b, __c);
12407
+ return (vector signed __int128)__builtin_altivec_vsubecuq(
12408
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b,
12409
+ (vector unsigned __int128)__c);
12357
12410
  }
12358
12411
 
12359
12412
  static __inline__ vector unsigned __int128 __ATTRS_o_ai
@@ -12381,7 +12434,9 @@ vec_subec(vector unsigned int __a, vector unsigned int __b,
12381
12434
  static __inline__ vector signed __int128 __ATTRS_o_ai
12382
12435
  vec_subec(vector signed __int128 __a, vector signed __int128 __b,
12383
12436
  vector signed __int128 __c) {
12384
- return __builtin_altivec_vsubecuq(__a, __b, __c);
12437
+ return (vector signed __int128)__builtin_altivec_vsubecuq(
12438
+ (vector unsigned __int128)__a, (vector unsigned __int128)__b,
12439
+ (vector unsigned __int128)__c);
12385
12440
  }
12386
12441
 
12387
12442
  static __inline__ vector unsigned __int128 __ATTRS_o_ai
@@ -12394,7 +12449,9 @@ vec_subec(vector unsigned __int128 __a, vector unsigned __int128 __b,
12394
12449
  static __inline__ vector unsigned char __attribute__((__always_inline__))
12395
12450
  vec_subec_u128(vector unsigned char __a, vector unsigned char __b,
12396
12451
  vector unsigned char __c) {
12397
- return (vector unsigned char)__builtin_altivec_vsubecuq(__a, __b, __c);
12452
+ return (vector unsigned char)__builtin_altivec_vsubecuq_c(
12453
+ (vector unsigned char)__a, (vector unsigned char)__b,
12454
+ (vector unsigned char)__c);
12398
12455
  }
12399
12456
  #endif // __POWER8_VECTOR__
12400
12457
 
@@ -14900,17 +14957,20 @@ static __inline__ int __ATTRS_o_ai vec_all_eq(vector double __a,
14900
14957
  #if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
14901
14958
  static __inline__ int __ATTRS_o_ai vec_all_eq(vector signed __int128 __a,
14902
14959
  vector signed __int128 __b) {
14903
- return __builtin_altivec_vcmpequq_p(__CR6_LT, __a, __b);
14960
+ return __builtin_altivec_vcmpequq_p(__CR6_LT, (vector unsigned __int128)__a,
14961
+ (vector signed __int128)__b);
14904
14962
  }
14905
14963
 
14906
14964
  static __inline__ int __ATTRS_o_ai vec_all_eq(vector unsigned __int128 __a,
14907
14965
  vector unsigned __int128 __b) {
14908
- return __builtin_altivec_vcmpequq_p(__CR6_LT, __a, __b);
14966
+ return __builtin_altivec_vcmpequq_p(__CR6_LT, __a,
14967
+ (vector signed __int128)__b);
14909
14968
  }
14910
14969
 
14911
14970
  static __inline__ int __ATTRS_o_ai vec_all_eq(vector bool __int128 __a,
14912
14971
  vector bool __int128 __b) {
14913
- 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);
14914
14974
  }
14915
14975
  #endif
14916
14976
 
@@ -15850,17 +15910,20 @@ static __inline__ int __ATTRS_o_ai vec_all_ne(vector double __a,
15850
15910
  #if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15851
15911
  static __inline__ int __ATTRS_o_ai vec_all_ne(vector signed __int128 __a,
15852
15912
  vector signed __int128 __b) {
15853
- return __builtin_altivec_vcmpequq_p(__CR6_EQ, __a, __b);
15913
+ return __builtin_altivec_vcmpequq_p(__CR6_EQ, (vector unsigned __int128)__a,
15914
+ __b);
15854
15915
  }
15855
15916
 
15856
15917
  static __inline__ int __ATTRS_o_ai vec_all_ne(vector unsigned __int128 __a,
15857
15918
  vector unsigned __int128 __b) {
15858
- return __builtin_altivec_vcmpequq_p(__CR6_EQ, __a, __b);
15919
+ return __builtin_altivec_vcmpequq_p(__CR6_EQ, __a,
15920
+ (vector signed __int128)__b);
15859
15921
  }
15860
15922
 
15861
15923
  static __inline__ int __ATTRS_o_ai vec_all_ne(vector bool __int128 __a,
15862
15924
  vector bool __int128 __b) {
15863
- return __builtin_altivec_vcmpequq_p(__CR6_EQ, __a, __b);
15925
+ return __builtin_altivec_vcmpequq_p(__CR6_EQ, (vector unsigned __int128)__a,
15926
+ (vector signed __int128)__b);
15864
15927
  }
15865
15928
  #endif
15866
15929
 
@@ -16144,17 +16207,20 @@ static __inline__ int __ATTRS_o_ai vec_any_eq(vector double __a,
16144
16207
  #if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
16145
16208
  static __inline__ int __ATTRS_o_ai vec_any_eq(vector signed __int128 __a,
16146
16209
  vector signed __int128 __b) {
16147
- return __builtin_altivec_vcmpequq_p(__CR6_EQ_REV, __a, __b);
16210
+ return __builtin_altivec_vcmpequq_p(__CR6_EQ_REV,
16211
+ (vector unsigned __int128)__a, __b);
16148
16212
  }
16149
16213
 
16150
16214
  static __inline__ int __ATTRS_o_ai vec_any_eq(vector unsigned __int128 __a,
16151
16215
  vector unsigned __int128 __b) {
16152
- return __builtin_altivec_vcmpequq_p(__CR6_EQ_REV, __a, __b);
16216
+ return __builtin_altivec_vcmpequq_p(__CR6_EQ_REV, __a,
16217
+ (vector signed __int128)__b);
16153
16218
  }
16154
16219
 
16155
16220
  static __inline__ int __ATTRS_o_ai vec_any_eq(vector bool __int128 __a,
16156
16221
  vector bool __int128 __b) {
16157
- return __builtin_altivec_vcmpequq_p(__CR6_EQ_REV, __a, __b);
16222
+ return __builtin_altivec_vcmpequq_p(
16223
+ __CR6_EQ_REV, (vector unsigned __int128)__a, (vector signed __int128)__b);
16158
16224
  }
16159
16225
  #endif
16160
16226
 
@@ -17124,17 +17190,20 @@ static __inline__ int __ATTRS_o_ai vec_any_ne(vector double __a,
17124
17190
  #if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
17125
17191
  static __inline__ int __ATTRS_o_ai vec_any_ne(vector signed __int128 __a,
17126
17192
  vector signed __int128 __b) {
17127
- return __builtin_altivec_vcmpequq_p(__CR6_LT_REV, __a, __b);
17193
+ return __builtin_altivec_vcmpequq_p(__CR6_LT_REV,
17194
+ (vector unsigned __int128)__a, __b);
17128
17195
  }
17129
17196
 
17130
17197
  static __inline__ int __ATTRS_o_ai vec_any_ne(vector unsigned __int128 __a,
17131
17198
  vector unsigned __int128 __b) {
17132
- return __builtin_altivec_vcmpequq_p(__CR6_LT_REV, __a, __b);
17199
+ return __builtin_altivec_vcmpequq_p(__CR6_LT_REV, __a,
17200
+ (vector signed __int128)__b);
17133
17201
  }
17134
17202
 
17135
17203
  static __inline__ int __ATTRS_o_ai vec_any_ne(vector bool __int128 __a,
17136
17204
  vector bool __int128 __b) {
17137
- return __builtin_altivec_vcmpequq_p(__CR6_LT_REV, __a, __b);
17205
+ return __builtin_altivec_vcmpequq_p(
17206
+ __CR6_LT_REV, (vector unsigned __int128)__a, (vector signed __int128)__b);
17138
17207
  }
17139
17208
  #endif
17140
17209
 
@@ -17297,13 +17366,17 @@ __builtin_crypto_vncipherlast(vector unsigned long long __a,
17297
17366
  static __inline__ vector bool char __ATTRS_o_ai
17298
17367
  vec_permxor(vector bool char __a, vector bool char __b,
17299
17368
  vector bool char __c) {
17300
- return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
17369
+ return (vector bool char)__builtin_altivec_crypto_vpermxor(
17370
+ (vector unsigned char)__a, (vector unsigned char)__b,
17371
+ (vector unsigned char)__c);
17301
17372
  }
17302
17373
 
17303
17374
  static __inline__ vector signed char __ATTRS_o_ai
17304
17375
  vec_permxor(vector signed char __a, vector signed char __b,
17305
17376
  vector signed char __c) {
17306
- return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
17377
+ return (vector signed char)__builtin_altivec_crypto_vpermxor(
17378
+ (vector unsigned char)__a, (vector unsigned char)__b,
17379
+ (vector unsigned char)__c);
17307
17380
  }
17308
17381
 
17309
17382
  static __inline__ vector unsigned char __ATTRS_o_ai
@@ -17365,7 +17438,7 @@ __builtin_crypto_vpmsumb(vector unsigned long long __a,
17365
17438
 
17366
17439
  static __inline__ vector signed char __ATTRS_o_ai
17367
17440
  vec_vgbbd(vector signed char __a) {
17368
- return __builtin_altivec_vgbbd((vector unsigned char)__a);
17441
+ return (vector signed char)__builtin_altivec_vgbbd((vector unsigned char)__a);
17369
17442
  }
17370
17443
 
17371
17444
  #define vec_pmsum_be __builtin_crypto_vpmsumb
@@ -17378,23 +17451,25 @@ vec_vgbbd(vector unsigned char __a) {
17378
17451
 
17379
17452
  static __inline__ vector signed long long __ATTRS_o_ai
17380
17453
  vec_gbb(vector signed long long __a) {
17381
- return __builtin_altivec_vgbbd((vector unsigned char)__a);
17454
+ return (vector signed long long)__builtin_altivec_vgbbd(
17455
+ (vector unsigned char)__a);
17382
17456
  }
17383
17457
 
17384
17458
  static __inline__ vector unsigned long long __ATTRS_o_ai
17385
17459
  vec_gbb(vector unsigned long long __a) {
17386
- return __builtin_altivec_vgbbd((vector unsigned char)__a);
17460
+ return (vector unsigned long long)__builtin_altivec_vgbbd(
17461
+ (vector unsigned char)__a);
17387
17462
  }
17388
17463
 
17389
17464
  static __inline__ vector long long __ATTRS_o_ai
17390
17465
  vec_vbpermq(vector signed char __a, vector signed char __b) {
17391
- return __builtin_altivec_vbpermq((vector unsigned char)__a,
17392
- (vector unsigned char)__b);
17466
+ return (vector long long)__builtin_altivec_vbpermq((vector unsigned char)__a,
17467
+ (vector unsigned char)__b);
17393
17468
  }
17394
17469
 
17395
17470
  static __inline__ vector long long __ATTRS_o_ai
17396
17471
  vec_vbpermq(vector unsigned char __a, vector unsigned char __b) {
17397
- return __builtin_altivec_vbpermq(__a, __b);
17472
+ return (vector long long)__builtin_altivec_vbpermq(__a, __b);
17398
17473
  }
17399
17474
 
17400
17475
  #if defined(__powerpc64__) && defined(__SIZEOF_INT128__)
@@ -17406,7 +17481,7 @@ vec_bperm(vector unsigned __int128 __a, vector unsigned char __b) {
17406
17481
  #endif
17407
17482
  static __inline__ vector unsigned char __ATTRS_o_ai
17408
17483
  vec_bperm(vector unsigned char __a, vector unsigned char __b) {
17409
- return __builtin_altivec_vbpermq(__a, __b);
17484
+ return (vector unsigned char)__builtin_altivec_vbpermq(__a, __b);
17410
17485
  }
17411
17486
  #endif // __POWER8_VECTOR__
17412
17487
  #ifdef __POWER9_VECTOR__
@@ -17777,26 +17852,26 @@ vec_xl_be(signed long long __offset, const unsigned __int128 *__ptr) {
17777
17852
  #if defined(__POWER10_VECTOR__) && defined(__VSX__) && \
17778
17853
  defined(__SIZEOF_INT128__)
17779
17854
 
17780
- /* vect_xl_sext */
17855
+ /* vec_xl_sext */
17781
17856
 
17782
- static __inline__ vector unsigned __int128 __ATTRS_o_ai
17857
+ static __inline__ vector signed __int128 __ATTRS_o_ai
17783
17858
  vec_xl_sext(ptrdiff_t __offset, const signed char *__pointer) {
17784
- return (vector unsigned __int128)*(__pointer + __offset);
17859
+ return (vector signed __int128)*(__pointer + __offset);
17785
17860
  }
17786
17861
 
17787
- static __inline__ vector unsigned __int128 __ATTRS_o_ai
17862
+ static __inline__ vector signed __int128 __ATTRS_o_ai
17788
17863
  vec_xl_sext(ptrdiff_t __offset, const signed short *__pointer) {
17789
- return (vector unsigned __int128)*(__pointer + __offset);
17864
+ return (vector signed __int128)*(__pointer + __offset);
17790
17865
  }
17791
17866
 
17792
- static __inline__ vector unsigned __int128 __ATTRS_o_ai
17867
+ static __inline__ vector signed __int128 __ATTRS_o_ai
17793
17868
  vec_xl_sext(ptrdiff_t __offset, const signed int *__pointer) {
17794
- return (vector unsigned __int128)*(__pointer + __offset);
17869
+ return (vector signed __int128)*(__pointer + __offset);
17795
17870
  }
17796
17871
 
17797
- static __inline__ vector unsigned __int128 __ATTRS_o_ai
17872
+ static __inline__ vector signed __int128 __ATTRS_o_ai
17798
17873
  vec_xl_sext(ptrdiff_t __offset, const signed long long *__pointer) {
17799
- return (vector unsigned __int128)*(__pointer + __offset);
17874
+ return (vector signed __int128)*(__pointer + __offset);
17800
17875
  }
17801
17876
 
17802
17877
  /* vec_xl_zext */
@@ -18260,13 +18335,17 @@ vec_expandm(vector unsigned __int128 __a) {
18260
18335
 
18261
18336
  #define vec_cntm(__a, __mp) \
18262
18337
  _Generic((__a), vector unsigned char \
18263
- : __builtin_altivec_vcntmbb((__a), (unsigned char)(__mp)), \
18338
+ : __builtin_altivec_vcntmbb((vector unsigned char)(__a), \
18339
+ (unsigned char)(__mp)), \
18264
18340
  vector unsigned short \
18265
- : __builtin_altivec_vcntmbh((__a), (unsigned char)(__mp)), \
18341
+ : __builtin_altivec_vcntmbh((vector unsigned short)(__a), \
18342
+ (unsigned char)(__mp)), \
18266
18343
  vector unsigned int \
18267
- : __builtin_altivec_vcntmbw((__a), (unsigned char)(__mp)), \
18344
+ : __builtin_altivec_vcntmbw((vector unsigned int)(__a), \
18345
+ (unsigned char)(__mp)), \
18268
18346
  vector unsigned long long \
18269
- : __builtin_altivec_vcntmbd((__a), (unsigned char)(__mp)))
18347
+ : __builtin_altivec_vcntmbd((vector unsigned long long)(__a), \
18348
+ (unsigned char)(__mp)))
18270
18349
 
18271
18350
  /* vec_gen[b|h|w|d|q]m */
18272
18351
 
@@ -18327,43 +18406,52 @@ vec_cfuge(vector unsigned long long __a, vector unsigned long long __b) {
18327
18406
  #ifdef __SIZEOF_INT128__
18328
18407
  #define vec_ternarylogic(__a, __b, __c, __imm) \
18329
18408
  _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)), \
18409
+ : (vector unsigned char)__builtin_vsx_xxeval( \
18410
+ (vector unsigned long long)(__a), \
18411
+ (vector unsigned long long)(__b), \
18412
+ (vector unsigned long long)(__c), (__imm)), \
18333
18413
  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)), \
18414
+ : (vector unsigned short)__builtin_vsx_xxeval( \
18415
+ (vector unsigned long long)(__a), \
18416
+ (vector unsigned long long)(__b), \
18417
+ (vector unsigned long long)(__c), (__imm)), \
18337
18418
  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)), \
18419
+ : (vector unsigned int)__builtin_vsx_xxeval( \
18420
+ (vector unsigned long long)(__a), \
18421
+ (vector unsigned long long)(__b), \
18422
+ (vector unsigned long long)(__c), (__imm)), \
18341
18423
  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)), \
18424
+ : (vector unsigned long long)__builtin_vsx_xxeval( \
18425
+ (vector unsigned long long)(__a), \
18426
+ (vector unsigned long long)(__b), \
18427
+ (vector unsigned long long)(__c), (__imm)), \
18345
18428
  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)))
18429
+ : (vector unsigned __int128)__builtin_vsx_xxeval( \
18430
+ (vector unsigned long long)(__a), \
18431
+ (vector unsigned long long)(__b), \
18432
+ (vector unsigned long long)(__c), (__imm)))
18349
18433
  #else
18350
18434
  #define vec_ternarylogic(__a, __b, __c, __imm) \
18351
18435
  _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)), \
18436
+ : (vector unsigned char)__builtin_vsx_xxeval( \
18437
+ (vector unsigned long long)(__a), \
18438
+ (vector unsigned long long)(__b), \
18439
+ (vector unsigned long long)(__c), (__imm)), \
18355
18440
  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)), \
18441
+ : (vector unsigned short)__builtin_vsx_xxeval( \
18442
+ (vector unsigned long long)(__a), \
18443
+ (vector unsigned long long)(__b), \
18444
+ (vector unsigned long long)(__c), (__imm)), \
18359
18445
  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)), \
18446
+ : (vector unsigned int)__builtin_vsx_xxeval( \
18447
+ (vector unsigned long long)(__a), \
18448
+ (vector unsigned long long)(__b), \
18449
+ (vector unsigned long long)(__c), (__imm)), \
18363
18450
  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)))
18451
+ : (vector unsigned long long)__builtin_vsx_xxeval( \
18452
+ (vector unsigned long long)(__a), \
18453
+ (vector unsigned long long)(__b), \
18454
+ (vector unsigned long long)(__c), (__imm)))
18367
18455
  #endif /* __SIZEOF_INT128__ */
18368
18456
  #endif /* __VSX__ */
18369
18457
 
@@ -18371,14 +18459,16 @@ vec_cfuge(vector unsigned long long __a, vector unsigned long long __b) {
18371
18459
 
18372
18460
  #ifdef __VSX__
18373
18461
  #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)))
18462
+ _Generic( \
18463
+ (__a), vector unsigned char \
18464
+ : __builtin_vsx_xxgenpcvbm((vector unsigned char)(__a), (int)(__imm)), \
18465
+ vector unsigned short \
18466
+ : __builtin_vsx_xxgenpcvhm((vector unsigned short)(__a), (int)(__imm)), \
18467
+ vector unsigned int \
18468
+ : __builtin_vsx_xxgenpcvwm((vector unsigned int)(__a), (int)(__imm)), \
18469
+ vector unsigned long long \
18470
+ : __builtin_vsx_xxgenpcvdm((vector unsigned long long)(__a), \
18471
+ (int)(__imm)))
18382
18472
  #endif /* __VSX__ */
18383
18473
 
18384
18474
  /* vec_clr_first */
@@ -18386,18 +18476,22 @@ vec_cfuge(vector unsigned long long __a, vector unsigned long long __b) {
18386
18476
  static __inline__ vector signed char __ATTRS_o_ai
18387
18477
  vec_clr_first(vector signed char __a, unsigned int __n) {
18388
18478
  #ifdef __LITTLE_ENDIAN__
18389
- return __builtin_altivec_vclrrb(__a, __n);
18479
+ return (vector signed char)__builtin_altivec_vclrrb((vector unsigned char)__a,
18480
+ __n);
18390
18481
  #else
18391
- return __builtin_altivec_vclrlb( __a, __n);
18482
+ return (vector signed char)__builtin_altivec_vclrlb((vector unsigned char)__a,
18483
+ __n);
18392
18484
  #endif
18393
18485
  }
18394
18486
 
18395
18487
  static __inline__ vector unsigned char __ATTRS_o_ai
18396
18488
  vec_clr_first(vector unsigned char __a, unsigned int __n) {
18397
18489
  #ifdef __LITTLE_ENDIAN__
18398
- return __builtin_altivec_vclrrb((vector signed char)__a, __n);
18490
+ return (vector unsigned char)__builtin_altivec_vclrrb(
18491
+ (vector unsigned char)__a, __n);
18399
18492
  #else
18400
- return __builtin_altivec_vclrlb((vector signed char)__a, __n);
18493
+ return (vector unsigned char)__builtin_altivec_vclrlb(
18494
+ (vector unsigned char)__a, __n);
18401
18495
  #endif
18402
18496
  }
18403
18497
 
@@ -18406,18 +18500,22 @@ vec_clr_first(vector unsigned char __a, unsigned int __n) {
18406
18500
  static __inline__ vector signed char __ATTRS_o_ai
18407
18501
  vec_clr_last(vector signed char __a, unsigned int __n) {
18408
18502
  #ifdef __LITTLE_ENDIAN__
18409
- return __builtin_altivec_vclrlb(__a, __n);
18503
+ return (vector signed char)__builtin_altivec_vclrlb((vector unsigned char)__a,
18504
+ __n);
18410
18505
  #else
18411
- return __builtin_altivec_vclrrb( __a, __n);
18506
+ return (vector signed char)__builtin_altivec_vclrrb((vector unsigned char)__a,
18507
+ __n);
18412
18508
  #endif
18413
18509
  }
18414
18510
 
18415
18511
  static __inline__ vector unsigned char __ATTRS_o_ai
18416
18512
  vec_clr_last(vector unsigned char __a, unsigned int __n) {
18417
18513
  #ifdef __LITTLE_ENDIAN__
18418
- return __builtin_altivec_vclrlb((vector signed char)__a, __n);
18514
+ return (vector unsigned char)__builtin_altivec_vclrlb(
18515
+ (vector unsigned char)__a, __n);
18419
18516
  #else
18420
- return __builtin_altivec_vclrrb((vector signed char)__a, __n);
18517
+ return (vector unsigned char)__builtin_altivec_vclrrb(
18518
+ (vector unsigned char)__a, __n);
18421
18519
  #endif
18422
18520
  }
18423
18521
 
@@ -18469,13 +18567,75 @@ vec_mod(vector unsigned __int128 __a, vector unsigned __int128 __b) {
18469
18567
  }
18470
18568
  #endif
18471
18569
 
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))
18570
+ /* vec_sldb */
18571
+ #define vec_sldb(__a, __b, __c) \
18572
+ _Generic( \
18573
+ (__a), vector unsigned char \
18574
+ : (vector unsigned char)__builtin_altivec_vsldbi( \
18575
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18576
+ (__c & 0x7)), \
18577
+ vector signed char \
18578
+ : (vector signed char)__builtin_altivec_vsldbi( \
18579
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18580
+ (__c & 0x7)), \
18581
+ vector unsigned short \
18582
+ : (vector unsigned short)__builtin_altivec_vsldbi( \
18583
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18584
+ (__c & 0x7)), \
18585
+ vector signed short \
18586
+ : (vector signed short)__builtin_altivec_vsldbi( \
18587
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18588
+ (__c & 0x7)), \
18589
+ vector unsigned int \
18590
+ : (vector unsigned int)__builtin_altivec_vsldbi( \
18591
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18592
+ (__c & 0x7)), \
18593
+ vector signed int \
18594
+ : (vector signed int)__builtin_altivec_vsldbi((vector unsigned char)__a, \
18595
+ (vector unsigned char)__b, \
18596
+ (__c & 0x7)), \
18597
+ vector unsigned long long \
18598
+ : (vector unsigned long long)__builtin_altivec_vsldbi( \
18599
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18600
+ (__c & 0x7)), \
18601
+ vector signed long long \
18602
+ : (vector signed long long)__builtin_altivec_vsldbi( \
18603
+ (vector unsigned char)__a, (vector unsigned char)__b, (__c & 0x7)))
18604
+
18605
+ /* vec_srdb */
18606
+ #define vec_srdb(__a, __b, __c) \
18607
+ _Generic( \
18608
+ (__a), vector unsigned char \
18609
+ : (vector unsigned char)__builtin_altivec_vsrdbi( \
18610
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18611
+ (__c & 0x7)), \
18612
+ vector signed char \
18613
+ : (vector signed char)__builtin_altivec_vsrdbi( \
18614
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18615
+ (__c & 0x7)), \
18616
+ vector unsigned short \
18617
+ : (vector unsigned short)__builtin_altivec_vsrdbi( \
18618
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18619
+ (__c & 0x7)), \
18620
+ vector signed short \
18621
+ : (vector signed short)__builtin_altivec_vsrdbi( \
18622
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18623
+ (__c & 0x7)), \
18624
+ vector unsigned int \
18625
+ : (vector unsigned int)__builtin_altivec_vsrdbi( \
18626
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18627
+ (__c & 0x7)), \
18628
+ vector signed int \
18629
+ : (vector signed int)__builtin_altivec_vsrdbi((vector unsigned char)__a, \
18630
+ (vector unsigned char)__b, \
18631
+ (__c & 0x7)), \
18632
+ vector unsigned long long \
18633
+ : (vector unsigned long long)__builtin_altivec_vsrdbi( \
18634
+ (vector unsigned char)__a, (vector unsigned char)__b, \
18635
+ (__c & 0x7)), \
18636
+ vector signed long long \
18637
+ : (vector signed long long)__builtin_altivec_vsrdbi( \
18638
+ (vector unsigned char)__a, (vector unsigned char)__b, (__c & 0x7)))
18479
18639
 
18480
18640
  /* vec_insertl */
18481
18641
 
@@ -18704,16 +18864,46 @@ vec_extracth(vector unsigned long long __a, vector unsigned long long __b,
18704
18864
  #ifdef __VSX__
18705
18865
 
18706
18866
  /* vec_permx */
18707
-
18708
18867
  #define vec_permx(__a, __b, __c, __d) \
18709
- __builtin_vsx_xxpermx((__a), (__b), (__c), (__d))
18868
+ _Generic( \
18869
+ (__a), vector unsigned char \
18870
+ : (vector unsigned char)__builtin_vsx_xxpermx( \
18871
+ (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18872
+ vector signed char \
18873
+ : (vector signed char)__builtin_vsx_xxpermx( \
18874
+ (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18875
+ vector unsigned short \
18876
+ : (vector unsigned short)__builtin_vsx_xxpermx( \
18877
+ (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18878
+ vector signed short \
18879
+ : (vector signed short)__builtin_vsx_xxpermx( \
18880
+ (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18881
+ vector unsigned int \
18882
+ : (vector unsigned int)__builtin_vsx_xxpermx( \
18883
+ (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18884
+ vector signed int \
18885
+ : (vector signed int)__builtin_vsx_xxpermx( \
18886
+ (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18887
+ vector unsigned long long \
18888
+ : (vector unsigned long long)__builtin_vsx_xxpermx( \
18889
+ (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18890
+ vector signed long long \
18891
+ : (vector signed long long)__builtin_vsx_xxpermx( \
18892
+ (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18893
+ vector float \
18894
+ : (vector float)__builtin_vsx_xxpermx( \
18895
+ (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18896
+ vector double \
18897
+ : (vector double)__builtin_vsx_xxpermx( \
18898
+ (vector unsigned char)__a, (vector unsigned char)__b, __c, __d))
18710
18899
 
18711
18900
  /* vec_blendv */
18712
18901
 
18713
18902
  static __inline__ vector signed char __ATTRS_o_ai
18714
18903
  vec_blendv(vector signed char __a, vector signed char __b,
18715
18904
  vector unsigned char __c) {
18716
- return __builtin_vsx_xxblendvb(__a, __b, __c);
18905
+ return (vector signed char)__builtin_vsx_xxblendvb(
18906
+ (vector unsigned char)__a, (vector unsigned char)__b, __c);
18717
18907
  }
18718
18908
 
18719
18909
  static __inline__ vector unsigned char __ATTRS_o_ai
@@ -18725,7 +18915,8 @@ vec_blendv(vector unsigned char __a, vector unsigned char __b,
18725
18915
  static __inline__ vector signed short __ATTRS_o_ai
18726
18916
  vec_blendv(vector signed short __a, vector signed short __b,
18727
18917
  vector unsigned short __c) {
18728
- return __builtin_vsx_xxblendvh(__a, __b, __c);
18918
+ return (vector signed short)__builtin_vsx_xxblendvh(
18919
+ (vector unsigned short)__a, (vector unsigned short)__b, __c);
18729
18920
  }
18730
18921
 
18731
18922
  static __inline__ vector unsigned short __ATTRS_o_ai
@@ -18737,7 +18928,8 @@ vec_blendv(vector unsigned short __a, vector unsigned short __b,
18737
18928
  static __inline__ vector signed int __ATTRS_o_ai
18738
18929
  vec_blendv(vector signed int __a, vector signed int __b,
18739
18930
  vector unsigned int __c) {
18740
- return __builtin_vsx_xxblendvw(__a, __b, __c);
18931
+ return (vector signed int)__builtin_vsx_xxblendvw(
18932
+ (vector unsigned int)__a, (vector unsigned int)__b, __c);
18741
18933
  }
18742
18934
 
18743
18935
  static __inline__ vector unsigned int __ATTRS_o_ai
@@ -18749,33 +18941,68 @@ vec_blendv(vector unsigned int __a, vector unsigned int __b,
18749
18941
  static __inline__ vector signed long long __ATTRS_o_ai
18750
18942
  vec_blendv(vector signed long long __a, vector signed long long __b,
18751
18943
  vector unsigned long long __c) {
18752
- return __builtin_vsx_xxblendvd(__a, __b, __c);
18944
+ return (vector signed long long)__builtin_vsx_xxblendvd(
18945
+ (vector unsigned long long)__a, (vector unsigned long long)__b, __c);
18753
18946
  }
18754
18947
 
18755
18948
  static __inline__ vector unsigned long long __ATTRS_o_ai
18756
18949
  vec_blendv(vector unsigned long long __a, vector unsigned long long __b,
18757
18950
  vector unsigned long long __c) {
18758
- return __builtin_vsx_xxblendvd(__a, __b, __c);
18951
+ return (vector unsigned long long)__builtin_vsx_xxblendvd(__a, __b, __c);
18759
18952
  }
18760
18953
 
18761
18954
  static __inline__ vector float __ATTRS_o_ai
18762
18955
  vec_blendv(vector float __a, vector float __b, vector unsigned int __c) {
18763
- return __builtin_vsx_xxblendvw(__a, __b, __c);
18956
+ return (vector float)__builtin_vsx_xxblendvw((vector unsigned int)__a,
18957
+ (vector unsigned int)__b, __c);
18764
18958
  }
18765
18959
 
18766
18960
  static __inline__ vector double __ATTRS_o_ai
18767
18961
  vec_blendv(vector double __a, vector double __b,
18768
18962
  vector unsigned long long __c) {
18769
- return __builtin_vsx_xxblendvd(__a, __b, __c);
18963
+ return (vector double)__builtin_vsx_xxblendvd(
18964
+ (vector unsigned long long)__a, (vector unsigned long long)__b, __c);
18770
18965
  }
18771
18966
 
18772
- /* vec_replace_elt */
18773
-
18774
- #define vec_replace_elt __builtin_altivec_vec_replace_elt
18775
-
18776
- /* vec_replace_unaligned */
18967
+ #define vec_replace_unaligned(__a, __b, __c) \
18968
+ _Generic((__a), vector signed int \
18969
+ : __builtin_altivec_vinsw((vector unsigned char)__a, \
18970
+ (unsigned int)__b, __c), \
18971
+ vector unsigned int \
18972
+ : __builtin_altivec_vinsw((vector unsigned char)__a, \
18973
+ (unsigned int)__b, __c), \
18974
+ vector unsigned long long \
18975
+ : __builtin_altivec_vinsd((vector unsigned char)__a, \
18976
+ (unsigned long long)__b, __c), \
18977
+ vector signed long long \
18978
+ : __builtin_altivec_vinsd((vector unsigned char)__a, \
18979
+ (unsigned long long)__b, __c), \
18980
+ vector float \
18981
+ : __builtin_altivec_vinsw((vector unsigned char)__a, \
18982
+ (unsigned int)__b, __c), \
18983
+ vector double \
18984
+ : __builtin_altivec_vinsd((vector unsigned char)__a, \
18985
+ (unsigned long long)__b, __c))
18777
18986
 
18778
- #define vec_replace_unaligned __builtin_altivec_vec_replace_unaligned
18987
+ #define vec_replace_elt(__a, __b, __c) \
18988
+ _Generic((__a), vector signed int \
18989
+ : (vector signed int)__builtin_altivec_vinsw_elt( \
18990
+ (vector unsigned char)__a, (unsigned int)__b, __c), \
18991
+ vector unsigned int \
18992
+ : (vector unsigned int)__builtin_altivec_vinsw_elt( \
18993
+ (vector unsigned char)__a, (unsigned int)__b, __c), \
18994
+ vector unsigned long long \
18995
+ : (vector unsigned long long)__builtin_altivec_vinsd_elt( \
18996
+ (vector unsigned char)__a, (unsigned long long)__b, __c), \
18997
+ vector signed long long \
18998
+ : (vector signed long long)__builtin_altivec_vinsd_elt( \
18999
+ (vector unsigned char)__a, (unsigned long long)__b, __c), \
19000
+ vector float \
19001
+ : (vector float)__builtin_altivec_vinsw_elt( \
19002
+ (vector unsigned char)__a, (unsigned int)__b, __c), \
19003
+ vector double \
19004
+ : (vector double)__builtin_altivec_vinsd_elt( \
19005
+ (vector unsigned char)__a, (unsigned long long)__b, __c))
18779
19006
 
18780
19007
  /* vec_splati */
18781
19008
 
@@ -18852,27 +19079,33 @@ vec_test_lsbb_all_zeros(vector unsigned char __a) {
18852
19079
  static __inline__ vector unsigned char __ATTRS_o_ai
18853
19080
  vec_stril(vector unsigned char __a) {
18854
19081
  #ifdef __LITTLE_ENDIAN__
18855
- return __builtin_altivec_vstribr((vector signed char)__a);
19082
+ return (vector unsigned char)__builtin_altivec_vstribr(
19083
+ (vector unsigned char)__a);
18856
19084
  #else
18857
- return __builtin_altivec_vstribl((vector signed char)__a);
19085
+ return (vector unsigned char)__builtin_altivec_vstribl(
19086
+ (vector unsigned char)__a);
18858
19087
  #endif
18859
19088
  }
18860
19089
 
18861
19090
  static __inline__ vector signed char __ATTRS_o_ai
18862
19091
  vec_stril(vector signed char __a) {
18863
19092
  #ifdef __LITTLE_ENDIAN__
18864
- return __builtin_altivec_vstribr(__a);
19093
+ return (vector signed char)__builtin_altivec_vstribr(
19094
+ (vector unsigned char)__a);
18865
19095
  #else
18866
- return __builtin_altivec_vstribl(__a);
19096
+ return (vector signed char)__builtin_altivec_vstribl(
19097
+ (vector unsigned char)__a);
18867
19098
  #endif
18868
19099
  }
18869
19100
 
18870
19101
  static __inline__ vector unsigned short __ATTRS_o_ai
18871
19102
  vec_stril(vector unsigned short __a) {
18872
19103
  #ifdef __LITTLE_ENDIAN__
18873
- return __builtin_altivec_vstrihr((vector signed short)__a);
19104
+ return (vector unsigned short)__builtin_altivec_vstrihr(
19105
+ (vector signed short)__a);
18874
19106
  #else
18875
- return __builtin_altivec_vstrihl((vector signed short)__a);
19107
+ return (vector unsigned short)__builtin_altivec_vstrihl(
19108
+ (vector signed short)__a);
18876
19109
  #endif
18877
19110
  }
18878
19111
 
@@ -18889,17 +19122,17 @@ vec_stril(vector signed short __a) {
18889
19122
 
18890
19123
  static __inline__ int __ATTRS_o_ai vec_stril_p(vector unsigned char __a) {
18891
19124
  #ifdef __LITTLE_ENDIAN__
18892
- return __builtin_altivec_vstribr_p(__CR6_EQ, (vector signed char)__a);
19125
+ return __builtin_altivec_vstribr_p(__CR6_EQ, (vector unsigned char)__a);
18893
19126
  #else
18894
- return __builtin_altivec_vstribl_p(__CR6_EQ, (vector signed char)__a);
19127
+ return __builtin_altivec_vstribl_p(__CR6_EQ, (vector unsigned char)__a);
18895
19128
  #endif
18896
19129
  }
18897
19130
 
18898
19131
  static __inline__ int __ATTRS_o_ai vec_stril_p(vector signed char __a) {
18899
19132
  #ifdef __LITTLE_ENDIAN__
18900
- return __builtin_altivec_vstribr_p(__CR6_EQ, __a);
19133
+ return __builtin_altivec_vstribr_p(__CR6_EQ, (vector unsigned char)__a);
18901
19134
  #else
18902
- return __builtin_altivec_vstribl_p(__CR6_EQ, __a);
19135
+ return __builtin_altivec_vstribl_p(__CR6_EQ, (vector unsigned char)__a);
18903
19136
  #endif
18904
19137
  }
18905
19138
 
@@ -18924,27 +19157,33 @@ static __inline__ int __ATTRS_o_ai vec_stril_p(vector signed short __a) {
18924
19157
  static __inline__ vector unsigned char __ATTRS_o_ai
18925
19158
  vec_strir(vector unsigned char __a) {
18926
19159
  #ifdef __LITTLE_ENDIAN__
18927
- return __builtin_altivec_vstribl((vector signed char)__a);
19160
+ return (vector unsigned char)__builtin_altivec_vstribl(
19161
+ (vector unsigned char)__a);
18928
19162
  #else
18929
- return __builtin_altivec_vstribr((vector signed char)__a);
19163
+ return (vector unsigned char)__builtin_altivec_vstribr(
19164
+ (vector unsigned char)__a);
18930
19165
  #endif
18931
19166
  }
18932
19167
 
18933
19168
  static __inline__ vector signed char __ATTRS_o_ai
18934
19169
  vec_strir(vector signed char __a) {
18935
19170
  #ifdef __LITTLE_ENDIAN__
18936
- return __builtin_altivec_vstribl(__a);
19171
+ return (vector signed char)__builtin_altivec_vstribl(
19172
+ (vector unsigned char)__a);
18937
19173
  #else
18938
- return __builtin_altivec_vstribr(__a);
19174
+ return (vector signed char)__builtin_altivec_vstribr(
19175
+ (vector unsigned char)__a);
18939
19176
  #endif
18940
19177
  }
18941
19178
 
18942
19179
  static __inline__ vector unsigned short __ATTRS_o_ai
18943
19180
  vec_strir(vector unsigned short __a) {
18944
19181
  #ifdef __LITTLE_ENDIAN__
18945
- return __builtin_altivec_vstrihl((vector signed short)__a);
19182
+ return (vector unsigned short)__builtin_altivec_vstrihl(
19183
+ (vector signed short)__a);
18946
19184
  #else
18947
- return __builtin_altivec_vstrihr((vector signed short)__a);
19185
+ return (vector unsigned short)__builtin_altivec_vstrihr(
19186
+ (vector signed short)__a);
18948
19187
  #endif
18949
19188
  }
18950
19189
 
@@ -18961,17 +19200,17 @@ vec_strir(vector signed short __a) {
18961
19200
 
18962
19201
  static __inline__ int __ATTRS_o_ai vec_strir_p(vector unsigned char __a) {
18963
19202
  #ifdef __LITTLE_ENDIAN__
18964
- return __builtin_altivec_vstribl_p(__CR6_EQ, (vector signed char)__a);
19203
+ return __builtin_altivec_vstribl_p(__CR6_EQ, (vector unsigned char)__a);
18965
19204
  #else
18966
- return __builtin_altivec_vstribr_p(__CR6_EQ, (vector signed char)__a);
19205
+ return __builtin_altivec_vstribr_p(__CR6_EQ, (vector unsigned char)__a);
18967
19206
  #endif
18968
19207
  }
18969
19208
 
18970
19209
  static __inline__ int __ATTRS_o_ai vec_strir_p(vector signed char __a) {
18971
19210
  #ifdef __LITTLE_ENDIAN__
18972
- return __builtin_altivec_vstribl_p(__CR6_EQ, __a);
19211
+ return __builtin_altivec_vstribl_p(__CR6_EQ, (vector unsigned char)__a);
18973
19212
  #else
18974
- return __builtin_altivec_vstribr_p(__CR6_EQ, __a);
19213
+ return __builtin_altivec_vstribr_p(__CR6_EQ, (vector unsigned char)__a);
18975
19214
  #endif
18976
19215
  }
18977
19216