This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: RFC: [PATCH] Add INLINE_SYSCALL_ERROR_RETURN
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: "H.J. Lu" <hongjiu dot lu at intel dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Sat, 22 Aug 2015 13:24:44 +0200
- Subject: Re: RFC: [PATCH] Add INLINE_SYSCALL_ERROR_RETURN
- Authentication-results: sourceware.org; auth=none
- References: <20150821223858 dot GA3889 at intel dot com>
* H. J. Lu:
> For ia32 PIC, the first thing of many syscalls does is to call
> __x86.get_pc_thunk.reg to load PC into reg in case there is an error,
> which is required for setting errno. In most cases, there are no
> errors. But we still call __x86.get_pc_thunk.reg. This patch adds
> INLINE_SYSCALL_ERROR_RETURN so that i386 can optimize setting errno by
> branching to the internal __syscall_error without PLT.
>
> With i386 INLINE_SYSCALL_ERROR_RETURN and i386 syscall inlining
> optimization for GCC 5, for sysdeps/unix/sysv/linux/fchmodat.c with
> -O2 -march=i686 -mtune=generic, GCC 5.2 now generates:
The patch does not seem to contain the i386 optimized
INLINE_SYSCALL_ERROR_RETURN definition.