Skip to content

Instantly share code, notes, and snippets.

@lydonchandra
Last active January 1, 2016 13:09
Show Gist options
  • Save lydonchandra/8148957 to your computer and use it in GitHub Desktop.
Save lydonchandra/8148957 to your computer and use it in GitHub Desktop.
test_unpckldq and unpcklqdq
void test_punpckldq() {
__m128i m128_1;
__asm {
mov r8d, 0x11112222
mov r9d, 0x33334444
mov r10d,0x55556666
mov r11d,0x77778888
movd xmm8, r8d
movd xmm9, r9d
movd xmm10,r10d
movd xmm11,r11d
//punpcklqdq xmm8, xmm9
//m128_1
//[0] = 11112222
//[1] = 33334444
punpckldq xmm8, xmm9
//m128_1
//[0] = 3333444411112222
//[1] = 0
//mov r8, 0x1111222233334444
//mov r9, 0x5555666677778888
//vmovq xmm8, r8
//vmovq xmm9, r9
//punpckldq xmm8, xmm9
//m128_1
//[0] = 7777888833334444
//[1] = 5555666611112222
//punpcklqdq xmm8, xmm9
//m128_1
//[0] = 1111222233334444
//[1] = 5555666677778888
movdqa m128_1, xmm8
}
printf("m128_1 \n[0]=%llx \n[1]=%llx \n",
m128_1.m128i_u64[0], m128_1.m128i_u64[1]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment