Serge Rogatch
Serge Rogatch

Reputation: 15030

C/C++ intrinsic for assembly VMOVD

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

Answers (1)

wim
wim

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

Related Questions