On 2012-06-09 03:39, Eric Botcazou wrote:
> the 4.7 compiler generates at -O:
> 
> load:
>         sync
>         lwz 10,0(3)
>         lwz 11,4(3)
>         cmpw 7,10,10
>         bne- 7,$+4
>         isync
>         mr 3,10
>         mr 4,11
>         blr
> 
> Is that really an atomic load?

Nope.  I do see the obvious mistake in the atomic_load pattern though:
The mode iterator should have been INT1 not INT.

... and for extra credit we ought to implement DImode atomic load/store
via the FPU, like we do for i386.


r~

Reply via email to