diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-08-17 14:48:11 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-08-17 14:48:11 +0000 |
commit | 54a7d559374ef72fa59bbe3a56d27ff5ec34d3aa (patch) | |
tree | 1fe7209313f2728c550d3eb75929b4af051fb349 /libc/sysdeps/linux/arm/bits/syscalls.h | |
parent | b46868ff8b3d2fb592e3fca4a516695533eae9e5 (diff) | |
download | uClibc-alpine-54a7d559374ef72fa59bbe3a56d27ff5ec34d3aa.tar.bz2 uClibc-alpine-54a7d559374ef72fa59bbe3a56d27ff5ec34d3aa.tar.xz |
Merge/sync with trunk.
Diffstat (limited to 'libc/sysdeps/linux/arm/bits/syscalls.h')
-rw-r--r-- | libc/sysdeps/linux/arm/bits/syscalls.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/arm/bits/syscalls.h b/libc/sysdeps/linux/arm/bits/syscalls.h index 245266730..21e5b8146 100644 --- a/libc/sysdeps/linux/arm/bits/syscalls.h +++ b/libc/sysdeps/linux/arm/bits/syscalls.h @@ -97,6 +97,7 @@ return (type) (INLINE_SYSCALL(name, 7, arg1, arg2, arg3, arg4, arg5, arg6, arg7) #define INTERNAL_SYSCALL_DECL(err) do { } while (0) #undef INTERNAL_SYSCALL +#if !defined(__thumb__) #define INTERNAL_SYSCALL(name, err, nr, args...) \ ({ unsigned int _sys_result; \ { \ @@ -109,6 +110,21 @@ return (type) (INLINE_SYSCALL(name, 7, arg1, arg2, arg3, arg4, arg5, arg6, arg7) _sys_result = _a1; \ } \ (int) _sys_result; }) +#else +#define INTERNAL_SYSCALL(name, err, nr, args...) \ + ({ unsigned int _sys_result; \ + { \ + register int _a1 asm ("a1"); \ + LOAD_ARGS_##nr (args) \ + register int _r7 asm ("r7") = (int) (SYS_ify(name)); \ + asm volatile ("swi 0 @ syscall " #name \ + : "=r" (_a1) \ + : "r" (_r7) ASM_ARGS_##nr \ + : "memory"); \ + _sys_result = _a1; \ + } \ + (int) _sys_result; }) +#endif #undef INTERNAL_SYSCALL_ERROR_P #define INTERNAL_SYSCALL_ERROR_P(val, err) \ |