diff options
author | Russ Cox <rsc@golang.org> | 2014-09-14 22:27:03 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-09-14 22:27:03 -0400 |
commit | 3e38d6e25d609b165405c2f13480f4f2501f8ca1 (patch) | |
tree | 4433aaab33f7510dd55c53881a572aa30b479c66 /src/syscall | |
parent | 210ef0c246a014bc413895dbd9aa536aae268fe4 (diff) | |
download | go-3e38d6e25d609b165405c2f13480f4f2501f8ca1.tar.gz |
syscall: add GO_ARGS to Go-called assembly
Fixes sporadic linux/386 build failure (untyped args)
and probably some others we haven't observed yet.
Fixes issue 8727.
TBR=iant
R=golang-codereviews
CC=bradfitz, golang-codereviews, iant, khr, r
https://codereview.appspot.com/143930043
Diffstat (limited to 'src/syscall')
-rw-r--r-- | src/syscall/asm_linux_386.s | 3 | ||||
-rw-r--r-- | src/syscall/asm_linux_amd64.s | 1 | ||||
-rw-r--r-- | src/syscall/asm_linux_arm.s | 1 | ||||
-rw-r--r-- | src/syscall/asm_plan9_386.s | 3 | ||||
-rw-r--r-- | src/syscall/asm_plan9_amd64.s | 3 |
5 files changed, 11 insertions, 0 deletions
diff --git a/src/syscall/asm_linux_386.s b/src/syscall/asm_linux_386.s index bcb85add6..2ce51822d 100644 --- a/src/syscall/asm_linux_386.s +++ b/src/syscall/asm_linux_386.s @@ -119,6 +119,7 @@ ok2: // func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, errno int) // Kernel interface gets call sub-number and pointer to a0. TEXT ·socketcall(SB),NOSPLIT,$0-36 + GO_ARGS CALL runtime·entersyscall(SB) MOVL $SYS_SOCKETCALL, AX // syscall entry MOVL 4(SP), BX // socket call number @@ -143,6 +144,7 @@ oksock: // func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, errno int) // Kernel interface gets call sub-number and pointer to a0. TEXT ·rawsocketcall(SB),NOSPLIT,$0-36 + GO_ARGS MOVL $SYS_SOCKETCALL, AX // syscall entry MOVL 4(SP), BX // socket call number LEAL 8(SP), CX // pointer to call arguments @@ -168,6 +170,7 @@ oksock1: // Underlying system call is // llseek(int fd, int offhi, int offlo, int64 *result, int whence) TEXT ·seek(SB),NOSPLIT,$0-28 + GO_ARGS CALL runtime·entersyscall(SB) MOVL $SYS__LLSEEK, AX // syscall entry MOVL 4(SP), BX // fd diff --git a/src/syscall/asm_linux_amd64.s b/src/syscall/asm_linux_amd64.s index 6c9e65451..0277c506c 100644 --- a/src/syscall/asm_linux_amd64.s +++ b/src/syscall/asm_linux_amd64.s @@ -116,6 +116,7 @@ ok2: RET TEXT ·gettimeofday(SB),NOSPLIT,$0-16 + GO_ARGS MOVQ 8(SP), DI MOVQ $0, SI MOVQ runtime·__vdso_gettimeofday_sym(SB), AX diff --git a/src/syscall/asm_linux_arm.s b/src/syscall/asm_linux_arm.s index 0060a2171..945101381 100644 --- a/src/syscall/asm_linux_arm.s +++ b/src/syscall/asm_linux_arm.s @@ -111,6 +111,7 @@ ok2: // Underlying system call is // llseek(int fd, int offhi, int offlo, int64 *result, int whence) TEXT ·seek(SB),NOSPLIT,$0-32 + GO_ARGS BL runtime·entersyscall(SB) MOVW $SYS__LLSEEK, R7 // syscall entry MOVW 4(SP), R0 // fd diff --git a/src/syscall/asm_plan9_386.s b/src/syscall/asm_plan9_386.s index 8585385bc..46562de84 100644 --- a/src/syscall/asm_plan9_386.s +++ b/src/syscall/asm_plan9_386.s @@ -132,6 +132,7 @@ TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 //func seek(placeholder uintptr, fd int, offset int64, whence int) (newoffset int64, err string) TEXT ·seek(SB),NOSPLIT,$0-36 + GO_ARGS LEAL newoffset+24(SP), AX MOVL AX, placeholder+4(SP) @@ -163,6 +164,8 @@ copyresult6: //func exit(code int) // Import runtime·exit for cleanly exiting. TEXT ·exit(SB),NOSPLIT,$4-4 + GO_ARGS + NO_LOCAL_POINTERS MOVL code+0(FP), AX MOVL AX, 0(SP) CALL runtime·exit(SB) diff --git a/src/syscall/asm_plan9_amd64.s b/src/syscall/asm_plan9_amd64.s index afbd49152..283e28999 100644 --- a/src/syscall/asm_plan9_amd64.s +++ b/src/syscall/asm_plan9_amd64.s @@ -131,6 +131,7 @@ TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 //func seek(placeholder uintptr, fd int, offset int64, whence int) (newoffset int64, err string) TEXT ·seek(SB),NOSPLIT,$0-56 + GO_ARGS LEAQ newoffset+40(SP), AX MOVQ AX, placeholder+8(SP) @@ -161,6 +162,8 @@ copyresult6: //func exit(code int) // Import runtime·exit for cleanly exiting. TEXT ·exit(SB),NOSPLIT,$8-8 + GO_ARGS + NO_LOCAL_POINTERS MOVQ code+0(FP), AX MOVQ AX, 0(SP) CALL runtime·exit(SB) |