agora inbox for [email protected]
help / color / mirror / Atom feedCreate/alter policy and exclusive table lock
271+ messages / 3 participants
[nested] [flat]
* Create/alter policy and exclusive table lock
@ 2020-01-14 14:18 Konstantin Knizhnik <[email protected]>
2020-01-14 14:40 ` Re: Create/alter policy and exclusive table lock Tom Lane <[email protected]>
0 siblings, 1 reply; 271+ messages in thread
From: Konstantin Knizhnik @ 2020-01-14 14:18 UTC (permalink / raw)
To: pgsql-hackers
Hi hackers,
Right now changing policies (create/alter policy statements) requires
exclusive lock of target table:
/* Get id of table. Also handles permissions checks. */
table_id = RangeVarGetRelidExtended(stmt->table, AccessExclusiveLock,
0,
RangeVarCallbackForPolicy,
(void *) stmt);
Unfortunately there are use cases where policies are changed quite
frequently and this exclusive lock becomes a bottleneck.
I wonder why do we really need exclusive lock here?
Policies are stored in pg_policy table and we get RowExclusiveLock on it.
May be I missed something, but why we can not rely on standard MVCC
visibility rules for pg_policy table?
Until transaction executing CREATE/ALTER POLICY is committed, other
transactions will not see its changes in pg_policy table and perform
RLS checks according to old policies. Once transaction is committed,
everybody will switch to new policies.
I wonder if we it is possible to replace AccessExclusiveLock with
AccessSharedLock in RangeVarGetRelidExtended in CreatePolicy and
AlterPolicy?
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
^ permalink raw reply [nested|flat] 271+ messages in thread
* Re: Create/alter policy and exclusive table lock
2020-01-14 14:18 Create/alter policy and exclusive table lock Konstantin Knizhnik <[email protected]>
@ 2020-01-14 14:40 ` Tom Lane <[email protected]>
2020-01-14 15:49 ` Re: Create/alter policy and exclusive table lock Konstantin Knizhnik <[email protected]>
0 siblings, 1 reply; 271+ messages in thread
From: Tom Lane @ 2020-01-14 14:40 UTC (permalink / raw)
To: Konstantin Knizhnik <[email protected]>; +Cc: pgsql-hackers
Konstantin Knizhnik <[email protected]> writes:
> Right now changing policies (create/alter policy statements) requires
> exclusive lock of target table:
Yup.
> I wonder why do we really need exclusive lock here?
Because it affects the behavior of a SELECT.
> May be I missed something, but why we can not rely on standard MVCC
> visibility rules for pg_policy table?
We cannot have a situation where the schema details of a table might
change midway through planning/execution of a statement. The results
are unlikely to be as clean as "you get either the old behavior or the
new one", because that sequence might examine the details more than
once. Also, even if you cleanly get the old behavior, that's hardly
satisfactory. Consider
Session 1 Session 2
begin;
alter policy ... on t1 ...;
insert new data into t1;
begin planning SELECT on t1;
commit;
begin executing SELECT on t1;
With your proposal, session 2 would see the new data in t1
(because the executor takes a fresh snapshot) but it would not
be affected by the new policy. That's a security failure,
and it's one that does not happen today.
regards, tom lane
^ permalink raw reply [nested|flat] 271+ messages in thread
* Re: Create/alter policy and exclusive table lock
2020-01-14 14:18 Create/alter policy and exclusive table lock Konstantin Knizhnik <[email protected]>
2020-01-14 14:40 ` Re: Create/alter policy and exclusive table lock Tom Lane <[email protected]>
@ 2020-01-14 15:49 ` Konstantin Knizhnik <[email protected]>
2020-01-14 17:40 ` Re: Create/alter policy and exclusive table lock Tom Lane <[email protected]>
0 siblings, 1 reply; 271+ messages in thread
From: Konstantin Knizhnik @ 2020-01-14 15:49 UTC (permalink / raw)
To: Tom Lane <[email protected]>; +Cc: pgsql-hackers
On 14.01.2020 17:40, Tom Lane wrote:
> Konstantin Knizhnik <[email protected]> writes:
>> Right now changing policies (create/alter policy statements) requires
>> exclusive lock of target table:
> Yup.
>
>> I wonder why do we really need exclusive lock here?
> Because it affects the behavior of a SELECT.
>
>> May be I missed something, but why we can not rely on standard MVCC
>> visibility rules for pg_policy table?
> We cannot have a situation where the schema details of a table might
> change midway through planning/execution of a statement. The results
> are unlikely to be as clean as "you get either the old behavior or the
> new one", because that sequence might examine the details more than
> once. Also, even if you cleanly get the old behavior, that's hardly
> satisfactory. Consider
>
> Session 1 Session 2
>
> begin;
> alter policy ... on t1 ...;
> insert new data into t1;
>
> begin planning SELECT on t1;
>
> commit;
>
> begin executing SELECT on t1;
>
> With your proposal, session 2 would see the new data in t1
> (because the executor takes a fresh snapshot) but it would not
> be affected by the new policy. That's a security failure,
> and it's one that does not happen today.
Thank you for explanation.
But let me ask you one more question: why do we obtaining snapshot twice
in exec_simple_query:
first for analyze (pg_analyze_and_rewrite) and one for execution
(PortalStart)?
GetSnapshotData is quite expensive operation and the fact that we are
calling it twice for each query execution (with read committed isolation
level)
seems to be strange. Also the problem in scenario you have described
above is caused by using different snapshots by planner and executor. If
them will share the same snapshot,
then there should be no security violation, right?
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
^ permalink raw reply [nested|flat] 271+ messages in thread
* Re: Create/alter policy and exclusive table lock
2020-01-14 14:18 Create/alter policy and exclusive table lock Konstantin Knizhnik <[email protected]>
2020-01-14 14:40 ` Re: Create/alter policy and exclusive table lock Tom Lane <[email protected]>
2020-01-14 15:49 ` Re: Create/alter policy and exclusive table lock Konstantin Knizhnik <[email protected]>
@ 2020-01-14 17:40 ` Tom Lane <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Tom Lane @ 2020-01-14 17:40 UTC (permalink / raw)
To: Konstantin Knizhnik <[email protected]>; +Cc: pgsql-hackers
Konstantin Knizhnik <[email protected]> writes:
> But let me ask you one more question: why do we obtaining snapshot twice
> in exec_simple_query:
> first for analyze (pg_analyze_and_rewrite) and one for execution
> (PortalStart)?
That would happen anyway if the plan is cached. If we were to throw away
all plan caching and swear a mighty oath that we'll never put it back,
maybe we could build in a design assumption that planning and execution
use identical snapshots. I doubt that would lead to a net win though.
Also note that our whole approach to cache invalidation is based on the
assumption that if session A needs to see the effects of session B,
they will be taking conflicting locks. Otherwise sinval signaling
is not guaranteed to be detected at the necessary times.
regards, tom lane
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h
@ 2025-07-27 17:45 Lukas Fittl <[email protected]>
0 siblings, 0 replies; 271+ messages in thread
From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw)
Author: Lukas Fittl <[email protected]>
Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com
---
meson.build | 4 ++++
src/port/pg_crc32c_sse42_choose.c | 4 ++--
src/port/pg_popcount_avx512.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 395416a6060..007ec30800f 100644
--- a/meson.build
+++ b/meson.build
@@ -2015,7 +2015,11 @@ if cc.links('''
args: test_c_args)
cdata.set('HAVE__GET_CPUID_COUNT', 1)
elif cc.links('''
+ #if defined(_MSC_VER)
#include <intrin.h>
+ #else
+ #include <cpuid.h>
+ #endif
int main(int arg, char **argv)
{
unsigned int exx[4] = {0, 0, 0, 0};
diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c
index 74d2421ba2b..750f390bfdf 100644
--- a/src/port/pg_crc32c_sse42_choose.c
+++ b/src/port/pg_crc32c_sse42_choose.c
@@ -20,11 +20,11 @@
#include "c.h"
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c
index 80c0aee3e73..80d9a372dd7 100644
--- a/src/port/pg_popcount_avx512.c
+++ b/src/port/pg_popcount_avx512.c
@@ -14,13 +14,13 @@
#ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK
-#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT)
+#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER))
#include <cpuid.h>
#endif
#include <immintrin.h>
-#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX)
+#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER))
#include <intrin.h>
#endif
--
2.47.3
--vtqqtrpooseurzip
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch"
^ permalink raw reply [nested|flat] 271+ messages in thread
end of thread, other threads:[~2025-07-27 17:45 UTC | newest]
Thread overview: 271+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14 14:18 Create/alter policy and exclusive table lock Konstantin Knizhnik <[email protected]>
2020-01-14 14:40 ` Tom Lane <[email protected]>
2020-01-14 15:49 ` Konstantin Knizhnik <[email protected]>
2020-01-14 17:40 ` Tom Lane <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]>
2025-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