]> granicus.if.org Git - postgresql/commit
For PowerPC instruction "addi", use constraint "b".
authorNoah Misch <noah@leadboat.com>
Sat, 19 Oct 2019 03:20:28 +0000 (20:20 -0700)
committerNoah Misch <noah@leadboat.com>
Sat, 19 Oct 2019 03:20:32 +0000 (20:20 -0700)
commit09d74aef33decd311128e65fee2b1abd94f2bc6a
treef1f07f31b91f491b750ccc0ff73896ebefb55298
parent579996bc2fc72b5496ccabe573bce8f2355c92df
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.GA4066266@rfd.leadboat.com
src/include/storage/s_lock.h