On Sat, Aug 13, 2022 at 8:08 AM Tom Lane <t...@sss.pgh.pa.us> wrote: > I wrote: > > I see that prairiedog was the only buildfarm animal failing the > > HAVE_PPC_LWARX_MUTEX_HINT test, and it seems pretty unlikely that > > there are any assemblers remaining in the wild that can't parse that. > > Actually, after further investigation and testing, I think we could > drop the conditionality around PPC spinlock sequences altogether. > The commentary in pg_config_manual.h claims that "some pre-POWER4 > machines" will fail on LWSYNC or LWARX with hint, but I've now > confirmed that the oldest PPC chips in my possession (prairiedog's > ppc7400, as well as a couple of ppc7450 machines) are all fine with > both. Indeed, prairiedog would have been failing for some time now > if it didn't like LWSYNC, because port/atomics/arch-ppc.h is using > that unconditionally in some places :-(. I think we can safely > assume that such machines no longer exist in the wild, or at least > are not going to be used to run Postgres v16.
Yeah, POWER3 was superseded in 2001. Looking around, Linux distros that someone might seriously run a database on already require much more recent POWER generations to even boot up, and although there is (for example) a separate unofficial powerpc port for Debian and of course NetBSD and others that can target older Macs and IBM servers etc, apparently no one has run our test suite on 21+ year old hardware and reported that it (presumably) SIGILLs already, per that observation (I think ports/packages that fail to work probably just get marked broken). As for vintage Apple hardware, clearly the G4 cube was far more collectable than those weird slightly inflated looking G3 machines :-) I'm curious, though... if we used compiler builtins, would -march/-mcpu etc know about this kind of thing, for people who wanted to compile on ancient hardware, or, I guess more interestingly, newer tricks that we haven't got around to learning about yet?