For PowerPC instruction "addi", use constraint "b".
authorNoah Misch <[email protected]>
Sat, 19 Oct 2019 03:20:28 +0000 (20:20 -0700)
committerNoah Misch <[email protected]>
Sat, 19 Oct 2019 03:20:28 +0000 (20:20 -0700)
commit89b4d7744c80ecb3f6bdf8a07ca711a043718db3
treefbccdca958d179acc1997953c09421888db0d7ee
parentf25968c49697db673f6cd2a07b3f7626779f1827
For PowerPC instruction "addi", use constraint "b".

Without "b", a variant of the tas() code miscompiles on macOS 10.4.
This may also fix a compilation failure involving macOS 10.1.  Today's
compilers have been allocating acceptable registers with or without this
change, but this future-proofs the code by precisely conveying the
acceptable registers.  Back-patch to 9.4 (all supported versions).

Reviewed by Tom Lane.

Discussion: https://postgr.es/m/20191009063900[email protected]
src/include/storage/s_lock.h