From ba993b3ea9937c4d5e6cefd193f29e7c2e85ba56 Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Sat, 11 Mar 2023 14:15:30 +0300 Subject: [PATCH] arm: use intrin to set/init vec4 as @gottfriedleibniz suggests --- include/cglm/simd/arm.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/cglm/simd/arm.h b/include/cglm/simd/arm.h index 676270c..01525d3 100644 --- a/include/cglm/simd/arm.h +++ b/include/cglm/simd/arm.h @@ -35,7 +35,13 @@ #define glmm_combine_hh(x, y) vcombine_f32(vget_high_f32(x), vget_high_f32(y)) #if defined(_WIN32) && defined(_MSC_VER) -# define glmm_float32x4_init(x, y, z, w) { .n128_f32 = { x, y, z, w } } +/* # define glmm_float32x4_init(x, y, z, w) { .n128_f32 = { x, y, z, w } } */ +CGLM_INLINE +float32x4_t +glmm_float32x4_init(float x, float y, float z, float w) { + CGLM_ALIGN(16) float v[4] = {x, y, z, w}; + return vld1q_f32(v); +} #else # define glmm_float32x4_init(x, y, z, w) { x, y, z, w } #endif