summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre@debian.org>2016-12-08 09:22:24 +0000
committerSylvestre Ledru <sylvestre@debian.org>2016-12-08 09:22:24 +0000
commitcd9d37433743d4518c04ca19ed77a1c8c8acafe6 (patch)
tree203640ad71a153d4f68c0b5fd5457d586598988c
parent0cc0446ad2264a79d5e4a514946680d5c9cf37b8 (diff)
downloadbcm5719-llvm-cd9d37433743d4518c04ca19ed77a1c8c8acafe6.tar.gz
bcm5719-llvm-cd9d37433743d4518c04ca19ed77a1c8c8acafe6.zip
Support of mips & mips64 for openmprtl
Summary: Implemented by Dejan Latinovic See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790735 for more more information Reviewers: AndreyChurbanov, jlpeyton Subscribers: openmp-commits, mgorny Differential Revision: https://reviews.llvm.org/D26576 llvm-svn: 289032
-rw-r--r--openmp/runtime/CMakeLists.txt10
-rw-r--r--openmp/runtime/README.txt1
-rw-r--r--openmp/runtime/cmake/LibompGetArchitecture.cmake4
-rw-r--r--openmp/runtime/cmake/LibompMicroTests.cmake3
-rw-r--r--openmp/runtime/cmake/LibompUtils.cmake4
-rw-r--r--openmp/runtime/src/kmp_affinity.h23
-rw-r--r--openmp/runtime/src/kmp_csupport.c2
-rw-r--r--openmp/runtime/src/kmp_gsupport.c2
-rw-r--r--openmp/runtime/src/kmp_os.h8
-rw-r--r--openmp/runtime/src/kmp_platform.h14
-rw-r--r--openmp/runtime/src/kmp_runtime.c4
-rw-r--r--openmp/runtime/src/thirdparty/ittnotify/ittnotify_config.h14
-rw-r--r--openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c2
-rw-r--r--openmp/runtime/src/z_Linux_asm.s4
-rw-r--r--openmp/runtime/tools/lib/Platform.pm15
-rw-r--r--openmp/runtime/tools/lib/Uname.pm4
-rw-r--r--openmp/www/README.txt1
-rw-r--r--openmp/www/index.html5
18 files changed, 101 insertions, 19 deletions
diff --git a/openmp/runtime/CMakeLists.txt b/openmp/runtime/CMakeLists.txt
index 0df9cfdf77d..08469351182 100644
--- a/openmp/runtime/CMakeLists.txt
+++ b/openmp/runtime/CMakeLists.txt
@@ -38,7 +38,7 @@ if(${LIBOMP_STANDALONE_BUILD})
# If adding a new architecture, take a look at cmake/LibompGetArchitecture.cmake
libomp_get_architecture(LIBOMP_DETECTED_ARCH)
set(LIBOMP_ARCH ${LIBOMP_DETECTED_ARCH} CACHE STRING
- "The architecture to build for (x86_64/i386/arm/ppc64/ppc64le/aarch64/mic).")
+ "The architecture to build for (x86_64/i386/arm/ppc64/ppc64le/aarch64/mic/mips/mips64).")
# Allow user to choose a suffix for the installation directory.
set(LIBOMP_LIBDIR_SUFFIX "" CACHE STRING
"suffix of lib installation directory e.g., 64 => lib64")
@@ -83,7 +83,7 @@ else() # Part of LLVM build
set(LIBOMP_ENABLE_ASSERTIONS ${LLVM_ENABLE_ASSERTIONS})
set(LIBOMP_ENABLE_WERROR ${LLVM_ENABLE_WERROR})
endif()
-libomp_check_variable(LIBOMP_ARCH 32e x86_64 32 i386 arm ppc64 ppc64le aarch64 mic)
+libomp_check_variable(LIBOMP_ARCH 32e x86_64 32 i386 arm ppc64 ppc64le aarch64 mic mips mips64)
set(LIBOMP_LIB_TYPE normal CACHE STRING
"Performance,Profiling,Stubs library (normal/profile/stubs)")
@@ -174,6 +174,8 @@ set(PPC64BE FALSE)
set(PPC64LE FALSE)
set(PPC64 FALSE)
set(MIC FALSE)
+set(MIPS64 FALSE)
+set(MIPS FALSE)
if("${LIBOMP_ARCH}" STREQUAL "i386" OR "${LIBOMP_ARCH}" STREQUAL "32") # IA-32 architecture
set(IA32 TRUE)
elseif("${LIBOMP_ARCH}" STREQUAL "x86_64" OR "${LIBOMP_ARCH}" STREQUAL "32e") # Intel(R) 64 architecture
@@ -190,6 +192,10 @@ elseif("${LIBOMP_ARCH}" STREQUAL "aarch64") # AARCH64 architecture
set(AARCH64 TRUE)
elseif("${LIBOMP_ARCH}" STREQUAL "mic") # Intel(R) Many Integrated Core Architecture
set(MIC TRUE)
+elseif("${LIBOMP_ARCH}" STREQUAL "mips") # MIPS architecture
+ set(MIPS TRUE)
+elseif("${LIBOMP_ARCH}" STREQUAL "mips64") # MIPS64 architecture
+ set(MIPS64 TRUE)
endif()
# Set some flags based on build_type
diff --git a/openmp/runtime/README.txt b/openmp/runtime/README.txt
index a86d3e85f86..62e01b2560c 100644
--- a/openmp/runtime/README.txt
+++ b/openmp/runtime/README.txt
@@ -52,6 +52,7 @@ Architectures Supported
* Aarch64 (64-bit ARM) architecture
* IBM(R) Power architecture (big endian)
* IBM(R) Power architecture (little endian)
+* MIPS and MIPS64 architecture
Supported RTL Build Configurations
==================================
diff --git a/openmp/runtime/cmake/LibompGetArchitecture.cmake b/openmp/runtime/cmake/LibompGetArchitecture.cmake
index 8f3c4c6565d..536b488405a 100644
--- a/openmp/runtime/cmake/LibompGetArchitecture.cmake
+++ b/openmp/runtime/cmake/LibompGetArchitecture.cmake
@@ -42,6 +42,10 @@ function(libomp_get_architecture return_arch)
#error ARCHITECTURE=ppc64le
#elif defined(__powerpc64__)
#error ARCHITECTURE=ppc64
+ #elif defined(__mips__) && defined(__mips64)
+ #error ARCHITECTURE=mips64
+ #elif defined(__mips__) && !defined(__mips64)
+ #error ARCHITECTURE=mips
#else
#error ARCHITECTURE=UnknownArchitecture
#endif
diff --git a/openmp/runtime/cmake/LibompMicroTests.cmake b/openmp/runtime/cmake/LibompMicroTests.cmake
index 76bc5503a11..0918fdd1e5f 100644
--- a/openmp/runtime/cmake/LibompMicroTests.cmake
+++ b/openmp/runtime/cmake/LibompMicroTests.cmake
@@ -206,6 +206,9 @@ else()
elseif(${PPC64})
libomp_append(libomp_expected_library_deps libc.so.6)
libomp_append(libomp_expected_library_deps ld64.so.1)
+ elseif(${MIPS} OR ${MIPS64})
+ libomp_append(libomp_expected_library_deps libc.so.6)
+ libomp_append(libomp_expected_library_deps ld.so.1)
endif()
libomp_append(libomp_expected_library_deps libpthread.so.0 IF_FALSE STUBS_LIBRARY)
libomp_append(libomp_expected_library_deps libhwloc.so.5 LIBOMP_USE_HWLOC)
diff --git a/openmp/runtime/cmake/LibompUtils.cmake b/openmp/runtime/cmake/LibompUtils.cmake
index ba81a6c79e2..dd2d4ecebf7 100644
--- a/openmp/runtime/cmake/LibompUtils.cmake
+++ b/openmp/runtime/cmake/LibompUtils.cmake
@@ -102,6 +102,10 @@ function(libomp_get_legal_arch return_arch_string)
set(${return_arch_string} "PPC64LE" PARENT_SCOPE)
elseif(${AARCH64})
set(${return_arch_string} "AARCH64" PARENT_SCOPE)
+ elseif(${MIPS})
+ set(${return_arch_string} "MIPS" PARENT_SCOPE)
+ elseif(${MIPS64})
+ set(${return_arch_string} "MIPS64" PARENT_SCOPE)
else()
set(${return_arch_string} "${LIBOMP_ARCH}" PARENT_SCOPE)
libomp_warning_say("libomp_get_legal_arch(): Warning: Unknown architecture: Using ${LIBOMP_ARCH}")
diff --git a/openmp/runtime/src/kmp_affinity.h b/openmp/runtime/src/kmp_affinity.h
index fc43e8a7462..142acf7f514 100644
--- a/openmp/runtime/src/kmp_affinity.h
+++ b/openmp/runtime/src/kmp_affinity.h
@@ -204,7 +204,28 @@ public:
# elif __NR_sched_getaffinity != 223
# error Wrong code for getaffinity system call.
# endif /* __NR_sched_getaffinity */
-# else
+# elif KMP_ARCH_MIPS
+# ifndef __NR_sched_setaffinity
+# define __NR_sched_setaffinity 4239
+# elif __NR_sched_setaffinity != 4239
+# error Wrong code for setaffinity system call.
+# endif /* __NR_sched_setaffinity */
+# ifndef __NR_sched_getaffinity
+# define __NR_sched_getaffinity 4240
+# elif __NR_sched_getaffinity != 4240
+# error Wrong code for getaffinity system call.
+# endif /* __NR_sched_getaffinity */
+# elif KMP_ARCH_MIPS64
+# ifndef __NR_sched_setaffinity
+# define __NR_sched_setaffinity 5195
+# elif __NR_sched_setaffinity != 5195
+# error Wrong code for setaffinity system call.
+# endif /* __NR_sched_setaffinity */
+# ifndef __NR_sched_getaffinity
+# define __NR_sched_getaffinity 5196
+# elif __NR_sched_getaffinity != 5196
+# error Wrong code for getaffinity system call.
+# endif /* __NR_sched_getaffinity */
# error Unknown or unsupported architecture
# endif /* KMP_ARCH_* */
class KMPNativeAffinity : public KMPAffinity {
diff --git a/openmp/runtime/src/kmp_csupport.c b/openmp/runtime/src/kmp_csupport.c
index f774ac14c00..00dc47167a3 100644
--- a/openmp/runtime/src/kmp_csupport.c
+++ b/openmp/runtime/src/kmp_csupport.c
@@ -624,7 +624,7 @@ __kmpc_flush(ident_t *loc)
#endif // KMP_COMPILER_ICC
}; // if
#endif // KMP_MIC
- #elif (KMP_ARCH_ARM || KMP_ARCH_AARCH64)
+ #elif (KMP_ARCH_ARM || KMP_ARCH_AARCH64 || KMP_ARCH_MIPS || KMP_ARCH_MIPS64)
// Nothing to see here move along
#elif KMP_ARCH_PPC64
// Nothing needed here (we have a real MB above).
diff --git a/openmp/runtime/src/kmp_gsupport.c b/openmp/runtime/src/kmp_gsupport.c
index ca97fb6731e..e07c09d3c2e 100644
--- a/openmp/runtime/src/kmp_gsupport.c
+++ b/openmp/runtime/src/kmp_gsupport.c
@@ -232,7 +232,7 @@ xexpand(KMP_API_NAME_GOMP_ORDERED_END)(void)
// (IA-32 architecture) or 64-bit signed (Intel(R) 64).
//
-#if KMP_ARCH_X86 || KMP_ARCH_ARM
+#if KMP_ARCH_X86 || KMP_ARCH_ARM || KMP_ARCH_MIPS
# define KMP_DISPATCH_INIT __kmp_aux_dispatch_init_4
# define KMP_DISPATCH_FINI_CHUNK __kmp_aux_dispatch_fini_chunk_4
# define KMP_DISPATCH_NEXT __kmpc_dispatch_next_4
diff --git a/openmp/runtime/src/kmp_os.h b/openmp/runtime/src/kmp_os.h
index 65382dbf3b1..2a900d37e02 100644
--- a/openmp/runtime/src/kmp_os.h
+++ b/openmp/runtime/src/kmp_os.h
@@ -147,9 +147,9 @@
# define KMP_UINT64_SPEC "llu"
#endif /* KMP_OS_UNIX */
-#if KMP_ARCH_X86 || KMP_ARCH_ARM
+#if KMP_ARCH_X86 || KMP_ARCH_ARM || KMP_ARCH_MIPS
# define KMP_SIZE_T_SPEC KMP_UINT32_SPEC
-#elif KMP_ARCH_X86_64 || KMP_ARCH_PPC64 || KMP_ARCH_AARCH64
+#elif KMP_ARCH_X86_64 || KMP_ARCH_PPC64 || KMP_ARCH_AARCH64 || KMP_ARCH_MIPS64
# define KMP_SIZE_T_SPEC KMP_UINT64_SPEC
#else
# error "Can't determine size_t printf format specifier."
@@ -559,7 +559,7 @@ extern kmp_real64 __kmp_xchg_real64( volatile kmp_real64 *p, kmp_real64 v );
# endif
#endif /* KMP_OS_WINDOWS */
-#if KMP_ARCH_PPC64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64
+#if KMP_ARCH_PPC64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64 || KMP_ARCH_MIPS || KMP_ARCH_MIPS64
# define KMP_MB() __sync_synchronize()
#endif
@@ -618,7 +618,7 @@ extern kmp_real64 __kmp_xchg_real64( volatile kmp_real64 *p, kmp_real64 v );
#define TCW_SYNC_8(a,b) (a) = (b)
#define TCX_SYNC_8(a,b,c) KMP_COMPARE_AND_STORE_REL64((volatile kmp_int64 *)(volatile void *)&(a), (kmp_int64)(b), (kmp_int64)(c))
-#if KMP_ARCH_X86
+#if KMP_ARCH_X86 || KMP_ARCH_MIPS
// What about ARM?
#define TCR_PTR(a) ((void *)TCR_4(a))
#define TCW_PTR(a,b) TCW_4((a),(b))
diff --git a/openmp/runtime/src/kmp_platform.h b/openmp/runtime/src/kmp_platform.h
index b6a19dc06c3..2f43cf83ff9 100644
--- a/openmp/runtime/src/kmp_platform.h
+++ b/openmp/runtime/src/kmp_platform.h
@@ -77,6 +77,8 @@
#define KMP_ARCH_PPC64_BE 0
#define KMP_ARCH_PPC64_LE 0
#define KMP_ARCH_PPC64 (KMP_ARCH_PPC64_LE || KMP_ARCH_PPC64_BE)
+#define KMP_ARCH_MIPS 0
+#define KMP_ARCH_MIPS64 0
#if KMP_OS_WINDOWS
# if defined _M_AMD64
@@ -106,6 +108,14 @@
# elif defined __aarch64__
# undef KMP_ARCH_AARCH64
# define KMP_ARCH_AARCH64 1
+# elif defined __mips__
+# if defined __mips64
+# undef KMP_ARCH_MIPS64
+# define KMP_ARCH_MIPS64 1
+# else
+# undef KMP_ARCH_MIPS
+# define KMP_ARCH_MIPS 1
+# endif
# endif
#endif
@@ -161,10 +171,10 @@
#endif
/* Specify 32 bit architectures here */
-#define KMP_32_BIT_ARCH (KMP_ARCH_X86 || KMP_ARCH_ARM)
+#define KMP_32_BIT_ARCH (KMP_ARCH_X86 || KMP_ARCH_ARM || KMP_ARCH_MIPS)
// 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)
+#if (1 != KMP_ARCH_X86 + KMP_ARCH_X86_64 + KMP_ARCH_ARM + KMP_ARCH_PPC64 + KMP_ARCH_AARCH64 + KMP_ARCH_MIPS + KMP_ARCH_MIPS64)
# error Unknown or unsupported architecture
#endif
diff --git a/openmp/runtime/src/kmp_runtime.c b/openmp/runtime/src/kmp_runtime.c
index da602d9bc0d..2a67206f981 100644
--- a/openmp/runtime/src/kmp_runtime.c
+++ b/openmp/runtime/src/kmp_runtime.c
@@ -7565,7 +7565,7 @@ __kmp_determine_reduction_method( ident_t *loc, kmp_int32 global_tid,
int atomic_available = FAST_REDUCTION_ATOMIC_METHOD_GENERATED;
int tree_available = FAST_REDUCTION_TREE_METHOD_GENERATED;
- #if KMP_ARCH_X86_64 || KMP_ARCH_PPC64 || KMP_ARCH_AARCH64
+ #if KMP_ARCH_X86_64 || KMP_ARCH_PPC64 || KMP_ARCH_AARCH64 || KMP_ARCH_MIPS64
#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_WINDOWS || KMP_OS_DARWIN
@@ -7591,7 +7591,7 @@ __kmp_determine_reduction_method( ident_t *loc, kmp_int32 global_tid,
#error "Unknown or unsupported OS"
#endif // KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_WINDOWS || KMP_OS_DARWIN
- #elif KMP_ARCH_X86 || KMP_ARCH_ARM || KMP_ARCH_AARCH
+ #elif KMP_ARCH_X86 || KMP_ARCH_ARM || KMP_ARCH_AARCH || KMP_ARCH_MIPS
#if KMP_OS_LINUX || KMP_OS_WINDOWS
diff --git a/openmp/runtime/src/thirdparty/ittnotify/ittnotify_config.h b/openmp/runtime/src/thirdparty/ittnotify/ittnotify_config.h
index 106823968fe..c3ce2fb42e1 100644
--- a/openmp/runtime/src/thirdparty/ittnotify/ittnotify_config.h
+++ b/openmp/runtime/src/thirdparty/ittnotify/ittnotify_config.h
@@ -142,6 +142,14 @@
# define ITT_ARCH_PPC64 5
#endif /* ITT_ARCH_PPC64 */
+#ifndef ITT_ARCH_MIPS
+# define ITT_ARCH_MIPS 6
+#endif /* ITT_ARCH_MIPS */
+
+#ifndef ITT_ARCH_MIPS64
+# define ITT_ARCH_MIPS64 6
+#endif /* ITT_ARCH_MIPS64 */
+
#ifndef ITT_ARCH
# if defined _M_IX86 || defined __i386__
@@ -156,6 +164,10 @@
# define ITT_ARCH ITT_ARCH_PPC64
# elif defined __aarch64__
# define ITT_ARCH ITT_ARCH_AARCH64
+# elif defined __mips__ && !defined __mips64
+# define ITT_ARCH ITT_ARCH_MIPS
+# elif defined __mips__ && defined __mips64
+# define ITT_ARCH ITT_ARCH_MIPS64
# endif
#endif
@@ -293,7 +305,7 @@ ITT_INLINE long __TBB_machine_fetchadd4(volatile void* ptr, long addend)
: "memory");
return result;
}
-#elif ITT_ARCH==ITT_ARCH_ARM || ITT_ARCH==ITT_ARCH_PPC64 || ITT_ARCH==ITT_ARCH_AARCH64
+#elif ITT_ARCH==ITT_ARCH_ARM || ITT_ARCH==ITT_ARCH_PPC64 || ITT_ARCH==ITT_ARCH_AARCH64 || ITT_ARCH==ITT_ARCH_MIPS || ITT_ARCH==ITT_ARCH_MIPS64
#define __TBB_machine_fetchadd4(addr, val) __sync_fetch_and_add(addr, val)
#endif /* ITT_ARCH==ITT_ARCH_IA64 */
#ifndef ITT_SIMPLE_INIT
diff --git a/openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c b/openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c
index 89a716dc0ab..de4fe41c093 100644
--- a/openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c
+++ b/openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c
@@ -72,7 +72,7 @@ static const char* ittnotify_lib_name = "libittnotify.dylib";
#ifndef LIB_VAR_NAME
-#if ITT_ARCH==ITT_ARCH_IA32 || ITT_ARCH==ITT_ARCH_ARM
+#if ITT_ARCH==ITT_ARCH_IA32 || ITT_ARCH==ITT_ARCH_ARM || ITT_ARCH==ITT_ARCH_MIPS
#define LIB_VAR_NAME INTEL_LIBITTNOTIFY32
#else
#define LIB_VAR_NAME INTEL_LIBITTNOTIFY64
diff --git a/openmp/runtime/src/z_Linux_asm.s b/openmp/runtime/src/z_Linux_asm.s
index 60130a4c0ef..d6e1c0b7195 100644
--- a/openmp/runtime/src/z_Linux_asm.s
+++ b/openmp/runtime/src/z_Linux_asm.s
@@ -1776,7 +1776,7 @@ __kmp_invoke_microtask:
#endif /* KMP_ARCH_PPC64 */
-#if KMP_ARCH_ARM
+#if KMP_ARCH_ARM || KMP_ARCH_MIPS
.data
.comm .gomp_critical_user_,32,8
.data
@@ -1787,7 +1787,7 @@ __kmp_unnamed_critical_addr:
.size __kmp_unnamed_critical_addr,4
#endif /* KMP_ARCH_ARM */
-#if KMP_ARCH_PPC64 || KMP_ARCH_AARCH64
+#if KMP_ARCH_PPC64 || KMP_ARCH_AARCH64 || KMP_ARCH_MIPS64
.data
.comm .gomp_critical_user_,32,8
.data
diff --git a/openmp/runtime/tools/lib/Platform.pm b/openmp/runtime/tools/lib/Platform.pm
index 6a2b3b6c51d..8fe63598a69 100644
--- a/openmp/runtime/tools/lib/Platform.pm
+++ b/openmp/runtime/tools/lib/Platform.pm
@@ -58,6 +58,10 @@ sub canon_arch($) {
$arch = "aarch64";
} elsif ( $arch =~ m{\Amic} ) {
$arch = "mic";
+ } elsif ( $arch =~ m{\Amips64} ) {
+ $arch = "mips64";
+ } elsif ( $arch =~ m{\Amips} ) {
+ $arch = "mips";
} else {
$arch = undef;
}; # if
@@ -89,6 +93,8 @@ sub canon_mic_arch($) {
"arm" => "ARM",
"aarch64" => "AArch64",
"mic" => "Intel(R) Many Integrated Core Architecture",
+ "mips" => "MIPS",
+ "mips64" => "MIPS64",
);
sub legal_arch($) {
@@ -109,6 +115,8 @@ sub canon_mic_arch($) {
"arm" => "arm",
"aarch64" => "aarch",
"mic" => "intel64",
+ "mips" => "mips",
+ "mips64" => "MIPS64",
);
sub arch_opt($) {
@@ -209,6 +217,10 @@ sub target_options() {
$_host_arch = "ppc64";
} elsif ( $hardware_platform eq "aarch64" ) {
$_host_arch = "aarch64";
+ } elsif ( $hardware_platform eq "mips64" ) {
+ $_host_arch = "mips64";
+ } elsif ( $hardware_platform eq "mips" ) {
+ $_host_arch = "mips";
} else {
die "Unsupported host hardware platform: \"$hardware_platform\"; stopped";
}; # if
@@ -398,7 +410,7 @@ the script assumes host architecture is target one.
Input string is an architecture name to canonize. The function recognizes many variants, for example:
C<32e>, C<Intel64>, C<Intel(R) 64>, etc. Returned string is a canononized architecture name,
-one of: C<32>, C<32e>, C<64>, C<arm>, C<ppc64le>, C<ppc64>, C<mic>, or C<undef> is input string is not recognized.
+one of: C<32>, C<32e>, C<64>, C<arm>, C<ppc64le>, C<ppc64>, C<mic>, C<mips>, C<mips64>, or C<undef> is input string is not recognized.
=item B<legal_arch( $arch )>
@@ -470,4 +482,3 @@ Target platform name (concatenated canonized OS name, underscore, and canonized
=cut
# end of file #
-
diff --git a/openmp/runtime/tools/lib/Uname.pm b/openmp/runtime/tools/lib/Uname.pm
index 415070b7d3c..f85e1ee23e5 100644
--- a/openmp/runtime/tools/lib/Uname.pm
+++ b/openmp/runtime/tools/lib/Uname.pm
@@ -153,6 +153,10 @@ if ( 0 ) {
$values{ hardware_platform } = "ppc64";
} elsif ( $values{ machine } =~ m{\Aaarch64\z} ) {
$values{ hardware_platform } = "aarch64";
+ } elsif ( $values{ machine } =~ m{\Amips64\z} ) {
+ $values{ hardware_platform } = "mips64";
+ } elsif ( $values{ machine } =~ m{\Amips\z} ) {
+ $values{ hardware_platform } = "mips";
} else {
die "Unsupported machine (\"$values{ machine }\") returned by POSIX::uname(); stopped";
}; # if
diff --git a/openmp/www/README.txt b/openmp/www/README.txt
index a86d3e85f86..3060653feb3 100644
--- a/openmp/www/README.txt
+++ b/openmp/www/README.txt
@@ -52,6 +52,7 @@ Architectures Supported
* Aarch64 (64-bit ARM) architecture
* IBM(R) Power architecture (big endian)
* IBM(R) Power architecture (little endian)
+* MIPS and MIPS64 architectures
Supported RTL Build Configurations
==================================
diff --git a/openmp/www/index.html b/openmp/www/index.html
index 3aa682a1d38..36c3e0b8e7e 100644
--- a/openmp/www/index.html
+++ b/openmp/www/index.html
@@ -142,6 +142,7 @@
or with gcc, and also the Intel&reg;&nbsp;Xeon Phi&trade; product family, when compiled with
the Intel compiler.
</li>
+ <li>MIPS and MIPS64</li>
</ul>
Ports to other architectures and operating systems are welcome.
</p>
@@ -232,6 +233,10 @@
ARM is a trademark of ARM Corporation in the U.S. and/or
other countries.
</li>
+<li>
+ MIPS is a trademark of MIPS Computer Systems in the U.S. and/or
+ other countries.
+</li>
</ul>
</div>
</body>
OpenPOWER on IntegriCloud