This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Small slowdown...
- To: Jan Hubicka <hubicka at atrey dot karlin dot mff dot cuni dot cz>
- Subject: Re: Small slowdown...
- From: Jamie Lokier <egcs at tantalophile dot demon dot co dot uk>
- Date: Sat, 10 Apr 1999 01:36:57 +0200
- Cc: Jeffrey A Law <law at upchuck dot cygnus dot com>, egcs at egcs dot cygnus dot com
- References: <19980522112932.39503@atrey.karlin.mff.cuni.cz> <921.922704938@upchuck> <19990330111139.A7934@pcep-jamie.cern.ch> <19990330122317.30203@atrey.karlin.mff.cuni.cz>
Jan Hubicka wrote:
> > There is still room for improvement.
> >
> > leal (%eax,%eax),%ecx is 3 bytes long, whereas
> > leal 0(,%eax,2) is 5 bytes long
>
> It is pretty easy to hanle this directly in asm output routines.
> Is such hack acceptable? If so, I will send a patch.
> (I have it implemented in my source tree and it seems to work
> reliably)
Just checking, you do mean GCC asm output routines, not binutils?
It would be wrong for binutils to convert (,%ebp,2) to (%ebp,%ebp),
because that changes the default segment used for the memory access.
Not a problem for GCC-generated code, but it can affect other asm code.
(I think -- can someone confirm that the default segment for (,%ebp,2)
and (,%esp,2) is %ds please? I couldn't find it in the Intel manual.)
Thanks,
-- Jamie