浏览代码

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

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@alpinelinux.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Natanael Copa 13 年之前
父节点
当前提交
555ae2e88c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      libc/sysdeps/linux/i386/bits/syscalls.h

+ 1 - 1
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 */