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]

Re: Small slowdown...


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


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