Your results seem strange

pragma pragma_member at pathlink.com
Fri Jun 9 10:39:13 PDT 2006


In article <e6c9mm$v9q$1 at digitaldaemon.com>, AKhropov says...
>
>Did your turn maximum optimization on?

As a matter of fact, I did not.  Sure enough, with "-O -inline release"
specified, the enter/leave instructions dissapear and are replaced with their
push/pop/mov counterparts (see attached).  :)

- Eric

SUB_L00402010:
push	ebp
mov	ebp,esp
nop
nop
nop
cmp	dword ptr [ebp+08h],00000000h
jnz	L00402022
mov	eax,[ebp+0Ch]
inc	eax
pop	ebp
retn
;------------------------------------------------------------------------------
L00402022:
cmp	dword ptr [ebp+0Ch],00000000h
jnz	L00402039
push	00000001h
mov	eax,[ebp+08h]
dec	eax
push	eax
call	SUB_L00402010
add	esp,00000008h
pop	ebp
retn
;------------------------------------------------------------------------------
L00402039:
mov	eax,[ebp+0Ch]
dec	eax
push	eax
push	[ebp+08h]
call	SUB_L00402010
add	esp,00000008h
push	eax
mov	eax,[ebp+08h]
dec	eax
push	eax
call	SUB_L00402010
add	esp,00000008h
pop	ebp
retn





More information about the Digitalmars-d mailing list