For the moment, you can turn the extension on in the compiler using
-mmni, and #include <tmmintrin.h>. (The extension was originally
slated to ship with the Tejas processor, which was cancelled. Thus,
Since this is the first time that you've all had to support an
optional vector ISA extension (for real) on the platform, I'll take a
minute to point out some differences between SSSE3 and AltiVec.
The -faltivec flag (without -maltivec) turned on the AltiVec
programming model but didn't give the compiler permission to stick
AltiVec anywhere it wanted to. You could safely intermingle vector
code and scalar code without causing trouble for the G3. SSSE3
support doesn't work that way. The -mmni flag gives the compiler
carte blanche to stick SSSE3 anywhere it wants in the file, even in
places you didn't explicitly use it. If a Code Duo hits that code,
it'll crash. Now, for the moment, I don't think the compiler is aware
enough of the merits of the new ISA extension to do that, but it
could at any time silently start doing so. You can save yourself a
world of trouble later if you do the right thing now.
The first thing you need to do is move any SSSE3 code off to it's own
file. Formally, SSE3 is also optional, so if you want to be pedantic,
you ought to move that out too. They should be different files.
This causes another problem. If your PowerPC build sees -mmni, it
will choke, so you can only pass -mmni on the Intel side. (I already
filed this bug and it was returned not to be fixed, by the way, so
don't bother.) While Xcode provides a way to do per-file
compilation flags and per-arch compilation flags, it doesn't provide
a straightforward way to do per-file per-arch compilation flags in
GUI, so you have to do that with build settings. Here's how:
You can also set up a separate target for each architecture and lipo
them all together, but that's a lot of work in my opinion.
Do not post admin requests to the list. They will be ignored.
PerfOptimization-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden