Skip to content

Commit c71db8b

Browse files
committed
zig cc: Update intrinsic headers to Clang 20.
1 parent bb0daf3 commit c71db8b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+17990
-2925
lines changed

lib/include/adcintrin.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@
1515
#endif
1616

1717
/* Define the default attributes for the functions in this file. */
18+
#if defined(__cplusplus) && (__cplusplus >= 201103L)
19+
#define __DEFAULT_FN_ATTRS \
20+
__attribute__((__always_inline__, __nodebug__)) constexpr
21+
#else
1822
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
23+
#endif
1924

2025
/* Use C++ inline semantics in C++, GNU inline for C mode. */
2126
#if defined(__cplusplus)

lib/include/adxintrin.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@
1515
#define __ADXINTRIN_H
1616

1717
/* Define the default attributes for the functions in this file. */
18+
#if defined(__cplusplus) && (__cplusplus >= 201103L)
19+
#define __DEFAULT_FN_ATTRS \
20+
__attribute__((__always_inline__, __nodebug__, __target__("adx"))) constexpr
21+
#else
1822
#define __DEFAULT_FN_ATTRS \
1923
__attribute__((__always_inline__, __nodebug__, __target__("adx")))
24+
#endif
2025

2126
/* Use C++ inline semantics in C++, GNU inline for C mode. */
2227
#if defined(__cplusplus)

lib/include/altivec.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2502,37 +2502,37 @@ vec_cmplt(vector unsigned long long __a, vector unsigned long long __b) {
25022502

25032503
static __inline__ vector unsigned char __ATTRS_o_ai
25042504
vec_popcnt(vector signed char __a) {
2505-
return (vector unsigned char)__builtin_altivec_vpopcntb(
2505+
return (vector unsigned char)__builtin_elementwise_popcount(
25062506
(vector unsigned char)__a);
25072507
}
25082508
static __inline__ vector unsigned char __ATTRS_o_ai
25092509
vec_popcnt(vector unsigned char __a) {
2510-
return __builtin_altivec_vpopcntb(__a);
2510+
return __builtin_elementwise_popcount(__a);
25112511
}
25122512
static __inline__ vector unsigned short __ATTRS_o_ai
25132513
vec_popcnt(vector signed short __a) {
2514-
return (vector unsigned short)__builtin_altivec_vpopcnth(
2514+
return (vector unsigned short)__builtin_elementwise_popcount(
25152515
(vector unsigned short)__a);
25162516
}
25172517
static __inline__ vector unsigned short __ATTRS_o_ai
25182518
vec_popcnt(vector unsigned short __a) {
2519-
return __builtin_altivec_vpopcnth(__a);
2519+
return __builtin_elementwise_popcount(__a);
25202520
}
25212521
static __inline__ vector unsigned int __ATTRS_o_ai
25222522
vec_popcnt(vector signed int __a) {
2523-
return __builtin_altivec_vpopcntw((vector unsigned int)__a);
2523+
return __builtin_elementwise_popcount((vector unsigned int)__a);
25242524
}
25252525
static __inline__ vector unsigned int __ATTRS_o_ai
25262526
vec_popcnt(vector unsigned int __a) {
2527-
return __builtin_altivec_vpopcntw(__a);
2527+
return __builtin_elementwise_popcount(__a);
25282528
}
25292529
static __inline__ vector unsigned long long __ATTRS_o_ai
25302530
vec_popcnt(vector signed long long __a) {
2531-
return __builtin_altivec_vpopcntd((vector unsigned long long)__a);
2531+
return __builtin_elementwise_popcount((vector unsigned long long)__a);
25322532
}
25332533
static __inline__ vector unsigned long long __ATTRS_o_ai
25342534
vec_popcnt(vector unsigned long long __a) {
2535-
return __builtin_altivec_vpopcntd(__a);
2535+
return __builtin_elementwise_popcount(__a);
25362536
}
25372537

25382538
#define vec_vclz vec_cntlz

0 commit comments

Comments
 (0)