digitalmars.D.learn - SSE2 movddup Not Moving Values
- Jonathan Crapuchettes (4/4) Aug 22 2012 Might anyone from this forum have some thoughts for this problem?
- bearophile (18/21) Aug 22 2012 There are some mistakes in that asm code:
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
Jonathan Crapuchettes:Might anyone from this forum have some thoughts for this problem? http://stackoverflow.com/questions/12082561/sse2-movddup-not-moving-valuesThere 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