2 // Acess2 ARMv7 - System Calls
35 @ Well, can't blame it
36 @ - Clear the instruction cache
44 _errno: .long 0 @ Placed in .text, to allow use of relative addressing
47 .macro syscall0 _name, _num
52 @mrc p15, 0, r3, c13, c0, 2
58 .macro syscall5 _name, _num
69 .macro syscall6 _name, _num
81 #define SYSCALL0(_name,_num) syscall0 _name, _num
82 #define SYSCALL1(_name,_num) SYSCALL0(_name, _num)
83 #define SYSCALL2(_name,_num) SYSCALL0(_name, _num)
84 #define SYSCALL3(_name,_num) SYSCALL0(_name, _num)
85 #define SYSCALL4(_name,_num) SYSCALL0(_name, _num)
86 // TODO: 5/6 need special handling, because the args are on the stack
87 #define SYSCALL5(_name,_num) syscall5 _name, _num
88 #define SYSCALL6(_name,_num) syscall6 _name, _num
90 // Override the clone syscall
91 #define _exit _exit_raw
92 #define _clone _clone_raw
93 #include "syscalls.s.h"
106 @ If in child, set SP