mirror of
https://github.com/golang/go
synced 2024-11-22 08:54:39 -07:00
syscall: Convert textflags from numbers to symbols.
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12773043
This commit is contained in:
parent
ac0df6ce89
commit
db324ccd72
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#include "../../cmd/ld/textflag.h"
|
||||
|
||||
//
|
||||
// System call support for 386, Darwin
|
||||
//
|
||||
@ -10,7 +12,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),7,$0-32
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-32
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
@ -34,7 +36,7 @@ ok:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall6(SB),7,$0-44
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-44
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
@ -61,7 +63,7 @@ ok6:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall9(SB),7,$0-56
|
||||
TEXT ·Syscall9(SB),NOSPLIT,$0-56
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
@ -91,7 +93,7 @@ ok9:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),7,$0-32
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-32
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
LEAL 8(SP), SI
|
||||
@ -112,7 +114,7 @@ ok1:
|
||||
MOVL $0, 28(SP) // errno
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall6(SB),7,$0-44
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-44
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
LEAL 8(SP), SI
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#include "../../cmd/ld/textflag.h"
|
||||
|
||||
//
|
||||
// System call support for AMD64, Darwin
|
||||
//
|
||||
@ -10,7 +12,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),7,$0-64
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-64
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVQ 16(SP), DI
|
||||
MOVQ 24(SP), SI
|
||||
@ -34,7 +36,7 @@ ok:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall6(SB),7,$0-88
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-88
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVQ 16(SP), DI
|
||||
MOVQ 24(SP), SI
|
||||
@ -58,7 +60,7 @@ ok6:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),7,$0-64
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-64
|
||||
MOVQ 16(SP), DI
|
||||
MOVQ 24(SP), SI
|
||||
MOVQ 32(SP), DX
|
||||
@ -79,7 +81,7 @@ ok1:
|
||||
MOVQ $0, 56(SP) // errno
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall6(SB),7,$0-88
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-88
|
||||
MOVQ 16(SP), DI
|
||||
MOVQ 24(SP), SI
|
||||
MOVQ 32(SP), DX
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#include "../../cmd/ld/textflag.h"
|
||||
|
||||
//
|
||||
// System call support for 386, FreeBSD
|
||||
//
|
||||
@ -10,7 +12,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),7,$0-32
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-32
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
@ -34,7 +36,7 @@ ok:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall6(SB),7,$0-44
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-44
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
@ -61,7 +63,7 @@ ok6:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall9(SB),7,$0-56
|
||||
TEXT ·Syscall9(SB),NOSPLIT,$0-56
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
@ -91,7 +93,7 @@ ok9:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),7,$0-32
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-32
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
LEAL 8(SP), SI
|
||||
@ -112,7 +114,7 @@ ok1:
|
||||
MOVL $0, 28(SP) // errno
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall6(SB),7,$0-44
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-44
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
LEAL 8(SP), SI
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#include "../../cmd/ld/textflag.h"
|
||||
|
||||
//
|
||||
// System call support for AMD64, FreeBSD
|
||||
//
|
||||
@ -11,7 +13,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),7,$0-64
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-64
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVQ 16(SP), DI
|
||||
MOVQ 24(SP), SI
|
||||
@ -34,7 +36,7 @@ ok:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall6(SB),7,$0-88
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-88
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVQ 16(SP), DI
|
||||
MOVQ 24(SP), SI
|
||||
@ -57,7 +59,7 @@ ok6:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall9(SB),7,$0-112
|
||||
TEXT ·Syscall9(SB),NOSPLIT,$0-112
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVQ 8(SP), AX
|
||||
MOVQ 16(SP), DI
|
||||
@ -90,7 +92,7 @@ ok9:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),7,$0-64
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-64
|
||||
MOVQ 16(SP), DI
|
||||
MOVQ 24(SP), SI
|
||||
MOVQ 32(SP), DX
|
||||
@ -110,7 +112,7 @@ ok1:
|
||||
MOVQ $0, 56(SP) // errno
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall6(SB),7,$0-88
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-88
|
||||
MOVQ 16(SP), DI
|
||||
MOVQ 24(SP), SI
|
||||
MOVQ 32(SP), DX
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#include "../../cmd/ld/textflag.h"
|
||||
|
||||
//
|
||||
// System call support for ARM, FreeBSD
|
||||
//
|
||||
@ -10,7 +12,7 @@
|
||||
// func Syscall6(trap int32, a1, a2, a3, a4, a5, a6 int32) (r1, r2, err int32);
|
||||
// func Syscall9(trap int32, a1, a2, a3, a4, a5, a6, a7, a8, a9 int64) (r1, r2, err int32)
|
||||
|
||||
TEXT ·Syscall(SB),7,$0-28
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-28
|
||||
BL runtime·entersyscall(SB)
|
||||
MOVW 0(FP), R0 // sigcall num
|
||||
MOVW 4(FP), R1 // a1
|
||||
@ -32,7 +34,7 @@ error:
|
||||
BL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall6(SB),7,$0-40
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-40
|
||||
BL runtime·entersyscall(SB)
|
||||
MOVW 0(FP), R0 // sigcall num
|
||||
MOVW 4(FP), R1 // a1
|
||||
@ -57,7 +59,7 @@ error6:
|
||||
BL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall9(SB),7,$0-52
|
||||
TEXT ·Syscall9(SB),NOSPLIT,$0-52
|
||||
BL runtime·entersyscall(SB)
|
||||
MOVW 0(FP), R0 // sigcall num
|
||||
MOVW 4(FP), R1 // a1
|
||||
@ -82,7 +84,7 @@ error9:
|
||||
BL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),7,$0-28
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-28
|
||||
MOVW 0(FP), R0 // sigcall num
|
||||
MOVW 4(FP), R1 // a1
|
||||
MOVW 8(FP), R2 // a2
|
||||
@ -101,7 +103,7 @@ errorr:
|
||||
MOVW R0, 24(FP) // err
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall6(SB),7,$0-40
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
|
||||
MOVW 0(FP), R0 // sigcall num
|
||||
MOVW 4(FP), R1 // a1
|
||||
MOVW 8(FP), R2 // a2
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#include "../../cmd/ld/textflag.h"
|
||||
|
||||
//
|
||||
// System calls for 386, Linux
|
||||
//
|
||||
@ -9,7 +11,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),7,$0-32
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-32
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
MOVL 8(SP), BX
|
||||
@ -34,7 +36,7 @@ ok:
|
||||
RET
|
||||
|
||||
// func Syscall6(trap uintptr, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);
|
||||
TEXT ·Syscall6(SB),7,$0-44
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-44
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
MOVL 8(SP), BX
|
||||
@ -60,7 +62,7 @@ ok6:
|
||||
RET
|
||||
|
||||
// func RawSyscall(trap uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr);
|
||||
TEXT ·RawSyscall(SB),7,$0-32
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-32
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
MOVL 8(SP), BX
|
||||
MOVL 12(SP), CX
|
||||
@ -82,7 +84,7 @@ ok1:
|
||||
RET
|
||||
|
||||
// func RawSyscall6(trap uintptr, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);
|
||||
TEXT ·RawSyscall6(SB),7,$0-44
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-44
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
MOVL 8(SP), BX
|
||||
MOVL 12(SP), CX
|
||||
@ -108,7 +110,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),7,$0-40
|
||||
TEXT ·socketcall(SB),NOSPLIT,$0-40
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL $SYS_SOCKETCALL, AX // syscall entry
|
||||
MOVL 4(SP), BX // socket call number
|
||||
@ -132,7 +134,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),7,$0-40
|
||||
TEXT ·rawsocketcall(SB),NOSPLIT,$0-40
|
||||
MOVL $SYS_SOCKETCALL, AX // syscall entry
|
||||
MOVL 4(SP), BX // socket call number
|
||||
LEAL 8(SP), CX // pointer to call arguments
|
||||
@ -157,7 +159,7 @@ oksock1:
|
||||
// taking the address of the return value newoffset.
|
||||
// Underlying system call is
|
||||
// llseek(int fd, int offhi, int offlo, int64 *result, int whence)
|
||||
TEXT ·Seek(SB),7,$0-32
|
||||
TEXT ·Seek(SB),NOSPLIT,$0-32
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL $SYS__LLSEEK, AX // syscall entry
|
||||
MOVL 4(SP), BX // fd
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#include "../../cmd/ld/textflag.h"
|
||||
|
||||
//
|
||||
// System calls for AMD64, Linux
|
||||
//
|
||||
@ -11,7 +13,7 @@
|
||||
// Note that this differs from "standard" ABI convention, which
|
||||
// would pass 4th arg in CX, not R10.
|
||||
|
||||
TEXT ·Syscall(SB),7,$0-64
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-64
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVQ 16(SP), DI
|
||||
MOVQ 24(SP), SI
|
||||
@ -36,7 +38,7 @@ ok:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall6(SB),7,$0-88
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-88
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVQ 16(SP), DI
|
||||
MOVQ 24(SP), SI
|
||||
@ -61,7 +63,7 @@ ok6:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),7,$0-64
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-64
|
||||
MOVQ 16(SP), DI
|
||||
MOVQ 24(SP), SI
|
||||
MOVQ 32(SP), DX
|
||||
@ -83,7 +85,7 @@ ok1:
|
||||
MOVQ $0, 56(SP) // errno
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall6(SB),7,$0-88
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-88
|
||||
MOVQ 16(SP), DI
|
||||
MOVQ 24(SP), SI
|
||||
MOVQ 32(SP), DX
|
||||
@ -105,7 +107,7 @@ ok2:
|
||||
MOVQ $0, 80(SP) // errno
|
||||
RET
|
||||
|
||||
TEXT ·Gettimeofday(SB),7,$0-24
|
||||
TEXT ·Gettimeofday(SB),NOSPLIT,$0-24
|
||||
MOVQ 8(SP), DI
|
||||
MOVQ $0, SI
|
||||
MOVQ runtime·__vdso_gettimeofday_sym(SB), AX
|
||||
@ -120,7 +122,7 @@ ok7:
|
||||
MOVQ $0, 16(SP) // errno
|
||||
RET
|
||||
|
||||
TEXT ·Time(SB),7,$0-32
|
||||
TEXT ·Time(SB),NOSPLIT,$0-32
|
||||
MOVQ 8(SP), DI
|
||||
MOVQ runtime·__vdso_time_sym(SB), AX
|
||||
CALL AX
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#include "../../cmd/ld/textflag.h"
|
||||
|
||||
//
|
||||
// System calls for arm, Linux
|
||||
//
|
||||
@ -10,7 +12,7 @@
|
||||
|
||||
// func Syscall(syscall uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr);
|
||||
|
||||
TEXT ·Syscall(SB),7,$0-28
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-28
|
||||
BL runtime·entersyscall(SB)
|
||||
MOVW 4(SP), R7
|
||||
MOVW 8(SP), R0
|
||||
@ -38,7 +40,7 @@ ok:
|
||||
|
||||
// func Syscall6(trap uintptr, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);
|
||||
// Actually Syscall5 but the rest of the code expects it to be named Syscall6.
|
||||
TEXT ·Syscall6(SB),7,$0-40
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-40
|
||||
BL runtime·entersyscall(SB)
|
||||
MOVW 4(SP), R7 // syscall entry
|
||||
MOVW 8(SP), R0
|
||||
@ -69,7 +71,7 @@ ok6:
|
||||
|
||||
// func RawSyscall6(trap uintptr, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);
|
||||
// Actually RawSyscall5 but the rest of the code expects it to be named RawSyscall6.
|
||||
TEXT ·RawSyscall6(SB),7,$0-40
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
|
||||
MOVW 4(SP), R7 // syscall entry
|
||||
MOVW 8(SP), R0
|
||||
MOVW 12(SP), R1
|
||||
@ -101,7 +103,7 @@ ok2:
|
||||
// taking the address of the return value newoffset.
|
||||
// Underlying system call is
|
||||
// llseek(int fd, int offhi, int offlo, int64 *result, int whence)
|
||||
TEXT ·Seek(SB),7,$0-32
|
||||
TEXT ·Seek(SB),NOSPLIT,$0-32
|
||||
BL runtime·entersyscall(SB)
|
||||
MOVW $SYS__LLSEEK, R7 // syscall entry
|
||||
MOVW 4(SP), R0 // fd
|
||||
@ -128,7 +130,7 @@ okseek:
|
||||
RET
|
||||
|
||||
// func RawSyscall(trap uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr);
|
||||
TEXT ·RawSyscall(SB),7,$0-28
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-28
|
||||
MOVW 4(SP), R7 // syscall entry
|
||||
MOVW 8(SP), R0
|
||||
MOVW 12(SP), R1
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#include "../../cmd/ld/textflag.h"
|
||||
|
||||
//
|
||||
// System call support for 386, NetBSD
|
||||
//
|
||||
@ -10,7 +12,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),7,$0-32
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-32
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
@ -34,7 +36,7 @@ ok:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall6(SB),7,$0-44
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-44
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
@ -61,7 +63,7 @@ ok6:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall9(SB),7,$0-56
|
||||
TEXT ·Syscall9(SB),NOSPLIT,$0-56
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
@ -91,7 +93,7 @@ ok9:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),7,$0-32
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-32
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
LEAL 8(SP), SI
|
||||
@ -112,7 +114,7 @@ ok1:
|
||||
MOVL $0, 28(SP) // errno
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall6(SB),7,$0-44
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-44
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
LEAL 8(SP), SI
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#include "../../cmd/ld/textflag.h"
|
||||
|
||||
//
|
||||
// System call support for AMD64, NetBSD
|
||||
//
|
||||
@ -11,7 +13,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),7,$0-64
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-64
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVQ 8(SP), AX // syscall entry
|
||||
MOVQ 16(SP), DI
|
||||
@ -34,7 +36,7 @@ ok:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall6(SB),7,$0-88
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-88
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVQ 8(SP), AX // syscall entry
|
||||
MOVQ 16(SP), DI
|
||||
@ -57,7 +59,7 @@ ok6:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall9(SB),7,$0-112
|
||||
TEXT ·Syscall9(SB),NOSPLIT,$0-112
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVQ 8(SP), AX // syscall entry
|
||||
MOVQ 16(SP), DI
|
||||
@ -89,7 +91,7 @@ ok9:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),7,$0-64
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-64
|
||||
MOVQ 16(SP), DI
|
||||
MOVQ 24(SP), SI
|
||||
MOVQ 32(SP), DX
|
||||
@ -109,7 +111,7 @@ ok1:
|
||||
MOVQ $0, 56(SP) // errno
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall6(SB),7,$0-88
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-88
|
||||
MOVQ 16(SP), DI
|
||||
MOVQ 24(SP), SI
|
||||
MOVQ 32(SP), DX
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#include "../../cmd/ld/textflag.h"
|
||||
|
||||
//
|
||||
// System call support for ARM, NetBSD
|
||||
//
|
||||
@ -10,7 +12,7 @@
|
||||
// func Syscall6(trap int32, a1, a2, a3, a4, a5, a6 int32) (r1, r2, err int32);
|
||||
// func Syscall9(trap int32, a1, a2, a3, a4, a5, a6, a7, a8, a9 int64) (r1, r2, err int32)
|
||||
|
||||
TEXT ·Syscall(SB),7,$0-28
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-28
|
||||
BL runtime·entersyscall(SB)
|
||||
MOVW 0(FP), R0 // sigcall num
|
||||
MOVW 4(FP), R1 // a1
|
||||
@ -32,7 +34,7 @@ error:
|
||||
BL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall6(SB),7,$0-40
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-40
|
||||
BL runtime·entersyscall(SB)
|
||||
MOVW 0(FP), R0 // sigcall num
|
||||
MOVW 4(FP), R1 // a1
|
||||
@ -57,7 +59,7 @@ error6:
|
||||
BL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall9(SB),7,$0-52
|
||||
TEXT ·Syscall9(SB),NOSPLIT,$0-52
|
||||
BL runtime·entersyscall(SB)
|
||||
MOVW 0(FP), R0 // sigcall num
|
||||
MOVW 4(FP), R1 // a1
|
||||
@ -82,7 +84,7 @@ error9:
|
||||
BL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),7,$0-28
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-28
|
||||
MOVW 0(FP), R0 // sigcall num
|
||||
MOVW 4(FP), R1 // a1
|
||||
MOVW 8(FP), R2 // a2
|
||||
@ -101,7 +103,7 @@ errorr:
|
||||
MOVW R0, 24(FP) // err
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall6(SB),7,$0-40
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
|
||||
MOVW 0(FP), R0 // sigcall num
|
||||
MOVW 4(FP), R1 // a1
|
||||
MOVW 8(FP), R2 // a2
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#include "../../cmd/ld/textflag.h"
|
||||
|
||||
//
|
||||
// System call support for 386, OpenBSD
|
||||
//
|
||||
@ -10,7 +12,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),7,$0-32
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-32
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
@ -34,7 +36,7 @@ ok:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall6(SB),7,$0-44
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-44
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
@ -61,7 +63,7 @@ ok6:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall9(SB),7,$0-56
|
||||
TEXT ·Syscall9(SB),NOSPLIT,$0-56
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
@ -91,7 +93,7 @@ ok9:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),7,$0-32
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-32
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
LEAL 8(SP), SI
|
||||
@ -112,7 +114,7 @@ ok1:
|
||||
MOVL $0, 28(SP) // errno
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall6(SB),7,$0-44
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-44
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
LEAL 8(SP), SI
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#include "../../cmd/ld/textflag.h"
|
||||
|
||||
//
|
||||
// System call support for AMD64, OpenBSD
|
||||
//
|
||||
@ -11,7 +13,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),7,$0-64
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-64
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVQ 8(SP), AX // syscall entry
|
||||
MOVQ 16(SP), DI
|
||||
@ -34,7 +36,7 @@ ok:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall6(SB),7,$0-88
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-88
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVQ 8(SP), AX // syscall entry
|
||||
MOVQ 16(SP), DI
|
||||
@ -57,7 +59,7 @@ ok6:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall9(SB),7,$0-112
|
||||
TEXT ·Syscall9(SB),NOSPLIT,$0-112
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVQ 8(SP), AX // syscall entry
|
||||
MOVQ 16(SP), DI
|
||||
@ -89,7 +91,7 @@ ok9:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),7,$0-64
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-64
|
||||
MOVQ 16(SP), DI
|
||||
MOVQ 24(SP), SI
|
||||
MOVQ 32(SP), DX
|
||||
@ -109,7 +111,7 @@ ok1:
|
||||
MOVQ $0, 56(SP) // errno
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall6(SB),7,$0-88
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-88
|
||||
MOVQ 16(SP), DI
|
||||
MOVQ 24(SP), SI
|
||||
MOVQ 32(SP), DX
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#include "../../cmd/ld/textflag.h"
|
||||
|
||||
//
|
||||
// System call support for 386, Plan 9
|
||||
//
|
||||
@ -12,7 +14,7 @@
|
||||
//func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)
|
||||
|
||||
// Trap # in AX, args on stack above caller pc.
|
||||
TEXT ·Syscall(SB),7,$0-32
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-32
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
@ -47,7 +49,7 @@ copyresult3:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall6(SB),7,$0-44
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-44
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
@ -85,7 +87,7 @@ copyresult4:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),7,$0-32
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-32
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
LEAL 8(SP), SI
|
||||
@ -100,7 +102,7 @@ TEXT ·RawSyscall(SB),7,$0-32
|
||||
MOVL AX, err+28(SP)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall6(SB),7,$0-44
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-44
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
LEAL 8(SP), SI
|
||||
@ -121,7 +123,7 @@ TEXT ·RawSyscall6(SB),7,$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),7,$0-40
|
||||
TEXT ·seek(SB),NOSPLIT,$0-40
|
||||
LEAL newoffset+24(SP), AX
|
||||
MOVL AX, placeholder+4(SP)
|
||||
|
||||
@ -152,7 +154,7 @@ copyresult6:
|
||||
|
||||
//func exit(code int)
|
||||
// Import runtime·exit for cleanly exiting.
|
||||
TEXT ·exit(SB),7,$4-4
|
||||
TEXT ·exit(SB),NOSPLIT,$4-4
|
||||
MOVL code+0(FP), AX
|
||||
MOVL AX, 0(SP)
|
||||
CALL runtime·exit(SB)
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#include "../../cmd/ld/textflag.h"
|
||||
|
||||
//
|
||||
// System call support for Plan 9
|
||||
//
|
||||
@ -14,7 +16,7 @@
|
||||
// Trap # in BP, args on stack above caller pc.
|
||||
// NxM requires that Plan 9 system calls be
|
||||
// marked with $0x8000 in AX.
|
||||
TEXT ·Syscall(SB),7,$0-64
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-64
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVQ $0x8000, AX // for NxM
|
||||
MOVQ 8(SP), BP // syscall entry
|
||||
@ -50,7 +52,7 @@ copyresult3:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall6(SB),7,$0-88
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-88
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVQ $0x8000, AX // for NxM
|
||||
MOVQ 8(SP), BP // syscall entry
|
||||
@ -89,7 +91,7 @@ copyresult4:
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),7,$0-64
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-64
|
||||
MOVQ $0x8000, AX // for NxM
|
||||
MOVQ 8(SP), BP // syscall entry
|
||||
// slide args down on top of system call number
|
||||
@ -105,7 +107,7 @@ TEXT ·RawSyscall(SB),7,$0-64
|
||||
MOVQ AX, err+56(SP)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall6(SB),7,$0-88
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-88
|
||||
MOVQ $0x8000, AX // for NxM
|
||||
MOVQ 8(SP), BP // syscall entry
|
||||
// slide args down on top of system call number
|
||||
@ -127,7 +129,7 @@ TEXT ·RawSyscall6(SB),7,$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),7,$0-64
|
||||
TEXT ·seek(SB),NOSPLIT,$0-64
|
||||
LEAQ newoffset+40(SP), AX
|
||||
MOVQ AX, placeholder+8(SP)
|
||||
|
||||
@ -158,7 +160,7 @@ copyresult6:
|
||||
|
||||
//func exit(code int)
|
||||
// Import runtime·exit for cleanly exiting.
|
||||
TEXT ·exit(SB),7,$8-4
|
||||
TEXT ·exit(SB),NOSPLIT,$8-4
|
||||
MOVQ code+0(FP), AX
|
||||
MOVQ AX, 0(SP)
|
||||
CALL runtime·exit(SB)
|
||||
|
Loading…
Reference in New Issue
Block a user