Choose ppc compare_exchange constant path for more operand values.
authorNoah Misch <noah@leadboat.com>
Mon, 12 Oct 2020 04:31:37 +0000 (21:31 -0700)
committerNoah Misch <noah@leadboat.com>
Mon, 12 Oct 2020 04:31:37 +0000 (21:31 -0700)
commit88ea7a1188d1afb25695124045e0ff81870f55e3
tree020bafbbcee6eb06fe744a9afaa773ff203545aa
parentf5c1167b173d6e7a5d4c938fe716f0d29ae7228d
Choose ppc compare_exchange constant path for more operand values.

The implementation uses smaller code when the "expected" operand is a
small constant, but the implementation needlessly defined the set of
acceptable constants more narrowly than the ABI does.  Core PostgreSQL
and PGXN don't use the constant path at all, so this is future-proofing.
Back-patch to v13, where commit 30ee5d17c20dbb282a9952b3048d6ad52d56c371
introduced this code.

Reviewed by Tom Lane.  Reported by Christoph Berg.

Discussion: https://postgr.es/m/20201009092825.GD889580@msg.df7cb.de
src/include/port/atomics/arch-ppc.h
src/test/regress/regress.c