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 | cd9d37433743d4518c04ca19ed77a1c8c8acafe6 (patch) | |
| tree | 203640ad71a153d4f68c0b5fd5457d586598988c /openmp/runtime/tools | |
| parent | 0cc0446ad2264a79d5e4a514946680d5c9cf37b8 (diff) | |
| download | bcm5719-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
Diffstat (limited to 'openmp/runtime/tools')
| -rw-r--r-- | openmp/runtime/tools/lib/Platform.pm | 15 | ||||
| -rw-r--r-- | openmp/runtime/tools/lib/Uname.pm | 4 |
2 files changed, 17 insertions, 2 deletions
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 |

