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_ppc64x.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_ppc64x.s')
-rw-r--r-- | src/runtime/asm_ppc64x.s | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/runtime/asm_ppc64x.s b/src/runtime/asm_ppc64x.s index 754c07a84c..c367518b2d 100644 --- a/src/runtime/asm_ppc64x.s +++ b/src/runtime/asm_ppc64x.s @@ -341,24 +341,6 @@ TEXT runtime·morestack_noctxt(SB),NOSPLIT|NOFRAME,$0-0 MOVD R0, R11 BR runtime·morestack(SB) -TEXT runtime·stackBarrier(SB),NOSPLIT,$0 - // We came here via a RET to an overwritten LR. - // R3 may be live. 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 - MULLD 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. - MOVD R6, CTR - BR (CTR) - // 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 @@ -734,29 +716,13 @@ TEXT setg_gcc<>(SB),NOSPLIT|NOFRAME,$0-0 TEXT runtime·getcallerpc(SB),NOSPLIT,$8-16 MOVD FIXED_FRAME+8(R1), R3 // LR saved by caller - MOVD runtime·stackBarrierPC(SB), R4 - CMP R3, R4 - BNE nobar - // Get original return PC. - BL runtime·nextBarrierPC(SB) - MOVD FIXED_FRAME+0(R1), R3 -nobar: MOVD R3, ret+8(FP) RET TEXT runtime·setcallerpc(SB),NOSPLIT,$8-16 MOVD pc+8(FP), R3 - MOVD FIXED_FRAME+8(R1), R4 - MOVD runtime·stackBarrierPC(SB), R5 - CMP R4, R5 - BEQ setbar MOVD R3, FIXED_FRAME+8(R1) // set LR in caller RET -setbar: - // Set the stack barrier return PC. - MOVD R3, FIXED_FRAME+0(R1) - BL runtime·setNextBarrierPC(SB) - RET TEXT runtime·abort(SB),NOSPLIT|NOFRAME,$0-0 MOVW (R0), R0 |