SSE support on x86 platform

In QNX Neutrino 2 (QNX 6.2) or above. Does anyone know if the GNU c++ compiler that comes with OS support MMX programming (or SSE) with Intel Pentium CPU? Does it support new inline macros from Intel or one makes inline assembly code directly from memonics?

yes it does. I haven’t not done it myself but read somewhere gnu asm support that stuff.

#include <stdlib.h>
#include <stdio.h>

float x[]={1.,1.,1.,1.};

int main(int argc, char *argv[]) {

asm("emms");
asm("movaps x,%xmm0");
asm("addps x,%xmm0");
asm("movaps %xmm0,x");
asm("emms");

printf("\n%f",x[0]);
return EXIT_SUCCESS;

}

I have learned in intel C++ compiler as well as visual studio a new set of macros and data types has been developed for use to simply inline SSE in C compilers.

The introduction of m128 data type as well as a series of mm_ type macros to replace traditional inline ASM.

Does any one know whether QNX gcc suport these types macros and if so how to get it setup in GCC.

There isn’t anything specific to QNX’s version of gcc. Look up the documention for GCC and if it’s support QNX supports it as well (make sure you check in the documentation of the same gcc version).