diff options
author | Alex Brainman <alex.brainman@gmail.com> | 2015-04-14 10:48:05 +1000 |
---|---|---|
committer | Alex Brainman <alex.brainman@gmail.com> | 2015-04-15 05:03:42 +0000 |
commit | 9402e49450d57eb608f03980e7541602a346e5ae (patch) | |
tree | 2a0173a7ca8564652e2250bfd88737a8e4bfdd01 /src/runtime/sys_windows_386.s | |
parent | 7e7d55f888736d8dd8881852be8056cd43739291 (diff) | |
download | go-9402e49450d57eb608f03980e7541602a346e5ae.tar.gz go-9402e49450d57eb608f03980e7541602a346e5ae.zip |
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_386.s')
-rw-r--r-- | src/runtime/sys_windows_386.s | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/runtime/sys_windows_386.s b/src/runtime/sys_windows_386.s index 5f4a63bcdd..e5fe88afd8 100644 --- a/src/runtime/sys_windows_386.s +++ b/src/runtime/sys_windows_386.s @@ -213,9 +213,11 @@ TEXT runtime·externalthreadhandler(SB),NOSPLIT,$0 MOVL CX, g_stackguard1(SP) MOVL DX, (g_stack+stack_hi)(SP) + PUSHL AX // room for return value PUSHL 16(BP) // arg for handler CALL 8(BP) POPL CX + POPL AX // pass return value to Windows in AX get_tls(CX) MOVL g(CX), CX |