diff options
author | David Crawshaw <crawshaw@golang.org> | 2016-10-26 13:29:39 -0400 |
---|---|---|
committer | David Crawshaw <crawshaw@golang.org> | 2016-10-28 13:13:08 +0000 |
commit | 9c02c75639b893cea6dbce1092d07e886ec5f44e (patch) | |
tree | ca7eec14ca5471d8b245ecde83e2836f5e0064e0 /src/runtime/sys_windows_amd64.s | |
parent | dd500193d3e96e6bc9700fd43fc68b55e662d7c1 (diff) | |
download | go-9c02c75639b893cea6dbce1092d07e886ec5f44e.tar.gz go-9c02c75639b893cea6dbce1092d07e886ec5f44e.zip |
runtime: pass windows float syscall args via XMM
Based on the calling convention documented in:
https://msdn.microsoft.com/en-us/library/zthk2dkh.aspx
and long-used in golang.org/x/mobile/gl via some fixup asm:
https://go.googlesource.com/mobile/+/master/gl/work_windows_amd64.s
Fixes #6510
Change-Id: I97e81baaa2872bcd732b1308915eb66f1ba2168f
Reviewed-on: https://go-review.googlesource.com/32173
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Minux Ma <minux@golang.org>
Diffstat (limited to 'src/runtime/sys_windows_amd64.s')
-rw-r--r-- | src/runtime/sys_windows_amd64.s | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/runtime/sys_windows_amd64.s b/src/runtime/sys_windows_amd64.s index 9c197379fb..9679099c4e 100644 --- a/src/runtime/sys_windows_amd64.s +++ b/src/runtime/sys_windows_amd64.s @@ -45,6 +45,14 @@ loadregs: MOVQ 8(SI), DX MOVQ 16(SI), R8 MOVQ 24(SI), R9 + // Floating point arguments are passed in the XMM + // registers. Set them here in case any of the arguments + // are floating point values. For details see + // https://msdn.microsoft.com/en-us/library/zthk2dkh.aspx + MOVQ CX, X0 + MOVQ DX, X1 + MOVQ R8, X2 + MOVQ R9, X3 // Call stdcall function. CALL AX |