summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-08-17 21:01:51 +0800
committerErik Kundiman <erik@megapahit.org>2023-08-17 21:01:51 +0800
commit84b72f12d42e08fe989752ce36e1972bb11c8d70 (patch)
tree22a8ad377a3364705c6c26ed50444e8c583ce58a /indra
parenteadd80cf95cc25565a3bdcea179503d21ba5ae11 (diff)
Neon is used as an alternative to SSE2
on Arm systems.
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llmemory.h4
-rw-r--r--indra/llmath/llsimdmath.h6
2 files changed, 9 insertions, 1 deletions
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h
index b67a8c9bc0..dd9867c9b3 100644
--- a/indra/llcommon/llmemory.h
+++ b/indra/llcommon/llmemory.h
@@ -71,7 +71,11 @@ LL_COMMON_API void ll_assert_aligned_func(uintptr_t ptr,U32 alignment);
#define ll_assert_aligned(ptr,alignment)
#endif
+#if defined(__i386__) || defined(__x86_64__)
#include <xmmintrin.h>
+#else
+#include <sse2neon.h>
+#endif
template <typename T> T* LL_NEXT_ALIGNED_ADDRESS(T* address)
{
diff --git a/indra/llmath/llsimdmath.h b/indra/llmath/llsimdmath.h
index 54a275633f..a6f57d1853 100644
--- a/indra/llmath/llsimdmath.h
+++ b/indra/llmath/llsimdmath.h
@@ -31,7 +31,7 @@
#error "Please include llmath.h before this file."
#endif
-#if ( ( LL_DARWIN || LL_LINUX ) && !(__SSE2__) ) || ( LL_WINDOWS && ( _M_IX86_FP < 2 && ADDRESS_SIZE == 32 ) )
+#if ( ( LL_DARWIN || LL_LINUX ) && !(__SSE2__ || __ARM_NEON) ) || ( LL_WINDOWS && ( _M_IX86_FP < 2 && ADDRESS_SIZE == 32 ) )
#error SSE2 not enabled. LLVector4a and related class will not compile.
#endif
@@ -39,8 +39,12 @@
#include <stdint.h>
#endif
+#if defined(__i386__) || defined(__x86_64__)
#include <xmmintrin.h>
#include <emmintrin.h>
+#else
+#include <sse2neon.h>
+#endif
#include "llmemory.h"
#include "llsimdtypes.h"