From patchwork Mon Jul 23 14:24:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 172698 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id C4E092C0085 for ; Tue, 24 Jul 2012 00:24:37 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1343658278; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Subject:MIME-Version:Content-Type:From:In-Reply-To:Date: CC:Content-Transfer-Encoding:Message-ID:References:To: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=SnRuzI9+d+55192QrOej vJe8618=; b=v+anGN45TiDMJIAgUX/Yv3mgANlJ3K3WNnSUaaCVycrWB3nehEEU UvQRtyUt11drJP27WT8PE9U01oeGW5XtLMmxXUEQmzp2vS7FKhFbMTB52OQ1zWUe TQRtU1dmgUm1lRyA12O7EiGWGLHwq/J1rrTvIf/GRwmsZyRGvKsdRiw= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Subject:MIME-Version:Content-Type:From:In-Reply-To:Date:CC:Content-Transfer-Encoding:Message-ID:References:To:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=a8mfDWktsDdLRPX3unFzY2jBbLdicLs+yRXJsYJi0jdRi4SlqJsY7OnIq64vwZ VtP39AAOBFemQK7D+mLEi/vsg8fpNo9TXpqA/vphupXh3TMSrn5NESDdIZwexM5l 20OABOM9tJeEsanTcIOpmhGa+9HCQNNO7xLnhQKg006/4=; Received: (qmail 31497 invoked by alias); 23 Jul 2012 14:24:31 -0000 Received: (qmail 31457 invoked by uid 22791); 23 Jul 2012 14:24:27 -0000 X-SWARE-Spam-Status: No, hits=-4.7 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; Mon, 23 Jul 2012 14:24:14 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1StJYS-0006sg-SA from Iain_Sandoe@mentor.com ; Mon, 23 Jul 2012 07:24:12 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 23 Jul 2012 07:24:12 -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; Mon, 23 Jul 2012 15:24:10 +0100 Subject: Re: [Ada] Lock-free implementation of protected objects MIME-Version: 1.0 (Apple Message framework v1084) From: Iain Sandoe In-Reply-To: <20120723080250.GA28974@adacore.com> Date: Mon, 23 Jul 2012 15:24:07 +0100 CC: , Vincent Pucci Message-ID: <62F94423-30A3-4A67-8F69-B64FE7A71C8E@codesourcery.com> References: <20120723080250.GA28974@adacore.com> To: Arnaud Charlet Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi Arnaud, On 23 Jul 2012, at 09:02, Arnaud Charlet wrote: > This patch implements a check in the runtime library that determines whether > the current target supports the atomic primitives up to 64 bits. If I understand the name of the flag, it looks like an "all or nothing" for atomic primitives? is that a consequence of the language definition, or simply that it isn't worth spending a lot of effort on 32 bit machines? > This should fix build failures on e.g. powerpc-darwin. almost :-) On a 64-bit processor, the [32 bit] powerpc-darwin kernel is capable of launching 64bit processes. Thus, there is an m64 multi-lib for powerpc-darwin, which is built by default for GCC (and, for that multi-lib, the 64 bit locks are available). At present, bootstrap is failing while building this multi-lib. With the following, bootstrap completed on powerpc-apple-darwin9, and make check-ada shows no new fails. Should I apply it? Iain gcc/ada: * system-darwin-ppc64.ads: Add Support_Atomic_Primitives, set to True. Index: gcc/ada/system-darwin-ppc64.ads =================================================================== --- gcc/ada/system-darwin-ppc64.ads (revision 189777) +++ gcc/ada/system-darwin-ppc64.ads (working copy) @@ -137,6 +137,7 @@ private Stack_Check_Limits : constant Boolean := False; Support_64_Bit_Divides : constant Boolean := True; Support_Aggregates : constant Boolean := True; + Support_Atomic_Primitives : constant Boolean := True; Support_Composite_Assign : constant Boolean := True; Support_Composite_Compare : constant Boolean := True; Support_Long_Shifts : constant Boolean := True;