2 // Acess2 ARMv7 - System Calls
35 //@ Well, can't blame it
36 // - Clear the instruction cache
44 @ >r1: Pointer to item count
47 __gnu_Unwind_Find_exidx:
54 _errno: .long 0 @ Placed in .text, to allow use of relative addressing
57 .macro syscall0 _name, _num
62 @mrc p15, 0, r3, c13, c0, 2
68 .macro syscall5 _name, _num
79 .macro syscall6 _name, _num
91 #define SYSCALL0(_name,_num) syscall0 _name, _num
92 #define SYSCALL1(_name,_num) SYSCALL0(_name, _num)
93 #define SYSCALL2(_name,_num) SYSCALL0(_name, _num)
94 #define SYSCALL3(_name,_num) SYSCALL0(_name, _num)
95 #define SYSCALL4(_name,_num) SYSCALL0(_name, _num)
96 // TODO: 5/6 need special handling, because the args are on the stack
97 #define SYSCALL5(_name,_num) syscall5 _name, _num
98 #define SYSCALL6(_name,_num) syscall6 _name, _num
100 // Override the clone syscall
101 #define _exit _exit_raw
102 #define _clone _clone_raw
103 #define _SysSeek _SysSeek_borken
104 #include "syscalls.s.h"
109 // NOTE: _SysSeek needs special handling for alignment
130 @ If in child, set SP