This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: optimizing calling conventions for function returns



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


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