load 32 bits from memory into xmm register
-
17-06-2021 - |
Frage
inline assembly:
__asm__("movd (%0), %%xmm1" : : "r"(some_pointer) :);
What is the equivalent intrinsics code?
__m128i foo = _mm_?????(some_pointer);
Lösung
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.
Andere Tipps
Given you want it into an integer SSE register, you're probably looking for _mm_cvtsi32_si128.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow