From 246e7006f535f65e0d045c644bfa8d645c86f5f7 Mon Sep 17 00:00:00 2001 From: Matthew Date: Fri, 9 Jan 2026 20:27:38 +1100 Subject: [PATCH] fix accidental mutation in vec binary ops --- math.d | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/math.d b/math.d index c8c6349..bf04f6b 100644 --- a/math.d +++ b/math.d @@ -249,19 +249,19 @@ struct Vector(T, int N) asm { - mov R8, l; - mov R9, r; - mov R10, res; + mov R8, l; + mov R9, r; + mov R10, res; movups XMM0, x.offsetof[R8]; movups XMM1, other.x.offsetof[R9]; } - static if(op == "*") asm { mulps XMM0, XMM1; } - else static if(op == "-") asm { subps XMM0, XMM1; } - else static if(op == "+") asm { addps XMM0, XMM1; } - else static if(op == "/") asm { divps XMM0, XMM1; } + static if(op == "*") asm { mulps XMM0, XMM1; } + else static if(op == "-") asm { subps XMM0, XMM1; } + else static if(op == "+") asm { addps XMM0, XMM1; } + else static if(op == "/") asm { divps XMM0, XMM1; } asm { - movups result.x.offsetof[R8], XMM0; + movups result.x.offsetof[R10], XMM0; } return result;