diff options
author | Russ Cox <rsc@golang.org> | 2019-05-08 15:30:33 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2019-05-09 21:13:26 +0000 |
commit | 924c161de4ad263142478f33113e53690b8d32c0 (patch) | |
tree | b4647134205f1b461eb1e26a87e9dfce3f3c518a /src/runtime/sys_freebsd_386.s | |
parent | b4a472b1c3b7ae48cf6128e5f0594439dc20d081 (diff) | |
download | go-git-924c161de4ad263142478f33113e53690b8d32c0.tar.gz |
runtime: fix vet complaints for all freebsd, netbsd, openbsd
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 these GOOSes,
while keeping "GO_BUILDER_NAME=misc-vetall go tool dist test" happy too.
For #31916.
Change-Id: I63c4805bdd44b301072da66c77086940e2a2765e
Reviewed-on: https://go-review.googlesource.com/c/go/+/176105
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/sys_freebsd_386.s')
-rw-r--r-- | src/runtime/sys_freebsd_386.s | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/runtime/sys_freebsd_386.s b/src/runtime/sys_freebsd_386.s index 26a81ebf44..35f357a1d9 100644 --- a/src/runtime/sys_freebsd_386.s +++ b/src/runtime/sys_freebsd_386.s @@ -22,8 +22,10 @@ TEXT runtime·thr_new(SB),NOSPLIT,$-4 MOVL AX, ret+8(FP) RET +// Called by OS using C ABI. TEXT runtime·thr_start(SB),NOSPLIT,$0 - MOVL mm+0(FP), AX + NOP SP // tell vet SP changed - stop checking offsets + MOVL 4(SP), AX // m MOVL m_g0(AX), BX LEAL m_tls(AX), BP MOVL m_id(AX), DI @@ -234,17 +236,19 @@ TEXT runtime·sigfwd(SB),NOSPLIT,$12-16 MOVL AX, SP RET +// Called by OS using C ABI. TEXT runtime·sigtramp(SB),NOSPLIT,$12 - MOVL signo+0(FP), BX + NOP SP // tell vet SP changed - stop checking offsets + MOVL 16(SP), BX // signo MOVL BX, 0(SP) - MOVL info+4(FP), BX + MOVL 20(SP), BX // info MOVL BX, 4(SP) - MOVL context+8(FP), BX + MOVL 24(SP), BX // context MOVL BX, 8(SP) CALL runtime·sigtrampgo(SB) // call sigreturn - MOVL context+8(FP), AX + MOVL 24(SP), AX // context MOVL $0, 0(SP) // syscall gap MOVL AX, 4(SP) MOVL $417, AX // sigreturn(ucontext) @@ -319,7 +323,7 @@ TEXT runtime·setldt(SB),NOSPLIT,$32 MOVL $0xffffffff, 0(SP) // auto-allocate entry and return in AX MOVL AX, 4(SP) MOVL $1, 8(SP) - CALL runtime·i386_set_ldt(SB) + CALL i386_set_ldt<>(SB) // compute segment selector - (entry*8+7) SHLL $3, AX @@ -327,7 +331,7 @@ TEXT runtime·setldt(SB),NOSPLIT,$32 MOVW AX, GS RET -TEXT runtime·i386_set_ldt(SB),NOSPLIT,$16 +TEXT i386_set_ldt<>(SB),NOSPLIT,$16 LEAL args+0(FP), AX // 0(FP) == 4(SP) before SP got moved MOVL $0, 0(SP) // syscall gap MOVL $1, 4(SP) |