#include "../../cmd/ld/textflag.h"
TEXT ·Syscall(SB),NOSPLIT,$0-28
CALL runtime·entersyscall(SB)
MOVL 4(SP), AX
MOVL 8(SP), BX
MOVL 12(SP), CX
MOVL 16(SP), DX
MOVL $0, SI
MOVL $0, DI
CALL *runtime·_vdso(SB)
CMPL AX, $0xfffff001
JLS ok
MOVL $-1, 20(SP)
MOVL $0, 24(SP)
NEGL AX
MOVL AX, 28(SP)
CALL runtime·exitsyscall(SB)
RET
ok:
MOVL AX, 20(SP)
MOVL DX, 24(SP)
MOVL $0, 28(SP)
CALL runtime·exitsyscall(SB)
RET
TEXT ·Syscall6(SB),NOSPLIT,$0-40
CALL runtime·entersyscall(SB)
MOVL 4(SP), AX
MOVL 8(SP), BX
MOVL 12(SP), CX
MOVL 16(SP), DX
MOVL 20(SP), SI
MOVL 24(SP), DI
MOVL 28(SP), BP
CALL *runtime·_vdso(SB)
CMPL AX, $0xfffff001
JLS ok6
MOVL $-1, 32(SP)
MOVL $0, 36(SP)
NEGL AX
MOVL AX, 40(SP)
CALL runtime·exitsyscall(SB)
RET
ok6:
MOVL AX, 32(SP)
MOVL DX, 36(SP)
MOVL $0, 40(SP)
CALL runtime·exitsyscall(SB)
RET
TEXT ·RawSyscall(SB),NOSPLIT,$0-28
MOVL 4(SP), AX
MOVL 8(SP), BX
MOVL 12(SP), CX
MOVL 16(SP), DX
MOVL $0, SI
MOVL $0, DI
CALL *runtime·_vdso(SB)
CMPL AX, $0xfffff001
JLS ok1
MOVL $-1, 20(SP)
MOVL $0, 24(SP)
NEGL AX
MOVL AX, 28(SP)
RET
ok1:
MOVL AX, 20(SP)
MOVL DX, 24(SP)
MOVL $0, 28(SP)
RET
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
MOVL 4(SP), AX
MOVL 8(SP), BX
MOVL 12(SP), CX
MOVL 16(SP), DX
MOVL 20(SP), SI
MOVL 24(SP), DI
MOVL 28(SP), BP
CALL *runtime·_vdso(SB)
CMPL AX, $0xfffff001
JLS ok2
MOVL $-1, 32(SP)
MOVL $0, 36(SP)
NEGL AX
MOVL AX, 40(SP)
RET
ok2:
MOVL AX, 32(SP)
MOVL DX, 36(SP)
MOVL $0, 40(SP)
RET
#define SYS_SOCKETCALL 102
TEXT ·socketcall(SB),NOSPLIT,$0-36
CALL runtime·entersyscall(SB)
MOVL $SYS_SOCKETCALL, AX
MOVL 4(SP), BX
LEAL 8(SP), CX
MOVL $0, DX
MOVL $0, SI
MOVL $0, DI
CALL *runtime·_vdso(SB)
CMPL AX, $0xfffff001
JLS oksock
MOVL $-1, 32(SP)
NEGL AX
MOVL AX, 36(SP)
CALL runtime·exitsyscall(SB)
RET
oksock:
MOVL AX, 32(SP)
MOVL $0, 36(SP)
CALL runtime·exitsyscall(SB)
RET
TEXT ·rawsocketcall(SB),NOSPLIT,$0-36
MOVL $SYS_SOCKETCALL, AX
MOVL 4(SP), BX
LEAL 8(SP), CX
MOVL $0, DX
MOVL $0, SI
MOVL $0, DI
CALL *runtime·_vdso(SB)
CMPL AX, $0xfffff001
JLS oksock1
MOVL $-1, 32(SP)
NEGL AX
MOVL AX, 36(SP)
RET
oksock1:
MOVL AX, 32(SP)
MOVL $0, 36(SP)
RET
#define SYS__LLSEEK 140
TEXT ·seek(SB),NOSPLIT,$0-28
CALL runtime·entersyscall(SB)
MOVL $SYS__LLSEEK, AX
MOVL 4(SP), BX
MOVL 12(SP), CX
MOVL 8(SP), DX
LEAL 20(SP), SI
MOVL 16(SP), DI
CALL *runtime·_vdso(SB)
CMPL AX, $0xfffff001
JLS okseek
MOVL $-1, 20(SP)
MOVL $-1, 24(SP)
NEGL AX
MOVL AX, 28(SP)
CALL runtime·exitsyscall(SB)
RET
okseek:
MOVL $0, 28(SP)
CALL runtime·exitsyscall(SB)
RET