_mm_storel_epi64

Microsoft Specific

Reads the lower 64 bits of b and stores them into the lower 64 bits of a.

void _mm_storel_epi64( 
   __m128i* a 
   __m128i b 
);

[in] a

An __m128i structure in memory to write to.

[in] b

An __m128i structure (mapping to an XMM hardware register) to read from.

Intrinsic

Architecture

_mm_storel_epi64

x86 with SSE2 support, x64

This intrinsic is useful for moving data from an MMX register into system memory.

This routine is only available as an intrinsic.

// _mm_storel_epi64.cpp
// processor: x86
#include <emmintrin.h>
#include <stdio.h>
extern "C"
{
   void _mm_storel_epi64(__m128i* a, __m128i b);
}
#pragma intrinsic(_mm_storel_epi64, _mm_empty, _mm_set1_epi64)

int main()
{
 
   __m128i m, n;
   __m64 q;

   // q is in memory
   q.m64_i64 = 100;
     
   // m is stored in the XMM register
   m = _mm_set1_epi64(q);

   // write to n in memory.
   _mm_storel_epi64(&n, m);
  
   // Return to floating point (x86 only)
#ifdef _M_IX86
   _mm_empty();
#endif

   // The first element is 100
   // The second parameter is garbage
   printf("%I64d %I64d\n", n.m128i_i64[0], n.m128i_i64[1]);
}

100 8639981687544439014

Community Additions

ADD
Show: