This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: optimizing calling conventions for function returns
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Etienne Lorrain <etienne_lorrain at yahoo dot fr>
- Cc: gcc at gcc dot gnu dot org, jonsmirl at gmail dot com
- Date: Wed, 24 May 2006 03:01:48 -0700
- Subject: Re: optimizing calling conventions for function returns
- References: <20060524095410.42517.qmail@web26910.mail.ukl.yahoo.com>
On May 24, 2006, at 2:54 AM, Etienne Lorrain wrote:
Another calling convention could be to not only return the "return
value"
in %eax (or %edx:%eax for long long returns) but also its
comparisson to
zero in the flags, so that you get:
call foo
jg .Lwarning
jnz .Lerror
And you think this will help? It will at most 1-10 cycles depending
on the processor. And if you have a call in the hot loop, you are
screwed
anyways because you will have to deal with the overhead of the call.
So it will end up being about even.
-- Pinski