+++ /dev/null
-// windows-specific vet whitelist. See readme.txt for details.
-
-// Issue 18609
-crypto/x509/root_windows.go: unreachable code
-
-runtime/sys_windows_ARCHSUFF.s: [GOARCH] onosstack: unknown variable usec; offset 0 is fn+0(FP)
+++ /dev/null
-// windows/386-specific vet whitelist. See readme.txt for details.
-
-runtime/sys_windows_386.s: [386] profileloop: use of 4(SP) points beyond argument frame
-runtime/sys_windows_386.s: [386] ctrlhandler: 4(SP) should be _type+0(FP)
-runtime/sys_windows_386.s: [386] callbackasm1+0: function callbackasm1+0 missing Go declaration
-runtime/sys_windows_386.s: [386] tstart: function tstart missing Go declaration
-runtime/sys_windows_386.s: [386] tstart_stdcall: RET without writing to 4-byte ret+4(FP)
-runtime/sys_windows_386.s: [386] sigtramp: function sigtramp missing Go declaration
+++ /dev/null
-// windows/amd64-specific vet whitelist. See readme.txt for details.
-
-runtime/sys_windows_amd64.s: [amd64] ctrlhandler: RET without writing to 4-byte ret+8(FP)
-runtime/sys_windows_amd64.s: [amd64] callbackasm1: function callbackasm1 missing Go declaration
-runtime/sys_windows_amd64.s: [amd64] tstart_stdcall: RET without writing to 4-byte ret+8(FP)
// TODO: restore this functionality on Windows. We tried to do
// it in Go 1.8 but had to revert it. See Issue 18609.
// Returning (nil, nil) was the old behavior, prior to CL 30578.
- return nil, nil
+ // The if statement here avoids vet complaining about
+ // unreachable code below.
+ if true {
+ return nil, nil
+ }
const CRYPT_E_NOT_FOUND = 0x80092004
// Function to be called by windows CreateThread
// to start new os thread.
-func tstart_stdcall(newm *m) uint32
+func tstart_stdcall(newm *m)
-func ctrlhandler(_type uint32) uint32
+func ctrlhandler(_type uint32)
type mOS struct {
waitsema uintptr // semaphore for parking on locks
// in sys_windows_386.s and sys_windows_amd64.s
func profileloop()
+// called from zcallback_windows_*.s to sys_windows_*.s
+func callbackasm1()
+
var profiletimer uintptr
func profilem(mp *m, thread uintptr) {
// 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
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
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
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
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
MOVL newm+0(FP), BX
PUSHL BX
- CALL runtime·tstart(SB)
+ CALL tstart<>(SB)
POPL BX
// Adjust stack for stdcall to return properly.
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
// exception record and context pointers.
// Handler function is stored in AX.
// Return 0 for 'not handled', -1 for handled.
-TEXT runtime·sigtramp(SB),NOSPLIT|NOFRAME,$0-0
+TEXT sigtramp<>(SB),NOSPLIT|NOFRAME,$0-0
// CX: PEXCEPTION_POINTERS ExceptionInfo
// DI SI BP BX R12 R13 R14 R15 registers and DF flag are preserved
TEXT runtime·exceptiontramp(SB),NOSPLIT|NOFRAME,$0
MOVQ $runtime·exceptionhandler(SB), AX
- JMP runtime·sigtramp(SB)
+ JMP sigtramp<>(SB)
TEXT runtime·firstcontinuetramp(SB),NOSPLIT|NOFRAME,$0-0
MOVQ $runtime·firstcontinuehandler(SB), AX
- JMP runtime·sigtramp(SB)
+ JMP sigtramp<>(SB)
TEXT runtime·lastcontinuetramp(SB),NOSPLIT|NOFRAME,$0-0
MOVQ $runtime·lastcontinuehandler(SB), AX
- JMP runtime·sigtramp(SB)
+ JMP sigtramp<>(SB)
TEXT runtime·ctrlhandler(SB),NOSPLIT|NOFRAME,$8
- MOVQ CX, 16(SP) // spill
+ MOVQ CX, _type+16(SP) // spill
MOVQ $runtime·ctrlhandler1(SB), CX
MOVQ CX, 0(SP)
CALL runtime·externalthreadhandler(SB)
MOVQ R12, m_libcallg(R13)
// sp must be the last, because once async cpu profiler finds
// all three values to be non-zero, it will use them
- LEAQ usec+0(FP), R12
+ LEAQ fn+0(FP), R12
MOVQ R12, m_libcallsp(R13)
MOVQ m_g0(R13), R14
// int32_t sigtramp(
// PEXCEPTION_POINTERS ExceptionInfo,
// func *GoExceptionHandler);
-TEXT runtime·sigtramp(SB),NOSPLIT|NOFRAME,$0
+TEXT sigtramp<>(SB),NOSPLIT|NOFRAME,$0
MOVM.DB.W [R0, R4-R11, R14], (R13) // push {r0, r4-r11, lr} (SP-=40)
SUB $(8+20), R13 // reserve space for g, sp, and
// parameters/retval to go call
// handler, don't clobber the stored SP and PC on the stack.
MOVW 4(R3), R3 // PEXCEPTION_POINTERS->Context
MOVW 0x40(R3), R2 // load PC from context record
- MOVW $runtime·returntramp(SB), R1
+ MOVW $returntramp<>(SB), R1
CMP R1, R2
B.EQ return // do not clobber saved SP/PC
// Set up context record to return to returntramp on g0 stack
MOVW R12, 0x38(R3) // save g0 stack pointer
// in context record
- MOVW $runtime·returntramp(SB), R2 // save resume address
+ MOVW $returntramp<>(SB), R2 // save resume address
MOVW R2, 0x40(R3) // in context record
return:
// This is part of the control flow guard workaround.
// It switches stacks and jumps to the continuation address.
//
-TEXT runtime·returntramp(SB),NOSPLIT|NOFRAME,$0
+TEXT returntramp<>(SB),NOSPLIT|NOFRAME,$0
MOVM.IA (R13), [R13, R15] // ldm sp, [sp, pc]
TEXT runtime·exceptiontramp(SB),NOSPLIT|NOFRAME,$0
MOVW $runtime·exceptionhandler(SB), R1
- B runtime·sigtramp(SB)
+ B sigtramp<>(SB)
TEXT runtime·firstcontinuetramp(SB),NOSPLIT|NOFRAME,$0
MOVW $runtime·firstcontinuehandler(SB), R1
- B runtime·sigtramp(SB)
+ B sigtramp<>(SB)
TEXT runtime·lastcontinuetramp(SB),NOSPLIT|NOFRAME,$0
MOVW $runtime·lastcontinuehandler(SB), R1
- B runtime·sigtramp(SB)
+ B sigtramp<>(SB)
TEXT runtime·ctrlhandler(SB),NOSPLIT|NOFRAME,$0
MOVW $runtime·ctrlhandler1(SB), R1
BL runtime·save_g(SB)
// do per-thread TLS initialization
- BL runtime·init_thread_tls(SB)
+ BL init_thread_tls<>(SB)
// Layout new m scheduler stack on os stack.
MOVW R13, R0
BIC $0x7, R13 // alignment for ABI
MOVW runtime·_SwitchToThread(SB), R0
BL (R0)
- MOVW R4, R13 // restore stack pointer
+ MOVW R4, R13 // restore stack pointer
MOVM.IA.W (R13), [R4, R15] // pop {R4, pc}
TEXT ·publicationBarrier(SB),NOSPLIT|NOFRAME,$0-0
MOVW $runtime·tls_g(SB), R1
MOVW R0, (R1)
- BL runtime·init_thread_tls(SB)
+ BL init_thread_tls<>(SB)
MOVW R4, R13
MOVM.IA.W (R13), [R4, R15] // pop {r4, pc}
// handler can get the real g from the thread's m.
//
// Clobbers R0-R3
-TEXT runtime·init_thread_tls(SB),NOSPLIT|NOFRAME,$0
+TEXT init_thread_tls<>(SB),NOSPLIT|NOFRAME,$0
// compute &_TEB->TlsSlots[tls_g]
MRC 15, 0, R0, C13, C0, 2
ADD $0xe10, R0