From patchwork Fri Jul 1 15:57:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 2410 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 773B923F53 for ; Fri, 1 Jul 2011 15:57:17 +0000 (UTC) Received: from mail-qy0-f173.google.com (mail-qy0-f173.google.com [209.85.216.173]) by fiordland.canonical.com (Postfix) with ESMTP id 96376A1860F for ; Fri, 1 Jul 2011 15:57:16 +0000 (UTC) Received: by qyk10 with SMTP id 10so14318qyk.11 for ; Fri, 01 Jul 2011 08:57:16 -0700 (PDT) Received: by 10.224.217.7 with SMTP id hk7mr2668687qab.59.1309535836044; Fri, 01 Jul 2011 08:57:16 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.229.48.135 with SMTP id r7cs108147qcf; Fri, 1 Jul 2011 08:57:15 -0700 (PDT) Received: by 10.227.197.199 with SMTP id el7mr3025685wbb.32.1309535834751; Fri, 01 Jul 2011 08:57:14 -0700 (PDT) Received: from mtagate6.uk.ibm.com (mtagate6.uk.ibm.com [194.196.100.166]) by mx.google.com with ESMTPS id o4si7278282wbh.46.2011.07.01.08.57.14 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 01 Jul 2011 08:57:14 -0700 (PDT) Received-SPF: neutral (google.com: 194.196.100.166 is neither permitted nor denied by best guess record for domain of david.gilbert@linaro.org) client-ip=194.196.100.166; Authentication-Results: mx.google.com; spf=neutral (google.com: 194.196.100.166 is neither permitted nor denied by best guess record for domain of david.gilbert@linaro.org) smtp.mail=david.gilbert@linaro.org Received: from d06nrmr1307.portsmouth.uk.ibm.com (d06nrmr1307.portsmouth.uk.ibm.com [9.149.38.129]) by mtagate6.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p61FvDpA006562 for ; Fri, 1 Jul 2011 15:57:13 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p61FvDHk2523244 for ; Fri, 1 Jul 2011 16:57:13 +0100 Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p61FvDkG023208 for ; Fri, 1 Jul 2011 09:57:13 -0600 Received: from davesworkthinkpad (davegilbertthinkpad.manchester-maybrook.uk.ibm.com [9.174.219.90]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p61FvBec023185 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 1 Jul 2011 09:57:13 -0600 Date: Fri, 1 Jul 2011 16:57:11 +0100 From: "Dr. David Alan Gilbert" To: gcc-patches@gcc.gnu.org Cc: patches@linaro.org Subject: [Patch 3/3] ARM 64 bit atomic operations Message-ID: <20110701155710.GD5242@davesworkthinkpad> References: <20110701155254.GA5242@davesworkthinkpad> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110701155254.GA5242@davesworkthinkpad> User-Agent: Mutt/1.5.20 (2009-06-14) As per pr/48126 Michael Edwards spotted that in the case where the compare fails in the cmpxchg, the barrier at the end wasn't taken theoretically allowing a following load to float up above the load value compared. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 057f9ba..39057d2 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -23531,8 +23626,8 @@ arm_output_sync_loop (emit_f emit, } } - arm_process_output_memory_barrier (emit, NULL); arm_output_asm_insn (emit, 1, operands, "%sLSYB%%=:", LOCAL_LABEL_PREFIX); + arm_process_output_memory_barrier (emit, NULL); } static rtx