diff options
author | Alexey Brodkin <abrodkin@synopsys.com> | 2017-09-15 11:59:14 +0300 |
---|---|---|
committer | Alexey Brodkin <abrodkin@synopsys.com> | 2017-09-15 13:54:09 +0300 |
commit | 8edd610ffa3499eea3580f98f296ec80578fba73 (patch) | |
tree | d57cb9b9302abd9f6d3ff2b14106d4f060af2997 /numpy/core/include | |
parent | f7be36b05feff7f54b3e118a9af265d0b9de94e2 (diff) | |
download | numpy-8edd610ffa3499eea3580f98f296ec80578fba73.tar.gz |
ENH: Add support of ARC architecture
Synopsys DesignWare ARC Processors are a family of 32-bit CPUs
which in some configurations may run Linux kernel and full stack
of applications on top of it. Among other things is Python.
With that change we allow building and usage of Numpy on ARC.
Diffstat (limited to 'numpy/core/include')
-rw-r--r-- | numpy/core/include/numpy/npy_cpu.h | 6 | ||||
-rw-r--r-- | numpy/core/include/numpy/npy_endian.h | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h index 60abae4e0..84653ea18 100644 --- a/numpy/core/include/numpy/npy_cpu.h +++ b/numpy/core/include/numpy/npy_cpu.h @@ -15,6 +15,8 @@ * NPY_CPU_ARMEB * NPY_CPU_SH_LE * NPY_CPU_SH_BE + * NPY_CPU_ARCEL + * NPY_CPU_ARCEB */ #ifndef _NPY_CPUARCH_H_ #define _NPY_CPUARCH_H_ @@ -76,6 +78,10 @@ #define NPY_CPU_AARCH64 #elif defined(__mc68000__) #define NPY_CPU_M68K +#elif defined(__arc__) && defined(__LITTLE_ENDIAN__) + #define NPY_CPU_ARCEL +#elif defined(__arc__) && defined(__BIG_ENDIAN__) + #define NPY_CPU_ARCEB #else #error Unknown CPU, please report this to numpy maintainers with \ information about your platform (OS, CPU and compiler) diff --git a/numpy/core/include/numpy/npy_endian.h b/numpy/core/include/numpy/npy_endian.h index e34b1d97e..1a42121db 100644 --- a/numpy/core/include/numpy/npy_endian.h +++ b/numpy/core/include/numpy/npy_endian.h @@ -45,7 +45,8 @@ || defined(NPY_CPU_AARCH64) \ || defined(NPY_CPU_SH_LE) \ || defined(NPY_CPU_MIPSEL) \ - || defined(NPY_CPU_PPC64LE) + || defined(NPY_CPU_PPC64LE) \ + || defined(NPY_CPU_ARCEL) #define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN #elif defined(NPY_CPU_PPC) \ || defined(NPY_CPU_SPARC) \ @@ -56,7 +57,8 @@ || defined(NPY_CPU_SH_BE) \ || defined(NPY_CPU_MIPSEB) \ || defined(NPY_CPU_OR1K) \ - || defined(NPY_CPU_M68K) + || defined(NPY_CPU_M68K) \ + || defined(NPY_CPU_ARCEB) #define NPY_BYTE_ORDER NPY_BIG_ENDIAN #else #error Unknown CPU: can not set endianness |