diff options
author | Sylvestre Ledru <sylvestre@debian.org> | 2016-12-08 09:22:24 +0000 |
---|---|---|
committer | Sylvestre Ledru <sylvestre@debian.org> | 2016-12-08 09:22:24 +0000 |
commit | 070870b8e689545efa2b9705701e7f86f5606b6c (patch) | |
tree | bdbd7ab9318aab070470a7ad2bba5fd65a402647 /runtime/tools | |
parent | 0fee15bb8f679dbf52db0e386ee840795d2e964a (diff) |
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
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@289032 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime/tools')
-rw-r--r-- | runtime/tools/lib/Platform.pm | 15 | ||||
-rw-r--r-- | runtime/tools/lib/Uname.pm | 4 |
2 files changed, 17 insertions, 2 deletions
diff --git a/runtime/tools/lib/Platform.pm b/runtime/tools/lib/Platform.pm index 6a2b3b6..8fe6359 100644 --- a/runtime/tools/lib/Platform.pm +++ b/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/runtime/tools/lib/Uname.pm b/runtime/tools/lib/Uname.pm index 415070b..f85e1ee 100644 --- a/runtime/tools/lib/Uname.pm +++ b/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 |