summaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/sys/windows/svc/sys_windows_arm64.s
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/sys/windows/svc/sys_windows_arm64.s')
-rw-r--r--vendor/golang.org/x/sys/windows/svc/sys_windows_arm64.s31
1 files changed, 31 insertions, 0 deletions
diff --git a/vendor/golang.org/x/sys/windows/svc/sys_windows_arm64.s b/vendor/golang.org/x/sys/windows/svc/sys_windows_arm64.s
new file mode 100644
index 0000000..3ca540e
--- /dev/null
+++ b/vendor/golang.org/x/sys/windows/svc/sys_windows_arm64.s
@@ -0,0 +1,31 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "textflag.h"
+
+// func servicemain(argc uint32, argv **uint16)
+TEXT ·servicemain(SB),NOSPLIT|NOFRAME,$0
+ MOVD R0, ·sArgc(SB)
+ MOVD R1, ·sArgv(SB)
+
+ MOVD ·sName(SB), R0
+ MOVD ·ctlHandlerExProc(SB), R1
+ MOVD $0, R2
+ MOVD ·cRegisterServiceCtrlHandlerExW(SB), R3
+ BL (R3)
+ CMP $0, R0
+ BEQ exit
+ MOVD R0, ·ssHandle(SB)
+
+ MOVD ·goWaitsH(SB), R0
+ MOVD ·cSetEvent(SB), R1
+ BL (R1)
+
+ MOVD ·cWaitsH(SB), R0
+ MOVD $-1, R1
+ MOVD ·cWaitForSingleObject(SB), R2
+ BL (R2)
+
+exit:
+ RET