Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer


Microsoft Specific

Emits the merge immediate form of the IPF Deposit (dep) instruction, which is used for copying a number of bits specified by len with the value bit into a value value in a register at the bit position specified by pos.

__m64 __m64_dep_mi( 
   const int bit, 
   __m64 value, 
   const int pos, 
   const int len 


[in] bit

Either 0 or 1. The value to set the merged bits to.

[in] value

The value to be merged into.

[in] pos

The bit position in the value to merge the bits. Valid values are 0 to 63.

[in] len

len is the number of bits to merge. Valid values are 1 to 64.

Intrinsic Architecture



Header file <intrin.h>

// dep.cpp
// compile with: /EHsc
// processor: IPF
#include <stdio.h>
#include <intrin.h>

#pragma intrinsic(__m64_dep_mi)

int main()
    __m64 m;
    // Merge a "1" bit at bit 1 in 0x200
    m = __m64_dep_mi(1, _m_from_int(0x200), 1, 1);

    printf_s("%I64x", m.m64_u64);


© 2015 Microsoft