From 2d3403be6c680fddcc66238baa0a25c0554e2227 Mon Sep 17 00:00:00 2001 From: mirabilos Date: Sun, 29 Jan 2017 15:05:13 +0100 Subject: extract six-argument syscalls from the rest (still same implementation though) Signed-off-by: mirabilos Signed-off-by: Waldemar Brodkorb --- libc/sysdeps/linux/i386/bits/syscalls.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 -#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, -- cgit v1.2.3