]> Cypherpunks.ru repositories - gostls13.git/commitdiff
runtime: fix vet complaints for linux/386
authorRuss Cox <rsc@golang.org>
Wed, 8 May 2019 15:44:15 +0000 (11:44 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 9 May 2019 21:13:18 +0000 (21:13 +0000)
Working toward making the tree vet-safe instead of having
so many exceptions in cmd/vet/all/whitelist.

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

For #31916.

Change-Id: I3e5586a7ff6e359357350d0602c2259493280ded
Reviewed-on: https://go-review.googlesource.com/c/go/+/176099
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
36 files changed:
src/cmd/vet/all/whitelist/386.txt [deleted file]
src/cmd/vet/all/whitelist/amd64.txt
src/cmd/vet/all/whitelist/android_386.txt [deleted file]
src/cmd/vet/all/whitelist/arm.txt
src/cmd/vet/all/whitelist/arm64.txt
src/cmd/vet/all/whitelist/darwin_386.txt [deleted file]
src/cmd/vet/all/whitelist/freebsd_386.txt
src/cmd/vet/all/whitelist/linux_386.txt [deleted file]
src/cmd/vet/all/whitelist/linux_amd64.txt
src/cmd/vet/all/whitelist/linux_arm.txt
src/cmd/vet/all/whitelist/linux_arm64.txt [deleted file]
src/cmd/vet/all/whitelist/nacl_386.txt
src/cmd/vet/all/whitelist/netbsd_386.txt
src/cmd/vet/all/whitelist/openbsd_386.txt
src/cmd/vet/all/whitelist/plan9_386.txt [deleted file]
src/cmd/vet/all/whitelist/plan9_amd64.txt
src/cmd/vet/all/whitelist/windows_386.txt
src/runtime/asm_386.s
src/runtime/asm_arm.s
src/runtime/duff_mips64x.s
src/runtime/duff_ppc64x.s
src/runtime/stubs.go
src/runtime/stubs_386.go
src/runtime/stubs_android.go [deleted file]
src/runtime/stubs_linux.go
src/runtime/sys_freebsd_386.s
src/runtime/sys_linux_386.s
src/runtime/sys_linux_mips64x.s
src/runtime/sys_linux_mipsx.s
src/runtime/sys_linux_ppc64x.s
src/runtime/sys_linux_s390x.s
src/runtime/sys_nacl_386.s
src/runtime/sys_netbsd_386.s
src/runtime/sys_openbsd_386.s
src/runtime/sys_plan9_amd64.s
src/runtime/sys_windows_386.s

diff --git a/src/cmd/vet/all/whitelist/386.txt b/src/cmd/vet/all/whitelist/386.txt
deleted file mode 100644 (file)
index f791a26..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// 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
index 020241f615a50f41ddf1eef454dc4b9d7cfedc57..5ce30cc6c20ba412fcc4378e30c82a95d5bc3512 100644 (file)
@@ -13,6 +13,3 @@ runtime/asm_amd64.s: [amd64] morestack: use of 8(SP) points beyond argument fram
 // 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
diff --git a/src/cmd/vet/all/whitelist/android_386.txt b/src/cmd/vet/all/whitelist/android_386.txt
deleted file mode 100644 (file)
index 5095f2f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// 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)
index 44eb97ec930b99ff73b6031f017d4130d24bdc6d..307f17bac81fa3e9a29009c9f1bc860847cdb483 100644 (file)
@@ -3,8 +3,5 @@
 // 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
index 550eb055e5f08b5a539be00b3a66beafb9cd624a..cd9577b7b53f67b443a37dc0d0e4483abb328100 100644 (file)
@@ -1,6 +1,5 @@
 // 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
diff --git a/src/cmd/vet/all/whitelist/darwin_386.txt b/src/cmd/vet/all/whitelist/darwin_386.txt
deleted file mode 100644 (file)
index 5c25e09..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-// darwin/386-specific vet whitelist. See readme.txt for details.
-
-// Ok
-
-runtime/sys_darwin_386.s: [386] setldt: function setldt missing Go declaration
index d37132cebb2ce94e44cfd76216aec4a489103621..b5218e814fbcdaf4c53f068b251716f8677b94f6 100644 (file)
@@ -5,7 +5,6 @@ runtime/sys_freebsd_386.s: [386] sigtramp: unknown variable signo
 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)
