]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix windows/amd64
authorRuss Cox <rsc@golang.org>
Mon, 12 Mar 2012 20:48:16 +0000 (16:48 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 12 Mar 2012 20:48:16 +0000 (16:48 -0400)
Maybe.

TBR=bradfitz
CC=golang-dev
https://golang.org/cl/5754091

src/pkg/runtime/sys_windows_amd64.s

index 2ddc1c82f37973feb8c52cb555c3a5ba485912ee..c8402d70e6360956edb15b96fa4ae1d46a079a4d 100644 (file)
@@ -116,7 +116,7 @@ TEXT runtime·setlasterror(SB),7,$0
        MOVL    AX, 0x68(CX)
        RET
 
-TEXT runtime·sigtramp(SB),7,$56
+TEXT runtime·sigtramp(SB),7,$0
        // CX: exception record
        // R8: context
 
@@ -125,7 +125,12 @@ TEXT runtime·sigtramp(SB),7,$56
        MOVL    $1, AX
        JNZ     sigdone
 
-       // copy arguments for call to sighandler
+       // copy arguments for call to sighandler.
+
+       // Stack adjustment is here to hide from 6l,
+       // which doesn't understand that sigtramp
+       // runs on essentially unlimited stack.
+       SUBQ    $56, SP
        MOVQ    CX, 0(SP)
        MOVQ    R8, 8(SP)
 
@@ -151,6 +156,8 @@ TEXT runtime·sigtramp(SB),7,$56
        MOVQ    32(SP), BP
        MOVQ    40(SP), SI
        MOVQ    48(SP), DI
+       ADDQ    $56, SP
+
 sigdone:
        RET