#include "../../cmd/ld/textflag.h"
TEXT ·Syscall(SB),NOSPLIT,$0-28
BL runtime·entersyscall(SB)
MOVW 4(SP), R7
MOVW 8(SP), R0
MOVW 12(SP), R1
MOVW 16(SP), R2
SWI $0
MOVW $0xfffff001, R1
CMP R1, R0
BLS ok
MOVW $-1, R1
MOVW R1, 20(SP)
MOVW $0, R2
MOVW R2, 24(SP)
RSB $0, R0, R0
MOVW R0, 28(SP)
BL runtime·exitsyscall(SB)
RET
ok:
MOVW R0, 20(SP)
MOVW $0, R0
MOVW R0, 24(SP)
MOVW R0, 28(SP)
BL runtime·exitsyscall(SB)
RET
TEXT ·Syscall6(SB),NOSPLIT,$0-40
BL runtime·entersyscall(SB)
MOVW 4(SP), R7
MOVW 8(SP), R0
MOVW 12(SP), R1
MOVW 16(SP), R2
MOVW 20(SP), R3
MOVW 24(SP), R4
MOVW 28(SP), R5
SWI $0
MOVW $0xfffff001, R6
CMP R6, R0
BLS ok6
MOVW $-1, R1
MOVW R1, 32(SP)
MOVW $0, R2
MOVW R2, 36(SP)
RSB $0, R0, R0
MOVW R0, 40(SP)
BL runtime·exitsyscall(SB)
RET
ok6:
MOVW R0, 32(SP)
MOVW R1, 36(SP)
MOVW $0, R0
MOVW R0, 40(SP)
BL runtime·exitsyscall(SB)
RET
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
MOVW 4(SP), R7
MOVW 8(SP), R0
MOVW 12(SP), R1
MOVW 16(SP), R2
MOVW 20(SP), R3
MOVW 24(SP), R4
MOVW 28(SP), R5
SWI $0
MOVW $0xfffff001, R6
CMP R6, R0
BLS ok2
MOVW $-1, R1
MOVW R1, 32(SP)
MOVW $0, R2
MOVW R2, 36(SP)
RSB $0, R0, R0
MOVW R0, 40(SP)
RET
ok2:
MOVW R0, 32(SP)
MOVW R1, 36(SP)
MOVW $0, R0
MOVW R0, 40(SP)
RET
#define SYS__LLSEEK 140
TEXT ·seek(SB),NOSPLIT,$0-32
BL runtime·entersyscall(SB)
MOVW $SYS__LLSEEK, R7
MOVW 4(SP), R0
MOVW 12(SP), R1
MOVW 8(SP), R2
MOVW $20(SP), R3
MOVW 16(SP), R4
SWI $0
MOVW $0xfffff001, R6
CMP R6, R0
BLS okseek
MOVW $0, R1
MOVW R1, 20(SP)
MOVW R1, 24(SP)
RSB $0, R0, R0
MOVW R0, 28(SP)
BL runtime·exitsyscall(SB)
RET
okseek:
MOVW $0, R0
MOVW R0, 28(SP)
BL runtime·exitsyscall(SB)
RET
TEXT ·RawSyscall(SB),NOSPLIT,$0-28
MOVW 4(SP), R7
MOVW 8(SP), R0
MOVW 12(SP), R1
MOVW 16(SP), R2
SWI $0
MOVW $0xfffff001, R1
CMP R1, R0
BLS ok1
MOVW $-1, R1
MOVW R1, 20(SP)
MOVW $0, R2
MOVW R2, 24(SP)
RSB $0, R0, R0
MOVW R0, 28(SP)
RET
ok1:
MOVW R0, 20(SP)
MOVW $0, R0
MOVW R0, 24(SP)
MOVW R0, 28(SP)
RET