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