www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - SSE2 movddup Not Moving Values

reply Jonathan Crapuchettes <jcrapuchettes gmail.com> writes:
Might anyone from this forum have some thoughts for this problem?
http://stackoverflow.com/questions/12082561/sse2-movddup-not-moving-values

Thanks,
JC
Aug 22 2012
parent "bearophile" <bearophileHUGS lycos.com> writes:
Jonathan Crapuchettes:
 Might anyone from this forum have some thoughts for this 
 problem?
 http://stackoverflow.com/questions/12082561/sse2-movddup-not-moving-values
There are some mistakes in that asm code: import core.stdc.stdio: printf; import core.cpuid: sse3; void main() { assert(sse3()); double d = 1.0 / 2; auto a = new double[2]; auto aptr = a.ptr; asm { mov ESI, aptr; movddup XMM0, d; movupd [ESI], XMM0; } printf("%f %f\n", a[0], a[1]); } Bye, bearophile
Aug 22 2012