Reputation: 15030
How (in C/C++) to load 32-bit integer to the low 32 bits of an SSE register, while leaving the rest undefined? I mean something like vmovd xmm0, eax
with the same efficiency.
Upvotes: 4
Views: 1179
Reputation: 3930
Probably you are looking for the intrinsic _mm_cvtsi32_si128 (int a)
. This copies the lower 32 bits. The upper bits are set to zero.
Upvotes: 6