Microsoft Specific

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

__m64 __m64_dep_mr( 
   __m64 source, 
   __m64 value, 
   const int pos, 
   const int len 

[in] source

The value from which to extract the bits for the merge.

[in] value

The value into which to merge.

[in] pos

The destination bit position for the merge into value. Valid values from 0 to 63.

[in] len

The number of bits to merge. Valid values from 1 to 16.





Header file <intrin.h>

// dep_mr.cpp
// compile with: /EHsc
// processor: IPF
#include <iostream>
#include <intrin.h>
using namespace std;

#pragma intrinsic(__m64_dep_mr)

int main()
  __m64 m, n;
  m.m64_u64 = 0xE00010;
  n.m64_u64 = 0x8888;
  __m64 result = __m64_dep_mr(n, m, 4, 16);

  cout << hex << "0x" << result.m64_u64;


Community Additions