[ARM] Add atomic_loaddi pattern

Richard Earnshaw rearnsha@arm.com
Mon Apr 30 10:51:00 GMT 2012


On 30/04/12 09:51, Andrew Haley wrote:
> On 04/27/2012 10:30 PM, Richard Henderson wrote:
>> We can perform a single-copy atomic load with an ldrexd insn.
>> If the load is all we care about, we need not pair this with
>> a strexd.
> 
> Can we?  It's good to know.  I have had a long email exchange with
> engineers at ARM, and they would not say that this was safe.  If they
> have changed their mind, I'd like to see chapter and verse.
> 
> Andrew.
> 

The ARM ARM lists a number of single-copy atomic operations.  For v7,
the list includes:

- memory accesses caused by LDREXD and STREXD instructions to
doubleword-aligned locations.

Of course, there is a potential performance issue from heavy use of the
global monitor to ensure coherency.

R.



More information about the Gcc-patches mailing list