aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_windows_386.s
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2019-05-08 18:28:21 -0400
committerRuss Cox <rsc@golang.org>2019-05-09 21:13:39 +0000
commit13723d44a0eea725215274070b53a023d52582c9 (patch)
tree3485fe71d6ffa5e072f82d66158629b3a152d3b6 /src/runtime/sys_windows_386.s
parent924c161de4ad263142478f33113e53690b8d32c0 (diff)
downloadgo-13723d44a0eea725215274070b53a023d52582c9.tar.gz
go-13723d44a0eea725215274070b53a023d52582c9.zip
runtime, crypto/x509: fix vet complaints for all windows
Working toward making the tree vet-safe instead of having so many exceptions in cmd/vet/all/whitelist. This CL makes "go vet -unsafeptr=false runtime" happy for windows/*, while keeping "GO_BUILDER_NAME=misc-vetall go tool dist test" happy too. For #31916. Change-Id: If37ab2b3f6fca4696b8a6afb2ef11ba6c4fb42e0 Reviewed-on: https://go-review.googlesource.com/c/go/+/176106 Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/sys_windows_386.s')
-rw-r--r--src/runtime/sys_windows_386.s18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/runtime/sys_windows_386.s b/src/runtime/sys_windows_386.s
index ff9f4bafa5..761da8eaef 100644
--- a/src/runtime/sys_windows_386.s
+++ b/src/runtime/sys_windows_386.s
@@ -76,7 +76,7 @@ TEXT runtime·setlasterror(SB),NOSPLIT,$0
// exception record and context pointers.
// Handler function is stored in AX.
// Return 0 for 'not handled', -1 for handled.
-TEXT runtime·sigtramp(SB),NOSPLIT,$0-0
+TEXT sigtramp<>(SB),NOSPLIT,$0-0
MOVL ptrs+0(FP), CX
SUBL $40, SP
@@ -155,7 +155,7 @@ done:
TEXT runtime·exceptiontramp(SB),NOSPLIT,$0
MOVL $runtime·exceptionhandler(SB), AX
- JMP runtime·sigtramp(SB)
+ JMP sigtramp<>(SB)
TEXT runtime·firstcontinuetramp(SB),NOSPLIT,$0-0
// is never called
@@ -163,17 +163,21 @@ TEXT runtime·firstcontinuetramp(SB),NOSPLIT,$0-0
TEXT runtime·lastcontinuetramp(SB),NOSPLIT,$0-0
MOVL $runtime·lastcontinuehandler(SB), AX
- JMP runtime·sigtramp(SB)
+ JMP sigtramp<>(SB)
+// Called by OS using stdcall ABI: bool ctrlhandler(uint32).
TEXT runtime·ctrlhandler(SB),NOSPLIT,$0
PUSHL $runtime·ctrlhandler1(SB)
+ NOP SP // tell vet SP changed - stop checking offsets
CALL runtime·externalthreadhandler(SB)
MOVL 4(SP), CX
ADDL $12, SP
JMP CX
+// Called by OS using stdcall ABI: uint32 profileloop(void*).
TEXT runtime·profileloop(SB),NOSPLIT,$0
PUSHL $runtime·profileloop1(SB)
+ NOP SP // tell vet SP changed - stop checking offsets
CALL runtime·externalthreadhandler(SB)
MOVL 4(SP), CX
ADDL $12, SP
@@ -232,7 +236,7 @@ TEXT runtime·externalthreadhandler(SB),NOSPLIT,$0
GLOBL runtime·cbctxts(SB), NOPTR, $4
-TEXT runtime·callbackasm1+0(SB),NOSPLIT,$0
+TEXT runtime·callbackasm1(SB),NOSPLIT,$0
MOVL 0(SP), AX // will use to find our callback context
// remove return address from stack, we are not returning there
@@ -308,7 +312,7 @@ TEXT runtime·callbackasm1+0(SB),NOSPLIT,$0
RET
// void tstart(M *newm);
-TEXT runtime·tstart(SB),NOSPLIT,$0
+TEXT tstart<>(SB),NOSPLIT,$0
MOVL newm+0(FP), CX // m
MOVL m_g0(CX), DX // g
@@ -340,7 +344,7 @@ TEXT runtime·tstart_stdcall(SB),NOSPLIT,$0
MOVL newm+0(FP), BX
PUSHL BX
- CALL runtime·tstart(SB)
+ CALL tstart<>(SB)
POPL BX
// Adjust stack for stdcall to return properly.
@@ -383,7 +387,7 @@ TEXT runtime·onosstack(SB),NOSPLIT,$0
MOVL SI, m_libcallg(BP)
// sp must be the last, because once async cpu profiler finds
// all three values to be non-zero, it will use them
- LEAL usec+0(FP), SI
+ LEAL fn+0(FP), SI
MOVL SI, m_libcallsp(BP)
MOVL m_g0(BP), SI