[macstl-dev] Re: [altivec] Secret incantations of the vector
masters...
Glen Low
glen.low at pixelglow.com
Sat Jun 4 01:04:21 WST 2005
On 03/06/2005, at 11:21 PM, Paul Russell wrote:
> On 3 Jun 2005, at 08:01, Glen Low wrote:
>
>
>> Hi All
>>
>> I've got vector code (macstl -- what else!) that needs to compile
>> correctly on:
>>
>> 1. Apple gcc 3.3 with -faltivec
>> 2. Mainline gcc 3.4 with -maltivec
>> 3. Apple gcc 4.0 with -faltivec -maltivec
>> 4. Mainline gcc 4.0 with -maltivec
>>
>> On 1 and 3, the Altivec intrinsics are builtin and vector, bool
>> and pixel are automatically contextualized keywords. On 2 and 4,
>> the Altivec intrinsics need to be #include <altivec.h> and vector,
>> bool and pixel are not keywords (but they are, ugh, defined
>> through macros in <altivec.h>).
>>
>> What combination of #ifdef macros and secret handshakes will allow
>> me to navigate this wasteland??
>>
>>
>>
>
> One possible empirical solution is to invoke:
>
> gcc -faltivec -dM -E - < /dev/null
>
> or
>
> gcc -maltivec -dM -E - < /dev/null
>
> on each of the compilers and then sort and diff the 4 out output
> files against each other.
>
> Paul
That would be good except I don't possess mainline gcc 3.4. Can
someone confirm that
__APPLE_CC__
is undefined or 1 for mainline gcc, and >1 for Apple gcc?
Cheers, Glen Low
---
pixelglow software | simply brilliant stuff
www.pixelglow.com
aim: pixglen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pixelglow.com/lists/archive/macstl-dev/attachments/20050604/dd94b98f/attachment.html
More information about the macstl-dev
mailing list