2 // Acess2 ARMv7 - System Calls
35 @ Well, can't blame it
36 @ - Clear the instruction cache
49 @ ; RSI - Second Param
50 @ mov rcx, rdx ; RDX - Third
57 _errno: .long 0 @ Placed in .text, to allow use of relative addressing
59 .macro syscall0 _name, _num
68 .macro syscall5 _name, _num
78 .macro syscall6 _name, _num
89 #define SYSCALL0(_name,_num) syscall0 _name, _num
90 #define SYSCALL1(_name,_num) SYSCALL0(_name, _num)
91 #define SYSCALL2(_name,_num) SYSCALL0(_name, _num)
92 #define SYSCALL3(_name,_num) SYSCALL0(_name, _num)
93 #define SYSCALL4(_name,_num) SYSCALL0(_name, _num)
94 // TODO: 5/6 need special handling, because the args are on the stack
95 #define SYSCALL5(_name,_num) syscall5 _name, _num
96 #define SYSCALL6(_name,_num) syscall6 _name, _num
98 // Override the clone syscall
99 #define _exit _exit_raw
100 #define _clone _clone_raw
101 #include "syscalls.s.h"
113 @ If in child, set SP