Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 06 Aug 2002 18:55:11 -0700
From:      Peter Wemm <peter@wemm.org>
To:        Darren Pilgrim <dmp@pantherdragon.org>
Cc:        Matthew Dillon <dillon@apollo.backplane.com>, Dan Nelson <dnelson@allantgroup.com>, Terry Lambert <tlambert2@mindspring.com>, Jason Andresen <jandrese@mitre.org>, Dmitry Morozovsky <marck@rinet.ru>, hackers@FreeBSD.ORG
Subject:   Re: -fomit-frame-pointer for the world build 
Message-ID:  <20020807015511.A1A092A7D6@canning.wemm.org>
In-Reply-To: <3D50664F.71603B49@pantherdragon.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
Darren Pilgrim wrote:
> Peter Wemm wrote:
> > Far more speed benefit can be had by setting -mcpu/-march/-mtune
> > *correctly* than things like -fomit-frame-pointer will do.  For example, 32
> > bit multiply is REALLY slow on i386 (our default target until recently) so
> > gcc will try and "optimize" out multiplies by converting them to shift/add.
> > Of course, this turns out to usually be slower on pentium and above. :-]
> 
> How do Intel's "Overdrive" processors fit in?  I have one machine that
> has a Pentium Pro Overdrive processor.  Do I set CPU=i686 or CPU=p2 in
> this case?  Here's kernel line for the CPU:
> 
> CPU: Overdrive Pentium II/Pentium II Xeon/Celeron (332.39-MHz 686-class CPU)
>   Origin = "GenuineIntel"  Id = 0x1631  Stepping = 1
>   Features=0x183f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV
    ,PAT,PSE36,MMX,FXSR>
> 
> I would assume CPU=p2, but I also know that what's in the ceramic
> casing isn't a standard Pentium II.

The pentium pro, pentium 2 and pentium 3 are essentially the same cpu core
with a few different bells and whistles and different L1 and L2 cache
configurations.  eg: pentium3 has got SSE, pentiumpro has got no MMX.
I'd say to call it a pentium2 since it has MMX.

`-mcpu=CPU-TYPE'
     Tune to CPU-TYPE everything applicable about the generated code,
     except for the ABI and the set of available instructions.  The
     choices for CPU-TYPE are `i386', `i486', `i586', `i686',
     `pentium', `pentium-mmx', `pentiumpro', `pentium2', `pentium3',
     `pentium4', `k6', `k6-2', `k6-3', `athlon', `athlon-tbird',
     `athlon-4', `athlon-xp' and `athlon-mp'.

You can also add -msse, -msse2, -m3dnow to use those extensions. It would
appear that our bsd.cpu.mk file is out of date and is missing the newer
cpu types.

Also, while reading 'info gcc', I noticed there is the following
new option in 3.1:

`-momit-leaf-frame-pointer'
     Don't keep the frame pointer in a register for leaf functions.
     This avoids the instructions to save, set up and restore frame
     pointers and makes an extra register available in leaf functions.

Cheers,
-Peter
--
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5


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?20020807015511.A1A092A7D6>