diff options
author | Than McIntosh <thanm@google.com> | 2020-10-14 08:36:11 -0400 |
---|---|---|
committer | Than McIntosh <thanm@google.com> | 2020-10-30 17:41:35 +0000 |
commit | a313eec3869c609c0da2402a4cac2d32113d599c (patch) | |
tree | b7da1095459d0af37ffef04a17ccb17491b0cf1c /src/runtime/preempt_riscv64.s | |
parent | 1af388f1c0a3f61903ea55098c135d153aac5ae7 (diff) | |
download | go-a313eec3869c609c0da2402a4cac2d32113d599c.tar.gz go-a313eec3869c609c0da2402a4cac2d32113d599c.zip |
reflect,runtime: use internal ABI for selected ASM routines, attempt 2
[This is a roll-forward of CL 262319, with a fix for some Darwin test
failures].
Change the definitions of selected runtime assembly routines
from ABI0 (the default) to ABIInternal. The ABIInternal def is
intended to indicate that these functions don't follow the existing Go
runtime ABI. In addition, convert the assembly reference to
runtime.main (from runtime.mainPC) to ABIInternal. Finally, for
functions such as "runtime.duffzero" that are called directly from
generated code, make sure that the compiler looks up the correct
ABI version.
This is intended to support the register abi work, however these
changes should not have any issues even when GOEXPERIMENT=regabi is
not in effect.
Updates #27539, #40724.
Change-Id: Idf507f1c06176073563845239e1a54dad51a9ea9
Reviewed-on: https://go-review.googlesource.com/c/go/+/266638
Trust: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src/runtime/preempt_riscv64.s')
-rw-r--r-- | src/runtime/preempt_riscv64.s | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime/preempt_riscv64.s b/src/runtime/preempt_riscv64.s index eb68dcba2b..d4f9cc277f 100644 --- a/src/runtime/preempt_riscv64.s +++ b/src/runtime/preempt_riscv64.s @@ -3,7 +3,8 @@ #include "go_asm.h" #include "textflag.h" -TEXT ·asyncPreempt(SB),NOSPLIT|NOFRAME,$0-0 +// Note: asyncPreempt doesn't use the internal ABI, but we must be able to inject calls to it from the signal handler, so Go code has to see the PC of this function literally. +TEXT ·asyncPreempt<ABIInternal>(SB),NOSPLIT|NOFRAME,$0-0 MOV X1, -472(X2) ADD $-472, X2 MOV X3, 8(X2) |