3 #include <asm/unistd.h>
4 #include <sys/syscall.h>
9 register int _num
asm("1") = num
;
10 register long ret
asm("2");
12 asm volatile( "svc 0\n"
20 svc1(int num
, unsigned long arg1
)
22 register int _num
asm("1") = num
;
23 register long ret
asm("2");
24 register unsigned long _arg1
asm("2") = arg1
;
26 asm volatile( "svc 0\n"
28 : "d" (_num
), "d" (_arg1
)
34 svc2(int num
, unsigned long arg1
, unsigned long arg2
)
36 register int _num
asm("1") = num
;
37 register long ret
asm("2");
38 register unsigned long _arg1
asm("2") = arg1
;
39 register unsigned long _arg2
asm("3") = arg2
;
41 asm volatile( "svc 0\n"
43 : "d" (_num
), "d" (_arg1
), "d" (_arg2
)
50 svc3(int num
, unsigned long arg1
, unsigned long arg2
, unsigned long arg3
)
52 register int _num
asm("1") = num
;
53 register long ret
asm("2");
54 register unsigned long _arg1
asm("2") = arg1
;
55 register unsigned long _arg2
asm("3") = arg2
;
56 register unsigned long _arg3
asm("4") = arg3
;
58 asm volatile( "svc 0\n"
60 : "d" (_num
), "d" (_arg1
), "d" (_arg2
), "d" (_arg3
)
68 svc4(int num
, unsigned long arg1
, unsigned long arg2
, unsigned long arg3
, unsigned long arg4
)
70 register int _num
asm("1") = num
;
71 register long ret
asm("2");
72 register unsigned long _arg1
asm("2") = arg1
;
73 register unsigned long _arg2
asm("3") = arg2
;
74 register unsigned long _arg3
asm("4") = arg3
;
75 register unsigned long _arg4
asm("5") = arg4
;
77 asm volatile( "svc 0\n"
79 : "d" (_num
), "d" (_arg1
), "d" (_arg2
), "d" (_arg3
), "d" (_arg4
)
87 svc5(int num
, unsigned long arg1
, unsigned long arg2
, unsigned long arg3
, unsigned long arg4
,
90 register int _num
asm("1") = num
;
91 register long ret
asm("2");
92 register unsigned long _arg1
asm("2") = arg1
;
93 register unsigned long _arg2
asm("3") = arg2
;
94 register unsigned long _arg3
asm("4") = arg3
;
95 register unsigned long _arg4
asm("5") = arg4
;
96 register unsigned long _arg5
asm("6") = arg5
;
98 asm volatile( "svc 0\n"
100 : "d" (_num
), "d" (_arg1
), "d" (_arg2
), "d" (_arg3
), "d" (_arg4
), "d" (_arg5
)