]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: delete windows setlasterror (unused)
authorRuss Cox <rsc@golang.org>
Sat, 30 Jan 2021 21:18:51 +0000 (16:18 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 19 Feb 2021 00:01:31 +0000 (00:01 +0000)
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>
src/runtime/os_windows.go
src/runtime/sys_windows_386.s
src/runtime/sys_windows_amd64.s
src/runtime/sys_windows_arm.s

index 1bf3309dfd9cf55fa3a2c4c4e410a43a29833c6f..a2a124cd9d029989013b82731f70934d4b9795dc 100644 (file)
@@ -379,7 +379,6 @@ const (
 // 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
index b3972ac78d2dfd737a1ecc2a18b26adde7ca901f..c556e3a3c25ef152f83734a711ff195e5603c150 100644 (file)
@@ -66,11 +66,6 @@ TEXT runtime·getlasterror(SB),NOSPLIT,$0
        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.
index 2bd7b748483594c41411ae05748f6c32a3583726..9cd14016b0164eb7b0cacb2c22c1f27d11d0fb10 100644 (file)
@@ -103,12 +103,6 @@ TEXT runtime·getlasterror(SB),NOSPLIT,$0
        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.
index 1d928a4f7d35dacb60867ca5429b323cb3a8b4b7..d2bdc50e3b6314d0466dd042f3acdc3af10f41a5 100644 (file)
@@ -103,11 +103,6 @@ TEXT runtime·getlasterror(SB),NOSPLIT,$0
        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.