mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-02 23:27:31 -04:00
windows: add support for windows/arm
Updates golang/go#26148 Change-Id: I0425244bfb0c8f600a6f02d9d7b228e175a720a4 Reviewed-on: https://go-review.googlesource.com/127665 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
f02c79500a
commit
90868a75fe
@@ -0,0 +1,11 @@
|
|||||||
|
// 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"
|
||||||
|
|
||||||
|
TEXT ·getprocaddress(SB),NOSPLIT,$0
|
||||||
|
B syscall·getprocaddress(SB)
|
||||||
|
|
||||||
|
TEXT ·loadlibrary(SB),NOSPLIT,$0
|
||||||
|
B syscall·loadlibrary(SB)
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
// 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.
|
||||||
|
|
||||||
|
// +build windows
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
// func servicemain(argc uint32, argv **uint16)
|
||||||
|
TEXT ·servicemain(SB),NOSPLIT|NOFRAME,$0
|
||||||
|
MOVM.DB.W [R4, R14], (R13) // push {r4, lr}
|
||||||
|
MOVW R13, R4
|
||||||
|
BIC $0x7, R13 // alignment for ABI
|
||||||
|
|
||||||
|
MOVW R0, ·sArgc(SB)
|
||||||
|
MOVW R1, ·sArgv(SB)
|
||||||
|
|
||||||
|
MOVW ·sName(SB), R0
|
||||||
|
MOVW ·ctlHandlerExProc(SB), R1
|
||||||
|
MOVW $0, R2
|
||||||
|
MOVW ·cRegisterServiceCtrlHandlerExW(SB), R3
|
||||||
|
BL (R3)
|
||||||
|
CMP $0, R0
|
||||||
|
BEQ exit
|
||||||
|
MOVW R0, ·ssHandle(SB)
|
||||||
|
|
||||||
|
MOVW ·goWaitsH(SB), R0
|
||||||
|
MOVW ·cSetEvent(SB), R1
|
||||||
|
BL (R1)
|
||||||
|
|
||||||
|
MOVW ·cWaitsH(SB), R0
|
||||||
|
MOVW $-1, R1
|
||||||
|
MOVW ·cWaitForSingleObject(SB), R2
|
||||||
|
BL (R2)
|
||||||
|
|
||||||
|
exit:
|
||||||
|
MOVW R4, R13 // free extra stack space
|
||||||
|
MOVM.IA.W (R13), [R4, R15] // pop {r4, pc}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
// 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.
|
||||||
|
|
||||||
|
package windows
|
||||||
|
|
||||||
|
type WSAData struct {
|
||||||
|
Version uint16
|
||||||
|
HighVersion uint16
|
||||||
|
Description [WSADESCRIPTION_LEN + 1]byte
|
||||||
|
SystemStatus [WSASYS_STATUS_LEN + 1]byte
|
||||||
|
MaxSockets uint16
|
||||||
|
MaxUdpDg uint16
|
||||||
|
VendorInfo *byte
|
||||||
|
}
|
||||||
|
|
||||||
|
type Servent struct {
|
||||||
|
Name *byte
|
||||||
|
Aliases **byte
|
||||||
|
Port uint16
|
||||||
|
Proto *byte
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user