summaryrefslogtreecommitdiff
path: root/numpy/core/include
diff options
context:
space:
mode:
authorStuart Archibald <stuart.archibald@googlemail.com>2018-04-30 15:17:54 +0000
committerStuart Archibald <stuart.archibald@googlemail.com>2018-06-26 09:44:17 +0100
commitb35dfc2d50ad051eb96bc4a13db23b66b5ba12f2 (patch)
tree3f46dc12eb06b3e6d9be5045addec299c3a99c7c /numpy/core/include
parent65f15a5e881817d8646571d36ab9a0bc39a6667e (diff)
downloadnumpy-b35dfc2d50ad051eb96bc4a13db23b66b5ba12f2.tar.gz
ENH: Add AARCH32 support.
This adds support for identifying AARCH32 and AARCH64 at compile time such that alignment etc is correctly determined.
Diffstat (limited to 'numpy/core/include')
-rw-r--r--numpy/core/include/numpy/npy_cpu.h27
1 files changed, 21 insertions, 6 deletions
diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h
index 106ffa450..56f18ff79 100644
--- a/numpy/core/include/numpy/npy_cpu.h
+++ b/numpy/core/include/numpy/npy_cpu.h
@@ -61,10 +61,27 @@
#define NPY_CPU_HPPA
#elif defined(__alpha__)
#define NPY_CPU_ALPHA
-#elif defined(__arm__) && defined(__ARMEL__)
- #define NPY_CPU_ARMEL
-#elif defined(__arm__) && defined(__ARMEB__)
- #define NPY_CPU_ARMEB
+#elif defined(__arm__)
+ #if defined(__ARMEB__)
+ #if defined(__ARM_32BIT_STATE)
+ #define NPY_CPU_ARMEB_AARCH32
+ #elif defined(__ARM_64BIT_STATE)
+ #define NPY_CPU_ARMEB_AARCH64
+ #else
+ #define NPY_CPU_ARMEB
+ #endif
+ #elif defined(__ARMEL__)
+ #if defined(__ARM_32BIT_STATE)
+ #define NPY_CPU_ARMEL_AARCH32
+ #elif defined(__ARM_64BIT_STATE)
+ #define NPY_CPU_ARMEL_AARCH64
+ #else
+ #define NPY_CPU_ARMEL
+ #endif
+ #else
+ # error Unknown ARM CPU, please report this to numpy maintainers with \
+ information about your platform (OS, CPU and compiler)
+ #endif
#elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
#define NPY_CPU_SH_LE
#elif defined(__sh__) && defined(__BIG_ENDIAN__)
@@ -75,8 +92,6 @@
#define NPY_CPU_MIPSEB
#elif defined(__or1k__)
#define NPY_CPU_OR1K
-#elif defined(__aarch64__)
- #define NPY_CPU_AARCH64
#elif defined(__mc68000__)
#define NPY_CPU_M68K
#elif defined(__arc__) && defined(__LITTLE_ENDIAN__)