| From: | John Naylor <johncnaylorls(at)gmail(dot)com> |
|---|---|
| To: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
| Cc: | Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de> |
| Subject: | Re: Fix typo 586/686 in atomics/arch-x86.h |
| Date: | 2025-12-20 02:37:14 |
| Message-ID: | CANWCAZZDZqtYW9aWhVwwtEN4xBTuc4XS5e6QbNpueEVGy1zhfQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Dec 19, 2025 at 4:04 PM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
> > I believe CI tests with -m32, so as long as we do that we should
> > probably make that work the way we think it does.
>
> It does, but will this affect that? Does gcc change the CPU arch to 32bit era
> hardware when using -m32? I was under the impression that it built code that
> can run in 32-bit mode on the underlying hardware unless a specific target arch
> was defined - but this is outside my wheelhouse so I might well be uninformed.
It's outside mine as well, but when I saw this thread I thought of
Thomas's experiment to use <stdatomic.h> and the need to verify code
generation on various platforms, so I see this patch as preventing
some head-scratching with that effort. With this patch applied on a
non-debug -m32 build I do see changes with bloaty:
FILE SIZE VM SIZE
-------------- --------------
+0.3% +6.27Ki +0.3% +6.27Ki .eh_frame
-0.0% -16 -0.0% -16 .eh_frame_hdr
-0.0% -32 [ = ] 0 .symtab
-0.0% -47 [ = ] 0 .strtab
-0.0% -198 [ = ] 0 .debug_abbrev
-0.1% -512 [ = ] 0 .debug_rnglists
-34.3% -3.20Ki [ = ] 0 [Unmapped]
-0.1% -3.63Ki [ = ] 0 .debug_line
-0.1% -7.06Ki -0.1% -7.06Ki .text
-0.2% -8.44Ki [ = ] 0 .debug_loclists
-0.0% -8.70Ki [ = ] 0 .debug_info
-0.1% -25.5Ki -0.0% -824 TOTAL
--
John Naylor
Amazon Web Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tender Wang | 2025-12-20 03:18:16 | Re: Add SPLIT PARTITION/MERGE PARTITIONS commands |
| Previous Message | John Naylor | 2025-12-20 02:30:37 | Re: Fix typo 586/686 in atomics/arch-x86.h |