diff --git a/src/pkg/syscall/asm_darwin_386.s b/src/pkg/syscall/asm_darwin_386.s index 2ddfb3bbd3b7ebb44efddef19816850f283474af..9b4dfa81df8b8de97db2bc9ba488e74f2499aeff 100644 --- a/src/pkg/syscall/asm_darwin_386.s +++ b/src/pkg/syscall/asm_darwin_386.s @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP) +// so that go vet can check that they are correct. + #include "../../cmd/ld/textflag.h" // @@ -12,7 +15,7 @@ // func Syscall6(trap int32, a1, a2, a3, a4, a5, a6 int32) (r1, r2, err int32); // Trap # in AX, args on stack above caller pc. -TEXT ·Syscall(SB),NOSPLIT,$0-32 +TEXT ·Syscall(SB),NOSPLIT,$0-28 CALL runtime·entersyscall(SB) MOVL 4(SP), AX // syscall entry // slide args down on top of system call number @@ -36,7 +39,7 @@ ok: CALL runtime·exitsyscall(SB) RET -TEXT ·Syscall6(SB),NOSPLIT,$0-44 +TEXT ·Syscall6(SB),NOSPLIT,$0-40 CALL runtime·entersyscall(SB) MOVL 4(SP), AX // syscall entry // slide args down on top of system call number @@ -63,7 +66,7 @@ ok6: CALL runtime·exitsyscall(SB) RET -TEXT ·Syscall9(SB),NOSPLIT,$0-56 +TEXT ·Syscall9(SB),NOSPLIT,$0-52 CALL runtime·entersyscall(SB) MOVL 4(SP), AX // syscall entry // slide args down on top of system call number @@ -93,7 +96,7 @@ ok9: CALL runtime·exitsyscall(SB) RET -TEXT ·RawSyscall(SB),NOSPLIT,$0-32 +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 MOVL 4(SP), AX // syscall entry // slide args down on top of system call number LEAL 8(SP), SI @@ -114,7 +117,7 @@ ok1: MOVL $0, 28(SP) // errno RET -TEXT ·RawSyscall6(SB),NOSPLIT,$0-44 +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 MOVL 4(SP), AX // syscall entry // slide args down on top of system call number LEAL 8(SP), SI diff --git a/src/pkg/syscall/asm_darwin_amd64.s b/src/pkg/syscall/asm_darwin_amd64.s index c1970b71d996dd7628653a1c4b6f84a5e3beebad..19ea05be722651d75813f3abe00cf23a8943ea17 100644 --- a/src/pkg/syscall/asm_darwin_amd64.s +++ b/src/pkg/syscall/asm_darwin_amd64.s @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP) +// so that go vet can check that they are correct. + #include "../../cmd/ld/textflag.h" // @@ -12,7 +15,7 @@ // func Syscall6(trap int64, a1, a2, a3, a4, a5, a6 int64) (r1, r2, err int64); // Trap # in AX, args in DI SI DX, return in AX DX -TEXT ·Syscall(SB),NOSPLIT,$0-64 +TEXT ·Syscall(SB),NOSPLIT,$0-56 CALL runtime·entersyscall(SB) MOVQ 16(SP), DI MOVQ 24(SP), SI @@ -36,7 +39,7 @@ ok: CALL runtime·exitsyscall(SB) RET -TEXT ·Syscall6(SB),NOSPLIT,$0-88 +TEXT ·Syscall6(SB),NOSPLIT,$0-80 CALL runtime·entersyscall(SB) MOVQ 16(SP), DI MOVQ 24(SP), SI @@ -60,7 +63,7 @@ ok6: CALL runtime·exitsyscall(SB) RET -TEXT ·RawSyscall(SB),NOSPLIT,$0-64 +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 MOVQ 16(SP), DI MOVQ 24(SP), SI MOVQ 32(SP), DX @@ -81,7 +84,7 @@ ok1: MOVQ $0, 56(SP) // errno RET -TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 MOVQ 16(SP), DI MOVQ 24(SP), SI MOVQ 32(SP), DX diff --git a/src/pkg/syscall/asm_freebsd_386.s b/src/pkg/syscall/asm_freebsd_386.s index d24216fddc271c6299a0e7217fca727bdf8ea951..91a46b1062aaa1e5f6b635f9ffd5783e60fb28ae 100644 --- a/src/pkg/syscall/asm_freebsd_386.s +++ b/src/pkg/syscall/asm_freebsd_386.s @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP) +// so that go vet can check that they are correct. + #include "../../cmd/ld/textflag.h" // @@ -12,7 +15,7 @@ // func Syscall6(trap int32, a1, a2, a3, a4, a5, a6 int32) (r1, r2, err int32); // Trap # in AX, args on stack above caller pc. -TEXT ·Syscall(SB),NOSPLIT,$0-32 +TEXT ·Syscall(SB),NOSPLIT,$0-28 CALL runtime·entersyscall(SB) MOVL 4(SP), AX // syscall entry // slide args down on top of system call number @@ -36,7 +39,7 @@ ok: CALL runtime·exitsyscall(SB) RET -TEXT ·Syscall6(SB),NOSPLIT,$0-44 +TEXT ·Syscall6(SB),NOSPLIT,$0-40 CALL runtime·entersyscall(SB) MOVL 4(SP), AX // syscall entry // slide args down on top of system call number @@ -63,7 +66,7 @@ ok6: CALL runtime·exitsyscall(SB) RET -TEXT ·Syscall9(SB),NOSPLIT,$0-56 +TEXT ·Syscall9(SB),NOSPLIT,$0-52 CALL runtime·entersyscall(SB) MOVL 4(SP), AX // syscall entry // slide args down on top of system call number @@ -93,7 +96,7 @@ ok9: CALL runtime·exitsyscall(SB) RET -TEXT ·RawSyscall(SB),NOSPLIT,$0-32 +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 MOVL 4(SP), AX // syscall entry // slide args down on top of system call number LEAL 8(SP), SI @@ -114,7 +117,7 @@ ok1: MOVL $0, 28(SP) // errno RET -TEXT ·RawSyscall6(SB),NOSPLIT,$0-44 +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 MOVL 4(SP), AX // syscall entry // slide args down on top of system call number LEAL 8(SP), SI diff --git a/src/pkg/syscall/asm_freebsd_amd64.s b/src/pkg/syscall/asm_freebsd_amd64.s index fca7f371ed85d956a8aab08ec67cb9dcb287140e..7abb36828a36cf6d268a75c2becfb2b9e1df8b08 100644 --- a/src/pkg/syscall/asm_freebsd_amd64.s +++ b/src/pkg/syscall/asm_freebsd_amd64.s @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP) +// so that go vet can check that they are correct. + #include "../../cmd/ld/textflag.h" // @@ -18,7 +21,7 @@ // func Syscall9(trap int64, a1, a2, a3, a4, a5, a6, a7, a8, a9 int64) (r1, r2, err int64) // Trap # in AX, args in DI SI DX, return in AX DX -TEXT ·Syscall(SB),NOSPLIT,$0-64 +TEXT ·Syscall(SB),NOSPLIT,$0-56 CALL runtime·entersyscall(SB) MOVQ 16(SP), DI MOVQ 24(SP), SI @@ -41,7 +44,7 @@ ok: CALL runtime·exitsyscall(SB) RET -TEXT ·Syscall6(SB),NOSPLIT,$0-88 +TEXT ·Syscall6(SB),NOSPLIT,$0-80 CALL runtime·entersyscall(SB) MOVQ 16(SP), DI MOVQ 24(SP), SI @@ -64,7 +67,7 @@ ok6: CALL runtime·exitsyscall(SB) RET -TEXT ·Syscall9(SB),NOSPLIT,$0-112 +TEXT ·Syscall9(SB),NOSPLIT,$0-104 CALL runtime·entersyscall(SB) MOVQ 8(SP), AX MOVQ 16(SP), DI @@ -97,7 +100,7 @@ ok9: CALL runtime·exitsyscall(SB) RET -TEXT ·RawSyscall(SB),NOSPLIT,$0-64 +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 MOVQ 16(SP), DI MOVQ 24(SP), SI MOVQ 32(SP), DX @@ -117,7 +120,7 @@ ok1: MOVQ $0, 56(SP) // errno RET -TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 MOVQ 16(SP), DI MOVQ 24(SP), SI MOVQ 32(SP), DX diff --git a/src/pkg/syscall/asm_linux_386.s b/src/pkg/syscall/asm_linux_386.s index cf2ab02abe5efa6d985c3f8762f56abcc3be8d89..668fc2bee5d08bcbeeac116eeb2ef58fecd3399a 100644 --- a/src/pkg/syscall/asm_linux_386.s +++ b/src/pkg/syscall/asm_linux_386.s @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP) +// so that go vet can check that they are correct. + #include "../../cmd/ld/textflag.h" // @@ -11,7 +14,7 @@ // func Syscall(trap uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr); // Trap # in AX, args in BX CX DX SI DI, return in AX -TEXT ·Syscall(SB),NOSPLIT,$0-32 +TEXT ·Syscall(SB),NOSPLIT,$0-28 CALL runtime·entersyscall(SB) MOVL 4(SP), AX // syscall entry MOVL 8(SP), BX @@ -36,7 +39,7 @@ ok: RET // func Syscall6(trap uintptr, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr); -TEXT ·Syscall6(SB),NOSPLIT,$0-44 +TEXT ·Syscall6(SB),NOSPLIT,$0-40 CALL runtime·entersyscall(SB) MOVL 4(SP), AX // syscall entry MOVL 8(SP), BX @@ -62,7 +65,7 @@ ok6: RET // func RawSyscall(trap uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr); -TEXT ·RawSyscall(SB),NOSPLIT,$0-32 +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 MOVL 4(SP), AX // syscall entry MOVL 8(SP), BX MOVL 12(SP), CX @@ -84,7 +87,7 @@ ok1: RET // func RawSyscall6(trap uintptr, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr); -TEXT ·RawSyscall6(SB),NOSPLIT,$0-44 +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 MOVL 4(SP), AX // syscall entry MOVL 8(SP), BX MOVL 12(SP), CX @@ -110,7 +113,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-40 +TEXT ·socketcall(SB),NOSPLIT,$0-36 CALL runtime·entersyscall(SB) MOVL $SYS_SOCKETCALL, AX // syscall entry MOVL 4(SP), BX // socket call number @@ -134,7 +137,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-40 +TEXT ·rawsocketcall(SB),NOSPLIT,$0-36 MOVL $SYS_SOCKETCALL, AX // syscall entry MOVL 4(SP), BX // socket call number LEAL 8(SP), CX // pointer to call arguments diff --git a/src/pkg/syscall/asm_linux_amd64.s b/src/pkg/syscall/asm_linux_amd64.s index 28a2a58092a0ebb31f4dbdd4300a2a256b8403e6..d75096dec01c178fbabef2dae2a705a49a179dac 100644 --- a/src/pkg/syscall/asm_linux_amd64.s +++ b/src/pkg/syscall/asm_linux_amd64.s @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP) +// so that go vet can check that they are correct. + #include "../../cmd/ld/textflag.h" // @@ -13,7 +16,7 @@ // Note that this differs from "standard" ABI convention, which // would pass 4th arg in CX, not R10. -TEXT ·Syscall(SB),NOSPLIT,$0-64 +TEXT ·Syscall(SB),NOSPLIT,$0-56 CALL runtime·entersyscall(SB) MOVQ 16(SP), DI MOVQ 24(SP), SI @@ -38,7 +41,7 @@ ok: CALL runtime·exitsyscall(SB) RET -TEXT ·Syscall6(SB),NOSPLIT,$0-88 +TEXT ·Syscall6(SB),NOSPLIT,$0-80 CALL runtime·entersyscall(SB) MOVQ 16(SP), DI MOVQ 24(SP), SI @@ -63,7 +66,7 @@ ok6: CALL runtime·exitsyscall(SB) RET -TEXT ·RawSyscall(SB),NOSPLIT,$0-64 +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 MOVQ 16(SP), DI MOVQ 24(SP), SI MOVQ 32(SP), DX @@ -85,7 +88,7 @@ ok1: MOVQ $0, 56(SP) // errno RET -TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 MOVQ 16(SP), DI MOVQ 24(SP), SI MOVQ 32(SP), DX diff --git a/src/pkg/syscall/asm_nacl_386.s b/src/pkg/syscall/asm_nacl_386.s index 7f330d3d6c8573102a596a89a5f430f6cddcd649..de7c3cc5da6ef9218660c23c0832ca94f1a1aedc 100644 --- a/src/pkg/syscall/asm_nacl_386.s +++ b/src/pkg/syscall/asm_nacl_386.s @@ -15,7 +15,7 @@ #define NACL_SYSJMP(code) \ MOVL $(0x10000 + ((code)<<5)), AX; JMP AX -TEXT syscall·Syscall(SB),NOSPLIT,$12-32 +TEXT syscall·Syscall(SB),NOSPLIT,$12-28 CALL runtime·entersyscall(SB) MOVL trap+0(FP), AX MOVL a1+4(FP), BX @@ -32,12 +32,12 @@ TEXT syscall·Syscall(SB),NOSPLIT,$12-32 MOVL $-1, r1+16(FP) MOVL $-1, r2+20(FP) NEGL AX - MOVL AX, errno+24(FP) + MOVL AX, err+24(FP) CALL runtime·exitsyscall(SB) RET ok: MOVL AX, r1+16(FP) MOVL DX, r2+20(FP) - MOVL $0, errno+24(FP) + MOVL $0, err+24(FP) CALL runtime·exitsyscall(SB) RET diff --git a/src/pkg/syscall/asm_nacl_amd64p32.s b/src/pkg/syscall/asm_nacl_amd64p32.s index 0ff6ece3d4e4b70b88c6692b9dc4b71baba967b6..de030ec806befe65dd3a92fdd3ea21d0893b2653 100644 --- a/src/pkg/syscall/asm_nacl_amd64p32.s +++ b/src/pkg/syscall/asm_nacl_amd64p32.s @@ -15,7 +15,7 @@ #define NACL_SYSJMP(code) \ MOVL $(0x10000 + ((code)<<5)), AX; JMP AX -TEXT syscall·Syscall(SB),NOSPLIT,$0-32 +TEXT syscall·Syscall(SB),NOSPLIT,$0-28 CALL runtime·entersyscall(SB) MOVL trap+0(FP), AX MOVL a1+4(FP), DI @@ -30,12 +30,12 @@ TEXT syscall·Syscall(SB),NOSPLIT,$0-32 MOVL $-1, r1+16(FP) MOVL $-1, r2+20(FP) NEGL AX - MOVL AX, errno+24(FP) + MOVL AX, err+24(FP) CALL runtime·exitsyscall(SB) RET ok: MOVL AX, r1+16(FP) MOVL DX, r2+20(FP) - MOVL $0, errno+24(FP) + MOVL $0, err+24(FP) CALL runtime·exitsyscall(SB) RET diff --git a/src/pkg/syscall/asm_netbsd_386.s b/src/pkg/syscall/asm_netbsd_386.s index 8caade255165d2b04052a1eb9136eb8cde1efbb0..40b30b405318796511ce034c82d56ba606cf73b3 100644 --- a/src/pkg/syscall/asm_netbsd_386.s +++ b/src/pkg/syscall/asm_netbsd_386.s @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP) +// so that go vet can check that they are correct. + #include "../../cmd/ld/textflag.h" // @@ -12,7 +15,7 @@ // func Syscall6(trap int32, a1, a2, a3, a4, a5, a6 int32) (r1, r2, err int32); // Trap # in AX, args on stack above caller pc. -TEXT ·Syscall(SB),NOSPLIT,$0-32 +TEXT ·Syscall(SB),NOSPLIT,$0-28 CALL runtime·entersyscall(SB) MOVL 4(SP), AX // syscall entry // slide args down on top of system call number @@ -36,7 +39,7 @@ ok: CALL runtime·exitsyscall(SB) RET -TEXT ·Syscall6(SB),NOSPLIT,$0-44 +TEXT ·Syscall6(SB),NOSPLIT,$0-40 CALL runtime·entersyscall(SB) MOVL 4(SP), AX // syscall entry // slide args down on top of system call number @@ -63,7 +66,7 @@ ok6: CALL runtime·exitsyscall(SB) RET -TEXT ·Syscall9(SB),NOSPLIT,$0-56 +TEXT ·Syscall9(SB),NOSPLIT,$0-52 CALL runtime·entersyscall(SB) MOVL 4(SP), AX // syscall entry // slide args down on top of system call number @@ -93,7 +96,7 @@ ok9: CALL runtime·exitsyscall(SB) RET -TEXT ·RawSyscall(SB),NOSPLIT,$0-32 +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 MOVL 4(SP), AX // syscall entry // slide args down on top of system call number LEAL 8(SP), SI @@ -114,7 +117,7 @@ ok1: MOVL $0, 28(SP) // errno RET -TEXT ·RawSyscall6(SB),NOSPLIT,$0-44 +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 MOVL 4(SP), AX // syscall entry // slide args down on top of system call number LEAL 8(SP), SI diff --git a/src/pkg/syscall/asm_netbsd_amd64.s b/src/pkg/syscall/asm_netbsd_amd64.s index e0b8b3cb8b135a618a8903a7474c42b53566d576..94ad0284adc82bc155bbeeeccb5357cba78f97f2 100644 --- a/src/pkg/syscall/asm_netbsd_amd64.s +++ b/src/pkg/syscall/asm_netbsd_amd64.s @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP) +// so that go vet can check that they are correct. + #include "../../cmd/ld/textflag.h" // @@ -13,7 +16,7 @@ // func Syscall9(trap int64, a1, a2, a3, a4, a5, a6, a7, a8, a9 int64) (r1, r2, err int64); // Trap # in AX, args in DI SI DX, return in AX DX -TEXT ·Syscall(SB),NOSPLIT,$0-64 +TEXT ·Syscall(SB),NOSPLIT,$0-56 CALL runtime·entersyscall(SB) MOVQ 8(SP), AX // syscall entry MOVQ 16(SP), DI @@ -36,7 +39,7 @@ ok: CALL runtime·exitsyscall(SB) RET -TEXT ·Syscall6(SB),NOSPLIT,$0-88 +TEXT ·Syscall6(SB),NOSPLIT,$0-80 CALL runtime·entersyscall(SB) MOVQ 8(SP), AX // syscall entry MOVQ 16(SP), DI @@ -59,7 +62,7 @@ ok6: CALL runtime·exitsyscall(SB) RET -TEXT ·Syscall9(SB),NOSPLIT,$0-112 +TEXT ·Syscall9(SB),NOSPLIT,$0-104 CALL runtime·entersyscall(SB) MOVQ 8(SP), AX // syscall entry MOVQ 16(SP), DI @@ -91,7 +94,7 @@ ok9: CALL runtime·exitsyscall(SB) RET -TEXT ·RawSyscall(SB),NOSPLIT,$0-64 +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 MOVQ 16(SP), DI MOVQ 24(SP), SI MOVQ 32(SP), DX @@ -111,7 +114,7 @@ ok1: MOVQ $0, 56(SP) // errno RET -TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 MOVQ 16(SP), DI MOVQ 24(SP), SI MOVQ 32(SP), DX diff --git a/src/pkg/syscall/asm_openbsd_386.s b/src/pkg/syscall/asm_openbsd_386.s index a383496611bc7072dc79fa8ddcf06f8658ccb2eb..7dd2e373f7e3e169811189dc8aa1ca196caf8959 100644 --- a/src/pkg/syscall/asm_openbsd_386.s +++ b/src/pkg/syscall/asm_openbsd_386.s @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP) +// so that go vet can check that they are correct. + #include "../../cmd/ld/textflag.h" // @@ -12,7 +15,7 @@ // func Syscall6(trap int32, a1, a2, a3, a4, a5, a6 int32) (r1, r2, err int32); // Trap # in AX, args on stack above caller pc. -TEXT ·Syscall(SB),NOSPLIT,$0-32 +TEXT ·Syscall(SB),NOSPLIT,$0-28 CALL runtime·entersyscall(SB) MOVL 4(SP), AX // syscall entry // slide args down on top of system call number @@ -36,7 +39,7 @@ ok: CALL runtime·exitsyscall(SB) RET -TEXT ·Syscall6(SB),NOSPLIT,$0-44 +TEXT ·Syscall6(SB),NOSPLIT,$0-40 CALL runtime·entersyscall(SB) MOVL 4(SP), AX // syscall entry // slide args down on top of system call number @@ -63,7 +66,7 @@ ok6: CALL runtime·exitsyscall(SB) RET -TEXT ·Syscall9(SB),NOSPLIT,$0-56 +TEXT ·Syscall9(SB),NOSPLIT,$0-52 CALL runtime·entersyscall(SB) MOVL 4(SP), AX // syscall entry // slide args down on top of system call number @@ -93,7 +96,7 @@ ok9: CALL runtime·exitsyscall(SB) RET -TEXT ·RawSyscall(SB),NOSPLIT,$0-32 +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 MOVL 4(SP), AX // syscall entry // slide args down on top of system call number LEAL 8(SP), SI @@ -114,7 +117,7 @@ ok1: MOVL $0, 28(SP) // errno RET -TEXT ·RawSyscall6(SB),NOSPLIT,$0-44 +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 MOVL 4(SP), AX // syscall entry // slide args down on top of system call number LEAL 8(SP), SI diff --git a/src/pkg/syscall/asm_openbsd_amd64.s b/src/pkg/syscall/asm_openbsd_amd64.s index 1bf25f1dbdf4ad439f98b19730825b786189d5f9..e127bf220cf4e9443ca194ac29d254311b3382f6 100644 --- a/src/pkg/syscall/asm_openbsd_amd64.s +++ b/src/pkg/syscall/asm_openbsd_amd64.s @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP) +// so that go vet can check that they are correct. + #include "../../cmd/ld/textflag.h" // @@ -13,7 +16,7 @@ // func Syscall9(trap int64, a1, a2, a3, a4, a5, a6, a7, a8, a9 int64) (r1, r2, err int64); // Trap # in AX, args in DI SI DX, return in AX DX -TEXT ·Syscall(SB),NOSPLIT,$0-64 +TEXT ·Syscall(SB),NOSPLIT,$0-56 CALL runtime·entersyscall(SB) MOVQ 8(SP), AX // syscall entry MOVQ 16(SP), DI @@ -36,7 +39,7 @@ ok: CALL runtime·exitsyscall(SB) RET -TEXT ·Syscall6(SB),NOSPLIT,$0-88 +TEXT ·Syscall6(SB),NOSPLIT,$0-80 CALL runtime·entersyscall(SB) MOVQ 8(SP), AX // syscall entry MOVQ 16(SP), DI @@ -59,7 +62,7 @@ ok6: CALL runtime·exitsyscall(SB) RET -TEXT ·Syscall9(SB),NOSPLIT,$0-112 +TEXT ·Syscall9(SB),NOSPLIT,$0-104 CALL runtime·entersyscall(SB) MOVQ 8(SP), AX // syscall entry MOVQ 16(SP), DI @@ -91,7 +94,7 @@ ok9: CALL runtime·exitsyscall(SB) RET -TEXT ·RawSyscall(SB),NOSPLIT,$0-64 +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 MOVQ 16(SP), DI MOVQ 24(SP), SI MOVQ 32(SP), DX @@ -111,7 +114,7 @@ ok1: MOVQ $0, 56(SP) // errno RET -TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 MOVQ 16(SP), DI MOVQ 24(SP), SI MOVQ 32(SP), DX diff --git a/src/pkg/syscall/asm_plan9_386.s b/src/pkg/syscall/asm_plan9_386.s index 7ebd20690827dc727d7d86430b87e32099b58167..f8c07c407af61d822788d80a5daa9b41710778ed 100644 --- a/src/pkg/syscall/asm_plan9_386.s +++ b/src/pkg/syscall/asm_plan9_386.s @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP) +// so that go vet can check that they are correct. + #include "../../cmd/ld/textflag.h" // @@ -87,7 +90,7 @@ copyresult4: CALL runtime·exitsyscall(SB) RET -TEXT ·RawSyscall(SB),NOSPLIT,$0-32 +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 MOVL 4(SP), AX // syscall entry // slide args down on top of system call number LEAL 8(SP), SI @@ -102,7 +105,7 @@ TEXT ·RawSyscall(SB),NOSPLIT,$0-32 MOVL AX, err+28(SP) RET -TEXT ·RawSyscall6(SB),NOSPLIT,$0-44 +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 MOVL 4(SP), AX // syscall entry // slide args down on top of system call number LEAL 8(SP), SI @@ -123,7 +126,7 @@ TEXT ·RawSyscall6(SB),NOSPLIT,$0-44 #define SYS_SEEK 39 /* from zsysnum_plan9_386.go */ //func seek(placeholder uintptr, fd int, offset int64, whence int) (newoffset int64, err string) -TEXT ·seek(SB),NOSPLIT,$0-40 +TEXT ·seek(SB),NOSPLIT,$0-36 LEAL newoffset+24(SP), AX MOVL AX, placeholder+4(SP) diff --git a/src/pkg/syscall/asm_plan9_amd64.s b/src/pkg/syscall/asm_plan9_amd64.s index 880bf7c6f512ff8b78f4a8c177d01deeaa04587d..2154a87d59322cc0015bb7fc03110fe0b7e1bbcb 100644 --- a/src/pkg/syscall/asm_plan9_amd64.s +++ b/src/pkg/syscall/asm_plan9_amd64.s @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP) +// so that go vet can check that they are correct. + #include "../../cmd/ld/textflag.h" // @@ -91,7 +94,7 @@ copyresult4: CALL runtime·exitsyscall(SB) RET -TEXT ·RawSyscall(SB),NOSPLIT,$0-64 +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 MOVQ $0x8000, AX // for NxM MOVQ 8(SP), BP // syscall entry // slide args down on top of system call number @@ -107,7 +110,7 @@ TEXT ·RawSyscall(SB),NOSPLIT,$0-64 MOVQ AX, err+56(SP) RET -TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 MOVQ $0x8000, AX // for NxM MOVQ 8(SP), BP // syscall entry // slide args down on top of system call number @@ -129,7 +132,7 @@ TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 #define SYS_SEEK 39 /* from zsysnum_plan9_amd64.go */ //func seek(placeholder uintptr, fd int, offset int64, whence int) (newoffset int64, err string) -TEXT ·seek(SB),NOSPLIT,$0-64 +TEXT ·seek(SB),NOSPLIT,$0-56 LEAQ newoffset+40(SP), AX MOVQ AX, placeholder+8(SP) @@ -160,7 +163,7 @@ copyresult6: //func exit(code int) // Import runtime·exit for cleanly exiting. -TEXT ·exit(SB),NOSPLIT,$8-4 +TEXT ·exit(SB),NOSPLIT,$8-8 MOVQ code+0(FP), AX MOVQ AX, 0(SP) CALL runtime·exit(SB) diff --git a/src/pkg/syscall/syscall_linux_386.go b/src/pkg/syscall/syscall_linux_386.go index e8943944d5d57b75639a4b3e4cad9fffe85cbf70..4487848f734c6df486f2fe492467f82964dacd18 100644 --- a/src/pkg/syscall/syscall_linux_386.go +++ b/src/pkg/syscall/syscall_linux_386.go @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP) +// so that go vet can check that they are correct. + package syscall import "unsafe" diff --git a/src/pkg/syscall/syscall_plan9.go b/src/pkg/syscall/syscall_plan9.go index 2e1c064c46a5b65541344add12f814579eb434ae..a8c340541fc9d51e41f37737484255a40e42256f 100644 --- a/src/pkg/syscall/syscall_plan9.go +++ b/src/pkg/syscall/syscall_plan9.go @@ -83,7 +83,7 @@ func errstr() string { } // Implemented in assembly to import from runtime. -func exit(int) +func exit(code int) func Exit(code int) { exit(code) }