pgsql: Refactor detection of x86 ZMM registers

From: John Naylor <john(dot)naylor(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Refactor detection of x86 ZMM registers
Date: 2026-02-28 09:30:19
Message-ID: E1vwGeR-001X6d-28@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Refactor detection of x86 ZMM registers

- Call _xgetbv within x86_set_runtime_features rather than in a
separate function
- Use symbols for XCR mask bits rather than a magic constant

A future commit will build on this to detect YMM registers without
code duplication.

Reviewed-by: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Discussion: https://postgr.es/m/CANWCAZbgEUFw7LuYSVeJ=Tj98R5HoOB1Ffeqk3aLvbw5rU5NTw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/51bb4a58ed23cb228e5dd2e5971843e785f4d913

Modified Files
--------------
src/port/pg_cpu_x86.c | 43 +++++++++++++++++++++++++++----------------
1 file changed, 27 insertions(+), 16 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2026-02-28 14:58:06 pgsql: psql: Show comments in \dRp+, \dRs+, and \dX+ psql meta-commands
Previous Message Peter Eisentraut 2026-02-27 21:04:48 pgsql: Fix some -Wcast-qual warnings