[PATCH] Fix for PR55492 : __atomic_load doesn't match ACQUIRE memory model

Andrew MacLeod amacleod@redhat.com
Thu Nov 29 17:01:00 GMT 2012


On 11/29/2012 10:42 AM, Yvan Roux wrote:
> Hi,
>
> on ARMv7, the code generated for the __atomic_load builtins in the
> __ATOMIC_ACQUIRE memory model, puts a memory barrier before the load, whereas
> the semantic of the acquire memory model implies a barrier after.
>
> The issue seems to be in expand_atomic_load which puts a memory fence before
> the load in any memory model. The attached patch fixes the problem.
>
Patch is fine.

If you can confirm you have a copyright assignment on file I can take 
care of checking it in.

Andrew



More information about the Gcc-patches mailing list