From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27120 invoked by alias); 14 Jun 2012 06:00:13 -0000 Received: (qmail 27087 invoked by uid 22791); 14 Jun 2012 06:00:10 -0000 X-SWARE-Spam-Status: No, hits=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Jun 2012 05:59:57 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Sf363-0001a5-NY from Maxim_Kuvyrkov@mentor.com ; Wed, 13 Jun 2012 22:59:55 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 13 Jun 2012 22:59:19 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Thu, 14 Jun 2012 06:59:54 +0100 Subject: Re: [PATCH 1/3, MIPS] Rewrite MIPS' atomic.h to use __atomic_* builtins. MIME-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset="us-ascii" From: Maxim Kuvyrkov In-Reply-To: Date: Thu, 14 Jun 2012 06:00:00 -0000 CC: , Richard Sandiford Content-Transfer-Encoding: quoted-printable Message-ID: <5607728D-E105-41C5-AA54-26E9842828CE@codesourcery.com> References: To: "Joseph S. Myers" Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2012-06/txt/msg00031.txt.bz2 On 14/06/2012, at 4:26 PM, Maxim Kuvyrkov wrote: > This patch rewrites MIPS' atomic.h to use __atomic_* builtins instead of = inline assembly. These builtins are available in recent version of GCC and= correspond to C++11 memory model support, they also map very well to GLIBC= 's atomic_* macros. >=20 > With the GCC patches posted here [*] applied, the compiler will generate = same, or better, assembly code for the atomic macros. XLP processors in pa= rticular will see a significant boost as GCC will use XLP-specific SWAP and= LDADD instructions for some of the macros instead of LL/SC sequences. >=20 > This patch was tested on XLP with no regressions; testing on a non-XLP pl= atform is in progress. Testing was done using GCC mainline with [*] patche= s applied. OK to apply once 2.16 branches? >=20 [*] http://gcc.gnu.org/ml/gcc-patches/2012-06/msg00779.html -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics