[PATCH] i386/bits/syscalls.h: allow immediate values as 6th syscall arg

Natanael Copa natanael.copa at gmail.com
Thu Jul 5 11:55:19 UTC 2012


Allow use of immedate values as the 6th syscall argument. Otherwise we must
store the arg on memory. This gives gcc more options to optimize better.

This also works around an issue with posix_fallocate.

Signed-off-by: Natanael Copa <ncopa at alpinelinux.org>
---
 libc/sysdeps/linux/i386/bits/syscalls.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/sysdeps/linux/i386/bits/syscalls.h b/libc/sysdeps/linux/i386/bits/syscalls.h
index 9fb4f35..566b5ac 100644
--- a/libc/sysdeps/linux/i386/bits/syscalls.h
+++ b/libc/sysdeps/linux/i386/bits/syscalls.h
@@ -136,7 +136,7 @@ __asm__ (
 #define ASMFMT_5(arg1, arg2, arg3, arg4, arg5) \
 	, "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5)
 #define ASMFMT_6(arg1, arg2, arg3, arg4, arg5, arg6) \
-	, "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5), "m" (arg6)
+	, "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5), "g" (arg6)
 
 #else /* !PIC */
 
-- 
1.7.11.1



More information about the uClibc mailing list