August 22, 2012 SSE2 movddup Not Moving Values | ||||
---|---|---|---|---|
| ||||
Might anyone from this forum have some thoughts for this problem? http://stackoverflow.com/questions/12082561/sse2-movddup-not-moving-values Thanks, JC |
August 23, 2012 Re: SSE2 movddup Not Moving Values | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan Crapuchettes | 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
|
Copyright © 1999-2021 by the D Language Foundation