]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: debugging help on 386
authorRuss Cox <rsc@golang.org>
Tue, 7 Dec 2010 22:19:36 +0000 (17:19 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 7 Dec 2010 22:19:36 +0000 (17:19 -0500)
R=r
CC=golang-dev
https://golang.org/cl/3502041

src/pkg/runtime/386/asm.s

index deb7b12f92a7e3d71ef2591a3fa4ee157999ebb8..84f5367e5148832c37f55afcce3d3933feef45c4 100644 (file)
@@ -177,7 +177,9 @@ TEXT runtime·morestack(SB),7,$0
        // Call newstack on m's scheduling stack.
        MOVL    m_g0(BX), BP
        MOVL    BP, g(CX)
-       MOVL    (m_sched+gobuf_sp)(BX), SP
+       MOVL    (m_sched+gobuf_sp)(BX), AX
+       MOVL    -4(AX), BX      // fault if CALL would, before smashing SP
+       MOVL    AX, SP
        CALL    runtime·newstack(SB)
        MOVL    $0, 0x1003      // crash if newstack returns
        RET