From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31584 invoked by alias); 29 Nov 2012 17:01:28 -0000 Received: (qmail 31551 invoked by uid 22791); 29 Nov 2012 17:01:23 -0000 X-SWARE-Spam-Status: No, hits=-7.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Nov 2012 17:01:15 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qATH198R005726 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 29 Nov 2012 12:01:15 -0500 Received: from [10.11.10.18] (vpn-10-18.rdu.redhat.com [10.11.10.18]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qATH18Am003061; Thu, 29 Nov 2012 12:01:08 -0500 Message-ID: <50B794D3.7010101@redhat.com> Date: Thu, 29 Nov 2012 17:01:00 -0000 From: Andrew MacLeod User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: Yvan Roux CC: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Fix for PR55492 : __atomic_load doesn't match ACQUIRE memory model References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg02462.txt.bz2 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