This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On 29/11/12 15:42, 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.

Thanks,
Yvan


The same issue exists in the 4.7 branch.


Can the fix be back ported?

/Marcus


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]