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

Reply via email to