Skip to content

Commit

Permalink
faudio: Use NEON intrinsics on ARM64EC.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjacek authored and flibitijibibo committed Apr 17, 2024
1 parent 45f8c58 commit ffbd861
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/FAudio_internal_simd.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@
* https://hg.icculus.org/icculus/mojoAL/file/default/mojoal.c
*/

#if defined(__x86_64__) || defined(_M_X64)
#if defined(__aarch64__) || defined(_M_ARM64) || defined(__arm64ec__) || defined(_M_ARM64EC)
/* Some platforms fail to define this... */
#ifndef __SSE2__
#define __SSE2__ 1
#ifndef __ARM_NEON__
#define __ARM_NEON__ 1
#endif

/* x86_64 guarantees SSE2. */
/* AArch64 guarantees NEON. */
#define NEED_SCALAR_CONVERTER_FALLBACKS 0
#elif defined(__aarch64__) || defined(_M_ARM64)
#elif defined(__x86_64__) || defined(_M_X64)
/* Some platforms fail to define this... */
#ifndef __ARM_NEON__
#define __ARM_NEON__ 1
#ifndef __SSE2__
#define __SSE2__ 1
#endif

/* AArch64 guarantees NEON. */
/* x86_64 guarantees SSE2. */
#define NEED_SCALAR_CONVERTER_FALLBACKS 0
#elif __MACOSX__ && !defined(__POWERPC__)
/* Some build systems may need to specify this. */
Expand All @@ -62,7 +62,7 @@
#endif

/* Our NEON paths require AArch64, don't check __ARM_NEON__ here */
#if defined(__aarch64__) || defined(_M_ARM64)
#if defined(__aarch64__) || defined(_M_ARM64) || defined(__arm64ec__) || defined(_M_ARM64EC)
#include <arm_neon.h>
#define HAVE_NEON_INTRINSICS 1
#endif
Expand Down

0 comments on commit ffbd861

Please sign in to comment.