aboutsummaryrefslogtreecommitdiff
path: root/runtime/tools
diff options
context:
space:
mode:
authorJonas Hahnfeld <hahnjo@hahnjo.de>2019-07-25 14:36:20 +0000
committerJonas Hahnfeld <hahnjo@hahnjo.de>2019-07-25 14:36:20 +0000
commit57b2fafae6ea3c35e4acf5a520a0e5f14f71ba13 (patch)
treeecf941df08d8b50b06016013fad4490feb3ec47f /runtime/tools
parentb840a856c2cc27c1aa6db219a095a11d278344c5 (diff)
[OpenMP] RISCV64 port
This is a port of libomp for the RISC-V 64-bit Linux target. We have tested this port on a HiFive Unleashed development board using a downstream LLVM that has support for the missing bits in upstream. As of now, all tests are passing, including OMPT. Patch by Ferran Pallarès! Differential Revision: https://reviews.llvm.org/D59880 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@367021 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime/tools')
-rw-r--r--runtime/tools/lib/Platform.pm7
-rw-r--r--runtime/tools/lib/Uname.pm2
2 files changed, 8 insertions, 1 deletions
diff --git a/runtime/tools/lib/Platform.pm b/runtime/tools/lib/Platform.pm
index b0e10a1..0ff7597 100644
--- a/runtime/tools/lib/Platform.pm
+++ b/runtime/tools/lib/Platform.pm
@@ -61,6 +61,8 @@ sub canon_arch($) {
$arch = "mips64";
} elsif ( $arch =~ m{\Amips} ) {
$arch = "mips";
+ } elsif ( $arch =~ m{\Ariscv64} ) {
+ $arch = "riscv64";
} else {
$arch = undef;
}; # if
@@ -94,6 +96,7 @@ sub canon_mic_arch($) {
"mic" => "Intel(R) Many Integrated Core Architecture",
"mips" => "MIPS",
"mips64" => "MIPS64",
+ "riscv64" => "RISC-V (64-bit)",
);
sub legal_arch($) {
@@ -220,6 +223,8 @@ sub target_options() {
$_host_arch = "mips64";
} elsif ( $hardware_platform eq "mips" ) {
$_host_arch = "mips";
+ } elsif ( $hardware_platform eq "riscv64" ) {
+ $_host_arch = "riscv64";
} else {
die "Unsupported host hardware platform: \"$hardware_platform\"; stopped";
}; # if
@@ -409,7 +414,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>, C<mips>, C<mips64>, 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>, C<riscv64> or C<undef> is input string is not recognized.
=item B<legal_arch( $arch )>
diff --git a/runtime/tools/lib/Uname.pm b/runtime/tools/lib/Uname.pm
index 4a5c332..a14cb3a 100644
--- a/runtime/tools/lib/Uname.pm
+++ b/runtime/tools/lib/Uname.pm
@@ -156,6 +156,8 @@ if ( 0 ) {
$values{ hardware_platform } = "mips64";
} elsif ( $values{ machine } =~ m{\Amips\z} ) {
$values{ hardware_platform } = "mips";
+ } elsif ( $values{ machine } =~ m{\Ariscv64\z} ) {
+ $values{ hardware_platform } = "riscv64";
} else {
die "Unsupported machine (\"$values{ machine }\") returned by POSIX::uname(); stopped";
}; # if