On 24-Aug-01 Leo Bicknell wrote:
>
> Someone suggested to me privately turning on optimization, for
> the record that doesn't help much: (with -O2)
Actually, it's fairly close to what I proposed. It even axed the addl after
the call. The only weirdness is the subl/addl dinking with gcc. I've no idea
what that is about. Perhaps it is using that to align code to a certain
boundary to optimize the ret inside printf? (Make it fetch at the start of a
cache line or some such.)
> .p2align 2,0x90
> .globl printasint
> .type printasint,@function
> printasint:
> pushl %ebp
> movl %esp,%ebp
> subl $8,%esp
> addl $-8,%esp
> pushl 8(%ebp)
> pushl $.LC0
> call printf
> leave
> ret
> .Lfe1:
> .size printasint,.Lfe1-printasint
> .ident "[ASM_FILE_END]GCC: (c) 2.95.2 19991024 (release)"
--
John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message