_mm_mullo_epi32
Microsoft Specific
Emits the Streaming SIMD Extensions 4 (SSE4) instruction pmullud. This instruction multiplies two sets of 32-bit signed integers.
__m128i _mm_mullo_epi32( __m128i a, __m128i b );
Only the lower 32-bits of each product are saved.
r0-r3, a0-a3, and b0-b3 are the sequentially ordered 32-bit components of return value r and parameters a and b. r0, a0, and b0 indicates the least significant 32 bits.
Before you use this intrinsic, software must ensure that the processor supports the instruction.
#include <stdio.h>
#include <smmintrin.h>
int main ()
{
__m128i a, b;
a.m128i_i32[0] = 65535;
a.m128i_i32[1] = -512;
a.m128i_i32[2] = 77910;
a.m128i_i32[3] = 0;
b.m128i_i32[0] = 2;
b.m128i_i32[1] = 4431;
b.m128i_i32[2] = -7969;
b.m128i_i32[3] = 240000000;
__m128i res = _mm_mullo_epi32(a, b);
printf_s(" a b res\n");
printf_s("%15d%15d%15d\n%15d%15d%15d\n%15d%15d%15d\n%15d%15d%15d\n",
a.m128i_i32[0], b.m128i_i32[0], res.m128i_i32[0],
a.m128i_i32[1], b.m128i_i32[1], res.m128i_i32[1],
a.m128i_i32[2], b.m128i_i32[2], res.m128i_i32[2],
a.m128i_i32[3], b.m128i_i32[3], res.m128i_i32[3]);
return 0;
}