This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/4] Optimize i386 syscall inlining


On Thu, Sep 10, 2015 at 10:23 AM, Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
>
> On 10-09-2015 10:14, H.J. Lu wrote:
>> OK for master?
>>
>> H.J.
>> ---
>> Define INLINE_SYSCALL_ERROR_RETURN so that i386 can optimize setting
>> errno by branching to the internal __syscall_error without PLT.
>>
>> Since GCC 5 and above can properly spill %ebx when needed, we can inline
>> syscalls with 6 arguments if GCC 5 or above is used to compile glibc.
>> This patch rewrites INTERNAL_SYSCALL macros and skips __libc_do_syscall
>> for GCC 5.
>>
>> For sysdeps/unix/sysv/linux/i386/brk.c, with -O2 -march=i686
>> -mtune=generic, GCC 5.2 now generates:
>
> You can use this refactoring to cleanup some duplicate code as well,
> since i386 brk.c, setegid.c, and seteuid.c can be replaces by generic
> implementation.
>
> Also for *stat* implementations i386 could override overflow.h and
> redefine stat_overflow with stat64 logic.
>
> For lockf64.c I also think it can be feasible to change default
> implementation to accommodate i386 requirements (use flock64
> instead of flock).
>
> The only implementation is really i386 specific is sigaction.c,
> but I can't tell how much of the assembly hackery it requires
> nowadays.
>

I'd like to keep my changes as mechanical as possible.  These
cleanups belong to separate patches after my patches are
checked-in.



-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]