This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] i386: Assembly Implementation cleanup
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 12 Aug 2015 15:16:00 -0700
- Subject: Re: [PATCH] i386: Assembly Implementation cleanup
- Authentication-results: sourceware.org; auth=none
- References: <5596AD3B dot 1060903 at linaro dot org> <CAMe9rOof5LzNfW_Yd2qgtX2=UMdP-E-ewdneJ9GjiCF9SPyNqQ at mail dot gmail dot com> <55CB3E37 dot 8080006 at linaro dot org> <CAMe9rOr6a+iNtDjx6xT3KWYsyetpDswu8Zm8rQiJWS9CtP5f6w at mail dot gmail dot com> <55CB5FDA dot 9050802 at redhat dot com> <CAMe9rOoZGamBEG8rkN7LqARW9QxthyzydnSZzbBqn=jK5qZwvQ at mail dot gmail dot com> <CAMe9rOr8fXXDf52twnucnHnDM0Bv-YJW7EX2-rbkbd8mAfM2kQ at mail dot gmail dot com> <55CBAEC3 dot 7030507 at redhat dot com>
On Wed, Aug 12, 2015 at 1:38 PM, Florian Weimer <fweimer@redhat.com> wrote:
> On 08/12/2015 09:22 PM, H.J. Lu wrote:
>> On Wed, Aug 12, 2015 at 8:06 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> On Wed, Aug 12, 2015 at 8:01 AM, Florian Weimer <fweimer@redhat.com> wrote:
>>>> On 08/12/2015 02:44 PM, H.J. Lu wrote:
>>>>
>>>>> Is there a way to truly inline syscall with 6 arguments, not by calling
>>>>> __libc_do_syscall?
>>>>
>>
>> With my GCC 5 patch:
>>
>> https://sourceware.org/ml/libc-alpha/2015-08/msg00477.html
>>
>> This updated patch will generate optimized code when GCC 5
>> or above is used. Any comments?
>
> I like it. Perhaps you could quote a bit of disassembly in the commit
> message?
See:
https://sourceware.org/ml/libc-alpha/2015-08/msg00492.html
> I would suggest to define a new macro (say,
> __usues_many_argument_syscall or something shorter) which expands to
> "__attribute__ ((optimize ("omit-frame-pointer), noinline))â on i386 and
> apply it to the function in the C source file, instead of adding it to
> the makefiles (assuming that this works, I have not tried it). This
> way, it would be more explicit what happens. In the documentation of
> the new macro, quote a typical GCC error message if a many-argument
> system call is used without it.
>
This only applies to syscalls with 6 arguments. It is easier
to add -fomit-frame-pointer to Makefile than a new macro since
it has to be added by hand for each system call with 6 arguments.
--
H.J.