On 2014-10-09 8:54 AM, anonymous wrote:
This compiles:
align(16) union __m128i { ubyte[16] data; } /* note the position
of the semicolon */
void store(__m128i* src, __m128i* dst) {
asm
{
movdqu XMM0, [src]; /* note: [src] */
movdqu [dst], XMM0;
}
}
Yes, this does compile, but the value from src never ends up stored in dst.
void main() {
__m128i src;
src.data[0] = 255;
__m128i dst;
writeln(src.data); // shows 255 at offset 0
store(&src, &dst);
writeln(dst.data); // remains set as the initial array
}
http://x86.renejeschke.de/html/file_module_x86_id_184.html
Is this how it's meant to be used?