__movsw
Microsoft Specific
Generates a Move String (rep movsw) instruction.
void __movsw( unsigned short* Dest, unsigned short* Source, size_t Count );
// movsw.cpp
// processor: x86, x64
#include <stdio.h>
#include <intrin.h>
#pragma intrinsic(__movsw)
int main()
{
unsigned short s1[10];
unsigned short s2[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
__movsw(s1, s2, 10);
for (int i = 0; i < 10; i++)
printf_s("%d ", s1[i]);
printf_s("\n");
}
0 1 2 3 4 5 6 7 8 9