Skip to content

Commit 678568a

Browse files
committed
runtime: delete windows setlasterror (unused)
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 <[email protected]> Trust: Jason A. Donenfeld <[email protected]> Reviewed-by: Alex Brainman <[email protected]> Reviewed-by: Cherry Zhang <[email protected]> Reviewed-by: Jason A. Donenfeld <[email protected]>
1 parent 0d94f98 commit 678568a

File tree

4 files changed

+0
-17
lines changed

4 files changed

+0
-17
lines changed

src/runtime/os_windows.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ const (
379379
// in sys_windows_386.s and sys_windows_amd64.s:
380380
func externalthreadhandler()
381381
func getlasterror() uint32
382-
func setlasterror(err uint32)
383382

384383
// When loading DLLs, we prefer to use LoadLibraryEx with
385384
// LOAD_LIBRARY_SEARCH_* flags, if available. LoadLibraryEx is not

src/runtime/sys_windows_386.s

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,6 @@ TEXT runtime·getlasterror(SB),NOSPLIT,$0
6666
MOVL AX, ret+0(FP)
6767
RET
6868

69-
TEXT runtime·setlasterror(SB),NOSPLIT,$0
70-
MOVL err+0(FP), AX
71-
MOVL AX, 0x34(FS)
72-
RET
73-
7469
// Called by Windows as a Vectored Exception Handler (VEH).
7570
// First argument is pointer to struct containing
7671
// exception record and context pointers.

src/runtime/sys_windows_amd64.s

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,6 @@ TEXT runtime·getlasterror(SB),NOSPLIT,$0
103103
MOVL AX, ret+0(FP)
104104
RET
105105

106-
TEXT runtime·setlasterror(SB),NOSPLIT,$0
107-
MOVL err+0(FP), AX
108-
MOVQ 0x30(GS), CX
109-
MOVL AX, 0x68(CX)
110-
RET
111-
112106
// Called by Windows as a Vectored Exception Handler (VEH).
113107
// First argument is pointer to struct containing
114108
// exception record and context pointers.

src/runtime/sys_windows_arm.s

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,6 @@ TEXT runtime·getlasterror(SB),NOSPLIT,$0
103103
MOVW R0, ret+0(FP)
104104
RET
105105

106-
TEXT runtime·setlasterror(SB),NOSPLIT|NOFRAME,$0
107-
MRC 15, 0, R1, C13, C0, 2
108-
MOVW R0, 0x34(R1)
109-
RET
110-
111106
// Called by Windows as a Vectored Exception Handler (VEH).
112107
// First argument is pointer to struct containing
113108
// exception record and context pointers.

0 commit comments

Comments
 (0)