Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Mar 2003 18:49:02 +0000
From:      Bruce Cran <bruce@cran.org.uk>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        current@freebsd.org
Subject:   Re: -O2 considered harmful
Message-ID:  <20030301184902.GA95347@fourtytwo.brucec.backnet>
In-Reply-To: <3E60127B.B6408504@mindspring.com>
References:  <xzpy943xnhx.fsf@flood.ping.uio.no> <20030226172500.Q42451@gravy.kishka.net> <20030228215121.GA68936@dragon.nuxi.com> <20030228172849.L41410@gravy.kishka.net> <3E60127B.B6408504@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 28, 2003 at 05:52:59PM -0800, Terry Lambert wrote:
> > > > I have seen this as well, using -O2 -march=athlon-xp.
> > > > The generated assembler tried to stuff -129 into a single byte.
> > >
> > > What about just trying -march=athlon?  The only difference is the SSE
> > > support, which is quite new and may have latent bugs anyway.
> > 
> > I didn't try that, but i did not get that error using:
> > -O2 -march=athlon-xp -mmmx -msse -m3dnow -mfpmath=sse
> > to compile the xc/ tree
> 
> 
> Is it just me, or does this whole discussion boil down to something
> like "How can I overclock my compiler?"?
> 

I'd say it's more something like "How can I get my money's worth out of my
processor?"   With modern processors having multiple functional units, 
capable of queuing and executing multiple instructions 
simultaneously, we need some
way to take advantage of this - so that we use 100% of the CPU instead of 75%.
So, for example using the new SSE functional unit instead of the aged hacked
387 makes sense, hence the -mfpmath=sse flag.  I have just recompiled the
world and all my ports using -O2 -march=athlon-xp -mmmx -msse -m3dnow
-mfpmath=sse and everything except ezm3 compiled cleanly 
(adding -fno-schedule-insns2 to the flags made it compile).  Mozilla doesn't
crash any more.

Bruce Cran

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030301184902.GA95347>