Skip to content

Commit 41b98dd

Browse files
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 f78667b. Discussion: https://postgr.es/m/Zy0jya8nF8CPpv3B%40nathan
1 parent f78667b commit 41b98dd

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

config/c-compiler.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ AC_DEFUN([PGAC_AVX512_POPCNT_INTRINSICS],
733733
AC_CACHE_CHECK([for _mm512_popcnt_epi64], [Ac_cachevar],
734734
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <immintrin.h>
735735
#if defined(__has_attribute) && __has_attribute (target)
736-
__attribute__((target("avx512vpopcntdq","avx512bw")))
736+
__attribute__((target("avx512vpopcntdq,avx512bw")))
737737
#endif
738738
static int popcount_test(void)
739739
{

configure

+1-1
Original file line numberDiff line numberDiff line change
@@ -17324,7 +17324,7 @@ else
1732417324
/* end confdefs.h. */
1732517325
#include <immintrin.h>
1732617326
#if defined(__has_attribute) && __has_attribute (target)
17327-
__attribute__((target("avx512vpopcntdq","avx512bw")))
17327+
__attribute__((target("avx512vpopcntdq,avx512bw")))
1732817328
#endif
1732917329
static int popcount_test(void)
1733017330
{

meson.build

+1-1
Original file line numberDiff line numberDiff line change
@@ -2184,7 +2184,7 @@ if host_cpu == 'x86_64'
21842184
#include <immintrin.h>
21852185
21862186
#if defined(__has_attribute) && __has_attribute (target)
2187-
__attribute__((target("avx512vpopcntdq","avx512bw")))
2187+
__attribute__((target("avx512vpopcntdq,avx512bw")))
21882188
#endif
21892189
int main(void)
21902190
{

src/port/pg_popcount_avx512.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ pg_popcount_avx512_available(void)
106106
* pg_popcount_avx512
107107
* Returns the number of 1-bits in buf
108108
*/
109-
pg_attribute_target("avx512vpopcntdq", "avx512bw")
109+
pg_attribute_target("avx512vpopcntdq,avx512bw")
110110
uint64
111111
pg_popcount_avx512(const char *buf, int bytes)
112112
{
@@ -162,7 +162,7 @@ pg_popcount_avx512(const char *buf, int bytes)
162162
* pg_popcount_masked_avx512
163163
* Returns the number of 1-bits in buf after applying the mask to each byte
164164
*/
165-
pg_attribute_target("avx512vpopcntdq", "avx512bw")
165+
pg_attribute_target("avx512vpopcntdq,avx512bw")
166166
uint64
167167
pg_popcount_masked_avx512(const char *buf, int bytes, bits8 mask)
168168
{

0 commit comments

Comments
 (0)