aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/stubs.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2020-10-03 20:40:49 -0400
committerAustin Clements <austin@google.com>2020-10-05 17:03:04 +0000
commit40bff82885b8de850f909f38357c53670562f815 (patch)
tree7fb9287e26532c35d4e19c8040e56c11de744f05 /src/runtime/stubs.go
parent9dc65d7dc9268d5150174ec55cc4753fe18f554c (diff)
downloadgo-40bff82885b8de850f909f38357c53670562f815.tar.gz
go-40bff82885b8de850f909f38357c53670562f815.zip
runtime: define and use call16 everywhere
Currently, runtime.call16 is defined and used only on 32-bit architectures, while 64-bit architectures all start at call32 and go up from there. This led to unnecessary complexity because call16's prototype needed to be in a different file, separate from all of the other call* prototypes, which in turn led to it getting out of sync with the other call* prototypes. This CL adds call16 on 64-bit architectures, bringing them all into sync, and moves the call16 prototype to live with the others. Prior to CL 31655 (in 2016), call16 couldn't be implemented on 64-bit architectures because it needed at least four words of argument space to invoke "callwritebarrier" after copying back the results. CL 31655 changed the way call* invoked the write barrier in preparation for the hybrid barrier; since the hybrid barrier had to be invoked prior to copying back results, it needed a different solution that didn't reuse call*'s stack space. At this point, call16 was no longer a problem on 64-bit, but we never added it. Until now. Change-Id: Id10ade0e4f75c6ea76afa6229ddaee2b994c27dd Reviewed-on: https://go-review.googlesource.com/c/go/+/259339 Trust: Austin Clements <austin@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/runtime/stubs.go')
-rw-r--r--src/runtime/stubs.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/runtime/stubs.go b/src/runtime/stubs.go
index b891a12fdd..bd2514e862 100644
--- a/src/runtime/stubs.go
+++ b/src/runtime/stubs.go
@@ -271,6 +271,7 @@ func return0()
// in asm_*.s
// not called directly; definitions here supply type information for traceback.
+func call16(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call32(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call64(typ, fn, arg unsafe.Pointer, n, retoffset uint32)
func call128(typ, fn, arg unsafe.Pointer, n, retoffset uint32)