arm: update ARM/NEON macros

This commit is contained in:
Recep Aslantas
2023-03-09 21:56:25 +03:00
parent 8a117017ea
commit a30baffafa
2 changed files with 14 additions and 10 deletions

View File

@@ -10,10 +10,6 @@
#include "intrin.h"
#ifdef CGLM_SIMD_ARM
#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || defined(__aarch64__)
# define CGLM_ARM64 1
#endif
#define glmm_load(p) vld1q_f32(p)
#define glmm_store(p, a) vst1q_f32(p, a)

View File

@@ -69,13 +69,21 @@
#endif
/* ARM Neon */
#if defined(__ARM_NEON) || defined(__ARM_NEON__)
/* TODO: check _M_ARM and compiling should work if there is no ARM64 and NEON */
#if defined(__ARM_NEON) || defined(__ARM_NEON__) \
|| defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || defined(__aarch64__)
# include <arm_neon.h>
# if defined(__ARM_NEON_FP)
# define CGLM_NEON_FP 1
# ifndef CGLM_SIMD_ARM
# define CGLM_SIMD_ARM
# endif
# ifndef __ARM_NEON
# define __ARM_NEON
# endif
# ifndef __ARM_NEON_FP
# define __ARM_NEON_FP 1
# endif
# ifndef CGLM_ARM64
# define CGLM_ARM64 1
# endif
# ifndef CGLM_SIMD_ARM
# define CGLM_SIMD_ARM
# endif
#endif