This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] i386: Assembly Implementation cleanup
- From: Florian Weimer <fweimer at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail 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 22:38:27 +0200
- 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>
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?
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.
(There are quite a few -fomit-frame-pointer settings in the makefiles,
some of which are curious.)
--
Florian Weimer / Red Hat Product Security