MMX instruction and gcc
Ian Lance Taylor
Thu Mar 15 15:13:00 GMT 2007
Galloth <email@example.com> writes:
> I want ask, if there is posibilities that gcc will be automaticaly
> generates MMX instruction? I tried -mtune, -march -mmmx. But gcc stil
> generates code without MMX instruction. On net I found only
> information about inline assembler function or citation from man page.
> I tried to compile program for adding two arrays of 24 chars.
This question is appropriate for the mailing list
firstname.lastname@example.org, not for email@example.com. Please take any
follow-ups to gcc-help. Thanks.
In some cases gcc may be able to automatically generate MMX
instructions if you use the -ftree-vectorize option.
Otherwise, you need to write your code using the macros defined in the
header file mmintrin.h. This can be found in the gcc source code in
gcc/config/i386/mmintrin.h. It will also be installed with gcc
somewhere on your system. It implements an interface documented by
Intel; the documentation is available somewhere on the Intel web
More information about the Gcc