123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258 |
- do { \
- if ((unsigned long) (_sc_ret) >= (unsigned long) (-125)) { \
- __set_errno(-_sc_ret); \
- _sc_ret = -1; \
- } \
- \
- return (type) (_sc_ret); \
- } while (0)
- "r1", "r2", "r3", "r4", \
- "r5", "r6", "r7", "r8", \
- "r9", "r10", "r11"
- type name (void) \
- { \
- register long _sc_0 __asm__("r0") = SYS_ify (name); \
- long _sc_ret; \
- \
- __asm__ __volatile__ ( \
- " pushl %%ap \n" \
- " pushl $0x0 \n" \
- " movl %%sp, %%ap \n" \
- " chmk %%r0 \n" \
- " addl2 $4, %%sp \n" \
- " movl (%%sp)+, %%ap \n" \
- : "=r" (_sc_0) \
- : "0" (_sc_0) \
- : _syscall_clobbers); \
- \
- _sc_ret = _sc_0; \
- _syscall_return (type); \
- }
- type name (type1 arg1) \
- { \
- register long _sc_0 __asm__("r0") = SYS_ify (name); \
- long _sc_ret; \
- \
- __asm__ __volatile__ ( \
- " pushl %%ap \n" \
- " pushl %2 \n" \
- " pushl $0x1 \n" \
- " movl %%sp, %%ap \n" \
- " chmk %%r0 \n" \
- " addl2 $8, %%sp \n" \
- " movl (%%sp)+, %%ap \n" \
- : "=r" (_sc_0) \
- : "0" (_sc_0), \
- "m" (arg1) \
- : _syscall_clobbers); \
- \
- _sc_ret = _sc_0; \
- _syscall_return (type); \
- }
- type name (type1 arg1, \
- type2 arg2) \
- { \
- register long _sc_0 __asm__("r0") = SYS_ify (name); \
- long _sc_ret; \
- \
- __asm__ __volatile__ ( \
- " pushl %%ap \n" \
- " pushl %3 \n" \
- " pushl %2 \n" \
- " pushl $0x2 \n" \
- " movl %%sp, %%ap \n" \
- " chmk %%r0 \n" \
- " addl2 $12, %%sp \n" \
- " movl (%%sp)+, %%ap \n" \
- : "=r" (_sc_0) \
- : "0" (_sc_0), \
- "m" (arg1), \
- "m" (arg2) \
- : _syscall_clobbers); \
- \
- _sc_ret = _sc_0; \
- _syscall_return (type); \
- }
- type name (type1 arg1, \
- type2 arg2, \
- type3 arg3) \
- { \
- register long _sc_0 __asm__("r0") = SYS_ify (name); \
- long _sc_ret; \
- \
- __asm__ __volatile__ ( \
- " pushl %%ap \n" \
- " pushl %4 \n" \
- " pushl %3 \n" \
- " pushl %2 \n" \
- " pushl $0x3 \n" \
- " movl %%sp, %%ap \n" \
- " chmk %%r0 \n" \
- " addl2 $16, %%sp \n" \
- " movl (%%sp)+, %%ap \n" \
- : "=r" (_sc_0) \
- : "0" (_sc_0), \
- "m" (arg1), \
- "m" (arg2), \
- "m" (arg3) \
- : _syscall_clobbers); \
- \
- _sc_ret = _sc_0; \
- _syscall_return (type); \
- }
- type4, arg4) \
- type name (type1 arg1, \
- type2 arg2, \
- type3 arg3, \
- type4 arg4) \
- { \
- register long _sc_0 __asm__("r0") = SYS_ify (name); \
- long _sc_ret; \
- \
- __asm__ __volatile__ ( \
- " pushl %%ap \n" \
- " pushl %5 \n" \
- " pushl %4 \n" \
- " pushl %3 \n" \
- " pushl %2 \n" \
- " pushl $0x4 \n" \
- " movl %%sp, %%ap \n" \
- " chmk %%r0 \n" \
- " addl2 $20, %%sp \n" \
- " movl (%%sp)+, %%ap \n" \
- : "=r" (_sc_0) \
- : "0" (_sc_0), \
- "m" (arg1), \
- "m" (arg2), \
- "m" (arg3), \
- "m" (arg4) \
- : _syscall_clobbers); \
- \
- _sc_ret = _sc_0; \
- _syscall_return (type); \
- }
- type4, arg4, type5, arg5) \
- type name (type1 arg1, \
- type2 arg2, \
- type3 arg3, \
- type4 arg4, \
- type5 arg5) \
- { \
- register long _sc_0 __asm__("r0") = SYS_ify (name); \
- long _sc_ret; \
- \
- __asm__ __volatile__ ( \
- " pushl %%ap \n" \
- " pushl %6 \n" \
- " pushl %5 \n" \
- " pushl %4 \n" \
- " pushl %3 \n" \
- " pushl %2 \n" \
- " pushl $0x5 \n" \
- " movl %%sp, %%ap \n" \
- " chmk %%r0 \n" \
- " addl2 $24, %%sp \n" \
- " movl (%%sp)+, %%ap \n" \
- : "=r" (_sc_0) \
- : "0" (_sc_0), \
- "m" (arg1), \
- "m" (arg2), \
- "m" (arg3), \
- "m" (arg4), \
- "m" (arg5) \
- : _syscall_clobbers); \
- \
- _sc_ret = _sc_0; \
- _syscall_return (type); \
- }
- type4, arg4, type5, arg5, type6, arg6) \
- type name (type1 arg1, \
- type2 arg2, \
- type3 arg3, \
- type4 arg4, \
- type5 arg5, \
- type6 arg6) \
- { \
- register long _sc_0 __asm__("r0") = SYS_ify (name); \
- long _sc_ret; \
- \
- __asm__ __volatile__ ( \
- " pushl %%ap \n" \
- " pushl %7 \n" \
- " pushl %6 \n" \
- " pushl %5 \n" \
- " pushl %4 \n" \
- " pushl %3 \n" \
- " pushl %2 \n" \
- " pushl $0x6 \n" \
- " movl %%sp, %%ap \n" \
- " chmk %%r0 \n" \
- " addl2 $28, %%sp \n" \
- " movl (%%sp)+, %%ap \n" \
- : "=r" (_sc_0) \
- : "0" (_sc_0), \
- "m" (arg1), \
- "m" (arg2), \
- "m" (arg3), \
- "m" (arg4), \
- "m" (arg5), \
- "m" (arg6) \
- : _syscall_clobbers); \
- \
- _sc_ret = _sc_0; \
- _syscall_return (type); \
- }
|