debuggers.hg

view tools/libaio/src/syscall-s390.h @ 22848:6341fe0f4e5a

Added tag 4.1.0-rc2 for changeset 9dca60d88c63
author Keir Fraser <keir@xen.org>
date Tue Jan 25 14:06:55 2011 +0000 (2011-01-25)
parents 2937703f0ed0
children
line source
1 #define __NR_io_setup 243
2 #define __NR_io_destroy 244
3 #define __NR_io_getevents 245
4 #define __NR_io_submit 246
5 #define __NR_io_cancel 247
7 #define io_svc_clobber "1", "cc", "memory"
9 #define io_syscall1(type,fname,sname,type1,arg1) \
10 type fname(type1 arg1) { \
11 register type1 __arg1 asm("2") = arg1; \
12 register long __svcres asm("2"); \
13 long __res; \
14 __asm__ __volatile__ ( \
15 " .if %1 < 256\n" \
16 " svc %b1\n" \
17 " .else\n" \
18 " la %%r1,%1\n" \
19 " .svc 0\n" \
20 " .endif" \
21 : "=d" (__svcres) \
22 : "i" (__NR_##sname), \
23 "0" (__arg1) \
24 : io_svc_clobber ); \
25 __res = __svcres; \
26 return (type) __res; \
27 }
29 #define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \
30 type fname(type1 arg1, type2 arg2) { \
31 register type1 __arg1 asm("2") = arg1; \
32 register type2 __arg2 asm("3") = arg2; \
33 register long __svcres asm("2"); \
34 long __res; \
35 __asm__ __volatile__ ( \
36 " .if %1 < 256\n" \
37 " svc %b1\n" \
38 " .else\n" \
39 " la %%r1,%1\n" \
40 " svc 0\n" \
41 " .endif" \
42 : "=d" (__svcres) \
43 : "i" (__NR_##sname), \
44 "0" (__arg1), \
45 "d" (__arg2) \
46 : io_svc_clobber ); \
47 __res = __svcres; \
48 return (type) __res; \
49 }
51 #define io_syscall3(type,fname,sname,type1,arg1,type2,arg2, \
52 type3,arg3) \
53 type fname(type1 arg1, type2 arg2, type3 arg3) { \
54 register type1 __arg1 asm("2") = arg1; \
55 register type2 __arg2 asm("3") = arg2; \
56 register type3 __arg3 asm("4") = arg3; \
57 register long __svcres asm("2"); \
58 long __res; \
59 __asm__ __volatile__ ( \
60 " .if %1 < 256\n" \
61 " svc %b1\n" \
62 " .else\n" \
63 " la %%r1,%1\n" \
64 " svc 0\n" \
65 " .endif" \
66 : "=d" (__svcres) \
67 : "i" (__NR_##sname), \
68 "0" (__arg1), \
69 "d" (__arg2), \
70 "d" (__arg3) \
71 : io_svc_clobber ); \
72 __res = __svcres; \
73 return (type) __res; \
74 }
76 #define io_syscall4(type,fname,sname,type1,arg1,type2,arg2, \
77 type3,arg3,type4,arg4) \
78 type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \
79 register type1 __arg1 asm("2") = arg1; \
80 register type2 __arg2 asm("3") = arg2; \
81 register type3 __arg3 asm("4") = arg3; \
82 register type4 __arg4 asm("5") = arg4; \
83 register long __svcres asm("2"); \
84 long __res; \
85 __asm__ __volatile__ ( \
86 " .if %1 < 256\n" \
87 " svc %b1\n" \
88 " .else\n" \
89 " la %%r1,%1\n" \
90 " svc 0\n" \
91 " .endif" \
92 : "=d" (__svcres) \
93 : "i" (__NR_##sname), \
94 "0" (__arg1), \
95 "d" (__arg2), \
96 "d" (__arg3), \
97 "d" (__arg4) \
98 : io_svc_clobber ); \
99 __res = __svcres; \
100 return (type) __res; \
101 }
103 #define io_syscall5(type,fname,sname,type1,arg1,type2,arg2, \
104 type3,arg3,type4,arg4,type5,arg5) \
105 type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \
106 type5 arg5) { \
107 register type1 __arg1 asm("2") = arg1; \
108 register type2 __arg2 asm("3") = arg2; \
109 register type3 __arg3 asm("4") = arg3; \
110 register type4 __arg4 asm("5") = arg4; \
111 register type5 __arg5 asm("6") = arg5; \
112 register long __svcres asm("2"); \
113 long __res; \
114 __asm__ __volatile__ ( \
115 " .if %1 < 256\n" \
116 " svc %b1\n" \
117 " .else\n" \
118 " la %%r1,%1\n" \
119 " svc 0\n" \
120 " .endif" \
121 : "=d" (__svcres) \
122 : "i" (__NR_##sname), \
123 "0" (__arg1), \
124 "d" (__arg2), \
125 "d" (__arg3), \
126 "d" (__arg4), \
127 "d" (__arg5) \
128 : io_svc_clobber ); \
129 __res = __svcres; \
130 return (type) __res; \
131 }