From: Tom Lane <tgl@sss.pgh.pa.us>
To: Noah Misch <noah@leadboat.com>
Cc: Christoph Berg <myon@debian.org>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: powerpc pg_atomic_compare_exchange_u32_impl: error: comparison of integer expressions of different signedness (Re: pgsql: For all ppc compilers, implement compare_exchange and) fetch_add
Date: Sun, 11 Oct 2020 13:12:40 -0400
Message-ID: <3006140.1602436360@sss.pgh.pa.us> (raw)
In-Reply-To: <20201011051043.GA1724101@rfd.leadboat.com>
References: <E1iLfOg-0005hK-98@gemulon.postgresql.org>
<20201009092825.GD889580@msg.df7cb.de>
<20201009100117.GA1550390@rfd.leadboat.com>
<20201011051043.GA1724101@rfd.leadboat.com>
Noah Misch <noah@leadboat.com> writes:
> The first attachment fixes the matter you've reported. While confirming that,
> I observed that gcc builds don't even use the 64-bit code in arch-ppc.h.
> Oops. The second attachment fixes that.
I reviewed these, and tested the first one on a nearby Apple machine.
(I lack access to 64-bit PPC, so I can't actually test the second.)
They look fine, and I confirmed by examining asm output that even
the rather-old-now gcc version that Apple last shipped for PPC does
the right thing with the conditionals.
> I plan not to back-patch either of these.
Hmm, I'd argue for a back-patch. The issue of modern compilers
warning about the incorrect code will apply to all supported branches.
Moreover, even if we don't use these code paths today, who's to say
that someone won't back-patch a bug fix that requires them? I do not
think it's unreasonable to expect these functions to work well in
all branches that have them.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, noah@leadboat.com, myon@debian.org
Subject: Re: powerpc pg_atomic_compare_exchange_u32_impl: error: comparison of integer expressions of different signedness (Re: pgsql: For all ppc compilers, implement compare_exchange and) fetch_add
In-Reply-To: <3006140.1602436360@sss.pgh.pa.us>
References: <E1iLfOg-0005hK-98@gemulon.postgresql.org> <20201009092825.GD889580@msg.df7cb.de> <20201009100117.GA1550390@rfd.leadboat.com> <20201011051043.GA1724101@rfd.leadboat.com> <3006140.1602436360@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox