Integer Set Operations for SSE2

The following set operation intrinsics and their respective instructions are functional in the Streaming SIMD Extensions 2 (SSE2).

The prototypes for SSE2 intrinsics are in the emmintrin.h header file.

__m128i _mm_set_epi64(__m64 q1, __m64 q0)

Sets the 2 64-bit integer values.
r0 := q0
r1 := q1

__m128i _mm_set_epi32(int i3, int i2, int i1, int i0)

Sets the 4 signed 32-bit integer values.
r0 := i0
r1 := i1
r2 := i2
r3 := i3

__m128i _mm_set_epi16(short w7, short w6, short w5, short w4, short w3, short w2, short w1, short w0)

Sets the 8 signed 16-bit integer values.
r0 := w0
r1 := w1
...
r7 := w7

__m128i _mm_set_epi8(char b15, char b14, char b13, char b12, char b11, char b10, char b9, char b8, char b7, char b6, char b5, char b4, char b3, char b2, char b1, char b0)

Sets the 16 signed 8-bit integer values.
r0 := b0
r1 := b1
...
r15 := b15

__m128i _mm_set1_epi64(__m64 q)

Sets the 2 64-bit integer values to q.
r0 := q
r1 := q

__m128i _mm_set1_epi32(int i)

Sets the 4 signed 32-bit integer values to i.
r0 := i
r1 := i
r2 := i
r3 := i

__m128i _mm_set1_epi16(short w)

Sets the 8 signed 16-bit integer values to w.
r0 := w
r1 := w
...
r7 := w

__m128i _mm_set1_epi8(char b)

Sets the 16 signed 8-bit integer values to b.
r0 := b
r1 := b
...
r15 := b

__m128i _mm_setr_epi64(__m64 q0, __m64 q1)

Sets the 2 64-bit integer values in reverse order.
r0 := q0
r1 := q1

__m128i _mm_setr_epi32(int i0, int i1, int i2, int i3)

Sets the 4 signed 32-bit integer values in reverse order.
r0 := i0
r1 := i1
r2 := i2
r3 := i3

__m128i _mm_setr_epi16(short w0, short w1, short w2, short w3, short w4, short w5, short w6, short w7)

Sets the 8 signed 16-bit integer values in reverse order.
r0 := w0
r1 := w1
...
r7 := w7

__m128i _mm_setr_epi8(char b15, char b14, char b13, char b12, char b11, char b10, char b9, char b8, char b7, char b6, char b5, char b4, char b3, char b2, char b1, char b0)

Sets the 16 signed 8-bit integer values in reverse order.
r0 := b0
r1 := b1
...
r15 := b15

__m128i _mm_setzero_si128()

Sets the 128-bit value to zero.
r := 0x0