summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2018-07-05 10:03:58 -0600
committerGitHub <noreply@github.com>2018-07-05 10:03:58 -0600
commit9b5faa45586818bad5559c93b55a7c4b6e163eb7 (patch)
treef30d4f64662a2c7572679f7c55f21129066933cb /numpy/core
parentd126856bf1b7ed79d696fcc49fcf5b579bb8d156 (diff)
parent3b3a1508889bebe003ce35453ca9657f677b401b (diff)
downloadnumpy-9b5faa45586818bad5559c93b55a7c4b6e163eb7.tar.gz
Merge pull request #11479 from wdirons/fix_define_for_ppc64_and_ppc64le
BUG: Fix #define for ppc64 and ppc64le
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/include/numpy/npy_cpu.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h
index 56f18ff79..c712fd3ef 100644
--- a/numpy/core/include/numpy/npy_cpu.h
+++ b/numpy/core/include/numpy/npy_cpu.h
@@ -39,17 +39,19 @@
* _M_AMD64 defined by MS compiler
*/
#define NPY_CPU_AMD64
+#elif defined(__powerpc64__) && defined(__LITTLE_ENDIAN__)
+ #define NPY_CPU_PPC64LE
+#elif defined(__powerpc64__) && defined(__BIG_ENDIAN__)
+ #define NPY_CPU_PPC64
#elif defined(__ppc__) || defined(__powerpc__) || defined(_ARCH_PPC)
/*
* __ppc__ is defined by gcc, I remember having seen __powerpc__ once,
* but can't find it ATM
* _ARCH_PPC is used by at least gcc on AIX
+ * As __powerpc__ and _ARCH_PPC are also defined by PPC64 check
+ * for those specifically first before defaulting to ppc
*/
#define NPY_CPU_PPC
-#elif defined(__ppc64le__)
- #define NPY_CPU_PPC64LE
-#elif defined(__ppc64__)
- #define NPY_CPU_PPC64
#elif defined(__sparc__) || defined(__sparc)
/* __sparc__ is defined by gcc and Forte (e.g. Sun) compilers */
#define NPY_CPU_SPARC