From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12182 invoked by alias); 30 Nov 2012 09:35:43 -0000 Received: (qmail 12129 invoked by uid 22791); 30 Nov 2012 09:35:43 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 30 Nov 2012 09:35:38 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Fri, 30 Nov 2012 09:35:36 +0000 Received: from [10.1.72.50] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 30 Nov 2012 09:35:35 +0000 Message-ID: <50B87DE7.70803@arm.com> Date: Fri, 30 Nov 2012 09:37:00 -0000 From: Marcus Shawcroft User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Fix for PR55492 : __atomic_load doesn't match ACQUIRE memory model References: In-Reply-To: X-MC-Unique: 112113009353615501 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg02524.txt.bz2 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, whe= reas > 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 bef= ore > 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