inline assembly:

__asm__("movd (%0), %%xmm1" : : "r"(some_pointer) :);

What is the equivalent intrinsics code?

__m128i foo = _mm_?????(some_pointer);
有帮助吗?

解决方案

int32_t *foo_pointer;

__m128i foo = _mm_cvtsi32_si128(*foo_pointer); // MOVD

For future reference get the handy Intel Intrinsics Guide from this page: http://software.intel.com/en-us/avx/ (bottom left hand side - different versions for different platforms: Mac/Linux/Windows). Don't be put off by the fact that this is an AVX page, the Intrinsics Guide covers all instructions from MMX through all flavours of SSE up to AVX and AVX2 and is a quick and easy way to look up SIMD opcodes and intrinsics.

其他提示

Given you want it into an integer SSE register, you're probably looking for _mm_cvtsi32_si128.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top