summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/i386/bits/syscalls.h
diff options
context:
space:
mode:
authormirabilos <m@mirbsd.org>2017-01-29 15:05:13 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2017-01-29 20:07:22 +0100
commit2d3403be6c680fddcc66238baa0a25c0554e2227 (patch)
tree34ac5e7a5e29f8b662d866206ea85ce626734095 /libc/sysdeps/linux/i386/bits/syscalls.h
parentc98ef313e6b7c8e8d224157e3473e0a4ce019139 (diff)
extract six-argument syscalls from the rest
(still same implementation though) Signed-off-by: mirabilos <m@mirbsd.org> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Diffstat (limited to 'libc/sysdeps/linux/i386/bits/syscalls.h')
-rw-r--r--libc/sysdeps/linux/i386/bits/syscalls.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/i386/bits/syscalls.h b/libc/sysdeps/linux/i386/bits/syscalls.h
index b0f54dcb0..e76a45653 100644
--- a/libc/sysdeps/linux/i386/bits/syscalls.h
+++ b/libc/sysdeps/linux/i386/bits/syscalls.h
@@ -14,7 +14,7 @@
#include <errno.h>
-#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+#define INTERNAL_SYSCALL_NCS_X86_UPTOFIVE(name, err, nr, args...) \
(__extension__ \
({ \
register unsigned int resultvar; \
@@ -30,6 +30,17 @@
}) \
)
+#define INTERNAL_SYSCALL_NCS_X86_0 INTERNAL_SYSCALL_NCS_X86_UPTOFIVE
+#define INTERNAL_SYSCALL_NCS_X86_1 INTERNAL_SYSCALL_NCS_X86_UPTOFIVE
+#define INTERNAL_SYSCALL_NCS_X86_2 INTERNAL_SYSCALL_NCS_X86_UPTOFIVE
+#define INTERNAL_SYSCALL_NCS_X86_3 INTERNAL_SYSCALL_NCS_X86_UPTOFIVE
+#define INTERNAL_SYSCALL_NCS_X86_4 INTERNAL_SYSCALL_NCS_X86_UPTOFIVE
+#define INTERNAL_SYSCALL_NCS_X86_5 INTERNAL_SYSCALL_NCS_X86_UPTOFIVE
+#define INTERNAL_SYSCALL_NCS_X86_6 INTERNAL_SYSCALL_NCS_X86_UPTOFIVE
+
+#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+ INTERNAL_SYSCALL_NCS_X86_##nr(name, err, nr, args)
+
/* This code avoids pushing/popping ebx as much as possible.
* I think the main reason was that older GCCs had problems
* with proper saving/restoring of ebx if "b" constraint was used,