diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-12-23 13:08:22 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-12-23 13:08:22 +0000 |
commit | edb570bb87b009c04e30b2d75acb2a513079c836 (patch) | |
tree | 19349f774331b4f7a2c26170bbd2bbb077367f9f /sysdeps/unix/sysv/linux/arm/sysdep.h | |
parent | 361d49e6a4463bd86aba76a67c2b1dc0348f711a (diff) | |
download | glibc-edb570bb87b009c04e30b2d75acb2a513079c836.tar.gz glibc-edb570bb87b009c04e30b2d75acb2a513079c836.tar.xz glibc-edb570bb87b009c04e30b2d75acb2a513079c836.zip |
Update.
1998-12-20 Philip Blundell <philb@gnu.org> * sysdeps/unix/sysv/linux/arm/sysdep.h (INLINE_SYSCALL): Add implementation. * sysdeps/unix/sysv/linux/arm/syscalls.list: Remove wrappers for now-inlined calls. 1998-12-22 Philip Blundell <pb@nexus.co.uk> * sysdeps/unix/sysv/linux/arm/ioperm.c: New file. Implementation of inb, outb etc for ARM systems. * sysdeps/unix/sysv/linux/arm/sys/io.h: Likewise. * sysdeps/unix/sysv/linux/arm/Versions: Add appropriate entries for the above.
Diffstat (limited to 'sysdeps/unix/sysv/linux/arm/sysdep.h')
-rw-r--r-- | sysdeps/unix/sysv/linux/arm/sysdep.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 5972abaa9a..d7e28220a7 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -104,6 +104,52 @@ #define UNDOARGS_4 /* nothing */ #define UNDOARGS_5 ldr r4, [sp]; +#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; \ + { \ + register int _a1 asm ("a1"); \ + LOAD_ARGS_##nr (args) \ + asm volatile ("swi %1" \ + : "=r" (_a1) \ + : "i" (SYS_ify(name)) ASM_ARGS_##nr \ + : "a1"); \ + _sys_result = _a1; \ + } \ + 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) \ + _a1 = (int) (a1); \ + LOAD_ARGS_0 () +#define ASM_ARGS_1 ASM_ARGS_0, "r" (_a1) +#define LOAD_ARGS_2(a1, a2) \ + register int _a2 asm ("a2") = (int) (a2); \ + LOAD_ARGS_1 (a1) +#define ASM_ARGS_2 ASM_ARGS_1, "r" (_a2) +#define LOAD_ARGS_3(a1, a2, a3) \ + register int _a3 asm ("a3") = (int) (a3); \ + LOAD_ARGS_2 (a1, a2) +#define ASM_ARGS_3 ASM_ARGS_2, "r" (_a3) +#define LOAD_ARGS_4(a1, a2, a3, a4) \ + register int _a4 asm ("a4") = (int) (a4); \ + LOAD_ARGS_3 (a1, a2, a3) +#define ASM_ARGS_4 ASM_ARGS_3, "r" (_a4) +#define LOAD_ARGS_5(a1, a2, a3, a4, a5) \ + register int _v1 asm ("v1") = (int) (a5); \ + LOAD_ARGS_4 (a1, a2, a3, a4) +#define ASM_ARGS_5 ASM_ARGS_4, "r" (_v1) + #endif /* __ASSEMBLER__ */ #endif /* linux/arm/sysdep.h */ |