_mm_cvtsi64_si128

Microsoft Specific

Emits the Streaming SIMD Extensions 2 (SSE2) instruction movq. This instruction copies a 64-bit integer into a 128-bit parameter.

__m128i _mm_cvtsi64_si128( 
   __int64 a
);

Parameters

  • [in] a
    A 64-bit signed integer.

Return value

The return value can be expressed with the following equations:

r0 := a
r1 := 0

Requirements

Intrinsic

Architecture

_mm_cvtsi64_si128

x64

Header file <emmintrin.h>

Remarks

r0 is the lower 64 bits of return value r. r1 is the higher 64 bits of return value r. The upper 64 bits of the result are set to zero.

Before you use this intrinsic, software must ensure that the processor supports the instruction.

Example

#include <stdio.h>
#include <emmintrin.h>

int main ()
{
    __int64 a = -65535;

    __m128i res = _mm_cvtsi64_si128(a);

    printf_s("Original a: %I64d\n", a);
    printf_s("Result res: %I64d\t%I64d\n", res.m128i_i64[1], res.m128i_i64[0]);

    return 0;
}
Original a: -65535
Result res: 0   -65535

See Also

Reference

Compiler Intrinsics