summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/kmp_platform.h
diff options
context:
space:
mode:
authorJonas Hahnfeld <hahnjo@hahnjo.de>2019-07-25 14:36:20 +0000
committerJonas Hahnfeld <hahnjo@hahnjo.de>2019-07-25 14:36:20 +0000
commit2488ae9df155cd66253512c42aba5daef1f076be (patch)
tree42a7de40bd8a48380384478161d50659efd3fff3 /openmp/runtime/src/kmp_platform.h
parentd668260f1a8e85976e090207075545a2d97d39a1 (diff)
downloadbcm5719-llvm-2488ae9df155cd66253512c42aba5daef1f076be.tar.gz
bcm5719-llvm-2488ae9df155cd66253512c42aba5daef1f076be.zip
[OpenMP] RISCV64 port
This is a port of libomp for the RISC-V 64-bit Linux target. We have tested this port on a HiFive Unleashed development board using a downstream LLVM that has support for the missing bits in upstream. As of now, all tests are passing, including OMPT. Patch by Ferran Pallarès! Differential Revision: https://reviews.llvm.org/D59880 llvm-svn: 367021
Diffstat (limited to 'openmp/runtime/src/kmp_platform.h')
-rw-r--r--openmp/runtime/src/kmp_platform.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/openmp/runtime/src/kmp_platform.h b/openmp/runtime/src/kmp_platform.h
index e4f2e06b962..3238deafc01 100644
--- a/openmp/runtime/src/kmp_platform.h
+++ b/openmp/runtime/src/kmp_platform.h
@@ -98,6 +98,7 @@
#define KMP_ARCH_PPC64 (KMP_ARCH_PPC64_LE || KMP_ARCH_PPC64_BE)
#define KMP_ARCH_MIPS 0
#define KMP_ARCH_MIPS64 0
+#define KMP_ARCH_RISCV64 0
#if KMP_OS_WINDOWS
#if defined(_M_AMD64) || defined(__x86_64)
@@ -135,6 +136,9 @@
#undef KMP_ARCH_MIPS
#define KMP_ARCH_MIPS 1
#endif
+#elif defined __riscv && __riscv_xlen == 64
+#undef KMP_ARCH_RISCV64
+#define KMP_ARCH_RISCV64 1
#endif
#endif
@@ -199,7 +203,7 @@
// TODO: Fixme - This is clever, but really fugly
#if (1 != \
KMP_ARCH_X86 + KMP_ARCH_X86_64 + KMP_ARCH_ARM + KMP_ARCH_PPC64 + \
- KMP_ARCH_AARCH64 + KMP_ARCH_MIPS + KMP_ARCH_MIPS64)
+ KMP_ARCH_AARCH64 + KMP_ARCH_MIPS + KMP_ARCH_MIPS64 + KMP_ARCH_RISCV64)
#error Unknown or unsupported architecture
#endif
OpenPOWER on IntegriCloud