agora inbox for [email protected]help / color / mirror / Atom feed
fill_extraUpdatedCols is done in completely the wrong place 270+ messages / 3 participants [nested] [flat]
* fill_extraUpdatedCols is done in completely the wrong place @ 2020-05-08 19:05 Tom Lane <[email protected]> 2020-05-18 14:54 ` Re: fill_extraUpdatedCols is done in completely the wrong place Peter Eisentraut <[email protected]> 0 siblings, 1 reply; 270+ messages in thread From: Tom Lane @ 2020-05-08 19:05 UTC (permalink / raw) To: Peter Eisentraut <[email protected]>; +Cc: [email protected] I happened to notice $subject while working on the release notes. AFAICS, it is 100% inappropriate for the parser to compute the set of generated columns affected by an UPDATE, because that set could change before execution. It would be really easy to break this for an UPDATE in a stored rule, for example. I think that that processing should be done by the planner, instead. I don't object too much to keeping the data in RTEs ... but there had better be a bold annotation that the set is not valid till after planning. An alternative solution is to keep the set in some executor data structure and compute it during executor startup; perhaps near to where the expressions are prepared for execution, so as to save extra stringToNode calls. regards, tom lane ^ permalink raw reply [nested|flat] 270+ messages in thread
* Re: fill_extraUpdatedCols is done in completely the wrong place 2020-05-08 19:05 fill_extraUpdatedCols is done in completely the wrong place Tom Lane <[email protected]> @ 2020-05-18 14:54 ` Peter Eisentraut <[email protected]> 2020-05-18 17:57 ` Re: fill_extraUpdatedCols is done in completely the wrong place Tom Lane <[email protected]> 0 siblings, 1 reply; 270+ messages in thread From: Peter Eisentraut @ 2020-05-18 14:54 UTC (permalink / raw) To: Tom Lane <[email protected]>; +Cc: [email protected] On 2020-05-08 21:05, Tom Lane wrote: > I happened to notice $subject while working on the release notes. > AFAICS, it is 100% inappropriate for the parser to compute the > set of generated columns affected by an UPDATE, because that set > could change before execution. It would be really easy to break > this for an UPDATE in a stored rule, for example. Do you have a specific situation in mind? How would a rule change the set of columns updated by a query? Something involving CTEs? Having a test case would be good. > I think that that processing should be done by the planner, instead. > I don't object too much to keeping the data in RTEs ... but there had > better be a bold annotation that the set is not valid till after > planning. > > An alternative solution is to keep the set in some executor data structure > and compute it during executor startup; perhaps near to where the > expressions are prepared for execution, so as to save extra stringToNode > calls. Yeah, really only the executor ended up needing this, so perhaps it should be handled in the executor. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services ^ permalink raw reply [nested|flat] 270+ messages in thread
* Re: fill_extraUpdatedCols is done in completely the wrong place 2020-05-08 19:05 fill_extraUpdatedCols is done in completely the wrong place Tom Lane <[email protected]> 2020-05-18 14:54 ` Re: fill_extraUpdatedCols is done in completely the wrong place Peter Eisentraut <[email protected]> @ 2020-05-18 17:57 ` Tom Lane <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Tom Lane @ 2020-05-18 17:57 UTC (permalink / raw) To: Peter Eisentraut <[email protected]>; +Cc: [email protected] Peter Eisentraut <[email protected]> writes: > On 2020-05-08 21:05, Tom Lane wrote: >> I happened to notice $subject while working on the release notes. >> AFAICS, it is 100% inappropriate for the parser to compute the >> set of generated columns affected by an UPDATE, because that set >> could change before execution. It would be really easy to break >> this for an UPDATE in a stored rule, for example. > Do you have a specific situation in mind? How would a rule change the > set of columns updated by a query? Something involving CTEs? Having a > test case would be good. broken-update-rule.sql, attached, shows the scenario I had in mind: the rule UPDATE query knows nothing of the generated column that gets added after the rule is stored, so the UPDATE fails to update it. However, on the way to preparing that test case I discovered that auto-updatable views have the same disease even when the generated column exists from the get-go; see broken-updatable-views.sql. In the context of the existing design, I suppose this means that there needs to be a fill_extraUpdatedCols call somewhere in the code path that constructs an auto-update query. But if we moved the whole thing to the executor then the problem would go away. I observe also that the executor doesn't seem to need this bitmap at all unless (a) there are triggers or (b) there are generated columns. So in a lot of simpler cases, the cost of doing fill_extraUpdatedCols at either parse or plan time would be quite wasted. That might be a good argument for moving it to executor start, even though we'd then have to re-do it when re-using a prepared plan. regards, tom lane drop view v1; drop table tab1; create table tab1 (f1 int, id serial); insert into tab1 values (42); table tab1; create view v1 as select f1, id from tab1; create rule r1 as on update to v1 do instead update tab1 set f1 = new.f1 where tab1.id = new.id; update v1 set f1 = 11; table tab1; alter table tab1 add column f2 int generated always as (f1 * 2) stored; table tab1; update v1 set f1 = 12; table tab1; drop view v1; drop table tab1; create table tab1 (f1 int, f2 int generated always as (f1 * 2) stored); insert into tab1 values (42); table tab1; create view v1 as select * from tab1; update v1 set f1 = 11; table tab1; Attachments: [text/plain] broken-update-rule.sql (417B, ../../[email protected]/2-broken-update-rule.sql) download | inline: drop view v1; drop table tab1; create table tab1 (f1 int, id serial); insert into tab1 values (42); table tab1; create view v1 as select f1, id from tab1; create rule r1 as on update to v1 do instead update tab1 set f1 = new.f1 where tab1.id = new.id; update v1 set f1 = 11; table tab1; alter table tab1 add column f2 int generated always as (f1 * 2) stored; table tab1; update v1 set f1 = 12; table tab1; [text/plain] broken-updatable-views.sql (224B, ../../[email protected]/3-broken-updatable-views.sql) download | inline: drop view v1; drop table tab1; create table tab1 (f1 int, f2 int generated always as (f1 * 2) stored); insert into tab1 values (42); table tab1; create view v1 as select * from tab1; update v1 set f1 = 11; table tab1; ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 270+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 270+ messages in thread
end of thread, other threads:[~2025-07-27 17:45 UTC | newest] Thread overview: 270+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-05-08 19:05 fill_extraUpdatedCols is done in completely the wrong place Tom Lane <[email protected]> 2020-05-18 14:54 ` Peter Eisentraut <[email protected]> 2020-05-18 17:57 ` 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