Re: centralize CPU feature detection

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: John Naylor <johncnaylorls(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, root <tenistarkim(at)gmail(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>
Subject: Re: centralize CPU feature detection
Date: 2026-02-16 20:15:15
Message-ID: CAN4CZFNpt2tsysM5j8GvhOLqU2fKiPEGW7xGJ987_Avwk7-7ag@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello!

Seems like a file (checksum_block_internal.h) is missing from the patch?

For the entire src/include/port/pg_x86_feature.h:

Shouldn't it have an

+#if defined(USE_SSE2) || defined(__i386__)
...
#endif

block around the file, to skip everything on other platforms?

In src/include/port/pg_x86_feature.h:33

+
+extern PGDLLEXPORT bool X86Feature[];
+

Shouldn't that be PGDLLIMPORT?

+typedef enum X86FeatureId
+{
+ init,
+
+ PG_SSE4_2,
+ PG_POPCNT,

Shouldn't that be INIT?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2026-02-16 20:31:25 Re: generating function default settings from pg_proc.dat
Previous Message Andres Freund 2026-02-16 20:10:40 Re: Fix uninitialized xl_running_xacts padding