fix accidental mutation in vec binary ops
This commit is contained in:
parent
9f70b8982c
commit
246e7006f5
16
math.d
16
math.d
@ -249,19 +249,19 @@ struct Vector(T, int N)
|
|||||||
|
|
||||||
asm
|
asm
|
||||||
{
|
{
|
||||||
mov R8, l;
|
mov R8, l;
|
||||||
mov R9, r;
|
mov R9, r;
|
||||||
mov R10, res;
|
mov R10, res;
|
||||||
movups XMM0, x.offsetof[R8];
|
movups XMM0, x.offsetof[R8];
|
||||||
movups XMM1, other.x.offsetof[R9];
|
movups XMM1, other.x.offsetof[R9];
|
||||||
}
|
}
|
||||||
static if(op == "*") asm { mulps XMM0, XMM1; }
|
static if(op == "*") asm { mulps XMM0, XMM1; }
|
||||||
else static if(op == "-") asm { subps XMM0, XMM1; }
|
else static if(op == "-") asm { subps XMM0, XMM1; }
|
||||||
else static if(op == "+") asm { addps XMM0, XMM1; }
|
else static if(op == "+") asm { addps XMM0, XMM1; }
|
||||||
else static if(op == "/") asm { divps XMM0, XMM1; }
|
else static if(op == "/") asm { divps XMM0, XMM1; }
|
||||||
asm
|
asm
|
||||||
{
|
{
|
||||||
movups result.x.offsetof[R8], XMM0;
|
movups result.x.offsetof[R10], XMM0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user