[Patch Darwin 2/2] fix PPC64 ABI
IainS
developer@sandoe-acoustics.co.uk
Mon Jul 26 15:19:00 GMT 2010
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
More information about the Gcc-patches
mailing list