From: Richard Henderson
Date: Tue, 30 Jul 2013 12:33:30 -1000
> On 07/30/2013 03:31 AM, Eric Botcazou wrote:
>> 2013-07-30 Eric Botcazou
>>
>> * config/sparc/sparc.c (sparc_emit_membar_for_model) : Add
>> the implied StoreLoad barrier for atomic operations if before.
>
> Looks good
On 07/30/2013 03:31 AM, Eric Botcazou wrote:
> 2013-07-30 Eric Botcazou
>
> * config/sparc/sparc.c (sparc_emit_membar_for_model) : Add
> the implied StoreLoad barrier for atomic operations if before.
Looks good.
r~
If you compile the following C++ code at -O for Linux or Solaris:
int exchange (int *loc, int val)
{
return __atomic_exchange_4 (loc, val, __ATOMIC_SEQ_CST);
}
you get in the assembly file:
_Z8exchangePii:
.LLFB0:
mov %o0, %g1
membar 2
mov %o1, %o0
swap