summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormirabilos <m@mirbsd.org>2017-01-29 14:05:13 (GMT)
committerWaldemar Brodkorb <wbx@openadk.org>2017-01-29 19:07:22 (GMT)
commit2d3403be6c680fddcc66238baa0a25c0554e2227 (patch)
tree34ac5e7a5e29f8b662d866206ea85ce626734095
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>
-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 b0f54dc..e76a456 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,