diff options
author | Andreas Schwab <schwab@suse.de> | 1998-10-26 01:47:41 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 1998-10-26 01:47:41 +0000 |
commit | d499a27c88edd31867935bbf820da405bf4d6534 (patch) | |
tree | 7b83e0946db22645267507fb2c3bf12e1f0190ba /sysdeps/unix/sysv/linux/m68k/sysdep.h | |
parent | c2ef793036b853554c238caccca31dfc0491be29 (diff) | |
download | glibc-d499a27c88edd31867935bbf820da405bf4d6534.tar.gz glibc-d499a27c88edd31867935bbf820da405bf4d6534.tar.xz glibc-d499a27c88edd31867935bbf820da405bf4d6534.zip |
* sysdeps/unix/sysv/linux/m68k/Makefile [subdir=signal]: Remove
rt_sigsuspend, rt_sigprocmask, rt_sigtimedwait, rt_sigqueueinfo, rt_sigaction and rt_sigpending. * sysdeps/unix/sysv/linux/m68k/syscalls.list: Remove all entries for __syscall_* functions. * sysdeps/unix/sysv/linux/m68k/sysdep.h: Implement INLINE_SYSCALL. 1998-10-24 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * sysdeps/unix/sysv/linux/m68k/Makefile [subdir=signal]: Remove rt_sigsuspend, rt_sigprocmask, rt_sigtimedwait, rt_sigqueueinfo, rt_sigaction and rt_sigpending. * sysdeps/unix/sysv/linux/m68k/syscalls.list: Remove all entries for __syscall_* functions. * sysdeps/unix/sysv/linux/m68k/sysdep.h: Implement INLINE_SYSCALL.
Diffstat (limited to 'sysdeps/unix/sysv/linux/m68k/sysdep.h')
-rw-r--r-- | sysdeps/unix/sysv/linux/m68k/sysdep.h | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 4094172587..d445471440 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -158,4 +158,50 @@ SYSCALL_ERROR_LABEL: \ #define MOVE(x,y) movel x , y #endif -#endif /* __ASSEMBLER__ */ +#else /* not __ASSEMBLER__ */ + +/* Define a macro which expands into the inline wrapper code for a system + call. */ +#undef INLINE_SYSCALL +#define INLINE_SYSCALL(name, nr, args...) \ + ({ unsigned int _sys_result; \ + { \ + LOAD_ARGS_##nr (args) \ + register int _d0 asm ("%d0") = __NR_##name; \ + asm volatile ("trap #0" \ + : "=d" (_d0) \ + : "0" (_d0) ASM_ARGS_##nr \ + : "d0"); \ + _sys_result = _d0; \ + } \ + if (_sys_result >= (unsigned int) -4095) \ + { \ + __set_errno (-_sys_result); \ + _sys_result = (unsigned int) -1; \ + } \ + (int) _sys_result; }) + +#define LOAD_ARGS_0() +#define ASM_ARGS_0 +#define LOAD_ARGS_1(a1) \ + register int _d1 asm ("d1") = (int) (a1); \ + LOAD_ARGS_0 () +#define ASM_ARGS_1 ASM_ARGS_0, "d" (_d1) +#define LOAD_ARGS_2(a1, a2) \ + register int _d2 asm ("d2") = (int) (a2); \ + LOAD_ARGS_1 (a1) +#define ASM_ARGS_2 ASM_ARGS_1, "d" (_d2) +#define LOAD_ARGS_3(a1, a2, a3) \ + register int _d3 asm ("d3") = (int) (a3); \ + LOAD_ARGS_2 (a1, a2) +#define ASM_ARGS_3 ASM_ARGS_2, "d" (_d3) +#define LOAD_ARGS_4(a1, a2, a3, a4) \ + register int _d4 asm ("d4") = (int) (a4); \ + LOAD_ARGS_3 (a1, a2, a3) +#define ASM_ARGS_4 ASM_ARGS_3, "d" (_d4) +#define LOAD_ARGS_5(a1, a2, a3, a4, a5) \ + register int _d5 asm ("d5") = (int) (a5); \ + LOAD_ARGS_4 (a1, a2, a3, a4) +#define ASM_ARGS_5 ASM_ARGS_4, "d" (_d5) + +#endif /* not __ASSEMBLER__ */ |