summaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
Diffstat (limited to 'libgo')
-rwxr-xr-xlibgo/configure12
-rw-r--r--libgo/configure.ac12
-rw-r--r--libgo/go/cmd/cgo/main.go2
-rw-r--r--libgo/go/go/build/syslist.go2
-rw-r--r--libgo/go/internal/syscall/unix/getrandom_linux_generic.go2
-rw-r--r--libgo/go/runtime/chan.go10
-rw-r--r--libgo/go/runtime/hash64.go2
-rw-r--r--libgo/go/runtime/hashmap.go25
-rw-r--r--libgo/go/runtime/lfstack_64bit.go2
-rw-r--r--libgo/go/runtime/malloc.go1
-rw-r--r--libgo/go/runtime/proc.go12
-rw-r--r--libgo/go/runtime/select.go7
-rw-r--r--libgo/go/runtime/unaligned1.go2
-rw-r--r--libgo/go/syscall/endian_little.go2
-rw-r--r--libgo/go/syscall/libcall_linux_ustat.go2
-rwxr-xr-xlibgo/goarch.sh4
-rwxr-xr-xlibgo/match.sh4
-rw-r--r--libgo/misc/cgo/testcshared/src/libgo2/dup2.go2
-rw-r--r--libgo/misc/cgo/testcshared/src/libgo2/dup3.go2
-rw-r--r--libgo/runtime/go-caller.c14
-rw-r--r--libgo/runtime/go-callers.c19
-rw-r--r--libgo/runtime/runtime.h3
-rwxr-xr-xlibgo/testsuite/gotest4
23 files changed, 111 insertions, 36 deletions
diff --git a/libgo/configure b/libgo/configure
index aba4dc396fc..c5f8e8a3763 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -13653,10 +13653,10 @@ esac
# - libgo/go/syscall/endian_XX.go
# - possibly others
# - possibly update files in libgo/go/internal/syscall/unix
-ALLGOARCH="386 alpha amd64 amd64p32 arm armbe arm64 arm64be ia64 m68k mips mipsle mips64 mips64le mips64p32 mips64p32le ppc ppc64 ppc64le s390 s390x sh shbe sparc sparc64"
+ALLGOARCH="386 alpha amd64 amd64p32 arm armbe arm64 arm64be ia64 m68k mips mipsle mips64 mips64le mips64p32 mips64p32le ppc ppc64 ppc64le riscv64 s390 s390x sh shbe sparc sparc64"
# All known GOARCH family values.
-ALLGOARCHFAMILY="I386 ALPHA AMD64 ARM ARM64 IA64 M68K MIPS MIPS64 PPC PPC64 S390 S390X SH SPARC SPARC64"
+ALLGOARCHFAMILY="I386 ALPHA AMD64 ARM ARM64 IA64 M68K MIPS MIPS64 PPC PPC64 RISCV64 S390 S390X SH SPARC SPARC64"
GOARCH=unknown
case ${host} in
@@ -13773,6 +13773,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
;;
+ riscv64-*-*)
+ GOARCH=riscv64
+ ;;
s390*-*-*)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14209,7 +14212,7 @@ if test "${libgo_cv_lib_pthread+set}" = set; then :
$as_echo_n "(cached) " >&6
else
CFLAGS_hold=$CFLAGS
-CFLAGS="$CFLAGS -pthread"
+CFLAGS="$CFLAGS -pthread -L../libatomic/.libs"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int i;
@@ -14226,7 +14229,8 @@ fi
$as_echo "$libgo_cv_lib_pthread" >&6; }
PTHREAD_CFLAGS=
if test "$libgo_cv_lib_pthread" = yes; then
- PTHREAD_CFLAGS=-pthread
+ # RISC-V apparently adds -latomic when using -pthread.
+ PTHREAD_CFLAGS="-pthread -L../libatomic/.libs"
fi
diff --git a/libgo/configure.ac b/libgo/configure.ac
index 1264a1d2524..eabe294afa9 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -224,10 +224,10 @@ AC_SUBST(USE_DEJAGNU)
# - libgo/go/syscall/endian_XX.go
# - possibly others
# - possibly update files in libgo/go/internal/syscall/unix
-ALLGOARCH="386 alpha amd64 amd64p32 arm armbe arm64 arm64be ia64 m68k mips mipsle mips64 mips64le mips64p32 mips64p32le ppc ppc64 ppc64le s390 s390x sh shbe sparc sparc64"
+ALLGOARCH="386 alpha amd64 amd64p32 arm armbe arm64 arm64be ia64 m68k mips mipsle mips64 mips64le mips64p32 mips64p32le ppc ppc64 ppc64le riscv64 s390 s390x sh shbe sparc sparc64"
# All known GOARCH family values.
-ALLGOARCHFAMILY="I386 ALPHA AMD64 ARM ARM64 IA64 M68K MIPS MIPS64 PPC PPC64 S390 S390X SH SPARC SPARC64"
+ALLGOARCHFAMILY="I386 ALPHA AMD64 ARM ARM64 IA64 M68K MIPS MIPS64 PPC PPC64 RISCV64 S390 S390X SH SPARC SPARC64"
GOARCH=unknown
case ${host} in
@@ -304,6 +304,9 @@ AC_COMPILE_IFELSE([
[GOARCH=ppc64le],
[GOARCH=ppc64])])
;;
+ riscv64-*-*)
+ GOARCH=riscv64
+ ;;
s390*-*-*)
AC_COMPILE_IFELSE([
#if defined(__s390x__)
@@ -493,14 +496,15 @@ dnl Test whether the compiler supports the -pthread option.
AC_CACHE_CHECK([whether -pthread is supported],
[libgo_cv_lib_pthread],
[CFLAGS_hold=$CFLAGS
-CFLAGS="$CFLAGS -pthread"
+CFLAGS="$CFLAGS -pthread -L../libatomic/.libs"
AC_COMPILE_IFELSE([[int i;]],
[libgo_cv_lib_pthread=yes],
[libgo_cv_lib_pthread=no])
CFLAGS=$CFLAGS_hold])
PTHREAD_CFLAGS=
if test "$libgo_cv_lib_pthread" = yes; then
- PTHREAD_CFLAGS=-pthread
+ # RISC-V apparently adds -latomic when using -pthread.
+ PTHREAD_CFLAGS="-pthread -L../libatomic/.libs"
fi
AC_SUBST(PTHREAD_CFLAGS)
diff --git a/libgo/go/cmd/cgo/main.go b/libgo/go/cmd/cgo/main.go
index f5c231ced6d..6baabfd1336 100644
--- a/libgo/go/cmd/cgo/main.go
+++ b/libgo/go/cmd/cgo/main.go
@@ -168,6 +168,7 @@ var ptrSizeMap = map[string]int64{
"ppc": 4,
"ppc64": 8,
"ppc64le": 8,
+ "riscv64": 8,
"s390": 4,
"s390x": 8,
"sh": 4,
@@ -192,6 +193,7 @@ var intSizeMap = map[string]int64{
"ppc": 4,
"ppc64": 8,
"ppc64le": 8,
+ "riscv64": 8,
"s390": 4,
"s390x": 8,
"sh": 4,
diff --git a/libgo/go/go/build/syslist.go b/libgo/go/go/build/syslist.go
index 6bf72630e7c..679d195025e 100644
--- a/libgo/go/go/build/syslist.go
+++ b/libgo/go/go/build/syslist.go
@@ -5,4 +5,4 @@
package build
const goosList = "aix android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris windows zos "
-const goarchList = "386 amd64 amd64p32 arm armbe arm64 arm64be alpha m68k ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le ppc s390 s390x sh shbe sparc sparc64"
+const goarchList = "386 amd64 amd64p32 arm armbe arm64 arm64be alpha m68k ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le ppc riscv64 s390 s390x sh shbe sparc sparc64"
diff --git a/libgo/go/internal/syscall/unix/getrandom_linux_generic.go b/libgo/go/internal/syscall/unix/getrandom_linux_generic.go
index 8425800b6da..d6af3dea8d7 100644
--- a/libgo/go/internal/syscall/unix/getrandom_linux_generic.go
+++ b/libgo/go/internal/syscall/unix/getrandom_linux_generic.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build arm64
+// +build arm64 riscv64
package unix
diff --git a/libgo/go/runtime/chan.go b/libgo/go/runtime/chan.go
index bf708aec5c4..87f7879e6f5 100644
--- a/libgo/go/runtime/chan.go
+++ b/libgo/go/runtime/chan.go
@@ -148,6 +148,11 @@ func chansend1(c *hchan, elem unsafe.Pointer) {
* the operation; we'll see that it's now closed.
*/
func chansend(c *hchan, ep unsafe.Pointer, block bool, callerpc uintptr) bool {
+ // Check preemption, since unlike gc we don't check on every call.
+ if getg().preempt {
+ checkPreempt()
+ }
+
if c == nil {
if !block {
return false
@@ -430,6 +435,11 @@ func chanrecv(c *hchan, ep unsafe.Pointer, block bool) (selected, received bool)
print("chanrecv: chan=", c, "\n")
}
+ // Check preemption, since unlike gc we don't check on every call.
+ if getg().preempt {
+ checkPreempt()
+ }
+
if c == nil {
if !block {
return
diff --git a/libgo/go/runtime/hash64.go b/libgo/go/runtime/hash64.go
index 5912943a4e9..74775a88f26 100644
--- a/libgo/go/runtime/hash64.go
+++ b/libgo/go/runtime/hash64.go
@@ -6,7 +6,7 @@
// xxhash: https://code.google.com/p/xxhash/
// cityhash: https://code.google.com/p/cityhash/
-// +build amd64 amd64p32 arm64 mips64 mips64le ppc64 ppc64le s390x alpha arm64be ia64 mips64p32 mips64p32le sparc64
+// +build amd64 amd64p32 arm64 mips64 mips64le ppc64 ppc64le s390x alpha arm64be ia64 mips64p32 mips64p32le sparc64 riscv64
package runtime
diff --git a/libgo/go/runtime/hashmap.go b/libgo/go/runtime/hashmap.go
index a1fe49e9305..aba9abd7aab 100644
--- a/libgo/go/runtime/hashmap.go
+++ b/libgo/go/runtime/hashmap.go
@@ -356,6 +356,11 @@ func makemap(t *maptype, hint int, h *hmap) *hmap {
// NOTE: The returned pointer may keep the whole map live, so don't
// hold onto it for very long.
func mapaccess1(t *maptype, h *hmap, key unsafe.Pointer) unsafe.Pointer {
+ // Check preemption, since unlike gc we don't check on every call.
+ if getg().preempt {
+ checkPreempt()
+ }
+
if raceenabled && h != nil {
callerpc := getcallerpc()
pc := funcPC(mapaccess1)
@@ -409,6 +414,11 @@ func mapaccess1(t *maptype, h *hmap, key unsafe.Pointer) unsafe.Pointer {
}
func mapaccess2(t *maptype, h *hmap, key unsafe.Pointer) (unsafe.Pointer, bool) {
+ // Check preemption, since unlike gc we don't check on every call.
+ if getg().preempt {
+ checkPreempt()
+ }
+
if raceenabled && h != nil {
callerpc := getcallerpc()
pc := funcPC(mapaccess2)
@@ -463,6 +473,11 @@ func mapaccess2(t *maptype, h *hmap, key unsafe.Pointer) (unsafe.Pointer, bool)
// returns both key and value. Used by map iterator
func mapaccessK(t *maptype, h *hmap, key unsafe.Pointer) (unsafe.Pointer, unsafe.Pointer) {
+ // Check preemption, since unlike gc we don't check on every call.
+ if getg().preempt {
+ checkPreempt()
+ }
+
if h == nil || h.count == 0 {
return nil, nil
}
@@ -521,6 +536,11 @@ func mapaccess2_fat(t *maptype, h *hmap, key, zero unsafe.Pointer) (unsafe.Point
// Like mapaccess, but allocates a slot for the key if it is not present in the map.
func mapassign(t *maptype, h *hmap, key unsafe.Pointer) unsafe.Pointer {
+ // Check preemption, since unlike gc we don't check on every call.
+ if getg().preempt {
+ checkPreempt()
+ }
+
if h == nil {
panic(plainError("assignment to entry in nil map"))
}
@@ -772,6 +792,11 @@ func mapiterinit(t *maptype, h *hmap, it *hiter) {
}
func mapiternext(it *hiter) {
+ // Check preemption, since unlike gc we don't check on every call.
+ if getg().preempt {
+ checkPreempt()
+ }
+
h := it.h
if raceenabled {
callerpc := getcallerpc()
diff --git a/libgo/go/runtime/lfstack_64bit.go b/libgo/go/runtime/lfstack_64bit.go
index 95d0eba57a6..dca17181e3e 100644
--- a/libgo/go/runtime/lfstack_64bit.go
+++ b/libgo/go/runtime/lfstack_64bit.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build amd64 arm64 mips64 mips64le ppc64 ppc64le s390x arm64be alpha sparc64 ia64
+// +build amd64 arm64 mips64 mips64le ppc64 ppc64le s390x arm64be alpha sparc64 ia64 riscv64
package runtime
diff --git a/libgo/go/runtime/malloc.go b/libgo/go/runtime/malloc.go
index 88e4ba3657b..c27aa487df3 100644
--- a/libgo/go/runtime/malloc.go
+++ b/libgo/go/runtime/malloc.go
@@ -826,6 +826,7 @@ func mallocgc(size uintptr, typ *_type, needzero bool) unsafe.Pointer {
}
}
+ // Check preemption, since unlike gc we don't check on every call.
if getg().preempt {
checkPreempt()
}
diff --git a/libgo/go/runtime/proc.go b/libgo/go/runtime/proc.go
index edf41405c1c..20fa0ad05be 100644
--- a/libgo/go/runtime/proc.go
+++ b/libgo/go/runtime/proc.go
@@ -2794,6 +2794,13 @@ func exitsyscall(dummy int32) {
exitsyscallclear(_g_)
_g_.m.locks--
_g_.throwsplit = false
+
+ // Check preemption, since unlike gc we don't check on
+ // every call.
+ if getg().preempt {
+ checkPreempt()
+ }
+
return
}
@@ -4084,8 +4091,9 @@ func preemptone(_p_ *p) bool {
// setting a global variable and figuring out a way to efficiently
// check that global variable.
//
- // For now we check gp.preempt in schedule and mallocgc,
- // which is at least better than doing nothing at all.
+ // For now we check gp.preempt in schedule, mallocgc, selectgo,
+ // and a few other places, which is at least better than doing
+ // nothing at all.
return true
}
diff --git a/libgo/go/runtime/select.go b/libgo/go/runtime/select.go
index 096af52be35..1c5124b4704 100644
--- a/libgo/go/runtime/select.go
+++ b/libgo/go/runtime/select.go
@@ -584,6 +584,13 @@ retc:
if cas.releasetime > 0 {
blockevent(cas.releasetime-t0, 1)
}
+
+ // Check preemption, since unlike gc we don't check on every call.
+ // A test case for this one is BenchmarkPingPongHog in proc_test.go.
+ if dfl != nil && getg().preempt {
+ checkPreempt()
+ }
+
return casi
sclose:
diff --git a/libgo/go/runtime/unaligned1.go b/libgo/go/runtime/unaligned1.go
index c94f19eeb94..2f5b63a4c7c 100644
--- a/libgo/go/runtime/unaligned1.go
+++ b/libgo/go/runtime/unaligned1.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build 386 amd64 amd64p32 arm64 ppc64 ppc64le s390x ppc s390 arm64be
+// +build 386 amd64 amd64p32 arm64 ppc64 ppc64le s390x ppc s390 arm64be riscv64
package runtime
diff --git a/libgo/go/syscall/endian_little.go b/libgo/go/syscall/endian_little.go
index b91d4bb72de..4a7312198f5 100644
--- a/libgo/go/syscall/endian_little.go
+++ b/libgo/go/syscall/endian_little.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
-// +build 386 amd64 amd64p32 arm arm64 ppc64le mips64le mipsle alpha ia64 mips64p32le sh
+// +build 386 amd64 amd64p32 arm arm64 ppc64le mips64le mipsle alpha ia64 mips64p32le sh riscv64
package syscall
diff --git a/libgo/go/syscall/libcall_linux_ustat.go b/libgo/go/syscall/libcall_linux_ustat.go
index 261f086f47e..3aff344f25c 100644
--- a/libgo/go/syscall/libcall_linux_ustat.go
+++ b/libgo/go/syscall/libcall_linux_ustat.go
@@ -4,7 +4,7 @@
// GNU/Linux library ustat call.
// This is not supported on some kernels, such as arm64.
-// +build !arm64
+// +build !arm64,!riscv64
package syscall
diff --git a/libgo/goarch.sh b/libgo/goarch.sh
index 9165e6a19a3..c63cbbaa76b 100755
--- a/libgo/goarch.sh
+++ b/libgo/goarch.sh
@@ -146,6 +146,10 @@ case $goarch in
;;
esac
;;
+ riscv64)
+ family=RISCV64
+ pcquantum=2
+ ;;
s390)
family=S390
bigendian=true
diff --git a/libgo/match.sh b/libgo/match.sh
index 62405556ede..9247ec6f40d 100755
--- a/libgo/match.sh
+++ b/libgo/match.sh
@@ -116,7 +116,7 @@ for f in $gofiles; do
aix | android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
tag1=nonmatchingtag
;;
- 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | s390 | s390x | sh | shbe | sparc | sparc64)
+ 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | riscv64 | s390 | s390x | sh | shbe | sparc | sparc64)
tag1=nonmatchingtag
;;
esac
@@ -128,7 +128,7 @@ for f in $gofiles; do
aix | android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
tag2=nonmatchingtag
;;
- 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | s390 | s390x | sh | shbe | sparc | sparc64)
+ 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | riscv64 | s390 | s390x | sh | shbe | sparc | sparc64)
tag2=nonmatchingtag
;;
esac
diff --git a/libgo/misc/cgo/testcshared/src/libgo2/dup2.go b/libgo/misc/cgo/testcshared/src/libgo2/dup2.go
index d18f0b130d3..d343aa54d9a 100644
--- a/libgo/misc/cgo/testcshared/src/libgo2/dup2.go
+++ b/libgo/misc/cgo/testcshared/src/libgo2/dup2.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux,!arm64 netbsd openbsd
+// +build darwin dragonfly freebsd linux,!arm64,!riscv64 netbsd openbsd
package main
diff --git a/libgo/misc/cgo/testcshared/src/libgo2/dup3.go b/libgo/misc/cgo/testcshared/src/libgo2/dup3.go
index c9c65a6e3c1..459f0dc1968 100644
--- a/libgo/misc/cgo/testcshared/src/libgo2/dup3.go
+++ b/libgo/misc/cgo/testcshared/src/libgo2/dup3.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build linux,arm64
+// +build linux,arm64 linux,riscv64
package main
diff --git a/libgo/runtime/go-caller.c b/libgo/runtime/go-caller.c
index ee8abdc67fe..6b26ddccbcf 100644
--- a/libgo/runtime/go-caller.c
+++ b/libgo/runtime/go-caller.c
@@ -129,18 +129,26 @@ __go_get_backtrace_state ()
is the entry on the stack of inlined functions; -1 means the last
one. */
-_Bool
+static _Bool
__go_file_line (uintptr pc, int index, String *fn, String *file, intgo *line)
{
struct caller c;
+ struct backtrace_state *state;
runtime_memclr (&c, sizeof c);
c.index = index;
- backtrace_pcinfo (__go_get_backtrace_state (), pc, callback,
- error_callback, &c);
+ state = __go_get_backtrace_state ();
+ backtrace_pcinfo (state, pc, callback, error_callback, &c);
*fn = c.fn;
*file = c.file;
*line = c.line;
+
+ // If backtrace_pcinfo didn't get the function name from the debug
+ // info, try to get it from the symbol table.
+ if (fn->len == 0)
+ backtrace_syminfo (state, pc, __go_syminfo_fnname_callback,
+ error_callback, fn);
+
return c.file.len > 0;
}
diff --git a/libgo/runtime/go-callers.c b/libgo/runtime/go-callers.c
index 590315376e3..b16ae0c4036 100644
--- a/libgo/runtime/go-callers.c
+++ b/libgo/runtime/go-callers.c
@@ -145,16 +145,17 @@ callback (void *data, uintptr_t pc, const char *filename, int lineno,
/* Syminfo callback. */
-static void
-syminfo_fnname_callback (void *data, uintptr_t pc __attribute__ ((unused)),
- const char *symname,
- uintptr_t address __attribute__ ((unused)),
- uintptr_t size __attribute__ ((unused)))
+void
+__go_syminfo_fnname_callback (void *data,
+ uintptr_t pc __attribute__ ((unused)),
+ const char *symname,
+ uintptr_t address __attribute__ ((unused)),
+ uintptr_t size __attribute__ ((unused)))
{
- Location* locptr = (Location*) data;
+ String* strptr = (String*) data;
if (symname != NULL)
- locptr->function = runtime_gostringnocopy ((const byte *) symname);
+ *strptr = runtime_gostringnocopy ((const byte *) symname);
}
/* Error callback. */
@@ -228,8 +229,8 @@ runtime_callers (int32 skip, Location *locbuf, int32 m, bool keep_thunks)
for (i = 0; i < data.index; ++i)
{
if (locbuf[i].function.len == 0 && locbuf[i].pc != 0)
- backtrace_syminfo (state, locbuf[i].pc, syminfo_fnname_callback,
- error_callback, &locbuf[i]);
+ backtrace_syminfo (state, locbuf[i].pc, __go_syminfo_fnname_callback,
+ error_callback, &locbuf[i].function);
}
return data.index;
diff --git a/libgo/runtime/runtime.h b/libgo/runtime/runtime.h
index 0fafe821441..0ffcf4bde9e 100644
--- a/libgo/runtime/runtime.h
+++ b/libgo/runtime/runtime.h
@@ -456,7 +456,8 @@ extern uintptr runtime_stacks_sys;
struct backtrace_state;
extern struct backtrace_state *__go_get_backtrace_state(void);
-extern _Bool __go_file_line(uintptr, int, String*, String*, intgo *);
+extern void __go_syminfo_fnname_callback(void*, uintptr_t, const char*,
+ uintptr_t, uintptr_t);
extern void runtime_main(void*)
__asm__(GOSYM_PREFIX "runtime.main");
diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest
index f978042cccc..06848fdb1f0 100755
--- a/libgo/testsuite/gotest
+++ b/libgo/testsuite/gotest
@@ -314,7 +314,7 @@ x)
aix | android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
tag1=nonmatchingtag
;;
- 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | s390 | s390x | sh | shbe | sparc | sparc64)
+ 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | riscv64 | s390 | s390x | sh | shbe | sparc | sparc64)
tag1=nonmatchingtag
;;
esac
@@ -326,7 +326,7 @@ x)
aix | android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
tag2=nonmatchingtag
;;
- 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | s390 | s390x | sh | shbe | sparc | sparc64)
+ 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | riscv64 | s390 | s390x | sh | shbe | sparc | sparc64)
tag2=nonmatchingtag
;;
esac