aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2019-05-09 20:12:09 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-05-09 20:12:09 +0000
commit133d3bd8362f0c438017ca18adb51afb7288f78b (patch)
treeea10f6811c6c34a39dc86a7d21b2652dbd18fc65 /libgo
parentb8754cd88a24097bdc0c018ea480e6f726f6baa7 (diff)
parent41a4d47581db409213d887c41dd914165b802419 (diff)
downloadgcc-133d3bd8362f0c438017ca18adb51afb7288f78b.zip
gcc-133d3bd8362f0c438017ca18adb51afb7288f78b.tar.gz
gcc-133d3bd8362f0c438017ca18adb51afb7288f78b.tar.bz2
Merge from trunk revision 271040.
From-SVN: r271043
Diffstat (limited to 'libgo')
-rw-r--r--libgo/Makefile.am1
-rw-r--r--libgo/Makefile.in23
-rw-r--r--libgo/README25
-rw-r--r--libgo/go/os/user/user_test.go3
-rw-r--r--libgo/go/reflect/value.go2
-rw-r--r--libgo/go/runtime/mbarrier.go1
-rw-r--r--libgo/go/runtime/stubs.go1
-rw-r--r--libgo/runtime/go-memmove.c16
8 files changed, 40 insertions, 32 deletions
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
index 1201cf5..ebbdee8 100644
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -461,7 +461,6 @@ runtime_files = \
runtime/go-memclr.c \
runtime/go-memcmp.c \
runtime/go-memequal.c \
- runtime/go-memmove.c \
runtime/go-nanotime.c \
runtime/go-now.c \
runtime/go-nosys.c \
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
index 346683b..737b01e 100644
--- a/libgo/Makefile.in
+++ b/libgo/Makefile.in
@@ -245,16 +245,15 @@ am__objects_3 = runtime/aeshash.lo runtime/go-assert.lo \
runtime/go-ffi.lo runtime/go-fieldtrack.lo \
runtime/go-matherr.lo runtime/go-memclr.lo \
runtime/go-memcmp.lo runtime/go-memequal.lo \
- runtime/go-memmove.lo runtime/go-nanotime.lo runtime/go-now.lo \
- runtime/go-nosys.lo runtime/go-reflect-call.lo \
- runtime/go-runtime-error.lo runtime/go-setenv.lo \
- runtime/go-signal.lo runtime/go-strslice.lo \
- runtime/go-typedesc-equal.lo runtime/go-unsafe-pointer.lo \
- runtime/go-unsetenv.lo runtime/go-unwind.lo \
- runtime/go-varargs.lo runtime/env_posix.lo runtime/panic.lo \
- runtime/print.lo runtime/proc.lo runtime/runtime_c.lo \
- runtime/stack.lo runtime/yield.lo $(am__objects_1) \
- $(am__objects_2)
+ runtime/go-nanotime.lo runtime/go-now.lo runtime/go-nosys.lo \
+ runtime/go-reflect-call.lo runtime/go-runtime-error.lo \
+ runtime/go-setenv.lo runtime/go-signal.lo \
+ runtime/go-strslice.lo runtime/go-typedesc-equal.lo \
+ runtime/go-unsafe-pointer.lo runtime/go-unsetenv.lo \
+ runtime/go-unwind.lo runtime/go-varargs.lo \
+ runtime/env_posix.lo runtime/panic.lo runtime/print.lo \
+ runtime/proc.lo runtime/runtime_c.lo runtime/stack.lo \
+ runtime/yield.lo $(am__objects_1) $(am__objects_2)
am_libgo_llgo_la_OBJECTS = $(am__objects_3)
libgo_llgo_la_OBJECTS = $(am_libgo_llgo_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
@@ -882,7 +881,6 @@ runtime_files = \
runtime/go-memclr.c \
runtime/go-memcmp.c \
runtime/go-memequal.c \
- runtime/go-memmove.c \
runtime/go-nanotime.c \
runtime/go-now.c \
runtime/go-nosys.c \
@@ -1337,8 +1335,6 @@ runtime/go-memcmp.lo: runtime/$(am__dirstamp) \
runtime/$(DEPDIR)/$(am__dirstamp)
runtime/go-memequal.lo: runtime/$(am__dirstamp) \
runtime/$(DEPDIR)/$(am__dirstamp)
-runtime/go-memmove.lo: runtime/$(am__dirstamp) \
- runtime/$(DEPDIR)/$(am__dirstamp)
runtime/go-nanotime.lo: runtime/$(am__dirstamp) \
runtime/$(DEPDIR)/$(am__dirstamp)
runtime/go-now.lo: runtime/$(am__dirstamp) \
@@ -1431,7 +1427,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-memclr.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-memcmp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-memequal.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-memmove.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-nanotime.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-nosys.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-now.Plo@am__quote@
diff --git a/libgo/README b/libgo/README
index d5af7e2..a39d524 100644
--- a/libgo/README
+++ b/libgo/README
@@ -42,3 +42,28 @@ http://code.google.com/legal/corporate-cla-v1.0.html.
If the copyright holder for your code has already completed the
agreement in connection with another Google open source project, it
does not need to be completed again.
+
+Debugging
+=========
+
+This describes how to test libgo when built as part of gccgo.
+
+To test a specific package, cd to the libgo build directory
+(TARGET/libgo) and run `make PKG/check`. For example, `make
+bytes/check`.
+
+To see the exact commands that it runs, including how the compiler is
+invoked, run `make GOTESTFLAGS=--trace bytes/check`. This will
+display the commands if the test fails. If the test passes, the
+commands and other output will be visible in a file named
+check-testlog in a subdirectory with the name of the package being
+checked. In the case of bytes/check, this will create
+bytes/check-testlog.
+
+To leave the test program behind, run `make GOTESTFLAGS=--keep
+bytes/check`. That will leave a gotestNNNN/test directory in the
+libgo build directory. In that directory you can run
+`LD_LIBRARY_PATH=../../.libs ./a.out -test.short` to run the tests.
+You can run specific failing tests using a -test.run option. You can
+see the tests being run with the -test.v option. You can run the
+program under a debugger such as gdb.
diff --git a/libgo/go/os/user/user_test.go b/libgo/go/os/user/user_test.go
index 2563077..eeb24dd 100644
--- a/libgo/go/os/user/user_test.go
+++ b/libgo/go/os/user/user_test.go
@@ -129,6 +129,9 @@ func TestLookupGroup(t *testing.T) {
func TestGroupIds(t *testing.T) {
checkGroup(t)
+ if runtime.GOOS == "aix" {
+ t.Skip("skipping GroupIds, see golang.org/issue/30563")
+ }
if runtime.GOOS == "solaris" {
t.Skip("skipping GroupIds, see golang.org/issue/14709")
}
diff --git a/libgo/go/reflect/value.go b/libgo/go/reflect/value.go
index d3a6243..298fbac 100644
--- a/libgo/go/reflect/value.go
+++ b/libgo/go/reflect/value.go
@@ -401,7 +401,7 @@ func (v Value) call(op string, in []Value) []Value {
if v.flag&flagMethod != 0 {
nin++
}
- firstPointer := len(in) > 0 && t.In(0).Kind() != Ptr && v.flag&flagMethodFn != 0
+ firstPointer := len(in) > 0 && ifaceIndir(t.In(0).common()) && v.flag&flagMethodFn != 0
params := make([]unsafe.Pointer, nin)
off := 0
if v.flag&flagMethod != 0 {
diff --git a/libgo/go/runtime/mbarrier.go b/libgo/go/runtime/mbarrier.go
index d3ffd3c..89febb9 100644
--- a/libgo/go/runtime/mbarrier.go
+++ b/libgo/go/runtime/mbarrier.go
@@ -23,6 +23,7 @@ import (
//
//go:linkname typedmemmove runtime.typedmemmove
//go:linkname typedslicecopy runtime.typedslicecopy
+//go:linkname memclrHasPointers runtime.memclrHasPointers
// Go uses a hybrid barrier that combines a Yuasa-style deletion
// barrier—which shades the object whose reference is being
diff --git a/libgo/go/runtime/stubs.go b/libgo/go/runtime/stubs.go
index dfdb38e..435cdf7 100644
--- a/libgo/go/runtime/stubs.go
+++ b/libgo/go/runtime/stubs.go
@@ -100,6 +100,7 @@ func reflect_memclrNoHeapPointers(ptr unsafe.Pointer, n uintptr) {
// memmove copies n bytes from "from" to "to".
//go:noescape
+//extern __builtin_memmove
func memmove(to, from unsafe.Pointer, n uintptr)
//go:linkname reflect_memmove reflect.memmove
diff --git a/libgo/runtime/go-memmove.c b/libgo/runtime/go-memmove.c
deleted file mode 100644
index a6fda08..0000000
--- a/libgo/runtime/go-memmove.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/* go-memmove.c -- move one memory buffer to another
-
- Copyright 2016 The Go Authors. All rights reserved.
- Use of this source code is governed by a BSD-style
- license that can be found in the LICENSE file. */
-
-#include "runtime.h"
-
-void move(void *, void *, uintptr)
- __asm__ (GOSYM_PREFIX "runtime.memmove");
-
-void
-move (void *p1, void *p2, uintptr len)
-{
- __builtin_memmove (p1, p2, len);
-}