aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_openbsd_386.s
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2019-05-08 15:30:33 -0400
committerRuss Cox <rsc@golang.org>2019-05-09 21:13:26 +0000
commit924c161de4ad263142478f33113e53690b8d32c0 (patch)
treeb4647134205f1b461eb1e26a87e9dfce3f3c518a /src/runtime/sys_openbsd_386.s
parentb4a472b1c3b7ae48cf6128e5f0594439dc20d081 (diff)
downloadgo-924c161de4ad263142478f33113e53690b8d32c0.tar.gz
go-924c161de4ad263142478f33113e53690b8d32c0.zip
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_openbsd_386.s')
-rw-r--r--src/runtime/sys_openbsd_386.s8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/runtime/sys_openbsd_386.s b/src/runtime/sys_openbsd_386.s
index a45e1ea282..6457e37c01 100644
--- a/src/runtime/sys_openbsd_386.s
+++ b/src/runtime/sys_openbsd_386.s
@@ -218,7 +218,9 @@ TEXT runtime·sigfwd(SB),NOSPLIT,$12-16
MOVL AX, SP
RET
+// Called by OS using C ABI.
TEXT runtime·sigtramp(SB),NOSPLIT,$28
+ NOP SP // tell vet SP changed - stop checking offsets
// Save callee-saved C registers, since the caller may be a C signal handler.
MOVL BX, bx-4(SP)
MOVL BP, bp-8(SP)
@@ -227,11 +229,11 @@ TEXT runtime·sigtramp(SB),NOSPLIT,$28
// We don't save mxcsr or the x87 control word because sigtrampgo doesn't
// modify them.
- MOVL signo+0(FP), BX
+ MOVL 32(SP), BX // signo
MOVL BX, 0(SP)
- MOVL info+4(FP), BX
+ MOVL 36(SP), BX // info
MOVL BX, 4(SP)
- MOVL context+8(FP), BX
+ MOVL 40(SP), BX // context
MOVL BX, 8(SP)
CALL runtime·sigtrampgo(SB)