powerpc pthread_once bug fix

Jeff Law law@redhat.com
Fri Aug 31 02:13:00 GMT 2012


On 08/30/2012 05:20 PM, Alan Modra wrote:
> On Fri, Aug 31, 2012 at 08:29:01AM +0930, Alan Modra wrote:
>> I wrote this code in the first instance using atomic_read_barrier
>> followed by atomic_increment..  The reason why I implemented the patch
>> as I did, is that the asm allows MUTEX_HINT_REL on lwarx.  Otherwise
>> the asm is identical to atomic_read_barrier followed by
>> atomic_increment.  Please look at the generated object code to verify
>> this is so (or to refute my claim and hopefully find why things are
>> going wrong).  Is UP defined for your builds?
>
> Sigh.  I see the error.  "=&r" (tmp) needs to be "=&b" (tmp), because
> "addi 0,0,1" is really "li 0,1".
I'll spin with that change.  Seems plausible enough.  Results in a few 
hours.

jeff



More information about the Libc-alpha mailing list