diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-08-24 18:15:04 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-08-24 18:15:04 +0000 |
commit | 1d29bb0408506480e13afeca2ec6b8611e6a0ce7 (patch) | |
tree | 1aba1d63f8e8f960b6130e1f8a595548106b1403 /libgo/runtime | |
parent | 9ca2ac699ab2eee4ef6a2904426fa38f58af5a0b (diff) | |
download | gcc-1d29bb0408506480e13afeca2ec6b8611e6a0ce7.zip gcc-1d29bb0408506480e13afeca2ec6b8611e6a0ce7.tar.gz gcc-1d29bb0408506480e13afeca2ec6b8611e6a0ce7.tar.bz2 |
runtime: remove the dummy arg of getcallersp
This is a port of https://golang.org/cl/109596 to the gofrontend, in
preparation for updating libgo to 1.11.
Original CL description:
getcallersp is intrinsified, and so the dummy arg is no longer
needed. Remove it, as well as a few dummy args that are solely
to feed getcallersp.
Reviewed-on: https://go-review.googlesource.com/131116
From-SVN: r263840
Diffstat (limited to 'libgo/runtime')
-rw-r--r-- | libgo/runtime/proc.c | 18 | ||||
-rw-r--r-- | libgo/runtime/runtime.h | 10 |
2 files changed, 13 insertions, 15 deletions
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c index 913ce5c..d8d231b 100644 --- a/libgo/runtime/proc.c +++ b/libgo/runtime/proc.c @@ -382,7 +382,7 @@ extern void kickoff(void) __asm__(GOSYM_PREFIX "runtime.kickoff"); extern void minit(void) __asm__(GOSYM_PREFIX "runtime.minit"); -extern void mstart1(int32) +extern void mstart1() __asm__(GOSYM_PREFIX "runtime.mstart1"); extern void stopm(void) __asm__(GOSYM_PREFIX "runtime.stopm"); @@ -542,7 +542,7 @@ runtime_mstart(void *arg) } #endif - mstart1(0); + mstart1(); // mstart1 does not return, but we need a return statement // here to avoid a compiler warning. @@ -621,12 +621,12 @@ makeGContext(G* gp, byte* sp, uintptr spsize) { // make g->sched refer to the caller's stack segment, because // entersyscall is going to return immediately after. -void runtime_entersyscall(int32) __attribute__ ((no_split_stack)); +void runtime_entersyscall() __attribute__ ((no_split_stack)); static void doentersyscall(uintptr, uintptr) __attribute__ ((no_split_stack, noinline)); void -runtime_entersyscall(int32 dummy __attribute__ ((unused))) +runtime_entersyscall() { // Save the registers in the g structure so that any pointers // held in registers will be seen by the garbage collector. @@ -638,8 +638,8 @@ runtime_entersyscall(int32 dummy __attribute__ ((unused))) // callee-saved registers to access the TLS variable g. We // don't want to put the ucontext_t on the stack because it is // large and we can not split the stack here. - doentersyscall((uintptr)runtime_getcallerpc(&dummy), - (uintptr)runtime_getcallersp(&dummy)); + doentersyscall((uintptr)runtime_getcallerpc(), + (uintptr)runtime_getcallersp()); } static void @@ -672,15 +672,15 @@ static void doentersyscallblock(uintptr, uintptr) // The same as runtime_entersyscall(), but with a hint that the syscall is blocking. void -runtime_entersyscallblock(int32 dummy __attribute__ ((unused))) +runtime_entersyscallblock() { // Save the registers in the g structure so that any pointers // held in registers will be seen by the garbage collector. getcontext(ucontext_arg(&g->gcregs[0])); // See comment in runtime_entersyscall. - doentersyscallblock((uintptr)runtime_getcallerpc(&dummy), - (uintptr)runtime_getcallersp(&dummy)); + doentersyscallblock((uintptr)runtime_getcallerpc(), + (uintptr)runtime_getcallersp()); } static void diff --git a/libgo/runtime/runtime.h b/libgo/runtime/runtime.h index 0ffcf4b..0856618 100644 --- a/libgo/runtime/runtime.h +++ b/libgo/runtime/runtime.h @@ -268,7 +268,7 @@ void* runtime_sysAlloc(uintptr, uint64*) void runtime_sysFree(void*, uintptr, uint64*) __asm__ (GOSYM_PREFIX "runtime.sysFree"); void runtime_mprofinit(void); -#define runtime_getcallersp(p) __builtin_frame_address(0) +#define runtime_getcallersp() __builtin_frame_address(0) void runtime_mcall(FuncVal*) __asm__ (GOSYM_PREFIX "runtime.mcall"); int32 runtime_timediv(int64, int32, int32*) @@ -305,12 +305,10 @@ void runtime_schedtrace(bool) void runtime_goparkunlock(Lock*, String, byte, intgo) __asm__ (GOSYM_PREFIX "runtime.goparkunlock"); void runtime_tsleep(int64, const char*); -void runtime_entersyscall(int32) +void runtime_entersyscall() __asm__ (GOSYM_PREFIX "runtime.entersyscall"); -void runtime_entersyscallblock(int32) +void runtime_entersyscallblock() __asm__ (GOSYM_PREFIX "runtime.entersyscallblock"); -void runtime_exitsyscall(int32) - __asm__ (GOSYM_PREFIX "runtime.exitsyscall"); G* __go_go(void (*pfn)(void*), void*); int32 runtime_callers(int32, Location*, int32, bool keep_callers); int64 runtime_nanotime(void) // monotonic time @@ -385,7 +383,7 @@ bool runtime_notetsleepg(Note*, int64) // false - timeout #define runtime_munmap munmap #define runtime_madvise madvise #define runtime_memclr(buf, size) __builtin_memset((buf), 0, (size)) -#define runtime_getcallerpc(p) __builtin_return_address(0) +#define runtime_getcallerpc() __builtin_return_address(0) #ifdef __rtems__ void __wrap_rtems_task_variable_add(void **); |