aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_windows_amd64.s
diff options
context:
space:
mode:
authorAlex Brainman <alex.brainman@gmail.com>2015-04-14 10:48:05 +1000
committerAlex Brainman <alex.brainman@gmail.com>2015-04-15 05:03:42 +0000
commit9402e49450d57eb608f03980e7541602a346e5ae (patch)
tree2a0173a7ca8564652e2250bfd88737a8e4bfdd01 /src/runtime/sys_windows_amd64.s
parent7e7d55f888736d8dd8881852be8056cd43739291 (diff)
downloadgo-9402e49450d57eb608f03980e7541602a346e5ae.tar.xz
runtime: really pass return value to Windows in externalthreadhandler
When Windows calls externalthreadhandler it expects to receive return value in AX. We don't set AX anywhere. Change that. Store ctrlhandler1 and profileloop1 return values into AX before returning from externalthreadhandler. Fixes #10215. Change-Id: Ied04542cc3ebe7d4a26660e970f9f78098143591 Reviewed-on: https://go-review.googlesource.com/8901 Reviewed-by: Minux Ma <minux@golang.org> Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/sys_windows_amd64.s')
-rw-r--r--src/runtime/sys_windows_amd64.s2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/runtime/sys_windows_amd64.s b/src/runtime/sys_windows_amd64.s
index dd81ce055a..ea4f3e0356 100644
--- a/src/runtime/sys_windows_amd64.s
+++ b/src/runtime/sys_windows_amd64.s
@@ -250,9 +250,11 @@ TEXT runtime·externalthreadhandler(SB),NOSPLIT,$0
MOVQ CX, g_stackguard1(SP)
MOVQ DX, (g_stack+stack_hi)(SP)
+ PUSHQ AX // room for return value
PUSHQ 32(BP) // arg for handler
CALL 16(BP)
POPQ CX
+ POPQ AX // pass return value to Windows in AX
get_tls(CX)
MOVQ g(CX), CX