开发者

Where can I find an official reference listing the operation of SSE intrinsic functions?

Is开发者_Python百科 there an official reference listing the operation of the SSE intrinsic functions for GCC, i.e. the functions in the <*mmintrin.h> header files?


As well as Intel's vol.2 PDF manual, there is also an online intrinsics guide.

The Intel® Intrinsics Guide contains reference information for Intel intrinsics, which provide access to Intel instructions such as Intel® Streaming SIMD Extensions (Intel® SSE), Intel® Advanced Vector Extensions (Intel® AVX), and Intel® Advanced Vector Extensions 2 (Intel® AVX2).

It has a full-text search, so an intrinsic can be found by its name, or by CPU instruction, CPU feature, etc. It also has a control on which ISA extension to show. This allows, for example, not searching KNC that you wouldn't likely be able to use, or MMX that is far less useful these days.

See also the tag wiki for the sse tag for links to guides and a couple tutorials, as well as this official documentation.


I found these headers were needed for invoking the different versions of SSE from GCC:

For SSE2

extern "C"
{
    #include <emmintrin.h>
    #include <mmintrin.h>
}

For SSE2

extern "C"
{
    #include <pmmintrin.h>
    #include <immintrin.h>   // (Meta-header)
}

For SSE4:

extern "C"
{
    #include <smmintrin.h>
}

In modern versions of the compilers, all the headers seem to be common to Visual Studio and GCC.


SSEPlus table on intrinsics is very easy to use for most cases.


The GCC intrinsics are implementations of the Intel compiler intrinsics. They are documented in Intel® 64 and IA-32 Architectures Developer's Manual: Vol. 2C - Appendix C.


These originally come from Intel. Intel C++ compiler describes those in its manual. AMD probably has its own manual containing those for 3DNow!.

You will have to compare the availability of those with the *mmintrin.h shipped with your version of GCC.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