Re: Fix typo 586/686 in atomics/arch-x86.h

From: John Naylor <johncnaylorls(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, 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:30:37
Message-ID: CANWCAZaO1P2iZbYTdx2S0pA5cWnEMd65QGgO5kwxOq3h4-TekA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Dec 20, 2025 at 9:01 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> John Naylor <johncnaylorls(at)gmail(dot)com> writes:
> > On Fri, Dec 19, 2025 at 5:13 PM Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> wrote:
> >> I did some quick testing with this, normally only __i386__ gets
> >> defined for 32 bit builds (-march=native -m32 for example, but also
> >> the default -march=x86-64 -m32). __i586__ and __i686__ are only there
> >> if I pass the matching -march (i586/i686) flag to gcc.
>
> > What platform is this? I don't see that:
>
> I can replicate Zsolt's result --- note the point about -march:
>
> $ echo | gcc -m32 -dM -E - | grep -E '86[^0-9]'
> #define __i386 1
> #define __i386__ 1
> #define i386 1
> $ echo | gcc -m32 -march=i586 -dM -E - | grep -E '86[^0-9]'
> #define __i586 1
> #define __tune_i586__ 1
> #define __i386 1
> #define __i586__ 1
> #define __i386__ 1
> #define i386 1
> $ echo | gcc -m32 -march=i686 -dM -E - | grep -E '86[^0-9]'
> #define __tune_i686__ 1
> #define __i686 1
> #define __i686__ 1
> #define __i386 1
> #define __i386__ 1
> #define i386 1
>
> This is with gcc 8.5.0 from RHEL8, and the same with gcc 14.3.1
> from Fedora 41.

My results were from Fedora 41 gcc 14.3.1 as well. With '-march' I get
the same as your 8.5.0 but in a slightly different order, but without
it I still get some 'i686' symbols defined.

--
John Naylor
Amazon Web Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2025-12-20 02:37:14 Re: Fix typo 586/686 in atomics/arch-x86.h
Previous Message Tom Lane 2025-12-20 02:01:23 Re: Fix typo 586/686 in atomics/arch-x86.h