]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: add GO_ARGS to Go-called assembly
authorRuss Cox <rsc@golang.org>
Mon, 15 Sep 2014 02:27:03 +0000 (22:27 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 15 Sep 2014 02:27:03 +0000 (22:27 -0400)
Fixes sporadic linux/386 build failure (untyped args)
and probably some others we haven't observed yet.

Fixes #8727.

TBR=iant
R=golang-codereviews
CC=bradfitz, golang-codereviews, iant, khr, r
https://golang.org/cl/143930043

src/syscall/asm_linux_386.s
src/syscall/asm_linux_amd64.s
src/syscall/asm_linux_arm.s
src/syscall/asm_plan9_386.s
src/syscall/asm_plan9_amd64.s

index bcb85add647fe6fa9a93994cce506716bae78fe2..2ce51822dab59e1123c75187abfe7e72aa54a98e 100644 (file)
@@ -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
index 6c9e6545196e5f4652f7a231453b4ed57fff5d26..0277c506c0b609c12718998a1ae9788ee0aeae50 100644 (file)
@@ -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
index 0060a2171c9b5cb57d4fca5b4bee8441aa27da11..945101381325012969b195a58ec29e41d40eccd7 100644 (file)
@@ -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
index 8585385bcdd9d8b51c8b408fa06999642a57dc40..46562de84552af10594c41a312f4da7a0bb263e4 100644 (file)
@@ -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)
index afbd49152c468d4a6e9e5323aee1be317d94e8b4..283e28999a940e6f204e31bea5896a57ac853dd8 100644 (file)
@@ -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)