diff --git a/src/cmd/vet/all/whitelist/linux_386.txt b/src/cmd/vet/all/whitelist/linux_386.txt
deleted file mode 100644 (file)
index a5111ca..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// 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
index 69ba65d54be6c4e26bcd440ab817b0cfe3451490..2f4a93355301e64c0d54d6005b12411f0e5678a7 100644 (file)
@@ -1,8 +1,3 @@
 // 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
index f7a9a0c468265e809d8bdbce67de97505486fa03..a911700c3d71a70cea2d14f239d1753967922a7c 100644 (file)
@@ -1,11 +1,5 @@
 // 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
diff --git a/src/cmd/vet/all/whitelist/linux_arm64.txt b/src/cmd/vet/all/whitelist/linux_arm64.txt
deleted file mode 100644 (file)
index 67280b7..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-// 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
index c4b03e40936fe82b531c52663906f0627b6fd3a2..9e756d1bd5d813ac31f6d1edc28344c20c48fa0b 100644 (file)
@@ -1,7 +1,6 @@
 // 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
index 9a54f871928ce4ca13b79c4356841a5bf67ba6bd..a85c6e0f784eca37ea30e8e14082afefe0387b79 100644 (file)
@@ -9,8 +9,6 @@ runtime/sys_netbsd_386.s: [386] sigreturn_tramp: use of 4(SP) points beyond argu
 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)
index b5c0a736c2f630604c14b2bcbeb991ad39210014..66172ff00899e6e3054f1cf9a4e7cbfa4433a86a 100644 (file)
@@ -3,7 +3,6 @@
 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)
diff --git a/src/cmd/vet/all/whitelist/plan9_386.txt b/src/cmd/vet/all/whitelist/plan9_386.txt
deleted file mode 100644 (file)
index 1531161..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-// plan9/386-specific vet whitelist. See readme.txt for details.
-
-runtime/sys_plan9_386.s: [386] setldt: function setldt missing Go declaration
index 39fc8e2c3c57b39ee6e490de8fcf016cafb7de08..1390475c77bfbbffebad81d21a49efb64f4ca648 100644 (file)
@@ -1,4 +1,3 @@
 // 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
index 0bf072b11d618b416fd4194783e3103cd362da46..60875a424c5ed45494016d96d35c0c0a9e22df31 100644 (file)
@@ -2,7 +2,6 @@
 
 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)
index 682f1ab5d0b1d499c7b0cded40b8cad46029f7cf..b98843e73e1599de92ced457d5201ec7c0e42de6 100644 (file)
@@ -89,7 +89,7 @@ GLOBL _rt0_386_lib_argc<>(SB),NOPTR, $4
 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
@@ -209,7 +209,7 @@ needtls:
 #endif
 
        // set up %gs
-       CALL    runtime·ldt0setup(SB)
+       CALL    ldt0setup<>(SB)
 
        // store through it, to make sure it works
        get_tls(BX)
@@ -453,6 +453,7 @@ TEXT runtime·morestack(SB),NOSPLIT,$0-0
 
        // 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
@@ -895,7 +896,7 @@ done:
        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.
@@ -914,19 +915,19 @@ TEXT runtime·aeshash(SB),NOSPLIT,$0-16
        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
index efd0e2a1a257e1c2d35f1acb805763ffd4942230..5a7e3b7ea7faa9b99fac2296a1f9a432e8ad8980 100644 (file)
@@ -893,7 +893,7 @@ TEXT runtime·usplitR0(SB),NOSPLIT,$0
 
 #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
index 59c7adc8ee77fbddad509b6875661b38922ac0ff..acf0a4e69817b1d8289f07b9c8169cb33cb4be14 100644 (file)
@@ -266,3 +266,6 @@ TEXT runtime·duffzero(SB), NOSPLIT|NOFRAME, $0-0
        RET
 
 // TODO: Implement runtime·duffcopy.
+TEXT runtime·duffcopy(SB),NOSPLIT|NOFRAME,$0-0
+       MOVV    R0, 2(R0)
+       RET
index b4bb9e7dbe7948f9d2fb1022e9da774a02cc7875..0c62d0afe9a3eab1ef871cabb0292dc5ff99dd5c 100644 (file)
@@ -138,3 +138,6 @@ TEXT runtime·duffzero(SB), NOSPLIT|NOFRAME, $0-0
        RET
 
 // TODO: Implement runtime·duffcopy.
