From 2d3cc97c9c7ced9d13d99611c3f3a69b4c81fbba Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 12 Mar 2012 16:48:16 -0400 Subject: [PATCH] runtime: fix windows/amd64 Maybe. TBR=bradfitz CC=golang-dev https://golang.org/cl/5754091 --- src/pkg/runtime/sys_windows_amd64.s | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/pkg/runtime/sys_windows_amd64.s b/src/pkg/runtime/sys_windows_amd64.s index 2ddc1c82f37..c8402d70e63 100644 --- a/src/pkg/runtime/sys_windows_amd64.s +++ b/src/pkg/runtime/sys_windows_amd64.s @@ -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