summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/arm
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-07-09 15:09:29 -0400
committerMike Frysinger <vapier@gentoo.org>2009-07-09 15:11:46 -0400
commit763bbf9e9a27426c9be8322dca5ddf2cb4dbc464 (patch)
tree1bdc0f8f1b01f27fdf9eb5c919d02ce73630d99e /libc/sysdeps/linux/arm
parent5ca445cb7b0e1ed549ff1db454c6a0460e2e0833 (diff)
syscall: unify part 2: NCS variety
Declare common NCS (non-constant syscall) variants and convert the existing ports over to this. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libc/sysdeps/linux/arm')
-rw-r--r--libc/sysdeps/linux/arm/bits/syscalls.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/libc/sysdeps/linux/arm/bits/syscalls.h b/libc/sysdeps/linux/arm/bits/syscalls.h
index 2ad725544..1a854ffab 100644
--- a/libc/sysdeps/linux/arm/bits/syscalls.h
+++ b/libc/sysdeps/linux/arm/bits/syscalls.h
@@ -30,8 +30,8 @@
#include <errno.h>
-#define INLINE_SYSCALL(name, nr, args...) \
- ({ unsigned int _inline_sys_result = INTERNAL_SYSCALL (name, , nr, args); \
+#define INLINE_SYSCALL_NCS(name, nr, args...) \
+ ({ unsigned int _inline_sys_result = INTERNAL_SYSCALL_NCS (name, , nr, args); \
if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_inline_sys_result, ), 0)) \
{ \
__set_errno (INTERNAL_SYSCALL_ERRNO (_inline_sys_result, )); \
@@ -41,12 +41,12 @@
#if !defined(__thumb__)
#if defined(__ARM_EABI__)
-#define INTERNAL_SYSCALL(name, err, nr, args...) \
+#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
({unsigned int __sys_result; \
{ \
register int _a1 __asm__ ("r0"), _nr __asm__ ("r7"); \
LOAD_ARGS_##nr (args) \
- _nr = SYS_ify(name); \
+ _nr = (name); \
__asm__ __volatile__ ("swi 0x0 @ syscall " #name \
: "=r" (_a1) \
: "r" (_nr) ASM_ARGS_##nr \
@@ -56,14 +56,14 @@
(int) __sys_result; })
#else /* defined(__ARM_EABI__) */
-#define INTERNAL_SYSCALL(name, err, nr, args...) \
+#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
({ unsigned int __sys_result; \
{ \
register int _a1 __asm__ ("a1"); \
LOAD_ARGS_##nr (args) \
__asm__ __volatile__ ("swi %1 @ syscall " #name \
: "=r" (_a1) \
- : "i" (SYS_ify(name)) ASM_ARGS_##nr \
+ : "i" (name) ASM_ARGS_##nr \
: "memory"); \
__sys_result = _a1; \
} \
@@ -73,13 +73,13 @@
/* We can't use push/pop inside the asm because that breaks
unwinding (ie. thread cancellation).
*/
-#define INTERNAL_SYSCALL(name, err, nr, args...) \
+#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
({ unsigned int __sys_result; \
{ \
int _sys_buf[2]; \
register int _a1 __asm__ ("a1"); \
register int *_v3 __asm__ ("v3") = _sys_buf; \
- *_v3 = (int) (SYS_ify(name)); \
+ *_v3 = (int) (name); \
LOAD_ARGS_##nr (args) \
__asm__ __volatile__ ("str r7, [v3, #4]\n" \
"\tldr r7, [v3]\n" \