Partager via


__m64_dep_zi 

Microsoft Specific

Emits the zero immediate form of the IPF Deposit (dep.z) instruction, which is used to copy a number of bits specified by len from a constant value source into a bit position specified by pos of the resulting value.

__m64 __m64_dep_zi( 
   const int source, 
   const int pos, 
   const int len 
);

Parameters

  • [in] source
    An 8-bit constant value to act as the source of bits to be copied into the result.
  • [in] pos
    The bit position in the result to place the copied bits.
  • [in] len
    The number of bits to copy.

Requirements

Intrinsic Architecture

__m64_dep_zi

IPF

Header file <intrin.h>

Remarks

The bits are copied sign extended. The rest of the bits in the result are cleared to zero.

Example

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

#pragma intrinsic(__m64_dep_zi)

int main()
{
  const int imm = 0x12;
  
  __m64 result = __m64_dep_zi(imm, 4, 16);

  cout << hex << "0x" << result.m64_i64 << endl;

  // When copying a number of bits larger than an int,
  // the copied bits are sign extended:
  const int imm2 = -1;
  result = __m64_dep_zi(imm2, 0, 56); 
  
  cout << hex << "0x" << result.m64_i64;
}

Output

0x120
0xffffffffffffff

END Microsoft Specific

See Also

Reference

__m64
Compiler Intrinsics