Commit 1ea76443 authored by Russ Cox's avatar Russ Cox

runtime: fix vet complaints for linux/arm

Working toward making the tree vet-safe instead of having
so many exceptions in cmd/vet/all/whitelist.

This CL makes "GOOS=linux GOARCH=arm go vet -unsafeptr=false runtime" happy,
while keeping "GO_BUILDER_NAME=misc-vetall go tool dist test" happy too.

For #31916.

Change-Id: Ifae75b832320b5356ac8773cf85055bfb2bd7214
Reviewed-on: https://go-review.googlesource.com/c/go/+/176101
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: default avatarAustin Clements <austin@google.com>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent fe67ce2e
// android/arm-specific vet whitelist. See readme.txt for details.
runtime/sys_linux_arm.s: [arm] clone: 12(R13) should be stk+4(FP)
runtime/sys_linux_arm.s: [arm] clone: 8(R13) should be flags+0(FP)
// arm-specific vet whitelist. See readme.txt for details.
// Intentionally missing declarations.
runtime/asm_arm.s: [arm] emptyfunc: function emptyfunc missing Go declaration
runtime/asm_arm.s: [arm] usplitR0: function usplitR0 missing Go declaration
runtime/tls_arm.s: [arm] load_g: function load_g missing Go declaration
runtime/tls_arm.s: [arm] _initcgo: function _initcgo missing Go declaration
// linux/arm-specific vet whitelist. See readme.txt for details.
// These SP references occur after a stack-altering call. They're fine.
runtime/sys_linux_arm.s: [arm] clone: 12(R13) should be stk+4(FP)
runtime/sys_linux_arm.s: [arm] clone: 8(R13) should be flags+0(FP)
......@@ -4,10 +4,17 @@
package runtime
// Stubs to pacify vet. Not safe to call from Go.
// Calls to these functions are inserted by the compiler or assembler.
// Called from compiler-generated code; declared for go vet.
func udiv()
func _div()
func _divu()
func _mod()
func _modu()
// Called from assembly only; declared for go vet.
func usplitR0()
func load_g()
func save_g()
func emptyfunc()
func _initcgo()
func read_tls_fallback()
......@@ -345,7 +345,6 @@ TEXT runtime·clone(SB),NOSPLIT,$0
MOVW $0, R5
// Copy mp, gp, fn off parent stack for use by child.
// TODO(kaib): figure out which registers are clobbered by clone and avoid stack copying
MOVW $-16(R1), R1
MOVW mp+8(FP), R6
MOVW R6, 0(R1)
......@@ -366,6 +365,7 @@ TEXT runtime·clone(SB),NOSPLIT,$0
RET
// Paranoia: check that SP is as we expect. Use R13 to avoid linker 'fixup'
NOP R13 // tell vet SP/R13 changed - stop checking offsets
MOVW 12(R13), R0
MOVW $1234, R1
CMP R0, R1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment