From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32365 invoked by alias); 26 Jul 2010 14:47:02 -0000 Received: (qmail 32342 invoked by uid 22791); 26 Jul 2010 14:47:01 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from c2beaomr04.btconnect.com (HELO c2beaomr04.btconnect.com) (213.123.26.182) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 26 Jul 2010 14:46:56 +0000 Received: from thor.office (host81-138-1-83.in-addr.btopenworld.com [81.138.1.83]) by c2beaomr04.btconnect.com with ESMTP id CHM94462; Mon, 26 Jul 2010 15:46:46 +0100 (BST) X-Mirapoint-IP-Reputation: reputation=Fair-1, source=Queried, refid=0001.0A0B0302.4C4D9FD5.02E4, actions=tag Cc: gcc patches , mrs@gcc.gnu.org Message-Id: <172A215B-0A5B-4869-B883-87AD11EDB480@sandoe-acoustics.co.uk> From: IainS To: Nathan Froyd In-Reply-To: <20100726133338.GM9110@codesourcery.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: [Patch Darwin 2/2] fix PPC64 ABI Date: Mon, 26 Jul 2010 15:19:00 -0000 References: <9C2B0543-065F-4BFB-B3E1-C2E138A54927@sandoe-acoustics.co.uk> <20100724101311.GK9110@codesourcery.com> <20100726133338.GM9110@codesourcery.com> 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: 2010-07/txt/msg02029.txt.bz2 On 26 Jul 2010, at 14:33, Nathan Froyd wrote: > On Sat, Jul 24, 2010 at 12:43:52PM +0100, IainS wrote: >> On 24 Jul 2010, at 11:13, Nathan Froyd wrote: >>> Could we avoid introducing more #if TARGET_MACHO where it's not >>> necessary? It should be sufficient to say something like: >>> >>> if (TARGET_MACHO >>> && rs6000_darwin_abi >>> && integer_zerop (TYPE_SIZE (type))) >>> ... >>> >>> and the compiler will DTRT and fold out that code for non-Darwin >>> targets. (This comment applies equally to your other darwin64 >>> patch.) >> >> sure, if that's the preference, no problem. >> I guess I was thinking that it would be better to eliminate the >> code at >> pre-processing > > It does slightly speed things up (I doubt that you'd notice the > speedup, > really). The rationale for using: > > if (TARGET_MACHO) > > versus > > #if TARGET_MACHO > > is that with the former, the compiler will validate that the code > syntax-checks and type-checks even when compiling for non-Darwin > targets. This extra checking makes it slightly harder to > inadvertently > break things. OK. I'll do a second pass through (after sorting out part #3 of the ABI fixes). Apropos extending this to its logical conclusion: I suspect that the only viable 'end-game' at present is to macro-ize the machopic* calls, exposing the whole of the machopic workings would probably carry too much weight. (that comment would apply equally to i386.c, which also uses that machopic common code). Iain