From owner-freebsd-hackers Tue Aug 6 13:50:13 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E296137B401 for ; Tue, 6 Aug 2002 13:50:06 -0700 (PDT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5295B43E6E for ; Tue, 6 Aug 2002 13:50:06 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.5/8.12.4) with ESMTP id g76Ko1CV015078; Tue, 6 Aug 2002 13:50:01 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.5/8.12.4/Submit) id g76Ko0AO015075; Tue, 6 Aug 2002 13:50:00 -0700 (PDT) (envelope-from dillon) Date: Tue, 6 Aug 2002 13:50:00 -0700 (PDT) From: Matthew Dillon Message-Id: <200208062050.g76Ko0AO015075@apollo.backplane.com> To: Dan Nelson Cc: Terry Lambert , Darren Pilgrim , Jason Andresen , Dmitry Morozovsky , hackers@FreeBSD.ORG Subject: Re: -fomit-frame-pointer for the world build References: <20020802212841.R58905-100000@woozle.rinet.ru> <3D4AC526.4CD399B3@mindspring.com> <3D4C8464.A2F4775A@pantherdragon.org> <3D4CC81F.94526C8A@mindspring.com> <3D4EA466.C1289F0F@mitre.org> <3D4EF091.EA1C91D3@pantherdragon.org> <3D4F0A5F.9B76573F@mindspring.com> <3D4F58B2.E58C2865@pantherdragon.org> <3D4F751E.1A5C1327@mindspring.com> <20020806141548.GB78723@dan.emsphone.com> 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 :I thought the main thing you got out of -fomit-frame-pointer was a free :register, which is a scarce commodity on x86. : :-- : Dan Nelson : dnelson@allantgroup.com I've done considerable testing of -fomit-frame-pointer and it really only has an effect if the program makes lots (millions) of calls to tiny, fast procedures. This is because the push %ebp; movl %esp,%ebp is removed from the beginning of the procedure and the 'leave' is removed from the end of the procedure (though an addl to restore %esp has to be added in). GCC does not seem to be able to make use of the extra register, or if it does it does not seem to be able to use it to any great degree. The IA32 architecture has 6 general registers available to it (eax, edx, ecx, ebx, esi, edi). Throwing in ebp would not make a huge difference, nor can 8 and 16 bit specifications (e.g. %al, %ah) be mixed together safely without a severe performance penalty on higher end cpus. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message