[Openmp-commits] [openmp] r289032 - Support of mips & mips64 for openmprtl

Sylvestre Ledru via Openmp-commits openmp-commits at lists.llvm.org
Thu Dec 8 01:22:27 PST 2016


Author: sylvestre
Date: Thu Dec  8 03:22:24 2016
New Revision: 289032

URL: http://llvm.org/viewvc/llvm-project?rev=289032&view=rev
Log:
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

Modified:
    openmp/trunk/runtime/CMakeLists.txt
    openmp/trunk/runtime/README.txt
    openmp/trunk/runtime/cmake/LibompGetArchitecture.cmake
    openmp/trunk/runtime/cmake/LibompMicroTests.cmake
    openmp/trunk/runtime/cmake/LibompUtils.cmake
    openmp/trunk/runtime/src/kmp_affinity.h
    openmp/trunk/runtime/src/kmp_csupport.c
    openmp/trunk/runtime/src/kmp_gsupport.c
    openmp/trunk/runtime/src/kmp_os.h
    openmp/trunk/runtime/src/kmp_platform.h
    openmp/trunk/runtime/src/kmp_runtime.c
    openmp/trunk/runtime/src/thirdparty/ittnotify/ittnotify_config.h
    openmp/trunk/runtime/src/thirdparty/ittnotify/ittnotify_static.c
    openmp/trunk/runtime/src/z_Linux_asm.s
    openmp/trunk/runtime/tools/lib/Platform.pm
    openmp/trunk/runtime/tools/lib/Uname.pm
    openmp/trunk/www/README.txt
    openmp/trunk/www/index.html

Modified: openmp/trunk/runtime/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/CMakeLists.txt?rev=289032&r1=289031&r2=289032&view=diff
==============================================================================
--- openmp/trunk/runtime/CMakeLists.txt (original)
+++ openmp/trunk/runtime/CMakeLists.txt Thu Dec  8 03:22:24 2016
@@ -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 "aarch6
   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

Modified: openmp/trunk/runtime/README.txt
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/README.txt?rev=289032&r1=289031&r2=289032&view=diff
==============================================================================
--- openmp/trunk/runtime/README.txt (original)
+++ openmp/trunk/runtime/README.txt Thu Dec  8 03:22:24 2016
@@ -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
 ==================================

Modified: openmp/trunk/runtime/cmake/LibompGetArchitecture.cmake
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/cmake/LibompGetArchitecture.cmake?rev=289032&r1=289031&r2=289032&view=diff
==============================================================================
--- openmp/trunk/runtime/cmake/LibompGetArchitecture.cmake (original)
+++ openmp/trunk/runtime/cmake/LibompGetArchitecture.cmake Thu Dec  8 03:22:24 2016
@@ -42,6 +42,10 @@ function(libomp_get_architecture return_
       #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

Modified: openmp/trunk/runtime/cmake/LibompMicroTests.cmake
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/cmake/LibompMicroTests.cmake?rev=289032&r1=289031&r2=289032&view=diff
==============================================================================
--- openmp/trunk/runtime/cmake/LibompMicroTests.cmake (original)
+++ openmp/trunk/runtime/cmake/LibompMicroTests.cmake Thu Dec  8 03:22:24 2016
@@ -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)

Modified: openmp/trunk/runtime/cmake/LibompUtils.cmake
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/cmake/LibompUtils.cmake?rev=289032&r1=289031&r2=289032&view=diff
==============================================================================
--- openmp/trunk/runtime/cmake/LibompUtils.cmake (original)
+++ openmp/trunk/runtime/cmake/LibompUtils.cmake Thu Dec  8 03:22:24 2016
@@ -102,6 +102,10 @@ function(libomp_get_legal_arch return_ar
     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}")

Modified: openmp/trunk/runtime/src/kmp_affinity.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_affinity.h?rev=289032&r1=289031&r2=289032&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_affinity.h (original)
+++ openmp/trunk/runtime/src/kmp_affinity.h Thu Dec  8 03:22:24 2016
@@ -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 {

Modified: openmp/trunk/runtime/src/kmp_csupport.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_csupport.c?rev=289032&r1=289031&r2=289032&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_csupport.c (original)
+++ openmp/trunk/runtime/src/kmp_csupport.c Thu Dec  8 03:22:24 2016
@@ -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).

