From 5c22ca3abbd5d09d2229dbaf54dcb4f3d8514d6a Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Fri, 7 May 2021 01:52:12 +0300 Subject: [PATCH] arrm, neon: use negate instruction instead of xor in glm_inv_tr_neon() --- include/cglm/simd/neon/affine.h | 2 +- include/cglm/simd/neon/mat2.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/cglm/simd/neon/affine.h b/include/cglm/simd/neon/affine.h index e1c23e0..f4557e7 100644 --- a/include/cglm/simd/neon/affine.h +++ b/include/cglm/simd/neon/affine.h @@ -97,7 +97,7 @@ glm_inv_tr_neon(mat4 mat) { x0 = glmm_fmadd(r0, glmm_splat_w(r0), glmm_fmadd(r1, glmm_splat_w(r1), vmulq_f32(r2, glmm_splat_w(r2)))); - x0 = glmm_xor(x0, glmm_set1(-0.f)); + x0 = vnegq_f32(x0); glmm_store(mat[0], r0); glmm_store(mat[1], r1); diff --git a/include/cglm/simd/neon/mat2.h b/include/cglm/simd/neon/mat2.h index 1bc9c9e..471ebea 100644 --- a/include/cglm/simd/neon/mat2.h +++ b/include/cglm/simd/neon/mat2.h @@ -22,8 +22,8 @@ glm_mat2_mul_neon(mat2 m1, mat2 m2, mat2 dest) { x1 = glmm_load(m1[0]); /* d c b a */ x2 = glmm_load(m2[0]); /* h g f e */ - dc = vget_high_f32(x1); - ba = vget_low_f32(x1); + dc = vget_high_f32(x1); + ba = vget_low_f32(x1); /* g g e e, h h f f */ a1 = vtrnq_f32(x2, x2);