024-i386-bits-syscalls.h-allow-immediate-values-as-6th-s.patch 956 B

12345678910111213141516171819202122232425
  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
  4. arg
  5. Allow use of immedate values as the 6th syscall argument. Otherwise we must
  6. store the arg on memory. This gives gcc more options to optimize better.
  7. This also works around an issue with posix_fallocate.
  8. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
  9. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
  10. ---
  11. --- a/libc/sysdeps/linux/i386/bits/syscalls.h
  12. +++ b/libc/sysdeps/linux/i386/bits/syscalls.h
  13. @@ -136,7 +136,7 @@ __asm__ (
  14. #define ASMFMT_5(arg1, arg2, arg3, arg4, arg5) \
  15. , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5)
  16. #define ASMFMT_6(arg1, arg2, arg3, arg4, arg5, arg6) \
  17. - , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5), "m" (arg6)
  18. + , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5), "g" (arg6)
  19. #else /* !PIC */