This is dead code and need not be ported to each architecture.
This CL is part of a stack adding windows/arm64
support (#36439), intended to land in the Go 1.17 cycle.
This CL is, however, not windows/arm64-specific.
It is cleanup meant to make the port (and future ports) easier.
Change-Id: I2d0072b377f73e49d7158ea304670c26f5486c59
Reviewed-on: https://go-review.googlesource.com/c/go/+/288794
Trust: Russ Cox <rsc@golang.org>
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
// in sys_windows_386.s and sys_windows_amd64.s:
func externalthreadhandler()
func getlasterror() uint32
-func setlasterror(err uint32)
// When loading DLLs, we prefer to use LoadLibraryEx with
// LOAD_LIBRARY_SEARCH_* flags, if available. LoadLibraryEx is not
MOVL AX, ret+0(FP)
RET
-TEXT runtime·setlasterror(SB),NOSPLIT,$0
- MOVL err+0(FP), AX
- MOVL AX, 0x34(FS)
- RET
-
// Called by Windows as a Vectored Exception Handler (VEH).
// First argument is pointer to struct containing
// exception record and context pointers.
MOVL AX, ret+0(FP)
RET
-TEXT runtime·setlasterror(SB),NOSPLIT,$0
- MOVL err+0(FP), AX
- MOVQ 0x30(GS), CX
- MOVL AX, 0x68(CX)
- RET
-
// Called by Windows as a Vectored Exception Handler (VEH).
// First argument is pointer to struct containing
// exception record and context pointers.
MOVW R0, ret+0(FP)
RET
-TEXT runtime·setlasterror(SB),NOSPLIT|NOFRAME,$0
- MRC 15, 0, R1, C13, C0, 2
- MOVW R0, 0x34(R1)
- RET
-
// Called by Windows as a Vectored Exception Handler (VEH).
// First argument is pointer to struct containing
// exception record and context pointers.