Noah Misch <noah@leadboat.com> writes:
> On Thu, Aug 27, 2015 at 10:36:46AM -0400, Tom Lane wrote:
>> the problem is that
>> IBM's assembler doesn't understand the "local symbol" notation supported
>> by the GNU assembler ("bne 1f" referencing the next occurrence of "1:").
>> So s_lock.h's PowerPC assembly code works if you have gcc configured to
>> use gas as backend, but not if it's configured to use the native AIX
>> assembler. Steve says the latter configuration is pretty common.
> These days, the latter configuration is all but universal. Per the GCC
> installation instructions, "The GNU Assembler has not been updated to support
> AIX 6 or AIX 7."
Ouch. I'm surprised we've not gotten more complaints.
>> 2. Don't rely on local symbols in the PPC spinlock assembly code. This
>> is a bit ugly, because the only way to do that is to hard-code branch
>> offsets, as in the attached draft patch. If there were any likelihood
>> that we'd be changing the PPC spinlock code in future, I would regard
>> this as unmaintainable ... but really, that code is pretty static.
>> So I think this is a viable alternative.
> A third option is to use __sync intrinsics, like we do on ARM. I like (2).
I've been waiting to hear confirmation from Steve that the proposed patch
works with IBM's assembler. (For all I know, it uses "*" rather than ".",
or some other randomness.) He's not responded yet though. Are you in
a position to test the patch?
regards, tom lane