Fix __attribute__((target(...))) usage.

The commonly supported way to specify multiple target options is to
surround the entire list with quotes and to use a comma (with no
extra spaces) as the delimiter.

Oversight in commit f78667bd91.

Discussion: https://postgr.es/m/Zy0jya8nF8CPpv3B%40nathan
This commit is contained in:
Nathan Bossart 2024-11-07 15:27:32 -06:00
parent f78667bd91
commit 41b98ddb77
4 changed files with 5 additions and 5 deletions

View File

@ -733,7 +733,7 @@ AC_DEFUN([PGAC_AVX512_POPCNT_INTRINSICS],
AC_CACHE_CHECK([for _mm512_popcnt_epi64], [Ac_cachevar], AC_CACHE_CHECK([for _mm512_popcnt_epi64], [Ac_cachevar],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <immintrin.h> [AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <immintrin.h>
#if defined(__has_attribute) && __has_attribute (target) #if defined(__has_attribute) && __has_attribute (target)
__attribute__((target("avx512vpopcntdq","avx512bw"))) __attribute__((target("avx512vpopcntdq,avx512bw")))
#endif #endif
static int popcount_test(void) static int popcount_test(void)
{ {

2
configure vendored
View File

@ -17324,7 +17324,7 @@ else
/* end confdefs.h. */ /* end confdefs.h. */
#include <immintrin.h> #include <immintrin.h>
#if defined(__has_attribute) && __has_attribute (target) #if defined(__has_attribute) && __has_attribute (target)
__attribute__((target("avx512vpopcntdq","avx512bw"))) __attribute__((target("avx512vpopcntdq,avx512bw")))
#endif #endif
static int popcount_test(void) static int popcount_test(void)
{ {

View File

@ -2184,7 +2184,7 @@ if host_cpu == 'x86_64'
#include <immintrin.h> #include <immintrin.h>
#if defined(__has_attribute) && __has_attribute (target) #if defined(__has_attribute) && __has_attribute (target)
__attribute__((target("avx512vpopcntdq","avx512bw"))) __attribute__((target("avx512vpopcntdq,avx512bw")))
#endif #endif
int main(void) int main(void)
{ {

View File

@ -106,7 +106,7 @@ pg_popcount_avx512_available(void)
* pg_popcount_avx512 * pg_popcount_avx512
* Returns the number of 1-bits in buf * Returns the number of 1-bits in buf
*/ */
pg_attribute_target("avx512vpopcntdq", "avx512bw") pg_attribute_target("avx512vpopcntdq,avx512bw")
uint64 uint64
pg_popcount_avx512(const char *buf, int bytes) pg_popcount_avx512(const char *buf, int bytes)
{ {
@ -162,7 +162,7 @@ pg_popcount_avx512(const char *buf, int bytes)
* pg_popcount_masked_avx512 * pg_popcount_masked_avx512
* Returns the number of 1-bits in buf after applying the mask to each byte * Returns the number of 1-bits in buf after applying the mask to each byte
*/ */
pg_attribute_target("avx512vpopcntdq", "avx512bw") pg_attribute_target("avx512vpopcntdq,avx512bw")
uint64 uint64
pg_popcount_masked_avx512(const char *buf, int bytes, bits8 mask) pg_popcount_masked_avx512(const char *buf, int bytes, bits8 mask)
{ {