chiark / gitweb /
[PATCH] added klibc version 0.82 (cvs tree) to the udev tree.
[elogind.git] / klibc / klibc / arch / x86_64 / include / klibc / archsys.h
1 /*
2  * arch/x86_64/include/klibc/archsys.h
3  *
4  * Architecture-specific syscall definitions
5  */
6
7 #ifndef _KLIBC_ARCHSYS_H
8 #define _KLIBC_ARCHSYS_H
9
10 /* x86-64 seems to miss _syscall6() from its headers */
11
12 #ifndef _syscall6
13
14 #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
15           type5,arg5,type6,arg6) \
16 type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \
17 { \
18 long __res; \
19 register type4 __r10 asm("%r10") = arg4; \
20 register type5 __r8  asm("%r8")  = arg5; \
21 register type6 __r9  asm("%r9")  = arg6; \
22 __asm__ volatile (__syscall \
23         : "=a" (__res) \
24         : "0" (__NR_##name),"D" (arg1),"S" (arg2), \
25           "d" (arg3),"r" (__r10),"r" (__r8), "r" (__r9) \
26         : __syscall_clobber); \
27 __syscall_return(type,__res); \
28 }
29
30 #endif /* _syscall6 missing */
31
32 #endif /* _KLIBC_ARCHSYS_H */