start on SIMD documentation
Peter Alexander
peter.alexander.au at gmail.com
Sat Jan 14 06:00:11 PST 2012
On 14/01/12 8:27 AM, Walter Bright wrote:
> On 1/13/2012 11:06 AM, Peter Alexander wrote:
>> *** Internal error: backend/cgcod.c 2048 ***
>>
>> Are all those instructions implemented? I seem to get the same for all
>> instructions.
>
> Things have gotten much better with the latest checkin.
Ok, just got latest:
float4 a = void; // this works now
float4 b; // this doesn't (backend/cod2.c 2630)
a = simd(XMM.PXOR, a, a); // this doesn't (backend/cgcod.c 2048)
a = simd(XMM.PXOR, a, b); // this works
a = simd(XMM.PXOR, b, a); // this works
b = simd(XMM.PXOR, a, a); // this doesn't (backend/cgcod.c 2048)
Seems to not like it when the two args are the same.
This doesn't work either:
asm { movaps a, b; } // (bad type/size of operands 'movaps')
So, I can load all zeroes into a register using this:
float4 a = void, b = void;
b = a;
a = simd(XMM.PXOR, a, b);
But can't really do anything else.
Also, is there any way to extract the information from a vector type?
Using a union, or taking address and casting to float* didn't work.
Presumably it isn't writing back into memory appropriately (or has no
memory associated).
More information about the Digitalmars-d
mailing list