Browse Source

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>
mirabilos 7 years ago
parent
commit
2d3403be6c
1 changed files with 12 additions and 1 deletions
  1. 12 1
      libc/sysdeps/linux/i386/bits/syscalls.h

+ 12 - 1
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,