summaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-11-20 16:02:55 +0000
committerRichard Sandiford <richard.sandiford@linaro.org>2017-11-20 16:02:55 +0000
commitd58952aefb03632bbb5b441d5c0bd330711f0af1 (patch)
treed046e56bfbd6a40106ae6ab96fafc954f1dfc955 /libgo
parent648f8fc59b2cc39abd24f4c22388b346cdebcc31 (diff)
parent50221fae802a10fafe95e61d40504a58da33e98f (diff)
downloadgcc-linaro-dev/sve.tar.gz
Merge trunk into svelinaro-dev/sve
Diffstat (limited to 'libgo')
-rw-r--r--libgo/Makefile.am6
-rw-r--r--libgo/Makefile.in6
-rwxr-xr-xlibgo/configure4
-rw-r--r--libgo/configure.ac2
-rw-r--r--libgo/go/runtime/internal/atomic/atomic.c14
-rw-r--r--libgo/go/runtime/panic.go1
-rw-r--r--libgo/go/sync/atomic/atomic.c12
-rwxr-xr-xlibgo/mkrsysinfo.sh8
-rwxr-xr-xlibgo/mksysinfo.sh8
-rw-r--r--libgo/runtime/runtime.h2
10 files changed, 33 insertions, 30 deletions
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
index bd0bbddd4ed..f0ecf92ca7d 100644
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -1191,7 +1191,7 @@ syscall/wait.lo: go/syscall/wait.c runtime.inc
@$(MKDIR_P) syscall
$(LTCOMPILE) -c -o $@ $(srcdir)/go/syscall/wait.c
-# Solaris 12 changed the type of fields in struct stat.
+# Solaris 11.4 changed the type of fields in struct stat.
# Use a build tag, based on a configure check, to cope.
if LIBGO_IS_SOLARIS
if HAVE_STAT_TIMESPEC
@@ -1474,7 +1474,7 @@ check-am:
@for f in $(TEST_PACKAGES); do \
rm -f $$f-testsum $$f-testlog; \
done
- -@$(MAKE) -k $(TEST_PACKAGES)
+ -@$(MAKE) $(AM_MAKEFLAGS) -k $(TEST_PACKAGES)
@for f in $(TEST_PACKAGES); do \
if test -f $$f-testsum; then \
cat $$f-testsum >> libgo.sum; \
@@ -1488,7 +1488,7 @@ check-multi:
$(MULTIDO) $(AM_MAKEFLAGS) DO=check-am multi-do # $(MAKE)
bench:
- -@$(MAKE) -k $(TEST_PACKAGES) GOBENCH=.
+ -@$(MAKE) $(AM_MAKEFLAGS) -k $(TEST_PACKAGES) GOBENCH=.
MOSTLYCLEANFILES = \
s-runtime_sysinfo s-sigtab s-runtime-inc s-zstdpkglist \
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
index 064df58f00e..794c125516a 100644
--- a/libgo/Makefile.in
+++ b/libgo/Makefile.in
@@ -1218,7 +1218,7 @@ extra_check_libs_cmd_go_internal_load = $(abs_builddir)/libgotool.a
extra_check_libs_cmd_go_internal_work = $(abs_builddir)/libgotool.a
@HAVE_STAT_TIMESPEC_FALSE@@LIBGO_IS_SOLARIS_TRUE@matchargs_os =
-# Solaris 12 changed the type of fields in struct stat.
+# Solaris 11.4 changed the type of fields in struct stat.
# Use a build tag, based on a configure check, to cope.
@HAVE_STAT_TIMESPEC_TRUE@@LIBGO_IS_SOLARIS_TRUE@matchargs_os = --tag=solaristag
@LIBGO_IS_SOLARIS_FALSE@matchargs_os =
@@ -3446,7 +3446,7 @@ check-am:
@for f in $(TEST_PACKAGES); do \
rm -f $$f-testsum $$f-testlog; \
done
- -@$(MAKE) -k $(TEST_PACKAGES)
+ -@$(MAKE) $(AM_MAKEFLAGS) -k $(TEST_PACKAGES)
@for f in $(TEST_PACKAGES); do \
if test -f $$f-testsum; then \
cat $$f-testsum >> libgo.sum; \
@@ -3460,7 +3460,7 @@ check-multi:
$(MULTIDO) $(AM_MAKEFLAGS) DO=check-am multi-do # $(MAKE)
bench:
- -@$(MAKE) -k $(TEST_PACKAGES) GOBENCH=.
+ -@$(MAKE) $(AM_MAKEFLAGS) -k $(TEST_PACKAGES) GOBENCH=.
mostlyclean-local:
find . -name '*.lo' -print | xargs $(LIBTOOL) --mode=clean rm -f
diff --git a/libgo/configure b/libgo/configure
index 1e5e41bed21..4e838166484 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -11114,7 +11114,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11117 "configure"
+#line 11118 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11220,7 +11220,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11223 "configure"
+#line 11224 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff --git a/libgo/configure.ac b/libgo/configure.ac
index 4bfe1698d32..7b0c629653f 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -752,7 +752,7 @@ STRUCT_EPOLL_EVENT_FD_OFFSET=${libgo_cv_c_epoll_event_fd_offset}
AC_SUBST(STRUCT_EPOLL_EVENT_FD_OFFSET)
dnl Check if <sys/stat.h> uses timespec_t for st_?tim members. Introduced
-dnl in Solaris 12 for XPG7 compatibility.
+dnl in Solaris 11.4 for XPG7 compatibility.
AC_EGREP_HEADER([timespec_t.*st_atim], [sys/stat.h],
[have_stat_timespec=yes], [have_stat_timespec=no])
AM_CONDITIONAL(HAVE_STAT_TIMESPEC, test $have_stat_timespec = yes)
diff --git a/libgo/go/runtime/internal/atomic/atomic.c b/libgo/go/runtime/internal/atomic/atomic.c
index b584656f817..24820f22a42 100644
--- a/libgo/go/runtime/internal/atomic/atomic.c
+++ b/libgo/go/runtime/internal/atomic/atomic.c
@@ -34,7 +34,7 @@ uint64_t
Load64 (uint64_t *ptr)
{
if (((uintptr_t) ptr & 7) != 0)
- ptr = NULL;
+ panicmem ();
return __atomic_load_n (ptr, __ATOMIC_ACQUIRE);
}
@@ -66,7 +66,7 @@ int64_t
Loadint64 (int64_t *ptr)
{
if (((uintptr_t) ptr & 7) != 0)
- ptr = NULL;
+ panicmem ();
return __atomic_load_n (ptr, __ATOMIC_ACQUIRE);
}
@@ -88,7 +88,7 @@ uint64_t
Xadd64 (uint64_t *ptr, int64_t delta)
{
if (((uintptr_t) ptr & 7) != 0)
- ptr = NULL;
+ panicmem ();
return __atomic_add_fetch (ptr, (uint64_t) delta, __ATOMIC_SEQ_CST);
}
@@ -110,7 +110,7 @@ int64_t
Xaddint64 (int64_t *ptr, int64_t delta)
{
if (((uintptr_t) ptr & 7) != 0)
- ptr = NULL;
+ panicmem ();
return __atomic_add_fetch (ptr, delta, __ATOMIC_SEQ_CST);
}
@@ -132,7 +132,7 @@ uint64_t
Xchg64 (uint64_t *ptr, uint64_t new)
{
if (((uintptr_t) ptr & 7) != 0)
- ptr = NULL;
+ panicmem ();
return __atomic_exchange_n (ptr, new, __ATOMIC_SEQ_CST);
}
@@ -184,7 +184,7 @@ _Bool
Cas64 (uint64_t *ptr, uint64_t old, uint64_t new)
{
if (((uintptr_t) ptr & 7) != 0)
- ptr = NULL;
+ panicmem ();
return __atomic_compare_exchange_n (ptr, &old, new, false, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
}
@@ -226,7 +226,7 @@ void
Store64 (uint64_t *ptr, uint64_t val)
{
if (((uintptr_t) ptr & 7) != 0)
- ptr = NULL;
+ panicmem ();
__atomic_store_n (ptr, val, __ATOMIC_SEQ_CST);
}
diff --git a/libgo/go/runtime/panic.go b/libgo/go/runtime/panic.go
index 2f656038a9e..c39a58d0c4b 100644
--- a/libgo/go/runtime/panic.go
+++ b/libgo/go/runtime/panic.go
@@ -22,6 +22,7 @@ import (
//go:linkname makefuncreturning runtime.makefuncreturning
//go:linkname gorecover runtime.gorecover
//go:linkname deferredrecover runtime.deferredrecover
+//go:linkname panicmem runtime.panicmem
// Temporary for C code to call:
//go:linkname throw runtime.throw
diff --git a/libgo/go/sync/atomic/atomic.c b/libgo/go/sync/atomic/atomic.c
index 7e04027c3f1..32cbf03c5cf 100644
--- a/libgo/go/sync/atomic/atomic.c
+++ b/libgo/go/sync/atomic/atomic.c
@@ -26,7 +26,7 @@ int64_t
SwapInt64 (int64_t *addr, int64_t new)
{
if (((uintptr_t) addr & 7) != 0)
- addr = NULL;
+ panicmem ();
return __atomic_exchange_n (addr, new, __ATOMIC_SEQ_CST);
}
@@ -48,7 +48,7 @@ uint64_t
SwapUint64 (uint64_t *addr, uint64_t new)
{
if (((uintptr_t) addr & 7) != 0)
- addr = NULL;
+ panicmem ();
return __atomic_exchange_n (addr, new, __ATOMIC_SEQ_CST);
}
@@ -215,7 +215,7 @@ LoadInt64 (int64_t *addr)
int64_t v;
if (((uintptr_t) addr & 7) != 0)
- addr = NULL;
+ panicmem ();
v = *addr;
while (! __sync_bool_compare_and_swap (addr, v, v))
v = *addr;
@@ -247,7 +247,7 @@ LoadUint64 (uint64_t *addr)
uint64_t v;
if (((uintptr_t) addr & 7) != 0)
- addr = NULL;
+ panicmem ();
v = *addr;
while (! __sync_bool_compare_and_swap (addr, v, v))
v = *addr;
@@ -308,7 +308,7 @@ StoreInt64 (int64_t *addr, int64_t val)
int64_t v;
if (((uintptr_t) addr & 7) != 0)
- addr = NULL;
+ panicmem ();
v = *addr;
while (! __sync_bool_compare_and_swap (addr, v, val))
v = *addr;
@@ -338,7 +338,7 @@ StoreUint64 (uint64_t *addr, uint64_t val)
uint64_t v;
if (((uintptr_t) addr & 7) != 0)
- addr = NULL;
+ panicmem ();
v = *addr;
while (! __sync_bool_compare_and_swap (addr, v, val))
v = *addr;
diff --git a/libgo/mkrsysinfo.sh b/libgo/mkrsysinfo.sh
index aee0163c365..40bc34bbe4e 100755
--- a/libgo/mkrsysinfo.sh
+++ b/libgo/mkrsysinfo.sh
@@ -168,22 +168,22 @@ grep '^type _zone_net_addr_t ' gen-sysinfo.go | \
sed -e 's/_in6_addr/[16]byte/' \
>> ${OUT}
-# The Solaris 12 _flow_arp_desc_t struct.
+# The Solaris 11.4 _flow_arp_desc_t struct.
grep '^type _flow_arp_desc_t ' gen-sysinfo.go | \
sed -e 's/_in6_addr_t/[16]byte/g' \
>> ${OUT}
-# The Solaris 12 _flow_l3_desc_t struct.
+# The Solaris 11.4 _flow_l3_desc_t struct.
grep '^type _flow_l3_desc_t ' gen-sysinfo.go | \
sed -e 's/_in6_addr_t/[16]byte/g' \
>> ${OUT}
-# The Solaris 12 _mac_ipaddr_t struct.
+# The Solaris 11.3 _mac_ipaddr_t struct.
grep '^type _mac_ipaddr_t ' gen-sysinfo.go | \
sed -e 's/_in6_addr_t/[16]byte/g' \
>> ${OUT}
-# The Solaris 12 _mactun_info_t struct.
+# The Solaris 11.3 _mactun_info_t struct.
grep '^type _mactun_info_t ' gen-sysinfo.go | \
sed -e 's/_in6_addr_t/[16]byte/g' \
>> ${OUT}
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
index cbe5b979418..c3495de72f6 100755
--- a/libgo/mksysinfo.sh
+++ b/libgo/mksysinfo.sh
@@ -1295,22 +1295,22 @@ grep '^type _zone_net_addr_t ' gen-sysinfo.go | \
sed -e 's/_in6_addr/[16]byte/' \
>> ${OUT}
-# The Solaris 12 _flow_arp_desc_t struct.
+# The Solaris 11.4 _flow_arp_desc_t struct.
grep '^type _flow_arp_desc_t ' gen-sysinfo.go | \
sed -e 's/_in6_addr_t/[16]byte/g' \
>> ${OUT}
-# The Solaris 12 _flow_l3_desc_t struct.
+# The Solaris 11.4 _flow_l3_desc_t struct.
grep '^type _flow_l3_desc_t ' gen-sysinfo.go | \
sed -e 's/_in6_addr_t/[16]byte/g' \
>> ${OUT}
-# The Solaris 12 _mac_ipaddr_t struct.
+# The Solaris 11.3 _mac_ipaddr_t struct.
grep '^type _mac_ipaddr_t ' gen-sysinfo.go | \
sed -e 's/_in6_addr_t/[16]byte/g' \
>> ${OUT}
-# The Solaris 12 _mactun_info_t struct.
+# The Solaris 11.3 _mactun_info_t struct.
grep '^type _mactun_info_t ' gen-sysinfo.go | \
sed -e 's/_in6_addr_t/[16]byte/g' \
>> ${OUT}
diff --git a/libgo/runtime/runtime.h b/libgo/runtime/runtime.h
index dd5a958888f..39b5ef883bd 100644
--- a/libgo/runtime/runtime.h
+++ b/libgo/runtime/runtime.h
@@ -211,6 +211,8 @@ extern uint32 runtime_panicking(void)
extern bool runtime_isstarted;
extern bool runtime_isarchive;
+extern void panicmem(void) __asm__ (GOSYM_PREFIX "runtime.panicmem");
+
/*
* common functions and data
*/