aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_windows_amd64.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/sys_windows_amd64.s')
-rw-r--r--src/runtime/sys_windows_amd64.s6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/sys_windows_amd64.s b/src/runtime/sys_windows_amd64.s
index 6d26bd3447..4a14b45c63 100644
--- a/src/runtime/sys_windows_amd64.s
+++ b/src/runtime/sys_windows_amd64.s
@@ -29,6 +29,11 @@ TEXT runtimeĀ·asmstdcall(SB),NOSPLIT,$16
SUBQ $(const_maxArgs*8), SP // room for args
+ // Fast version, do not store args on the stack nor
+ // load them into registers.
+ CMPL CX, $0
+ JE docall
+
// Fast version, do not store args on the stack.
CMPL CX, $4
JLE loadregs
@@ -59,6 +64,7 @@ loadregs:
MOVQ R8, X2
MOVQ R9, X3
+docall:
// Call stdcall function.
CALL AX