+TEXT runtime·duffcopy(SB),NOSPLIT|NOFRAME,$0-0
+       MOVD    R0, 0(R0)
+       RET
index 7210b6f4cbe4d586358ee89ac5621f6b31d77227..18e64dd5f7b7e623fd4457b8da2c192266aae345 100644 (file)
@@ -319,3 +319,8 @@ func abort()
 
 // 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()
index 01d92d399f63d221ea33fc7b758c53d9cac7b92d..ecdf0a9df040b6ca0941ef3ac90312fe1727e6c1 100644 (file)
@@ -4,5 +4,11 @@
 
 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()
diff --git a/src/runtime/stubs_android.go b/src/runtime/stubs_android.go
deleted file mode 100644 (file)
index 0380dca..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-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
index d10f657197fe0dd59b238fdcaf80bc3c18dc303c..e75fcf6c95ca8b4f99a13e72f3d9be70650adf3e 100644 (file)
@@ -6,4 +6,14 @@
 
 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
index bc309ba4536a6ab8098e2141847cebeddaf27599..26a81ebf443f1f11068e6e488b326e2797d01fed 100644 (file)
@@ -295,7 +295,7 @@ int i386_set_ldt(int, const union ldt_entry *, int);
 
 // 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
 
index 8c791b30041299a12b728180c8d58d0434698c6b..72c43bd9da62a8c958dbc3038f70bd73fc90e450 100644 (file)
@@ -474,6 +474,7 @@ TEXT runtime·clone(SB),NOSPLIT,$0
        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)
@@ -572,7 +573,7 @@ GLOBL runtime·tls_entry_number(SB), NOPTR, $4
 // 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.
index c45703d22801c7aa08393db59c4fd61d6b1d5bc1..33ed1050c291fcdc46fa2bca9eef376c2582eb99 100644 (file)
@@ -462,3 +462,18 @@ TEXT runtime·sbrk0(SB),NOSPLIT|NOFRAME,$0-8
        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
index f362b0f3f1c95d888042f2b454d3ea82b48aa9e2..ee9f9303c7d8624c3762c1b832177808accab148 100644 (file)
@@ -492,3 +492,18 @@ TEXT runtime·sbrk0(SB),NOSPLIT,$0-4
        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
index 6835f434de4fca616f107923c47ccbf7710b3bfc..f1515ec41be5e2ef64aeda14ff13721fedc5a460 100644 (file)
@@ -616,3 +616,18 @@ TEXT runtime·sbrk0(SB),NOSPLIT|NOFRAME,$0
        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
index c79ceea7512f6400967ea2b8aea56dc61c1549b3..d7ee39112623c9eb4450e91a8db86ae25d698c1d 100644 (file)
@@ -446,3 +446,18 @@ TEXT runtime·sbrk0(SB),NOSPLIT|NOFRAME,$0-8
        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
index 24eaeb238cb6d29b8483d2c728059ab895d951b4..fff75b86263f454f39113e7aed1b4f03d3de658c 100644 (file)
@@ -287,7 +287,7 @@ TEXT runtime·nanotime(SB),NOSPLIT,$20
        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)
index 5501e101069b27574bbe2263bf0bf85e696d970e..ee4e3cf5a29295f1b7734839789d54824ad8d986 100644 (file)
@@ -361,7 +361,7 @@ TEXT runtime·sigaltstack(SB),NOSPLIT,$-8
 
 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
index d555edb71f16212e518a9ddcb5650a11e724165a..741907312e3f4d09d82e39cc5515b924c245856c 100644 (file)
@@ -329,7 +329,7 @@ TEXT runtime·sigaltstack(SB),NOSPLIT,$-8
 
 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
index 4ef4aab37671e6705c9c613b815c027a08eb0c20..a73c33f10495ddac0b8c215cfae9d80b10d049db 100644 (file)
@@ -6,10 +6,6 @@
 #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
index e6d774e66f475b613baa02c05a2ec8c7af33d59a..ff9f4bafa5c4c18d4804c235ea015c2f69241e7e 100644 (file)
@@ -354,7 +354,7 @@ TEXT runtime·tstart_stdcall(SB),NOSPLIT,$0
 
 // 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