This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.


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

Re: Small slowdown...


> >   > Output from the gcc2.7.2 is:
> >   > .L11:
> >   > 	addl %ecx,%eax
> >   > 	leal (%eax,%eax),%ecx
> >   > 	decl %edx
> >   > 	jns .L11
> 
> Jeffrey A Law wrote:
> > I just checked this with the current snapshot and the loop looks like
> >  this now:
> > 
> > .L6:
> >         addl %edx,%eax
> >         leal 0(,%eax,2),%edx
> >         decl %ecx
> >         jns .L6
> 
> 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)

Honza
> 
> Have nice day,
> -- Jamie

-- 
                       OK. Lets make a signature file.
+-------------------------------------------------------------------------+
|        Jan Hubicka (Jan Hubi\v{c}ka in TeX) hubicka@freesoft.cz         |
|         Czech free software foundation: http://www.freesoft.cz          |
|AA project - the new way for computer graphics - http://www.ta.jcu.cz/aa |
|  homepage: http://www.paru.cas.cz/~hubicka/, games koules, Xonix, fast  |
|  fractal zoomer XaoS, index of Czech GNU/Linux/UN*X documentation etc.  | 
+-------------------------------------------------------------------------+