|
|
@@ -117,7 +117,20 @@
|
|
|
#endif
|
|
|
|
|
|
// Detect CPU architecture
|
|
|
-#if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86)
|
|
|
+#if defined(__aarch64__) || defined(_M_ARM64) || defined(__arm__) || defined(_M_ARM) || defined(_M_ARM64EC)
|
|
|
+ // ARM CPU architecture
|
|
|
+ #define JPH_CPU_ARM
|
|
|
+ #if defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC)
|
|
|
+ #define JPH_CPU_ARCH_BITS 64
|
|
|
+ #define JPH_USE_NEON
|
|
|
+ #define JPH_VECTOR_ALIGNMENT 16
|
|
|
+ #define JPH_DVECTOR_ALIGNMENT 32
|
|
|
+ #else
|
|
|
+ #define JPH_CPU_ARCH_BITS 32
|
|
|
+ #define JPH_VECTOR_ALIGNMENT 8 // 32-bit ARM does not support aligning on the stack on 16 byte boundaries
|
|
|
+ #define JPH_DVECTOR_ALIGNMENT 8
|
|
|
+ #endif
|
|
|
+#elif defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86)
|
|
|
// X86 CPU architecture
|
|
|
#define JPH_CPU_X86
|
|
|
#if defined(__x86_64__) || defined(_M_X64)
|
|
|
@@ -167,19 +180,6 @@
|
|
|
#error Undefined compiler
|
|
|
#endif
|
|
|
#endif
|
|
|
-#elif defined(__aarch64__) || defined(_M_ARM64) || defined(__arm__) || defined(_M_ARM)
|
|
|
- // ARM CPU architecture
|
|
|
- #define JPH_CPU_ARM
|
|
|
- #if defined(__aarch64__) || defined(_M_ARM64)
|
|
|
- #define JPH_CPU_ARCH_BITS 64
|
|
|
- #define JPH_USE_NEON
|
|
|
- #define JPH_VECTOR_ALIGNMENT 16
|
|
|
- #define JPH_DVECTOR_ALIGNMENT 32
|
|
|
- #else
|
|
|
- #define JPH_CPU_ARCH_BITS 32
|
|
|
- #define JPH_VECTOR_ALIGNMENT 8 // 32-bit ARM does not support aligning on the stack on 16 byte boundaries
|
|
|
- #define JPH_DVECTOR_ALIGNMENT 8
|
|
|
- #endif
|
|
|
#elif defined(__riscv)
|
|
|
// RISC-V CPU architecture
|
|
|
#define JPH_CPU_RISCV
|