public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: IainS <developer@sandoe-acoustics.co.uk>
To: Nathan Froyd <froydnj@codesourcery.com>
Cc: gcc patches <gcc-patches@gcc.gnu.org>, mrs@gcc.gnu.org
Subject: Re: [Patch Darwin 2/2] fix PPC64 ABI
Date: Mon, 26 Jul 2010 15:19:00 -0000	[thread overview]
Message-ID: <172A215B-0A5B-4869-B883-87AD11EDB480@sandoe-acoustics.co.uk> (raw)
In-Reply-To: <20100726133338.GM9110@codesourcery.com>


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

      reply	other threads:[~2010-07-26 14:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-24  8:36 IainS
2010-07-24  9:46 ` Mike Stump
2010-07-24 10:04   ` IainS
2010-07-24 15:06   ` IainS
2010-07-24 15:10     ` David Edelsohn
2010-07-27 13:35       ` IainS
2010-07-24 10:13 ` Nathan Froyd
2010-07-24 11:44   ` IainS
2010-07-26 13:33     ` Nathan Froyd
2010-07-26 15:19       ` IainS [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=172A215B-0A5B-4869-B883-87AD11EDB480@sandoe-acoustics.co.uk \
    --to=developer@sandoe-acoustics.co.uk \
    --cc=froydnj@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mrs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).