In the last episode (Aug 24), John Baldwin said:
> 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.)
For what it's worth, gcc30 -O produces:
.align 4
.globl printasint
.type printasint,@function
printasint:
pushl %ebp
movl %esp, %ebp
subl $16, %esp
pushl 8(%ebp)
pushl $.LC0
call printf
leave
ret
--
Dan Nelson
[EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message
- function calls/rets in assembly Steve Roome
- RE: function calls/rets in assembly John Baldwin
- Re: function calls/rets in assembly David O'Brien
- Re: function calls/rets in assembly John Baldwin
- Re: function calls/rets in assembly Leo Bicknell
- Re: function calls/rets in assembly John Baldwin
- Re: function calls/rets in assembly Leo Bicknell
- Re: function calls/rets in assembly Dan Nelson
- Re: function calls/rets in assembly Matt Dillon
- Re: function calls/rets in assembly John Baldwin
- Re: function calls/rets in assembly Valentin Nechayev
- Re: function calls/rets in assembly Peter Pentchev
- Re: function calls/rets in assembly David O'Brien
- Re: function calls/rets in assembly Valentin Nechayev
- Re: function calls/rets in assembly David O'Brien
- Re: function calls/rets in assembly Valentin Nechayev
- Re: function calls/rets in assembly Terry Lambert
- Re: function calls/rets in assembly John Baldwin

