agora inbox for [email protected]help / color / mirror / Atom feed
restrict global access to be readonly 275+ messages / 9 participants [nested] [flat]
* restrict global access to be readonly @ 2015-02-13 08:32 =?utf-8?B?aGFwcHkgdGltZXM=?= <[email protected]> 0 siblings, 2 replies; 275+ messages in thread From: =?utf-8?B?aGFwcHkgdGltZXM=?= @ 2015-02-13 08:32 UTC (permalink / raw) To: pgsql-hackers; +Cc: =?utf-8?B?ZnVubnl4ai5meGo=?= <[email protected]>; =?utf-8?B?ZGluZ3FpLmx4Yg==?= <[email protected]> Hi PG Developers, I didn’t find any convenient way to restrict access to PostgreSQL databases to be read-only for all users. I need it in following scenarios: A) Planned switch-over from master to slave. We want to minimize impact within the planned switch-overs. So during the process we switch from master to slave, we would like to allow read-only transactions to be run on the original master until the switch-over complete and the new master starts taking user connections (we do the switch with virtual IP mechanism). I didn’t find way to do this on the database server side. Sure, we can utilize the runtime parameter default_transaction_read_only, however, it does not restrict user from changing transaction attribute to non-readonly mode, so is not safe. B) Blocking writing access when storage constraint is reached. We have massive PostgreSQL instances which are sold to external users with specific storage constraints and prices. When storage constraint for a specific instance is reached, we would rather change the instance to be readonly (then notify user to cleanup data or buy more storage) than shutdown the instance. Our current solution is putting a recovery.conf file to the instance (killing all existing connections) and restart the instance to get it into recovery mode (which is readonly), which is not pretty. C) Blocking writing access when an instance has expired. Similar with B), when the user’s contract with us expires about his/her instance, we want to firstly block the write access rather than shutdown the instance completely. Having that said, it would be very nice if there is a command like “SET GLOBAL_ACCESS TO READONLY | READWRITE” which does the job for the whole instance. I guess there could be others who want this feature too. So, have anyone considered or discussed about adding such a command? Is there anyone working on it (I would like to work on it if no)? Sincerely, Guangzhou ^ permalink raw reply [nested|flat] 275+ messages in thread
* Re: restrict global access to be readonly @ 2015-02-14 21:14 Robert Haas <[email protected]> parent: =?utf-8?B?aGFwcHkgdGltZXM=?= <[email protected]> 1 sibling, 1 reply; 275+ messages in thread From: Robert Haas @ 2015-02-14 21:14 UTC (permalink / raw) To: happy times <[email protected]>; +Cc: pgsql-hackers; funnyxj.fxj <[email protected]>; dingqi.lxb <[email protected]> On Fri, Feb 13, 2015 at 3:32 AM, happy times <[email protected]> wrote: > I didn’t find any convenient way to restrict access to PostgreSQL databases > to be read-only for all users. I need it in following scenarios: > > A) Planned switch-over from master to slave. We want to minimize impact > within the planned switch-overs. So during the process we switch from master > to slave, we would like to allow read-only transactions to be run on the > original master until the switch-over complete and the new master starts > taking user connections (we do the switch with virtual IP mechanism). I > didn’t find way to do this on the database server side. Sure, we can utilize > the runtime parameter default_transaction_read_only, however, it does not > restrict user from changing transaction attribute to non-readonly mode, so > is not safe. > > B) Blocking writing access when storage constraint is reached. We have > massive PostgreSQL instances which are sold to external users with specific > storage constraints and prices. When storage constraint for a specific > instance is reached, we would rather change the instance to be readonly > (then notify user to cleanup data or buy more storage) than shutdown the > instance. Our current solution is putting a recovery.conf file to the > instance (killing all existing connections) and restart the instance to get > it into recovery mode (which is readonly), which is not pretty. > > C) Blocking writing access when an instance has expired. Similar with B), > when the user’s contract with us expires about his/her instance, we want to > firstly block the write access rather than shutdown the instance completely. > > Having that said, it would be very nice if there is a command like “SET > GLOBAL_ACCESS TO READONLY | READWRITE” which does the job for the whole > instance. I guess there could be others who want this feature too. > > So, have anyone considered or discussed about adding such a command? Is > there anyone working on it (I would like to work on it if no)? I think this would be a useful feature and have thought about it myself. I suggest that it be spelled like this: ALTER SYSTEM [ READ ONLY | READ WRITE ]; Although I like the idea, it's not clear to me how to implement it. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers ^ permalink raw reply [nested|flat] 275+ messages in thread
* Re: restrict global access to be readonly @ 2015-02-14 23:28 Jim Nasby <[email protected]> parent: Robert Haas <[email protected]> 0 siblings, 2 replies; 275+ messages in thread From: Jim Nasby @ 2015-02-14 23:28 UTC (permalink / raw) To: Robert Haas <[email protected]>; happy times <[email protected]>; +Cc: pgsql-hackers; funnyxj.fxj <[email protected]>; dingqi.lxb <[email protected]> On 2/14/15 3:14 PM, Robert Haas wrote: > On Fri, Feb 13, 2015 at 3:32 AM, happy times <[email protected]> wrote: >> I didn’t find any convenient way to restrict access to PostgreSQL databases >> to be read-only for all users. I need it in following scenarios: >> >> A) Planned switch-over from master to slave. We want to minimize impact >> within the planned switch-overs. So during the process we switch from master >> to slave, we would like to allow read-only transactions to be run on the >> original master until the switch-over complete and the new master starts >> taking user connections (we do the switch with virtual IP mechanism). I >> didn’t find way to do this on the database server side. Sure, we can utilize >> the runtime parameter default_transaction_read_only, however, it does not >> restrict user from changing transaction attribute to non-readonly mode, so >> is not safe. >> >> B) Blocking writing access when storage constraint is reached. We have >> massive PostgreSQL instances which are sold to external users with specific >> storage constraints and prices. When storage constraint for a specific >> instance is reached, we would rather change the instance to be readonly >> (then notify user to cleanup data or buy more storage) than shutdown the >> instance. Our current solution is putting a recovery.conf file to the >> instance (killing all existing connections) and restart the instance to get >> it into recovery mode (which is readonly), which is not pretty. >> >> C) Blocking writing access when an instance has expired. Similar with B), >> when the user’s contract with us expires about his/her instance, we want to >> firstly block the write access rather than shutdown the instance completely. >> >> Having that said, it would be very nice if there is a command like “SET >> GLOBAL_ACCESS TO READONLY | READWRITE” which does the job for the whole >> instance. I guess there could be others who want this feature too. >> >> So, have anyone considered or discussed about adding such a command? Is >> there anyone working on it (I would like to work on it if no)? > > I think this would be a useful feature and have thought about it > myself. I suggest that it be spelled like this: > > ALTER SYSTEM [ READ ONLY | READ WRITE ]; > > Although I like the idea, it's not clear to me how to implement it. Throw an error in AssignTransactionId/GetNewTransactionId? I see 4 calls to Get*TransactionId in logical replication, though arguably if we're fixing that we should look at doing something special for Slony and the likes. Related to this, a lot of people have expressed desire for read only tables. That would presumably be trickier to accomplish. -- Jim Nasby, Data Architect, Blue Treble Consulting Data in Trouble? Get it in Treble! http://BlueTreble.com -- Sent via pgsql-hackers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers ^ permalink raw reply [nested|flat] 275+ messages in thread
* Re: restrict global access to be readonly @ 2015-02-15 00:24 Tom Lane <[email protected]> parent: Jim Nasby <[email protected]> 1 sibling, 1 reply; 275+ messages in thread From: Tom Lane @ 2015-02-15 00:24 UTC (permalink / raw) To: Jim Nasby <[email protected]>; +Cc: Robert Haas <[email protected]>; happy times <[email protected]>; pgsql-hackers; funnyxj.fxj <[email protected]>; dingqi.lxb <[email protected]> Jim Nasby <[email protected]> writes: > On 2/14/15 3:14 PM, Robert Haas wrote: >> Although I like the idea, it's not clear to me how to implement it. > Throw an error in AssignTransactionId/GetNewTransactionId? A whole lot depends on what you choose to mean by "read only". If it means the same thing as "all transactions are READ ONLY", that would be useful for some purposes, and it would have the advantage of having a visible relationship to a long-established feature with the same name. If you want it to mean "no writes to disk at all", that's something totally different, and possibly not all that useful (eg, do you really want to make sorts fail if they'd spill to disk? How about hint bit updates?). Jim's suggestion above would be somewhere in the middle, as it would successfully block use of temp tables but not eg. VACUUM. Another possibility that would be attractive for replication-related use-cases would be "nothing that generates WAL thank you very much". I'm inclined to think that we should agree on the desired semantics before jumping to implementation. regards, tom lane -- Sent via pgsql-hackers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers ^ permalink raw reply [nested|flat] 275+ messages in thread
* Re: restrict global access to be readonly @ 2015-02-15 09:13 David G Johnston <[email protected]> parent: =?utf-8?B?aGFwcHkgdGltZXM=?= <[email protected]> 1 sibling, 1 reply; 275+ messages in thread From: David G Johnston @ 2015-02-15 09:13 UTC (permalink / raw) To: pgsql-hackers happy times wrote > Sure, we can utilize the runtime parameter > default_transaction_read_only, however, it does not restrict user from > changing transaction attribute to non-readonly mode, so is not safe. ISTM that implementing a means to make this setting only super-user changeable would be a quick(er) solution to the problem - the decision as to what to disallow is already decided. It seems like it would have to be a separate GUC but it would require any new SQL but would simply leverage the existing settings system to setup database-user values that only a super-user can change. David J. -- View this message in context: http://postgresql.nabble.com/restrict-global-access-to-be-readonly-tp5837818p5838021.html Sent from the PostgreSQL - hackers mailing list archive at Nabble.com. -- Sent via pgsql-hackers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers ^ permalink raw reply [nested|flat] 275+ messages in thread
* Re: restrict global access to be readonly @ 2015-02-15 16:14 Florian Pflug <[email protected]> parent: David G Johnston <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Florian Pflug @ 2015-02-15 16:14 UTC (permalink / raw) To: David G Johnston <[email protected]>; +Cc: pgsql-hackers On Feb15, 2015, at 10:13 , David G Johnston <[email protected]> wrote: > happy times wrote >> Sure, we can utilize the runtime parameter >> default_transaction_read_only, however, it does not restrict user from >> changing transaction attribute to non-readonly mode, so is not safe. > > ISTM that implementing a means to make this setting only super-user > changeable would be a quick(er) solution to the problem - the decision as to > what to disallow is already decided. > > It seems like it would have to be a separate GUC but it would require any > new SQL but would simply leverage the existing settings system to setup > database-user values that only a super-user can change. I've wished for a way prevent regular users for changing specific settings in the past. Maybe we could have ALTER DATABASE <database> FORCE <parameter> TO <value> ALTER ROLE <role> [ IN DATABASE <db> ] FORCE <parameter> TO <value> In postgresql.conf, we could use a syntax like parameter =!= value to indicate that the parameter value can only be changed by super-users. We' have to figure out what happens if a database- or role-specific FORCEd setting attempts to override a value already FORCEd in postgresql.conf. Ideally, we'd allow database- or role-specific settings created by super-users to override previously FORCEd values, but that would require us to store the role that creates such settings in pg_db_role_setting. For SET clauses attached to functions, we'd complain if they attempt to change a FORCEd value, unless they are called by a super-user, or are marked SECURITY DEFINER and owned by a super-user. best regards, Florian Pflug -- Sent via pgsql-hackers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers ^ permalink raw reply [nested|flat] 275+ messages in thread
* Re: restrict global access to be readonly @ 2015-02-15 16:24 Andres Freund <[email protected]> parent: Jim Nasby <[email protected]> 1 sibling, 0 replies; 275+ messages in thread From: Andres Freund @ 2015-02-15 16:24 UTC (permalink / raw) To: Jim Nasby <[email protected]>; +Cc: Robert Haas <[email protected]>; happy times <[email protected]>; pgsql-hackers; funnyxj.fxj <[email protected]>; dingqi.lxb <[email protected]> On 2015-02-14 17:28:38 -0600, Jim Nasby wrote: > Throw an error in AssignTransactionId/GetNewTransactionId? I see 4 calls to > Get*TransactionId in logical replication, though arguably if we're fixing > that we should look at doing something special for Slony and the > likes. I don't think there are any xid assignments in the logical decoding code. There's a couple error checks erroring out if an xid has been assigned, but those use GetTopTransactionIdIfAny(), i.e. don't assign an id. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers ^ permalink raw reply [nested|flat] 275+ messages in thread
* Re: restrict global access to be readonly @ 2015-02-16 01:03 Peter Eisentraut <[email protected]> parent: Tom Lane <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Peter Eisentraut @ 2015-02-16 01:03 UTC (permalink / raw) To: Tom Lane <[email protected]>; Jim Nasby <[email protected]>; +Cc: Robert Haas <[email protected]>; happy times <[email protected]>; pgsql-hackers; funnyxj.fxj <[email protected]>; dingqi.lxb <[email protected]> On 2/14/15 7:24 PM, Tom Lane wrote: > Another possibility that would be attractive for replication-related > use-cases would be "nothing that generates WAL thank you very much". This would be useful, as it essentially simulates a hot standby. -- Sent via pgsql-hackers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
* [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h @ 2025-07-27 17:45 Lukas Fittl <[email protected]> 0 siblings, 0 replies; 275+ messages in thread From: Lukas Fittl @ 2025-07-27 17:45 UTC (permalink / raw) Author: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53Pky-BN0Ui+A9no3TsU=GoMTFpxYSWYtp_LVaDH=y69BxNg@mail.gmail.com --- meson.build | 4 ++++ src/port/pg_crc32c_sse42_choose.c | 4 ++-- src/port/pg_popcount_avx512.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 395416a6060..007ec30800f 100644 --- a/meson.build +++ b/meson.build @@ -2015,7 +2015,11 @@ if cc.links(''' args: test_c_args) cdata.set('HAVE__GET_CPUID_COUNT', 1) elif cc.links(''' + #if defined(_MSC_VER) #include <intrin.h> + #else + #include <cpuid.h> + #endif int main(int arg, char **argv) { unsigned int exx[4] = {0, 0, 0, 0}; diff --git a/src/port/pg_crc32c_sse42_choose.c b/src/port/pg_crc32c_sse42_choose.c index 74d2421ba2b..750f390bfdf 100644 --- a/src/port/pg_crc32c_sse42_choose.c +++ b/src/port/pg_crc32c_sse42_choose.c @@ -20,11 +20,11 @@ #include "c.h" -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif diff --git a/src/port/pg_popcount_avx512.c b/src/port/pg_popcount_avx512.c index 80c0aee3e73..80d9a372dd7 100644 --- a/src/port/pg_popcount_avx512.c +++ b/src/port/pg_popcount_avx512.c @@ -14,13 +14,13 @@ #ifdef USE_AVX512_POPCNT_WITH_RUNTIME_CHECK -#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) +#if defined(HAVE__GET_CPUID) || defined(HAVE__GET_CPUID_COUNT) || (defined(HAVE__CPUIDEX) && !defined(_MSC_VER)) #include <cpuid.h> #endif #include <immintrin.h> -#if defined(HAVE__CPUID) || defined(HAVE__CPUIDEX) +#if defined(HAVE__CPUID) || (defined(HAVE__CPUIDEX) && defined(_MSC_VER)) #include <intrin.h> #endif -- 2.47.3 --vtqqtrpooseurzip Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v12-0002-Use-time-stamp-counter-to-measure-time-on-Linux-.patch" ^ permalink raw reply [nested|flat] 275+ messages in thread
end of thread, other threads:[~2025-07-27 17:45 UTC | newest] Thread overview: 275+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-02-13 08:32 restrict global access to be readonly =?utf-8?B?aGFwcHkgdGltZXM=?= <[email protected]> 2015-02-14 21:14 ` Robert Haas <[email protected]> 2015-02-14 23:28 ` Jim Nasby <[email protected]> 2015-02-15 00:24 ` Tom Lane <[email protected]> 2015-02-16 01:03 ` Peter Eisentraut <[email protected]> 2015-02-15 16:24 ` Andres Freund <[email protected]> 2015-02-15 09:13 ` David G Johnston <[email protected]> 2015-02-15 16:14 ` Florian Pflug <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-07-27 17:45 [PATCH v12 1/3] cpuidex check: Support detecting newer GCC versions defining it in cpuid.h Lukas Fittl <[email protected]> 2025-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