Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Aug 2002 13:50:00 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Dan Nelson <dnelson@allantgroup.com>
Cc:        Terry Lambert <tlambert2@mindspring.com>, Darren Pilgrim <dmp@pantherdragon.org>, Jason Andresen <jandrese@mitre.org>, Dmitry Morozovsky <marck@rinet.ru>, hackers@FreeBSD.ORG
Subject:   Re: -fomit-frame-pointer for the world build
Message-ID:  <200208062050.g76Ko0AO015075@apollo.backplane.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
: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 
					<dillon@backplane.com>

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?200208062050.g76Ko0AO015075>