diff options
| author | Austin Clements <austin@google.com> | 2021-07-30 16:40:17 -0400 |
|---|---|---|
| committer | Austin Clements <austin@google.com> | 2021-07-30 21:51:49 +0000 |
| commit | e3e9f0bb2d6cc15b201fe2e0a0ac095d62cf4b8c (patch) | |
| tree | 1c5960b23d5810b75637928c33a6bd4c6357e8c1 /src/runtime/asm_arm64.s | |
| parent | 40e561d9337afbae221b34d6d0811761f32412f6 (diff) | |
| download | go-e3e9f0bb2d6cc15b201fe2e0a0ac095d62cf4b8c.tar.xz | |
[dev.typeparams] Revert "[dev.typeparams] runtime,cmd/compile,cmd/link: replace jmpdefer with a loop"
This reverts CL 227652.
I'm reverting CL 337651 and this builds on top of it.
Change-Id: I03ce363be44c2a3defff2e43e7b1aad83386820d
Reviewed-on: https://go-review.googlesource.com/c/go/+/338709
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/runtime/asm_arm64.s')
| -rw-r--r-- | src/runtime/asm_arm64.s | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/runtime/asm_arm64.s b/src/runtime/asm_arm64.s index e51ce2f831..e7c5fa3225 100644 --- a/src/runtime/asm_arm64.s +++ b/src/runtime/asm_arm64.s @@ -982,6 +982,23 @@ again: CBNZ R0, again RET +// void jmpdefer(fv, sp); +// called from deferreturn. +// 1. grab stored LR for caller +// 2. sub 4 bytes to get back to BL deferreturn +// 3. BR to fn +TEXT runtime·jmpdefer(SB), NOSPLIT|NOFRAME, $0-16 + MOVD 0(RSP), R0 + SUB $4, R0 + MOVD R0, LR + + MOVD fv+0(FP), R26 + MOVD argp+8(FP), R0 + MOVD R0, RSP + SUB $8, RSP + MOVD 0(R26), R3 + B (R3) + // Save state of caller into g->sched, // but using fake PC from systemstack_switch. // Must only be called from functions with no locals ($0) |
