From owner-freebsd-hackers Fri Aug 24 13:36:28 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 1C0D537B40A; Fri, 24 Aug 2001 13:36:24 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.11.4/8.11.4) id f7OKaNS11236; Fri, 24 Aug 2001 15:36:23 -0500 (CDT) (envelope-from dan) Date: Fri, 24 Aug 2001 15:36:23 -0500 From: Dan Nelson To: John Baldwin Cc: Leo Bicknell , "David O'Brien" , freebsd-hackers@FreeBSD.ORG, Steve Roome Subject: Re: function calls/rets in assembly Message-ID: <20010824153622.A17762@dan.emsphone.com> References: <20010824161024.A45122@ussenterprise.ufp.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.20i X-OS: FreeBSD 5.0-CURRENT 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 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 dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message