+++ /dev/null
-// 386-specific vet whitelist. See readme.txt for details.
-
-// startup code uses non-standard calling convention and intentionally
-// omits args.
-runtime/asm_386.s: [386] rt0_go: use of 4(SP) points beyond argument frame
-
-// reflect trampolines intentionally omit arg size. Same for morestack.
-runtime/asm_386.s: [386] morestack: use of 4(SP) points beyond argument frame
-runtime/asm_386.s: [386] morestack: use of 8(SP) points beyond argument frame
-runtime/asm_386.s: [386] morestack: use of 4(SP) points beyond argument frame
-
-// Intentionally missing declarations. These are special assembly routines.
-runtime/asm_386.s: [386] ldt0setup: function ldt0setup missing Go declaration
-runtime/asm_386.s: [386] emptyfunc: function emptyfunc missing Go declaration
-runtime/asm_386.s: [386] aeshashbody: function aeshashbody missing Go declaration
-runtime/asm_386.s: [386] addmoduledata: function addmoduledata missing Go declaration
-runtime/duff_386.s: [386] duffzero: function duffzero missing Go declaration
-runtime/duff_386.s: [386] duffcopy: function duffcopy missing Go declaration
// Others use the platform ABI.
// There is no sensible corresponding Go prototype.
runtime/asm_amd64.s: [amd64] aeshashbody: function aeshashbody missing Go declaration
-runtime/asm_amd64.s: [amd64] addmoduledata: function addmoduledata missing Go declaration
-runtime/duff_amd64.s: [amd64] duffzero: function duffzero missing Go declaration
-runtime/duff_amd64.s: [amd64] duffcopy: function duffcopy missing Go declaration
+++ /dev/null
-// android/386-specific vet whitelist. See readme.txt for details.
-
-runtime/sys_linux_386.s: [386] setldt: function setldt missing Go declaration
-
-// These SP references occur after a stack-altering call. They're fine.
-runtime/sys_linux_386.s: [386] clone: 12(SP) should be mp+8(FP)
-runtime/sys_linux_386.s: [386] clone: 4(SP) should be flags+0(FP)
-runtime/sys_linux_386.s: [386] clone: 8(SP) should be stk+4(FP)
// 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/asm_arm.s: [arm] addmoduledata: function addmoduledata missing Go declaration
-runtime/duff_arm.s: [arm] duffzero: function duffzero missing Go declaration
-runtime/duff_arm.s: [arm] duffcopy: function duffcopy 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
// arm64-specific vet whitelist. See readme.txt for details.
// Intentionally missing declarations.
-runtime/asm_arm64.s: [arm64] addmoduledata: function addmoduledata missing Go declaration
runtime/tls_arm64.s: [arm64] load_g: function load_g missing Go declaration
runtime/tls_arm64.s: [arm64] save_g: function save_g missing Go declaration
+++ /dev/null
-// darwin/386-specific vet whitelist. See readme.txt for details.
-
-// Ok
-
-runtime/sys_darwin_386.s: [386] setldt: function setldt missing Go declaration
runtime/sys_freebsd_386.s: [386] sigtramp: unknown variable info
runtime/sys_freebsd_386.s: [386] sigtramp: unknown variable context
runtime/sys_freebsd_386.s: [386] sigtramp: unknown variable context
-runtime/sys_freebsd_386.s: [386] setldt: function setldt missing Go declaration
runtime/sys_freebsd_386.s: [386] i386_set_ldt: function i386_set_ldt missing Go declaration
syscall/asm_unix_386.s: [386] Syscall: 8(SP) should be a1+4(FP)
syscall/asm_unix_386.s: [386] Syscall: 4(SP) should be trap+0(FP)
+++ /dev/null
-// linux/386-specific vet whitelist. See readme.txt for details.
-
-runtime/sys_linux_386.s: [386] setldt: function setldt missing Go declaration
-
-// These SP references occur after a stack-altering call. They're fine.
-runtime/sys_linux_386.s: [386] clone: 12(SP) should be mp+8(FP)
-runtime/sys_linux_386.s: [386] clone: 4(SP) should be flags+0(FP)
-runtime/sys_linux_386.s: [386] clone: 8(SP) should be stk+4(FP)
-
-// Android-specific; stubs missing on other linux platforms.
-runtime/sys_linux_386.s: [386] access: function access missing Go declaration
-runtime/sys_linux_386.s: [386] connect: function connect missing Go declaration
-runtime/sys_linux_386.s: [386] socket: function socket missing Go declaration
// linux/amd64-specific vet whitelist. See readme.txt for details.
runtime/sys_linux_amd64.s: [amd64] settls: function settls missing Go declaration
-
-// Android-specific; stubs missing on other linux platforms.
-runtime/sys_linux_amd64.s: [amd64] access: function access missing Go declaration
-runtime/sys_linux_amd64.s: [amd64] connect: function connect missing Go declaration
-runtime/sys_linux_amd64.s: [amd64] socket: function socket 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)
-
-// Special functions.
-runtime/sys_linux_arm.s: [arm] access: function access missing Go declaration
-runtime/sys_linux_arm.s: [arm] connect: function connect missing Go declaration
-runtime/sys_linux_arm.s: [arm] socket: function socket missing Go declaration
+++ /dev/null
-// linux/arm64-specific vet whitelist. See readme.txt for details.
-
-runtime/sys_linux_arm64.s: [arm64] access: function access missing Go declaration
-runtime/sys_linux_arm64.s: [arm64] connect: function connect missing Go declaration
-runtime/sys_linux_arm64.s: [arm64] socket: function socket missing Go declaration
// nacl/386-specific vet whitelist. See readme.txt for details.
runtime/sys_nacl_386.s: [386] nacl_clock_gettime: function nacl_clock_gettime missing Go declaration
-runtime/sys_nacl_386.s: [386] setldt: function setldt missing Go declaration
runtime/sys_nacl_386.s: [386] sigtramp: use of 20(SP) points beyond argument frame
runtime/sys_nacl_386.s: [386] sigtramp: use of 4(SP) points beyond argument frame
runtime/sys_nacl_386.s: [386] sigtramp: unknown variable ctxt
runtime/sys_netbsd_386.s: [386] sigtramp: unknown variable signo
runtime/sys_netbsd_386.s: [386] sigtramp: unknown variable info
runtime/sys_netbsd_386.s: [386] sigtramp: unknown variable context
-runtime/sys_netbsd_386.s: [386] setldt: function setldt missing Go declaration
-runtime/sys_netbsd_386.s: [386] setldt: use of 16(SP) points beyond argument frame
syscall/asm_unix_386.s: [386] Syscall: 8(SP) should be a1+4(FP)
syscall/asm_unix_386.s: [386] Syscall: 4(SP) should be trap+0(FP)
runtime/sys_openbsd_386.s: [386] sigtramp: unknown variable signo
runtime/sys_openbsd_386.s: [386] sigtramp: unknown variable info
runtime/sys_openbsd_386.s: [386] sigtramp: unknown variable context
-runtime/sys_openbsd_386.s: [386] setldt: function setldt missing Go declaration
runtime/sys_openbsd_386.s: [386] settls: function settls missing Go declaration
syscall/asm_unix_386.s: [386] Syscall: 8(SP) should be a1+4(FP)
syscall/asm_unix_386.s: [386] Syscall: 4(SP) should be trap+0(FP)
+++ /dev/null
-// plan9/386-specific vet whitelist. See readme.txt for details.
-
-runtime/sys_plan9_386.s: [386] setldt: function setldt missing Go declaration
// plan9/amd64-specific vet whitelist. See readme.txt for details.
-runtime/sys_plan9_amd64.s: [amd64] setldt: function setldt missing Go declaration
runtime/sys_plan9_amd64.s: [amd64] settls: function settls missing Go declaration
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] setldt: function setldt missing Go declaration
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)
DATA _rt0_386_lib_argv<>(SB)/4, $0
GLOBL _rt0_386_lib_argv<>(SB),NOPTR, $4
-TEXT runtime·rt0_go(SB),NOSPLIT,$0
+TEXT runtime·rt0_go(SB),NOSPLIT|NOFRAME,$0
// Copy arguments forward on an even stack.
// Users of this function jump to it, they don't call it.
MOVL 0(SP), AX
#endif
// set up %gs
- CALL runtime·ldt0setup(SB)
+ CALL ldt0setup<>(SB)
// store through it, to make sure it works
get_tls(BX)
// Called from f.
// Set m->morebuf to f's caller.
+ NOP SP // tell vet SP changed - stop checking offsets
MOVL 4(SP), DI // f's caller's PC
MOVL DI, (m_morebuf+gobuf_pc)(BX)
LEAL 8(SP), CX // f's caller's SP
MOVL DX, ret_hi+4(FP)
RET
-TEXT runtime·ldt0setup(SB),NOSPLIT,$16-0
+TEXT ldt0setup<>(SB),NOSPLIT,$16-0
// set up ldt 7 to point at m0.tls
// ldt 1 would be fine on Linux, but on OS X, 7 is as low as we can go.
// the entry number is just a hint. setldt will set up GS with what it used.
MOVL p+0(FP), AX // ptr to data
MOVL s+8(FP), BX // size
LEAL ret+12(FP), DX
- JMP runtime·aeshashbody(SB)
+ JMP aeshashbody<>(SB)
TEXT runtime·aeshashstr(SB),NOSPLIT,$0-12
MOVL p+0(FP), AX // ptr to string object
MOVL 4(AX), BX // length of string
MOVL (AX), AX // string data
LEAL ret+8(FP), DX
- JMP runtime·aeshashbody(SB)
+ JMP aeshashbody<>(SB)
// AX: data
// BX: length
// DX: address to put return value
-TEXT runtime·aeshashbody(SB),NOSPLIT,$0-0
+TEXT aeshashbody<>(SB),NOSPLIT,$0-0
MOVL h+4(FP), X0 // 32 bits of per-table hash seed
PINSRW $4, BX, X0 // 16 bits of length
PSHUFHW $0, X0, X0 // replace size with its low 2 bytes repeated 4 times
#ifndef GOOS_nacl
// This is called from .init_array and follows the platform, not Go, ABI.
-TEXT runtime·addmoduledata(SB),NOSPLIT,$0-8
+TEXT runtime·addmoduledata(SB),NOSPLIT,$0-0
MOVW R9, saver9-4(SP) // The access to global variables below implicitly uses R9, which is callee-save
MOVW R11, saver11-8(SP) // Likewise, R11 is the temp register, but callee-save in C ABI
MOVW runtime·lastmoduledatap(SB), R1
RET
// TODO: Implement runtime·duffcopy.
+TEXT runtime·duffcopy(SB),NOSPLIT|NOFRAME,$0-0
+ MOVV R0, 2(R0)
+ RET
RET
// TODO: Implement runtime·duffcopy.
+TEXT runtime·duffcopy(SB),NOSPLIT|NOFRAME,$0-0
+ MOVD R0, 0(R0)
+ RET
// Called from compiled code; declared for vet; do NOT call from Go.
func gcWriteBarrier()
+func duffzero()
+func duffcopy()
+
+// Called from linker-generated .initarray; declared for go vet; do NOT call from Go.
+func addmoduledata()
package runtime
+import "unsafe"
+
func float64touint32(a float64) uint32
func uint32tofloat64(a uint32) float64
+
+// Called from assembly only; declared for go vet.
+func setldt(slot uintptr, base unsafe.Pointer, size uintptr)
+func emptyfunc()
+++ /dev/null
-package runtime
-
-import "unsafe"
-
-// Return values of access/connect/socket are the return values of the syscall
-// (may encode error numbers).
-
-// int access(const char *, int)
-//go:noescape
-func access(name *byte, mode int32) int32
-
-// int connect(int, const struct sockaddr*, socklen_t)
-func connect(fd int32, addr unsafe.Pointer, len int32) int32
-
-// int socket(int, int, int)
-func socket(domain int32, typ int32, prot int32) int32
package runtime
+import "unsafe"
+
func sbrk0() uintptr
+
+// Called from write_err_android.go only, but defined in sys_linux_*.s;
+// declared here (instead of in write_err_android.go) for go vet on non-android builds.
+// The return value is the raw syscall result, which may encode an error number.
+//go:noescape
+func access(name *byte, mode int32) int32
+func connect(fd int32, addr unsafe.Pointer, len int32) int32
+func socket(domain int32, typ int32, prot int32) int32
// setldt(int entry, int address, int limit)
TEXT runtime·setldt(SB),NOSPLIT,$32
- MOVL address+4(FP), BX // aka base
+ MOVL base+4(FP), BX
// see comment in sys_linux_386.s; freebsd is similar
ADDL $0x4, BX
RET
// Paranoia: check that SP is as we expect.
+ NOP SP // tell vet SP changed - stop checking offsets
MOVL 12(SP), BP
CMPL BP, $1234
JEQ 2(PC)
// The name, setldt, is a misnomer, although we leave this name as it is for
// the compatibility with other platforms.
TEXT runtime·setldt(SB),NOSPLIT,$32
- MOVL address+4(FP), DX // base address
+ MOVL base+4(FP), DX
#ifdef GOOS_android
// Android stores the TLS offset in runtime·tls_g.
SYSCALL
MOVV R2, ret+0(FP)
RET
+
+TEXT runtime·access(SB),$0-20
+ MOVV R0, 2(R0) // unimplemented, only needed for android; declared in stubs_linux.go
+ MOVW R0, ret+16(FP) // for vet
+ RET
+
+TEXT runtime·connect(SB),$0-28
+ MOVV R0, 2(R0) // unimplemented, only needed for android; declared in stubs_linux.go
+ MOVW R0, ret+24(FP) // for vet
+ RET
+
+TEXT runtime·socket(SB),$0-20
+ MOVV R0, 2(R0) // unimplemented, only needed for android; declared in stubs_linux.go
+ MOVW R0, ret+16(FP) // for vet
+ RET
SYSCALL
MOVW R2, ret+0(FP)
RET
+
+TEXT runtime·access(SB),$0-12
+ BREAK // unimplemented, only needed for android; declared in stubs_linux.go
+ MOVW R0, ret+8(FP) // for vet
+ RET
+
+TEXT runtime·connect(SB),$0-16
+ BREAK // unimplemented, only needed for android; declared in stubs_linux.go
+ MOVW R0, ret+12(FP) // for vet
+ RET
+
+TEXT runtime·socket(SB),$0-16
+ BREAK // unimplemented, only needed for android; declared in stubs_linux.go
+ MOVW R0, ret+12(FP) // for vet
+ RET
SYSCALL $SYS_brk
MOVD R3, ret+0(FP)
RET
+
+TEXT runtime·access(SB),$0-20
+ MOVD R0, 0(R0) // unimplemented, only needed for android; declared in stubs_linux.go
+ MOVW R0, ret+16(FP) // for vet
+ RET
+
+TEXT runtime·connect(SB),$0-28
+ MOVD R0, 0(R0) // unimplemented, only needed for android; declared in stubs_linux.go
+ MOVW R0, ret+24(FP) // for vet
+ RET
+
+TEXT runtime·socket(SB),$0-20
+ MOVD R0, 0(R0) // unimplemented, only needed for android; declared in stubs_linux.go
+ MOVW R0, ret+16(FP) // for vet
+ RET
SYSCALL
MOVD R2, ret+0(FP)
RET
+
+TEXT runtime·access(SB),$0-20
+ MOVD $0, 2(R0) // unimplemented, only needed for android; declared in stubs_linux.go
+ MOVW R0, ret+16(FP)
+ RET
+
+TEXT runtime·connect(SB),$0-28
+ MOVD $0, 2(R0) // unimplemented, only needed for android; declared in stubs_linux.go
+ MOVW R0, ret+24(FP)
+ RET
+
+TEXT runtime·socket(SB),$0-20
+ MOVD $0, 2(R0) // unimplemented, only needed for android; declared in stubs_linux.go
+ MOVW R0, ret+16(FP)
+ RET
RET
TEXT runtime·setldt(SB),NOSPLIT,$8
- MOVL addr+4(FP), BX // aka base
+ MOVL base+4(FP), BX
ADDL $0x8, BX
MOVL BX, 0(SP)
NACL_SYSCALL(SYS_tls_init)
TEXT runtime·setldt(SB),NOSPLIT,$8
// Under NetBSD we set the GS base instead of messing with the LDT.
- MOVL 16(SP), AX // tls0
+ MOVL base+4(FP), AX
MOVL AX, 0(SP)
CALL runtime·settls(SB)
RET
TEXT runtime·setldt(SB),NOSPLIT,$4
// Under OpenBSD we set the GS base instead of messing with the LDT.
- MOVL tls0+4(FP), AX
+ MOVL base+4(FP), AX
MOVL AX, 0(SP)
CALL runtime·settls(SB)
RET
#include "go_tls.h"
#include "textflag.h"
-// setldt(int entry, int address, int limit)
-TEXT runtime·setldt(SB),NOSPLIT,$0
- RET
-
TEXT runtime·open(SB),NOSPLIT,$0
MOVQ $14, BP
SYSCALL
// setldt(int entry, int address, int limit)
TEXT runtime·setldt(SB),NOSPLIT,$0
- MOVL address+4(FP), CX
+ MOVL base+4(FP), CX
MOVL CX, 0x14(FS)
RET