From owner-freebsd-hackers Sun Aug 26 23: 9:55 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail11.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by hub.freebsd.org (Postfix) with ESMTP id 518F137B405 for ; Sun, 26 Aug 2001 23:09:52 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 63662 invoked from network); 27 Aug 2001 06:09:51 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([64.81.54.73]) (envelope-sender ) by mail11.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 27 Aug 2001 06:09:51 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20010825154427.B761@iv.nn.kiev.ua> Date: Sun, 26 Aug 2001 23:09:58 -0700 (PDT) From: John Baldwin To: Valentin Nechayev Subject: Re: function calls/rets in assembly Cc: Steve Roome , freebsd-hackers@FreeBSD.ORG, "David O'Brien" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 -- 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