summaryrefslogtreecommitdiff
path: root/src/pkg/syscall/asm_linux_arm.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/syscall/asm_linux_arm.s')
-rw-r--r--src/pkg/syscall/asm_linux_arm.s28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/pkg/syscall/asm_linux_arm.s b/src/pkg/syscall/asm_linux_arm.s
index 04dbdb624..2651b7284 100644
--- a/src/pkg/syscall/asm_linux_arm.s
+++ b/src/pkg/syscall/asm_linux_arm.s
@@ -67,6 +67,34 @@ ok6:
BL runtime·exitsyscall(SB)
RET
+// 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
+ MOVW 4(SP), R7 // syscall entry
+ 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) // r1
+ MOVW $0, R2
+ MOVW R2, 36(SP) // r2
+ RSB $0, R0, R0
+ MOVW R0, 40(SP) // errno
+ RET
+ok2:
+ MOVW R0, 32(SP) // r1
+ MOVW R1, 36(SP) // r2
+ MOVW $0, R0
+ MOVW R0, 40(SP) // errno
+ RET
+
#define SYS__LLSEEK 140 /* from zsysnum_linux_arm.go */
// func Seek(fd int, offset int64, whence int) (newoffset int64, errno int)
// Implemented in assembly to avoid allocation when