Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB barriers
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Greg Burd <greg@burd.me>
Cc: Thomas Munro <thomas.munro@gmail.com>, Nathan Bossart <nathandbossart@gmail.com>,
Peter Eisentraut <peter@eisentraut.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Dave Cramer <davecramer@gmail.com>
Date: 2025-11-23T15:55:21Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
MSVC: Support building for AArch64.
- a516b3f00d74 19 (unreleased) landed
Hi,
On 2025-11-22 16:43:30 -0500, Greg Burd wrote:
> With the new MSVC compiler flag Andres mentioned (/arch:armv9.4) I only
> had to update the S_UNLOCK() macro, the compiler did the rest correctly
> AFAICT.
Just to be clear - the flag shouldn't be necessary for things to work
correctly. I was only using it to have godbolt inline the intrinsics, rather
than have them generate an out-of-line function call that I couldn't easily
inspect. I'm fairly sure that the out-of-line functions also have the relevant
barriers.
> @@ -2509,7 +2513,10 @@ int main(void)
> }
> '''
>
> - if cc.links(prog, name: '__crc32cb, __crc32ch, __crc32cw, and __crc32cd without -march=armv8-a+crc',
> + if cc.get_id() == 'msvc'
> + cdata.set('USE_ARMV8_CRC32C', 1)
> + have_optimized_crc = true
Should have a comment explaining why we can do this unconditionally...
Greetings,
Andres Freund