Modified: openmp/trunk/runtime/src/kmp_gsupport.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_gsupport.c?rev=289032&r1=289031&r2=289032&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_gsupport.c (original)
+++ openmp/trunk/runtime/src/kmp_gsupport.c Thu Dec  8 03:22:24 2016
@@ -232,7 +232,7 @@ xexpand(KMP_API_NAME_GOMP_ORDERED_END)(v
 // (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

Modified: openmp/trunk/runtime/src/kmp_os.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_os.h?rev=289032&r1=289031&r2=289032&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_os.h (original)
+++ openmp/trunk/runtime/src/kmp_os.h Thu Dec  8 03:22:24 2016
@@ -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( vol
 # 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( vol
 #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))

Modified: openmp/trunk/runtime/src/kmp_platform.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_platform.h?rev=289032&r1=289031&r2=289032&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_platform.h (original)
+++ openmp/trunk/runtime/src/kmp_platform.h Thu Dec  8 03:22:24 2016
@@ -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
 

Modified: openmp/trunk/runtime/src/kmp_runtime.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_runtime.c?rev=289032&r1=289031&r2=289032&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_runtime.c (original)
+++ openmp/trunk/runtime/src/kmp_runtime.c Thu Dec  8 03:22:24 2016
@@ -7565,7 +7565,7 @@ __kmp_determine_reduction_method( ident_
         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_
                 #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
 

Modified: openmp/trunk/runtime/src/thirdparty/ittnotify/ittnotify_config.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/thirdparty/ittnotify/ittnotify_config.h?rev=289032&r1=289031&r2=289032&view=diff
==============================================================================
--- openmp/trunk/runtime/src/thirdparty/ittnotify/ittnotify_config.h (original)
+++ openmp/trunk/runtime/src/thirdparty/ittnotify/ittnotify_config.h Thu Dec  8 03:22:24 2016
@@ -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(
                           : "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

Modified: openmp/trunk/runtime/src/thirdparty/ittnotify/ittnotify_static.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/thirdparty/ittnotify/ittnotify_static.c?rev=289032&r1=289031&r2=289032&view=diff
==============================================================================
--- openmp/trunk/runtime/src/thirdparty/ittnotify/ittnotify_static.c (original)
+++ openmp/trunk/runtime/src/thirdparty/ittnotify/ittnotify_static.c Thu Dec  8 03:22:24 2016
@@ -72,7 +72,7 @@ static const char* ittnotify_lib_name =
 
 
 #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

Modified: openmp/trunk/runtime/src/z_Linux_asm.s
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/z_Linux_asm.s?rev=289032&r1=289031&r2=289032&view=diff
==============================================================================
--- openmp/trunk/runtime/src/z_Linux_asm.s (original)
+++ openmp/trunk/runtime/src/z_Linux_asm.s Thu Dec  8 03:22:24 2016
@@ -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

Modified: openmp/trunk/runtime/tools/lib/Platform.pm
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/tools/lib/Platform.pm?rev=289032&r1=289031&r2=289032&view=diff
==============================================================================
--- openmp/trunk/runtime/tools/lib/Platform.pm (original)
+++ openmp/trunk/runtime/tools/lib/Platform.pm Thu Dec  8 03:22:24 2016
@@ -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
 
 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 canon
 =cut
 
 # end of file #
-

Modified: openmp/trunk/runtime/tools/lib/Uname.pm
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/tools/lib/Uname.pm?rev=289032&r1=289031&r2=289032&view=diff
==============================================================================
--- openmp/trunk/runtime/tools/lib/Uname.pm (original)
+++ openmp/trunk/runtime/tools/lib/Uname.pm Thu Dec  8 03:22:24 2016
@@ -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

Modified: openmp/trunk/www/README.txt
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/www/README.txt?rev=289032&r1=289031&r2=289032&view=diff
==============================================================================
--- openmp/trunk/www/README.txt (original)
+++ openmp/trunk/www/README.txt Thu Dec  8 03:22:24 2016
@@ -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
 ==================================

Modified: openmp/trunk/www/index.html
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/www/index.html?rev=289032&r1=289031&r2=289032&view=diff
==============================================================================
--- openmp/trunk/www/index.html (original)
+++ openmp/trunk/www/index.html Thu Dec  8 03:22:24 2016
@@ -142,6 +142,7 @@
         or with gcc, and also the Intel® Xeon Phi™ 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>




More information about the Openmp-commits mailing list