Commit ef4666ec authored by Russ Cox's avatar Russ Cox

runtime: fix windows-amd64-2012 build

I forgot that in Go assembly, x+16(SP) is not the same as 16(SP).
The former is the virtual stack pointer (one word below FP on x86)
while the latter is the actual stack pointer.

Change-Id: Ibb7012bb97261949f5e1a0dc70869d9a6f50aa99
Reviewed-on: https://go-review.googlesource.com/c/go/+/176557
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 1d1ff469
......@@ -135,7 +135,8 @@ var (
// to start new os thread.
func tstart_stdcall(newm *m)
func ctrlhandler(_type uint32)
// Called by OS using stdcall ABI.
func ctrlhandler()
type mOS struct {
waitsema uintptr // semaphore for parking on locks
......
......@@ -211,7 +211,7 @@ TEXT runtime·lastcontinuetramp(SB),NOSPLIT|NOFRAME,$0-0
JMP sigtramp<>(SB)
TEXT runtime·ctrlhandler(SB),NOSPLIT|NOFRAME,$8
MOVQ CX, _type+16(SP) // spill
MOVQ CX, 16(SP) // spill
MOVQ $runtime·ctrlhandler1(SB), CX
MOVQ CX, 0(SP)
CALL runtime·externalthreadhandler(SB)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment