aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2021-01-03 21:40:04 +0100
committerThomas Koenig <tkoenig@gcc.gnu.org>2021-01-03 21:40:04 +0100
commitafae4a55ccaa0de95ea11e5f634084db6ab2f444 (patch)
treed632cc867d10410ba9fb750523be790b86846ac4 /libgo/runtime
parent9d9a82ec8478ff52c7a9d61f58cd2a7b6295b5f9 (diff)
parentd2eb616a0f7bea78164912aa438c29fe1ef5774a (diff)
downloadgcc-afae4a55ccaa0de95ea11e5f634084db6ab2f444.zip
gcc-afae4a55ccaa0de95ea11e5f634084db6ab2f444.tar.gz
gcc-afae4a55ccaa0de95ea11e5f634084db6ab2f444.tar.bz2
Merge branch 'master' into devel/coarray_native
Diffstat (limited to 'libgo/runtime')
-rw-r--r--libgo/runtime/go-caller.c7
-rw-r--r--libgo/runtime/go-cdiv.c49
-rw-r--r--libgo/runtime/go-ffi.c30
-rw-r--r--libgo/runtime/go-fieldtrack.c2
-rw-r--r--libgo/runtime/go-setenv.c2
-rw-r--r--libgo/runtime/go-unsafe-pointer.c4
-rw-r--r--libgo/runtime/go-unsetenv.c2
-rw-r--r--libgo/runtime/proc.c3
-rw-r--r--libgo/runtime/runtime.h2
9 files changed, 27 insertions, 74 deletions
diff --git a/libgo/runtime/go-caller.c b/libgo/runtime/go-caller.c
index a187876..f1077df 100644
--- a/libgo/runtime/go-caller.c
+++ b/libgo/runtime/go-caller.c
@@ -65,10 +65,9 @@ callback (void *data, uintptr_t pc __attribute__ ((unused)),
if (c->index == 0)
{
- /* If there are more frames after the indexed one, and we should
- skip this one, then skip it. */
- if (c->more
- && c->fn.len > 0
+ /* If we should skip the frame we have, then see if we can get
+ another one. */
+ if (c->fn.len > 0
&& runtime_skipInCallback((const char *) c->fn.str, NULL))
return 0;
diff --git a/libgo/runtime/go-cdiv.c b/libgo/runtime/go-cdiv.c
deleted file mode 100644
index 0355e26..0000000
--- a/libgo/runtime/go-cdiv.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* go-cdiv.c -- complex division routines
-
- Copyright 2013 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 <complex.h>
-#include <math.h>
-
-/* Calls to these functions are generated by the Go frontend for
- division of complex64 or complex128. We use these because Go's
- complex division expects slightly different results from the GCC
- default. When dividing NaN+1.0i / 0+0i, Go expects NaN+NaNi but
- GCC generates NaN+Infi. NaN+Infi seems wrong seems the rules of
- C99 Annex G specify that if either side of a complex number is Inf,
- the the whole number is Inf, but an operation involving NaN ought
- to result in NaN, not Inf. */
-
-complex float
-__go_complex64_div (complex float a, complex float b)
-{
- if (__builtin_expect (b == 0, 0))
- {
- if (!isinf (crealf (a))
- && !isinf (cimagf (a))
- && (isnan (crealf (a)) || isnan (cimagf (a))))
- {
- /* Pass "1" to nanf to match math/bits.go. */
- return nanf("1") + nanf("1")*I;
- }
- }
- return a / b;
-}
-
-complex double
-__go_complex128_div (complex double a, complex double b)
-{
- if (__builtin_expect (b == 0, 0))
- {
- if (!isinf (creal (a))
- && !isinf (cimag (a))
- && (isnan (creal (a)) || isnan (cimag (a))))
- {
- /* Pass "1" to nan to match math/bits.go. */
- return nan("1") + nan("1")*I;
- }
- }
- return a / b;
-}
diff --git a/libgo/runtime/go-ffi.c b/libgo/runtime/go-ffi.c
index b030f5e..1ec5f87 100644
--- a/libgo/runtime/go-ffi.c
+++ b/libgo/runtime/go-ffi.c
@@ -16,36 +16,36 @@
the libffi type values. */
ffi_type *go_ffi_type_pointer(void) __attribute__ ((no_split_stack));
-ffi_type *go_ffi_type_pointer(void) __asm__ ("runtime.ffi_type_pointer");
+ffi_type *go_ffi_type_pointer(void) __asm__ ("runtime.ffi__type__pointer");
ffi_type *go_ffi_type_sint8(void) __attribute__ ((no_split_stack));
-ffi_type *go_ffi_type_sint8(void) __asm__ ("runtime.ffi_type_sint8");
+ffi_type *go_ffi_type_sint8(void) __asm__ ("runtime.ffi__type__sint8");
ffi_type *go_ffi_type_sint16(void) __attribute__ ((no_split_stack));
-ffi_type *go_ffi_type_sint16(void) __asm__ ("runtime.ffi_type_sint16");
+ffi_type *go_ffi_type_sint16(void) __asm__ ("runtime.ffi__type__sint16");
ffi_type *go_ffi_type_sint32(void) __attribute__ ((no_split_stack));
-ffi_type *go_ffi_type_sint32(void) __asm__ ("runtime.ffi_type_sint32");
+ffi_type *go_ffi_type_sint32(void) __asm__ ("runtime.ffi__type__sint32");
ffi_type *go_ffi_type_sint64(void) __attribute__ ((no_split_stack));
-ffi_type *go_ffi_type_sint64(void) __asm__ ("runtime.ffi_type_sint64");
+ffi_type *go_ffi_type_sint64(void) __asm__ ("runtime.ffi__type__sint64");
ffi_type *go_ffi_type_uint8(void) __attribute__ ((no_split_stack));
-ffi_type *go_ffi_type_uint8(void) __asm__ ("runtime.ffi_type_uint8");
+ffi_type *go_ffi_type_uint8(void) __asm__ ("runtime.ffi__type__uint8");
ffi_type *go_ffi_type_uint16(void) __attribute__ ((no_split_stack));
-ffi_type *go_ffi_type_uint16(void) __asm__ ("runtime.ffi_type_uint16");
+ffi_type *go_ffi_type_uint16(void) __asm__ ("runtime.ffi__type__uint16");
ffi_type *go_ffi_type_uint32(void) __attribute__ ((no_split_stack));
-ffi_type *go_ffi_type_uint32(void) __asm__ ("runtime.ffi_type_uint32");
+ffi_type *go_ffi_type_uint32(void) __asm__ ("runtime.ffi__type__uint32");
ffi_type *go_ffi_type_uint64(void) __attribute__ ((no_split_stack));
-ffi_type *go_ffi_type_uint64(void) __asm__ ("runtime.ffi_type_uint64");
+ffi_type *go_ffi_type_uint64(void) __asm__ ("runtime.ffi__type__uint64");
ffi_type *go_ffi_type_float(void) __attribute__ ((no_split_stack));
-ffi_type *go_ffi_type_float(void) __asm__ ("runtime.ffi_type_float");
+ffi_type *go_ffi_type_float(void) __asm__ ("runtime.ffi__type__float");
ffi_type *go_ffi_type_double(void) __attribute__ ((no_split_stack));
-ffi_type *go_ffi_type_double(void) __asm__ ("runtime.ffi_type_double");
+ffi_type *go_ffi_type_double(void) __asm__ ("runtime.ffi__type__double");
ffi_type *go_ffi_type_complex_float(void) __attribute__ ((no_split_stack));
-ffi_type *go_ffi_type_complex_float(void) __asm__ ("runtime.ffi_type_complex_float");
+ffi_type *go_ffi_type_complex_float(void) __asm__ ("runtime.ffi__type__complex__float");
ffi_type *go_ffi_type_complex_double(void) __attribute__ ((no_split_stack));
-ffi_type *go_ffi_type_complex_double(void) __asm__ ("runtime.ffi_type_complex_double");
+ffi_type *go_ffi_type_complex_double(void) __asm__ ("runtime.ffi__type__complex__double");
ffi_type *go_ffi_type_void(void) __attribute__ ((no_split_stack));
-ffi_type *go_ffi_type_void(void) __asm__ ("runtime.ffi_type_void");
+ffi_type *go_ffi_type_void(void) __asm__ ("runtime.ffi__type__void");
_Bool go_ffi_supports_complex(void) __attribute__ ((no_split_stack));
-_Bool go_ffi_supports_complex(void) __asm__ ("runtime.ffi_supports_complex");
+_Bool go_ffi_supports_complex(void) __asm__ ("runtime.ffi__supports__complex");
ffi_type *
go_ffi_type_pointer(void)
diff --git a/libgo/runtime/go-fieldtrack.c b/libgo/runtime/go-fieldtrack.c
index 22f091b..80be27c 100644
--- a/libgo/runtime/go-fieldtrack.c
+++ b/libgo/runtime/go-fieldtrack.c
@@ -31,7 +31,7 @@ extern void *mapassign (const struct maptype *, void *hmap, const void *key)
// The type descriptor for map[string] bool. */
extern const char map_string_bool[] __attribute__ ((weak));
extern const char map_string_bool[]
- __asm__ (GOSYM_PREFIX "type..map.6string.7bool");
+ __asm__ (GOSYM_PREFIX "type..map_6string_7bool");
void runtime_Fieldtrack (void *) __asm__ (GOSYM_PREFIX "runtime.Fieldtrack");
diff --git a/libgo/runtime/go-setenv.c b/libgo/runtime/go-setenv.c
index 81b1775..08987de 100644
--- a/libgo/runtime/go-setenv.c
+++ b/libgo/runtime/go-setenv.c
@@ -13,7 +13,7 @@
/* Set the C environment from Go. This is called by syscall.Setenv. */
-void setenv_c (String, String) __asm__ (GOSYM_PREFIX "syscall.setenv_c");
+void setenv_c (String, String) __asm__ (GOSYM_PREFIX "syscall.setenv__c");
void
setenv_c (String k, String v)
diff --git a/libgo/runtime/go-unsafe-pointer.c b/libgo/runtime/go-unsafe-pointer.c
index 364878e..e24bfb2 100644
--- a/libgo/runtime/go-unsafe-pointer.c
+++ b/libgo/runtime/go-unsafe-pointer.c
@@ -72,7 +72,7 @@ const struct _type unsafe_Pointer =
it to be defined elsewhere. */
extern const struct ptrtype pointer_unsafe_Pointer
- __asm__ (GOSYM_PREFIX "type...1unsafe.Pointer");
+ __asm__ (GOSYM_PREFIX "unsafe.Pointer..p");
/* The reflection string. */
#define PREFLECTION "*unsafe.Pointer"
@@ -83,7 +83,7 @@ static const String preflection_string =
};
extern const byte pointer_unsafe_Pointer_gc[]
- __asm__ (GOSYM_PREFIX "type...1unsafe.Pointer..g");
+ __asm__ (GOSYM_PREFIX "unsafe.Pointer..p..g");
const byte pointer_unsafe_Pointer_gc[] = { 1 };
diff --git a/libgo/runtime/go-unsetenv.c b/libgo/runtime/go-unsetenv.c
index 2135997..4b5058a 100644
--- a/libgo/runtime/go-unsetenv.c
+++ b/libgo/runtime/go-unsetenv.c
@@ -14,7 +14,7 @@
/* Unset an environment variable from Go. This is called by
syscall.Unsetenv. */
-void unsetenv_c (String) __asm__ (GOSYM_PREFIX "syscall.unsetenv_c");
+void unsetenv_c (String) __asm__ (GOSYM_PREFIX "syscall.unsetenv__c");
void
unsetenv_c (String k)
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c
index 274ce01..c037df6 100644
--- a/libgo/runtime/proc.c
+++ b/libgo/runtime/proc.c
@@ -222,6 +222,9 @@ runtime_m(void)
}
// Set g.
+
+void runtime_setg(G*) __attribute__ ((no_split_stack));
+
void
runtime_setg(G* gp)
{
diff --git a/libgo/runtime/runtime.h b/libgo/runtime/runtime.h
index f46eaea..3a65d44 100644
--- a/libgo/runtime/runtime.h
+++ b/libgo/runtime/runtime.h
@@ -440,7 +440,7 @@ void runtime_freedefer(Defer*);
extern void _cgo_wait_runtime_init_done (void);
extern void _cgo_notify_runtime_init_done (void)
- __asm__ (GOSYM_PREFIX "runtime._cgo_notify_runtime_init_done");
+ __asm__ (GOSYM_PREFIX "runtime.__cgo__notify__runtime__init__done");
extern _Bool runtime_iscgo;
extern uintptr __go_end __attribute__ ((weak));
extern void *getitab(const struct _type *, const struct _type *, _Bool)