www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/18/14:52:44

Message-Id: <m0zK5df-000S4fC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: johnfine AT erols DOT com, djgpp AT delorie DOT com
Date: Fri, 18 Sep 1998 15:55:26 +0000
MIME-Version: 1.0
Subject: Re: Optimizations
In-reply-to: <36027FD2.329A@erols.com>

"John S. Fine" <johnfine AT erols DOT com> wrote:

> void foo(void) {
>    int index;
>    for (index=5; index>0; index--)
>       fun();
> }
> 
> _foo:
> 	pushl %ebx
> 	movl $5,%ebx
> 	.align 2,0x90
> L5:
> 	call _fun
> 	decl %ebx
> 	testl %ebx,%ebx
> 	jg L5
> 	popl %ebx
> 	ret
> 
>   Notice the testl %ebx,%ebx.  It isn't needed at all.
>

Help the idiot, use it: for (index=5; index; index--) ;-)

SET
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019