1 // Copyright 2018 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
9 // func servicemain(argc uint32, argv **uint16)
10 TEXT ·servicemain(SB),NOSPLIT|NOFRAME,$0
11 MOVM.DB.W [R4, R14], (R13) // push {r4, lr}
13 BIC $0x7, R13 // alignment for ABI
19 MOVW ·ctlHandlerExProc(SB), R1
21 MOVW ·cRegisterServiceCtrlHandlerExW(SB), R3
25 MOVW R0, ·ssHandle(SB)
27 MOVW ·goWaitsH(SB), R0
28 MOVW ·cSetEvent(SB), R1
33 MOVW ·cWaitForSingleObject(SB), R2
37 MOVW R4, R13 // free extra stack space
38 MOVM.IA.W (R13), [R4, R15] // pop {r4, pc}