# General Support Intrinsics (MMX™ technology)

This topic summarizes the MMX™ technology general support intrinsics.

To use these intrinsics, include the immintrin.h file as follows:

    #include <immintrin.h>

Intrinsic Name | Operation | Corresponding MMX™ Instruction
--- | --- | ---
_mm_empty | Empty MM state | EMMS
_mm_cvtsi32_si64 | Convert from int | MOVD
_mm_cvtsi64_si32 | Convert to int | MOVD
_mm_cvtsi64_m64 | Convert from __int64 | MOVQ
_mm_cvtm64_si64 | Convert to __int64 | MOVQ
_mm_packs_pi16 | Pack | PACKSSWB
_mm_packs_pi32 | Pack | PACKSSDW
_mm_packs_pu16 | Pack | PACKUSWB
_mm_unpackhi_pi8 | Interleave | PUNPCKHBW
_mm_unpackhi_pi16 | Interleave | PUNPCKHWD
_mm_unpackhi_pi32 | Interleave | PUNPCKHDQ
_mm_unpacklo_pi8 | Interleave | PUNPCKLBW
_mm_unpacklo_pi16 | Interleave | PUNPCKLWD
_mm_unpacklo_pi32 | Interleave | PUNPCKLDQ

## _mm_empty

void _mm_empty(void);

Empties the multimedia state.

## _mm_cvtsi32_si64

__m64 _mm_cvtsi32_si64(int i);

Converts the integer object i to a 64-bit __m64 object. The integer value is zero-extended to 64 bits.

## _mm_cvtsi64_si32

int _mm_cvtsi64_si32(__m64 m);

Converts the lower 32 bits of the `__m64` object m to an integer.

## _mm_cvtsi64_m64

__m64 _mm_cvtsi64_m64(__int64 i);

Moves the 64-bit integer object i to a `__m64` object

## _mm_cvtm64_si64

__m64 _mm_cvtm64_si64(__m64 m);

Moves the `__m64` object m to a 64-bit integer

## _mm_packs_pi16

__m64 _mm_packs_pi16(__m64 m1, __m64 m2);

Packs the four 16-bit values from m1 into the lower four 8-bit values of the result with signed saturation, and pack the four 16-bit values from m2 into the upper four 8-bit values of the result with signed saturation.

## _mm_packs_pi32

__m64 _mm_packs_pi32(__m64 m1, __m64 m2);

Packs the two 32-bit values from m1 into the lower two 16-bit values of the result with signed saturation, and pack the two 32-bit values from m2 into the upper two 16-bit values of the result with signed saturation.

## _mm_packs_pu16

__m64 _mm_packs_pu16(__m64 m1, __m64 m2);

Packs the four 16-bit values from m1 into the lower four 8-bit values of the result with unsigned saturation, and pack the four 16-bit values from m2 into the upper four 8-bit values of the result with unsigned saturation.

## _mm_unpackhi_pi8

__m64 _mm_unpackhi_pi8(__m64 m1, __m64 m2);

Interleaves the four 8-bit values from the high half of m1 with the four values from the high half of m2. The interleaving begins with the data from m1.

## _mm_unpackhi_pi16

__m64 _mm_unpackhi_pi16(__m64 m1, __m64 m2);

Interleaves the two 16-bit values from the high half of m1 with the two values from the high half of m2. The interleaving begins with the data from m1.

## _mm_unpackhi_pi32

__m64 _mm_unpackhi_pi32(__m64 m1, __m64 m2);

Interleaves the 32-bit value from the high half of m1 with the 32-bit value from the high half of m2. The interleaving begins with the data from m1.

## _mm_unpacklo_pi8

__m64 _mm_unpacklo_pi8(__m64 m1, __m64 m2);

Interleaves the four 8-bit values from the low half of m1 with the four values from the low half of m2. The interleaving begins with the data from m1.

## _mm_unpacklo_pi16

__m64 _mm_unpacklo_pi16(__m64 m1, __m64 m2);

Interleaves the two 16-bit values from the low half of m1 with the two values from the low half of m2. The interleaving begins with the data from m1.

## _mm_unpacklo_pi32

__m64 _mm_unpacklo_pi32(__m64 m1, __m64 m2);

Interleaves the 32-bit value from the low half of m1 with the 32-bit value from the low half of m2. The interleaving begins with the data from m1.

Parent topic: Intrinsics for MMX™ Technology