1 From: Natanael Copa <natanael.copa@gmail.com>
2 Date: Thu, 5 Jul 2012 11:55:19 +0000
3 Subject: [PATCH] i386/bits/syscalls.h: allow immediate values as 6th syscall
6 Allow use of immedate values as the 6th syscall argument. Otherwise we must
7 store the arg on memory. This gives gcc more options to optimize better.
9 This also works around an issue with posix_fallocate.
11 Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
12 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
15 --- a/libc/sysdeps/linux/i386/bits/syscalls.h
16 +++ b/libc/sysdeps/linux/i386/bits/syscalls.h
17 @@ -136,7 +136,7 @@ __asm__ (
18 #define ASMFMT_5(arg1, arg2, arg3, arg4, arg5) \
19 , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5)
20 #define ASMFMT_6(arg1, arg2, arg3, arg4, arg5, arg6) \
21 - , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5), "m" (arg6)
22 + , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5), "g" (arg6)