[macstl-dev] Re: [altivec] Secret incantations of the vector
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
> gcc -maltivec -dM -E - < /dev/null
> on each of the compilers and then sort and diff the 4 out output
> files against each other.
That would be good except I don't possess mainline gcc 3.4. Can
someone confirm that
is undefined or 1 for mainline gcc, and >1 for Apple gcc?
Cheers, Glen Low
pixelglow software | simply brilliant stuff
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the macstl-dev