This is the mail archive of the
mailing list for the GCC project.
Re: [ARM] Add atomic_loaddi pattern
- From: Andrew Haley <aph at redhat dot com>
- To: Richard Earnshaw <rearnsha at arm dot com>
- Cc: Richard Henderson <rth at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, "ramana dot radhakrishnan at linaro dot org" <ramana dot radhakrishnan at linaro dot org>
- Date: Mon, 30 Apr 2012 12:23:56 +0100
- Subject: Re: [ARM] Add atomic_loaddi pattern
- References: <4F9B0FEF.firstname.lastname@example.org> <4F9E5277.email@example.com> <4F9E6E75.firstname.lastname@example.org>
On 04/30/2012 11:50 AM, Richard Earnshaw wrote:
> 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.
> 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.
Aha! That is excellent news. that none of us managed to discover.
I shall immediately change the code we use in OpenJDK.