aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/src/kmp_platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/src/kmp_platform.h')
-rw-r--r--runtime/src/kmp_platform.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/src/kmp_platform.h b/runtime/src/kmp_platform.h
index e4f2e06b962c..3238deafc01b 100644
--- a/runtime/src/kmp_platform.h
+++ b/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