Look at the source, LukeSo if this is a code porting activity, where is the source? All the
source code we need to look at is in the GCC source trees. You can either git
(https://gcc.gnu.org/wiki/GitMirro)
the gcc source or download one of the
recent AT source tars (for example:
ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/ubuntu/dists/xenial/at10.0/).
You will find the intrinsic headers in the ./gcc/config/i386/
sub-directory.If you have an Intel Linux workstation or laptop with GCC installed,
you already have these headers, if you want to take a look:
$ find /usr/lib -name '*mmintrin.h'
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/include/wmmintrin.h
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/include/mmintrin.h
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/include/xmmintrin.h
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/include/emmintrin.h
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/include/tmmintrin.h
...
$ But depending on the vintage of the distro, these may not be the
latest versions of the headers. Looking at the header source will tell you a
few things: the include structure (what other headers are implicitly
included), the types that are used at the API, and finally, how the API is
implemented.smmintrin.h (SSE4.1) includes tmmintrin,h
tmmintrin.h (SSSE3) includes pmmintrin.h
pmmintrin.h (SSE3) includes emmintrin,h
emmintrin.h (SSE2) includes xmmintrin.h
xmmintrin.h (SSE) includes mmintrin.h and mm_malloc.h
mmintrin.h (MMX)