arm: use intrin to set/init vec4 as @gottfriedleibniz suggests

This commit is contained in:
Recep Aslantas
2023-03-11 14:15:30 +03:00
parent 4a6fc485fd
commit ba993b3ea9

View File

@@ -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