Using SSE/SSE2 intrinsics in AMD64 Kernel

I am trying to add SSE2 intrinsics to a function in my WDM driver,
but am having difficulty when compiling for AMD64 (I have no problems
compiling for x86). Specifically, I am assuming that I need to
#include <emmintrin.h> before any SSE intrinsics and types can be
used, however, this file is not included in the DDK.

For my x68 build, I simply pulled in the appropriate header files
from Visual Studio and compiled with no problems, however, the same
header files do not compile in an AMD64 build, which makes me suspect
that this is not the correct way to reference these includes.

As every x64 driver porting guide mentions the use of SSE intrinsics
in the kernel, I am assuming that this should be a fairly
straightforward process. Has anyone tried this – and if so, what
steps were needed to allow the compiler to accept SSE types when
building for x64 – or can anyone point to a driver sample that makes
use of SSE?

Thanks,
Doug Clarke</emmintrin.h>

I don’t think you can do this. The __m64 data type is not supported on x64.

From MSDN:

“Any SSE intrinsics that use the __m64 data type are not supported on x64 processors.”

emmintrin.h has many uses of __m64

extern __m64 _mm_cvtpd_pi32(__m128d _A);

Good luck,

mm