agora inbox for [email protected]
help / color / mirror / Atom feedConfusing comment in TransactionIdIsInProgress
270+ messages / 4 participants
[nested] [flat]
* Confusing comment in TransactionIdIsInProgress
@ 2011-01-18 05:15 Jim Nasby <[email protected]>
2011-01-18 08:51 ` Re: Confusing comment in TransactionIdIsInProgress Heikki Linnakangas <[email protected]>
0 siblings, 1 reply; 270+ messages in thread
From: Jim Nasby @ 2011-01-18 05:15 UTC (permalink / raw)
To: pgsql-hackers
Shouldn't the comment read "If first time through"?
/*
* If not first time through, get workspace to remember main XIDs in. We
* malloc it permanently to avoid repeated palloc/pfree overhead.
*/
if (xids == NULL)
{
...
xids = (TransactionId *) malloc(maxxids * sizeof(TransactionId));
--
Jim C. Nasby, Database Architect [email protected]
512.569.9461 (cell) http://jim.nasby.net
^ permalink raw reply [nested|flat] 270+ messages in thread
* Re: Confusing comment in TransactionIdIsInProgress
2011-01-18 05:15 Confusing comment in TransactionIdIsInProgress Jim Nasby <[email protected]>
@ 2011-01-18 08:51 ` Heikki Linnakangas <[email protected]>
2011-01-19 10:06 ` Re: Confusing comment in TransactionIdIsInProgress Simon Riggs <[email protected]>
0 siblings, 1 reply; 270+ messages in thread
From: Heikki Linnakangas @ 2011-01-18 08:51 UTC (permalink / raw)
To: Jim Nasby <[email protected]>; +Cc: pgsql-hackers
On 18.01.2011 07:15, Jim Nasby wrote:
> Shouldn't the comment read "If first time through"?
>
> /*
> * If not first time through, get workspace to remember main XIDs in. We
> * malloc it permanently to avoid repeated palloc/pfree overhead.
> */
> if (xids == NULL)
> {
> ...
> xids = (TransactionId *) malloc(maxxids * sizeof(TransactionId));
Huh, yes, I'm amazed that no-one have noticed. I must've read that piece
of code dozens of times in the last couple of years myself, and that
sentence was even copy-pasted to GetConflictingVirtualXIDs() later in
that file, including that thinko.
Thanks, fixed both copies.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 270+ messages in thread
* Re: Confusing comment in TransactionIdIsInProgress
2011-01-18 05:15 Confusing comment in TransactionIdIsInProgress Jim Nasby <[email protected]>
2011-01-18 08:51 ` Re: Confusing comment in TransactionIdIsInProgress Heikki Linnakangas <[email protected]>
@ 2011-01-19 10:06 ` Simon Riggs <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Simon Riggs @ 2011-01-19 10:06 UTC (permalink / raw)
To: Heikki Linnakangas <[email protected]>; +Cc: Jim Nasby <[email protected]>; pgsql-hackers
On Tue, 2011-01-18 at 10:51 +0200, Heikki Linnakangas wrote:
> On 18.01.2011 07:15, Jim Nasby wrote:
> > Shouldn't the comment read "If first time through"?
> >
> > /*
> > * If not first time through, get workspace to remember main XIDs in. We
> > * malloc it permanently to avoid repeated palloc/pfree overhead.
> > */
> > if (xids == NULL)
> > {
> > ...
> > xids = (TransactionId *) malloc(maxxids * sizeof(TransactionId));
>
> Huh, yes, I'm amazed that no-one have noticed. I must've read that piece
> of code dozens of times in the last couple of years myself, and that
> sentence was even copy-pasted to GetConflictingVirtualXIDs() later in
> that file, including that thinko.
Yes, I laughed when I saw that, having camped out in that code many
nights.
--
Simon Riggs http://www.2ndQuadrant.com/books/
PostgreSQL Development, 24x7 Support, Training and Services
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 270+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 270+ messages in thread
end of thread, other threads:[~2025-07-27 17:45 UTC | newest]
Thread overview: 270+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-01-18 05:15 Confusing comment in TransactionIdIsInProgress Jim Nasby <[email protected]>
2011-01-18 08:51 ` Heikki Linnakangas <[email protected]>
2011-01-19 10:06 ` Simon Riggs <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox