Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Aug 2001 23:09:58 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Valentin Nechayev <netch@iv.nn.kiev.ua>
Cc:        Steve Roome <stephen_roome@yahoo.com>, freebsd-hackers@FreeBSD.ORG, "David O'Brien" <obrien@FreeBSD.ORG>
Subject:   Re: function calls/rets in assembly
Message-ID:  <XFMail.010826230958.jhb@FreeBSD.org>
In-Reply-To: <20010825154427.B761@iv.nn.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help

On 25-Aug-01 Valentin Nechayev wrote:
> Well, unnesesary stack pointer shiftings disappeared.
> After calling with additional -O1:
> 
> printasint:
>         pushl %ebp
>         movl %esp,%ebp
>         pushl 8(%ebp)
>         pushl $.LC0
>         call printf
>         leave
>         ret
> 
> You can simply see that this assembly output is fully identical
> to one you requested.
> 
> Well, now you should add wanted options to /etc/make.conf and avoid
> seeing of such nightmares.

Erm, the original topic of this dicussion was about attempting to use the
assembly from the C compiler to see how things work when writing one's own
assembly functions.  Having to know magical extra parameters to pass to the
compiler to make this a fruitful exercise doesn't help.  If the compiler were
more intelligent about the code it output by default in the first place, then
that would help.

-- 

John Baldwin <jhb@FreeBSD.org> -- 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 majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010826230958.jhb>