diff options
author | Austin Clements <austin@google.com> | 2017-02-09 14:03:49 -0500 |
---|---|---|
committer | Austin Clements <austin@google.com> | 2017-02-14 15:52:54 +0000 |
commit | d089a6c7187f1ff85277515405ec6c641588a7ff (patch) | |
tree | 2eb4d16038ec3ade478a83249cc879898efd5b8b /src/runtime/asm_arm64.s | |
parent | c5ebcd2c8ac6c5bdf85ec0a346974efd4b0cbe49 (diff) | |
download | go-d089a6c7187f1ff85277515405ec6c641588a7ff.tar.gz go-d089a6c7187f1ff85277515405ec6c641588a7ff.zip |
runtime: remove stack barriers
Now that we don't rescan stacks, stack barriers are unnecessary. This
removes all of the code and structures supporting them as well as
tests that were specifically for stack barriers.
Updates #17503.
Change-Id: Ia29221730e0f2bbe7beab4fa757f31a032d9690c
Reviewed-on: https://go-review.googlesource.com/36620
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/asm_arm64.s')
-rw-r--r-- | src/runtime/asm_arm64.s | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/runtime/asm_arm64.s b/src/runtime/asm_arm64.s index 5f2d4a5681..05d5ab20b0 100644 --- a/src/runtime/asm_arm64.s +++ b/src/runtime/asm_arm64.s @@ -315,23 +315,6 @@ TEXT runtime·morestack_noctxt(SB),NOSPLIT,$-4-0 MOVW $0, R26 B runtime·morestack(SB) -TEXT runtime·stackBarrier(SB),NOSPLIT,$0 - // We came here via a RET to an overwritten LR. - // R0 may be live (see return0). Other registers are available. - - // Get the original return PC, g.stkbar[g.stkbarPos].savedLRVal. - MOVD (g_stkbar+slice_array)(g), R4 - MOVD g_stkbarPos(g), R5 - MOVD $stkbar__size, R6 - MUL R5, R6 - ADD R4, R6 - MOVD stkbar_savedLRVal(R6), R6 - // Record that this stack barrier was hit. - ADD $1, R5 - MOVD R5, g_stkbarPos(g) - // Jump to the original return PC. - B (R6) - // reflectcall: call a function with the given argument list // func call(argtype *_type, f *FuncVal, arg *byte, argsize, retoffset uint32). // we don't have variable-sized frames, so we use a small number @@ -723,29 +706,13 @@ TEXT setg_gcc<>(SB),NOSPLIT,$8 TEXT runtime·getcallerpc(SB),NOSPLIT,$8-16 MOVD 16(RSP), R0 // LR saved by caller - MOVD runtime·stackBarrierPC(SB), R1 - CMP R0, R1 - BNE nobar - // Get original return PC. - BL runtime·nextBarrierPC(SB) - MOVD 8(RSP), R0 -nobar: MOVD R0, ret+8(FP) RET TEXT runtime·setcallerpc(SB),NOSPLIT,$8-16 MOVD pc+8(FP), R0 - MOVD 16(RSP), R1 - MOVD runtime·stackBarrierPC(SB), R2 - CMP R1, R2 - BEQ setbar MOVD R0, 16(RSP) // set LR in caller RET -setbar: - // Set the stack barrier return PC. - MOVD R0, 8(RSP) - BL runtime·setNextBarrierPC(SB) - RET TEXT runtime·abort(SB),NOSPLIT,$-8-0 B (ZR) |