Re: -O2 considered harmful

2003-03-01 Thread Bruce Cran
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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: -O2 considered harmful

2003-02-28 Thread Terry Lambert
> > > 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?"?

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: -O2 considered harmful

2003-02-28 Thread Bryan Liesner
On Fri, 28 Feb 2003, David O'Brien wrote:

> On Wed, Feb 26, 2003 at 05:31:20PM -0500, Bryan Liesner 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

I know that some of the flags above are redundant, but this worked and
X is running without any crashes or wierdness. (so far).

I also applied all of the above compile flags when building
xscreensaver and saw a very noticeable speed improvement in some of
the hacks.

-- 
==
= Bryan D. Liesner LeezSoft Communications, Inc. =
=  A subsidiary of LeezSoft Inc. =
= [EMAIL PROTECTED]Home of the Gipper=
==

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: -O2 considered harmful

2003-02-28 Thread David O'Brien
On Wed, Feb 26, 2003 at 05:31:20PM -0500, Bryan Liesner 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.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: -O2 considered harmful

2003-02-27 Thread Rhett Monteg Hollander
Bruce Cran wrote:
> I'm afraid you're wrong - the V2SI datatype and MMX functions
> automatically become available after -march=pentium2, while
> with other processor types you've got to explicitly add -mmmx.
> -msse is presumed with -march=pentium3 and up.
I'm afraid I'm not; I was talking strictly about -march=pentiumpro,
not -march=pentium2 et cetera.

> ... I've seen code which runs 40x faster when compiled for
> athlon-xp than for i386, and I would guess that a lot of that
> is because of clever use of sse and mmx.   That wasn't an
> audio/video program, it was the libgmp arbitrary precision maths
> package.
MMX won't help you even a bit in precise mathematical calculations,
unlike SSE. Also, if you're familiar with the way how MMX works, you
won't enable it when compiling any application that requires heavy
floating-point computations, because constant switching between MMX
unit and FPU results in significant latency.

> Also, I'm sure most people wouldn't say no to 50% more processing
> speed for free!
I didn't mean to stop using MMX at all; I only intended to note that
there is no need to enable it for _all_ applications.

> So, if you've got a pentium, k6 or pentiumpro which supports MMX,
> you _do_ need to explicitly add -mmmx, but for other processors
> it's implied.
You didn't pay enough attention to my original post; PPro doesn't
support MMX. Though, you can specify -mmmx anyway, if you feel
comfortable with SIGILLs.

---
Regards,
 Rhett


__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: -O2 considered harmful

2003-02-27 Thread Bruce Cran
On Thu, Feb 27, 2003 at 09:49:13PM +, Nuno Teixeira wrote:
> On Thu, Feb 27, 2003 at 08:38:00AM +, Bruce Cran wrote:
> > I'm afraid you're wrong - the V2SI datatype and MMX functions automatically
> > become available after -march=pentium2, while with other processor types
> > you've got to explicitly add -mmmx. -msse is presumed with -march=pentium3 
> > and up.  It's far from absurd to use mmx for everyday applications - sure,
> > only a few applications may take advantage of it, but I've seen code which
> > runs 40x faster when compiled for athlon-xp than for i386, and I would guess
> > that a lot of that is because of clever use of sse and mmx.   That wasn't
> > an audio/video program, it was the libgmp arbitrary precision maths
> > package.  Also, I'm sure
> > most people wouldn't say no to 50% more processing speed for free!
> > So, if you've got a pentium, k6 or pentiumpro which supports MMX, you _do_ 
> > need to explicitly add -mmmx, but for other processors it's implied.
> > 

> I searched gcc docs and didn't found info for what you say here. I'm
> seeing a lots of people using e.g. athlon-xp with -mmmx and -m3dnow
> included. I'm confused about if this optimizations are implied or not by
> processores that supports it.
> 

I, too, use -mmmx -msse -m3dnow with -march=athlon-xp.   I do it simply
because I don't trust gcc enough to do it for me - people have shown in
the past that -O2 and -O3 don't activate all the optimizations which
the docs claim they should, which is why you see people adding crazy stuff
like -funroll-loops -fomit-frame-pointer -fschedule-insns2 -fgcse ...
The surest way to find out about at which point gcc enables vector
extensions is, if you've got access to a suitable computer, compile the
following:

typedef int v4sf __attribute__ ((mode(V4SF)));

int main()
{
v4sf a = {1,2,3,4};
v4sf b = {5,6,7,8};
v4sf c = __builtin_ia32_addps(a,b);
return 0;
}

This will only compile when gcc has enabled sse instruction support.  I've 
found that this happens when you use -msse on it's own, even with
-march=pentium, and when you use -march=pentium3, -march=pentium4,
-march=athlon-xp etc without any extra -msse.   In addition, when compiling
mmx code, -m3dnow implies -mmmx, which makes sense since 3dnow is just an
extension of mmx.   

Of course what many people don't realise is that gcc, unlike icc, will not
produce any vector instructions unless either the -mfpunit=sse is enabled to
use sse for all floating point math, or vector instructions are 
explicitly coded for, as above.  So for most software, adding the extra flags
shouldn't affect it in the slightest, but for a few applications, it will
detect the vector unit and use it, resulting in a sometimes significant
performance gain.   You should notice a fairly large increase in performance
when using the sse unit, because unlike mmx and 3dnow it is a seperate
functional unit and so was designed to be fast, instead of being crippled
with backward compatability with the 387.  Indeed, with sse2, Intel seem
to have finally gained a very decent vector processing unit which can 
compete with similar processors such as the G4 with its AltiVec.

Bruce Cran

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: -O2 considered harmful

2003-02-27 Thread Nuno Teixeira
On Thu, Feb 27, 2003 at 08:38:00AM +, Bruce Cran wrote:
> On Wed, Feb 26, 2003 at 06:51:55PM -0800, Rhett Monteg Hollander wrote:
> > Nuno Teixeira wrote:
> > > 
> > > Hi,
> > > 
> > > Just a little question:
> > > 
> > > Does -march=k6-2 implies -m3dnow? Or -march=pentiumpro implies -mmmx?
> > Pentium Pro doesn't support MMX; -march=pentiumpro (aka -march=i686) enables
> > compiling with main i686 instruction set, no MMX\SSE or whatever.
> > 
> > > 
> > > I always thought that when I use -march it will enable other
> > > porcessor specific optimizations like mmx and 3dnow (if available).
> > No way. Besides, only a dozen of open-source UNIX applications can really
> > profit from MMX, so it's absurd to use -mmmx for day-by-day use. To be correct,
> > MMX is only useful for real-time video\audio processing.
> > 
> > A little example: consider some 16-bit pixel set that you need to increase
> > brightness, i.e. to add some value to every pixel. You can load a word into
> > integer register, process, and store. You can also load a quadword of four
> > 16-bit values into MMX register which is mapped onto FPU register, process them
> > at once, and store. Indeed to be faster.
> > 
> > Enabling MMX usually results in about 50% performance increase for true CISC
> > processors like P-MMX, and about 20% for PII and up.
> > 
> 
> I'm afraid you're wrong - the V2SI datatype and MMX functions automatically
> become available after -march=pentium2, while with other processor types
> you've got to explicitly add -mmmx. -msse is presumed with -march=pentium3 
> and up.  It's far from absurd to use mmx for everyday applications - sure,
> only a few applications may take advantage of it, but I've seen code which
> runs 40x faster when compiled for athlon-xp than for i386, and I would guess
> that a lot of that is because of clever use of sse and mmx.   That wasn't
> an audio/video program, it was the libgmp arbitrary precision maths
> package.  Also, I'm sure
> most people wouldn't say no to 50% more processing speed for free!
> So, if you've got a pentium, k6 or pentiumpro which supports MMX, you _do_ 
> need to explicitly add -mmmx, but for other processors it's implied.
> 
> Bruce Cran
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message

Hi,

I searched gcc docs and didn't found info for what you say here. I'm
seeing a lots of people using e.g. athlon-xp with -mmmx and -m3dnow
included. I'm confused about if this optimizations are implied or not by
processores that supports it.

Thanks very much,

Nuno Teixeira

-- 

/*
PGP fingerprint:
C6D1 06ED EB54 A99C 6B14  6732 0A5D 810D 727D F6C6
*/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: -O2 considered harmful

2003-02-27 Thread Andre Guibert de Bruet


On Thu, 27 Feb 2003, Nuno Teixeira wrote:

> On Wed, Feb 26, 2003 at 06:51:55PM -0800, Rhett Monteg Hollander wrote:
>
> I understand it. Anyway, there is known problems by using -mmmx or
> -m3dnow on builworld/buildkernel? Well, I used allways march=pentiumpro
> on stable and now pentium2 on current without any problem.

I've been using -march=athlon-xp -O2 -mmmx -m3dnow and -msse on my desktop
for close to a month without any noticeable quirks. I rebuild world twice
daily and kernel every other day...

> I use some applications like grip, lame, mplayer, etc. Maybe I get some
> extra performance running this apps.

With -mmmx, -m3dnow or -msse, you're going to get a noticeable
improvement, especially with lame and mplayer.

I recommend compiling programs that use sound or graphics with high
optimization cflags and keeping moderately conservative options for the
base system and kernel.

Regards,

> Andre Guibert de Bruet | Enterprise Software Consultant >
> Silicon Landmark, LLC. | http://siliconlandmark.com/>



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: -O2 considered harmful

2003-02-27 Thread Nuno Teixeira
On Wed, Feb 26, 2003 at 06:51:55PM -0800, Rhett Monteg Hollander wrote:
> Nuno Teixeira wrote:
> > 
> > Hi,
> > 
> > Just a little question:
> > 
> > Does -march=k6-2 implies -m3dnow? Or -march=pentiumpro implies -mmmx?
> Pentium Pro doesn't support MMX; -march=pentiumpro (aka -march=i686) enables
> compiling with main i686 instruction set, no MMX\SSE or whatever.
> 
> > 
> > I always thought that when I use -march it will enable other
> > porcessor specific optimizations like mmx and 3dnow (if available).
> No way. Besides, only a dozen of open-source UNIX applications can really
> profit from MMX, so it's absurd to use -mmmx for day-by-day use. To be correct,
> MMX is only useful for real-time video\audio processing.
> 
> A little example: consider some 16-bit pixel set that you need to increase
> brightness, i.e. to add some value to every pixel. You can load a word into
> integer register, process, and store. You can also load a quadword of four
> 16-bit values into MMX register which is mapped onto FPU register, process them
> at once, and store. Indeed to be faster.
> 
> Enabling MMX usually results in about 50% performance increase for true CISC
> processors like P-MMX, and about 20% for PII and up.
> 
> ---
> Regards,
>  Rhett
> 

Hi,

I understand it. Anyway, there is known problems by using -mmmx or
-m3dnow on builworld/buildkernel? Well, I used allways march=pentiumpro
on stable and now pentium2 on current without any problem.

I use some applications like grip, lame, mplayer, etc. Maybe I get some
extra performance running this apps.

Thanks,

Nuno Teixeira

-- 

/*
PGP fingerprint:
C6D1 06ED EB54 A99C 6B14  6732 0A5D 810D 727D F6C6
*/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: -O2 considered harmful

2003-02-27 Thread Morten Rodal
On Thu, Feb 27, 2003 at 05:49:47AM -0500, Geoffrey wrote:
>   This is fine and good, but make.conf appears to be hiding in 5.0
> (or at least in the various installs/cvsups I've encountered to date).
> What flags are accepted is a bit of a guessing game without a template in
> /etc/defaults (yes, I could wade through man pages but with the rate of
> change on release, those recommendations aren't a given either).
> 

Have you looked at the make.conf in /usr/share/examples/etc ?

-- 
Morten Rodal



pgp0.pgp
Description: PGP signature


Re: -O2 considered harmful

2003-02-27 Thread Geoffrey
On Thu, 27 Feb 2003, Bruce Cran wrote:

> On Wed, Feb 26, 2003 at 06:51:55PM -0800, Rhett Monteg Hollander wrote:
>
> I'm afraid you're wrong - the V2SI datatype and MMX functions automatically
> become available after -march=pentium2, while with other processor types
> you've got to explicitly add -mmmx. -msse is presumed with -march=pentium3
> and up.  It's far from absurd to use mmx for everyday applications - sure,
> only a few applications may take advantage of it, but I've seen code which
> runs 40x faster when compiled for athlon-xp than for i386, and I would guess
> that a lot of that is because of clever use of sse and mmx.   That wasn't
> an audio/video program, it was the libgmp arbitrary precision maths
> package.  Also, I'm sure
> most people wouldn't say no to 50% more processing speed for free!
> So, if you've got a pentium, k6 or pentiumpro which supports MMX, you _do_
> need to explicitly add -mmmx, but for other processors it's implied.
>
This is fine and good, but make.conf appears to be hiding in 5.0
(or at least in the various installs/cvsups I've encountered to date).
What flags are accepted is a bit of a guessing game without a template in
/etc/defaults (yes, I could wade through man pages but with the rate of
change on release, those recommendations aren't a given either).

Cheers.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: -O2 considered harmful

2003-02-27 Thread Bruce Cran
On Wed, Feb 26, 2003 at 06:51:55PM -0800, Rhett Monteg Hollander wrote:
> Nuno Teixeira wrote:
> > 
> > Hi,
> > 
> > Just a little question:
> > 
> > Does -march=k6-2 implies -m3dnow? Or -march=pentiumpro implies -mmmx?
> Pentium Pro doesn't support MMX; -march=pentiumpro (aka -march=i686) enables
> compiling with main i686 instruction set, no MMX\SSE or whatever.
> 
> > 
> > I always thought that when I use -march it will enable other
> > porcessor specific optimizations like mmx and 3dnow (if available).
> No way. Besides, only a dozen of open-source UNIX applications can really
> profit from MMX, so it's absurd to use -mmmx for day-by-day use. To be correct,
> MMX is only useful for real-time video\audio processing.
> 
> A little example: consider some 16-bit pixel set that you need to increase
> brightness, i.e. to add some value to every pixel. You can load a word into
> integer register, process, and store. You can also load a quadword of four
> 16-bit values into MMX register which is mapped onto FPU register, process them
> at once, and store. Indeed to be faster.
> 
> Enabling MMX usually results in about 50% performance increase for true CISC
> processors like P-MMX, and about 20% for PII and up.
> 

I'm afraid you're wrong - the V2SI datatype and MMX functions automatically
become available after -march=pentium2, while with other processor types
you've got to explicitly add -mmmx. -msse is presumed with -march=pentium3 
and up.  It's far from absurd to use mmx for everyday applications - sure,
only a few applications may take advantage of it, but I've seen code which
runs 40x faster when compiled for athlon-xp than for i386, and I would guess
that a lot of that is because of clever use of sse and mmx.   That wasn't
an audio/video program, it was the libgmp arbitrary precision maths
package.  Also, I'm sure
most people wouldn't say no to 50% more processing speed for free!
So, if you've got a pentium, k6 or pentiumpro which supports MMX, you _do_ 
need to explicitly add -mmmx, but for other processors it's implied.

Bruce Cran

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: -O2 considered harmful

2003-02-26 Thread Rhett Monteg Hollander
Nuno Teixeira wrote:
> 
> Hi,
> 
> Just a little question:
> 
> Does -march=k6-2 implies -m3dnow? Or -march=pentiumpro implies -mmmx?
Pentium Pro doesn't support MMX; -march=pentiumpro (aka -march=i686) enables
compiling with main i686 instruction set, no MMX\SSE or whatever.

> 
> I always thought that when I use -march it will enable other
> porcessor specific optimizations like mmx and 3dnow (if available).
No way. Besides, only a dozen of open-source UNIX applications can really
profit from MMX, so it's absurd to use -mmmx for day-by-day use. To be correct,
MMX is only useful for real-time video\audio processing.

A little example: consider some 16-bit pixel set that you need to increase
brightness, i.e. to add some value to every pixel. You can load a word into
integer register, process, and store. You can also load a quadword of four
16-bit values into MMX register which is mapped onto FPU register, process them
at once, and store. Indeed to be faster.

Enabling MMX usually results in about 50% performance increase for true CISC
processors like P-MMX, and about 20% for PII and up.

---
Regards,
 Rhett


__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: -O2 considered harmful

2003-02-26 Thread Jens Rehsack
Andre Guibert de Bruet wrote:
On Wed, 26 Feb 2003, Nuno Teixeira wrote:


Does -march=k6-2 implies -m3dnow? Or -march=pentiumpro implies -mmmx?

I always thought that when I use -march it will enable other
porcessor specific optimizations like mmx and 3dnow (if available).


IIRC, 166 and 180 Mhz PPros don't support MMX.
Neither do PPro's 200:
CPU: Pentium Pro (199.43-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x619  Stepping = 9
  Features=0xf9ff
I'm seeing differences in compiled code between simple -march=athlon-xp
and -march=athlon-xp -mmmx -m3dnow -msse.
The documentation says the same: those options have to be enabled to use 
extended instruction sets. -march/-mcpu just optmizes boundaries of jump 
labels, variables, etc... - and sometimes the kind of instructions to 
use, eg. 'loop label' or 'dec bcx, jne label', but that's all, AFAIK.

So long,
Jens
--
L i  W W W  i Jens Rehsack
LW W W
L i   W   W W   W   i  nnnLiWing IT-Services
L iW W   W Wi  n  n  g   g
  i W W i  n  n  g   gFriesenstraße 2
  06112 Halle
 g
 g   g
Tel.:  +49 - 3 45 - 5 17 05 91ggg e-Mail: <[EMAIL PROTECTED]>
Fax:   +49 - 3 45 - 5 17 05 92http://www.liwing.de/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: -O2 considered harmful

2003-02-26 Thread Andre Guibert de Bruet

On Wed, 26 Feb 2003, Nuno Teixeira wrote:

> Does -march=k6-2 implies -m3dnow? Or -march=pentiumpro implies -mmmx?
>
> I always thought that when I use -march it will enable other
> porcessor specific optimizations like mmx and 3dnow (if available).

IIRC, 166 and 180 Mhz PPros don't support MMX.

I'm seeing differences in compiled code between simple -march=athlon-xp
and -march=athlon-xp -mmmx -m3dnow -msse.

Regards,

> Andre Guibert de Bruet | Enterprise Software Consultant >
> Silicon Landmark, LLC. | http://siliconlandmark.com/>

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: -O2 considered harmful

2003-02-26 Thread Anti
On Wed, 26 Feb 2003 13:06:54 +0100
Jens Rehsack <[EMAIL PROTECTED]> wrote:

> Dag-Erling Smorgrav wrote:
> > It seems that with -O2 on ia32 (-march=k6-2 in my case), gcc will in
> > some cases generate short jumps to targets too far away for the offset
> > to fit in a single byte.  A surefire way to reproduce this is to build
> > Mesa (or XFree86-4-libraries, which includes parts of Mesa).
> > 
> > Has anybody else run into this?
> > 
> 
> I build world and ports on desktop machines usually using -O2 and never 
> got any problems, except with lang/ezm3. If you tell me, where you've 
> find the problems, I'll tell my gcc to keep the temporaries and check 
> them after a make build.


you need to add "-fno-schedule-insns2" to your CFLAGS to compile ezm3 with
-O2...


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: -O2 considered harmful

2003-02-26 Thread Bryan Liesner
On Wed, 26 Feb 2003, Dag-Erling Smorgrav wrote:

> It seems that with -O2 on ia32 (-march=k6-2 in my case), gcc will in
> some cases generate short jumps to targets too far away for the offset
> to fit in a single byte.  A surefire way to reproduce this is to build
> Mesa (or XFree86-4-libraries, which includes parts of Mesa).
>
> Has anybody else run into this?
>
> DES
>

I have seen this as well, using -O2 -march=athlon-xp.
The generated assembler tried to stuff -129 into a single byte.

-- 
==
= Bryan D. Liesner LeezSoft Communications, Inc. =
=  A subsidiary of LeezSoft Inc. =
= [EMAIL PROTECTED]Home of the Gipper=
==

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: -O2 considered harmful

2003-02-26 Thread Nuno Teixeira

Hi,

Just a little question:

Does -march=k6-2 implies -m3dnow? Or -march=pentiumpro implies -mmmx?

I always thought that when I use -march it will enable other
porcessor specific optimizations like mmx and 3dnow (if available).


Thanks,

Nuno Teixeira

On Wed, Feb 26, 2003 at 05:06:35PM -0300, Fred Souza wrote:
> > I was recently a participant in a thread in another forum where all sorts
> > of people, including a well respected gcc developer, said categorically
> > that the latest (stock) gcc produces correct code with -O2 in all cases on
> > ia32. If it doesn't, the gcc folks would like a bug report.
> 
>   I use -O3 -mmmx -m3dnow -march=k6-2 on nearly everything (things that
>   break with that many optimization, such as XFree86-4-libraries, I
>   "downgrade" to the highest optimization possible - usually -O2), and
>   I'm not noticing any bad impacts because of it.
> 
>   And by "nearly everything" I even meant the kernel (yes, I can respect
>   if anyone screams "[EMAIL PROTECTED]" ;-)
> 
> 
>   Fred
> 
> 
> -- 
> Insulting a person's appearance:
> 
>   That's what they mean by dark and handsome. When it's dark, you're
>   handsome...



-- 

/*
PGP fingerprint:
C6D1 06ED EB54 A99C 6B14  6732 0A5D 810D 727D F6C6
*/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: -O2 considered harmful

2003-02-26 Thread Bruce Cran
On Wed, Feb 26, 2003 at 05:06:35PM -0300, Fred Souza wrote:
> > I was recently a participant in a thread in another forum where all sorts
> > of people, including a well respected gcc developer, said categorically
> > that the latest (stock) gcc produces correct code with -O2 in all cases on
> > ia32. If it doesn't, the gcc folks would like a bug report.
> 
>   I use -O3 -mmmx -m3dnow -march=k6-2 on nearly everything (things that
>   break with that many optimization, such as XFree86-4-libraries, I
>   "downgrade" to the highest optimization possible - usually -O2), and
>   I'm not noticing any bad impacts because of it.
> 
>   And by "nearly everything" I even meant the kernel (yes, I can respect
>   if anyone screams "[EMAIL PROTECTED]" ;-)
> 

Is it just me, or does mozilla break when things are compiled with -march=athlon-xp?
I'm not sure what happens, but mozilla starts to load, a window flashes up
briefly before mozilla quits.  Running dbg on it says that it segfaults in
WindowGetHeight() or some such function.   When I recompile _everything_ back
using -O -march=pentiumpro it works again.  I'm sure I've compiled it for
athlon-xp before on 5.0-RELEASE, has something changed to break it?

Bruce Cran

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: -O2 considered harmful

2003-02-26 Thread Fred Souza
> I was recently a participant in a thread in another forum where all sorts
> of people, including a well respected gcc developer, said categorically
> that the latest (stock) gcc produces correct code with -O2 in all cases on
> ia32. If it doesn't, the gcc folks would like a bug report.

  I use -O3 -mmmx -m3dnow -march=k6-2 on nearly everything (things that
  break with that many optimization, such as XFree86-4-libraries, I
  "downgrade" to the highest optimization possible - usually -O2), and
  I'm not noticing any bad impacts because of it.

  And by "nearly everything" I even meant the kernel (yes, I can respect
  if anyone screams "[EMAIL PROTECTED]" ;-)


  Fred


-- 
Insulting a person's appearance:

That's what they mean by dark and handsome. When it's dark, you're
handsome...


pgp0.pgp
Description: PGP signature


Re: -O2 considered harmful

2003-02-26 Thread Doug Barton
On Wed, 26 Feb 2003, Dag-Erling Smorgrav wrote:

> It seems that with -O2 on ia32 (-march=k6-2 in my case), gcc will in
> some cases generate short jumps to targets too far away for the offset
> to fit in a single byte.  A surefire way to reproduce this is to build
> Mesa (or XFree86-4-libraries, which includes parts of Mesa).

I was recently a participant in a thread in another forum where all sorts
of people, including a well respected gcc developer, said categorically
that the latest (stock) gcc produces correct code with -O2 in all cases on
ia32. If it doesn't, the gcc folks would like a bug report.

Doug

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: -O2 considered harmful

2003-02-26 Thread Bruce Evans
On Wed, 26 Feb 2003, Dag-Erling Smorgrav wrote:

> It seems that with -O2 on ia32 (-march=k6-2 in my case), gcc will in
> some cases generate short jumps to targets too far away for the offset
> to fit in a single byte.  A surefire way to reproduce this is to build
> Mesa (or XFree86-4-libraries, which includes parts of Mesa).

The assembler generates these.

Bruce


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: -O2 considered harmful

2003-02-26 Thread Jens Rehsack
Dag-Erling Smorgrav wrote:
It seems that with -O2 on ia32 (-march=k6-2 in my case), gcc will in
some cases generate short jumps to targets too far away for the offset
to fit in a single byte.  A surefire way to reproduce this is to build
Mesa (or XFree86-4-libraries, which includes parts of Mesa).
Has anybody else run into this?

I build world and ports on desktop machines usually using -O2 and never 
got any problems, except with lang/ezm3. If you tell me, where you've 
find the problems, I'll tell my gcc to keep the temporaries and check 
them after a make build.

Jens

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


-O2 considered harmful

2003-02-26 Thread Dag-Erling Smorgrav
It seems that with -O2 on ia32 (-march=k6-2 in my case), gcc will in
some cases generate short jumps to targets too far away for the offset
to fit in a single byte.  A surefire way to reproduce this is to build
Mesa (or XFree86-4-libraries, which includes parts of Mesa).

Has anybody else run into this?

DES
-- 
Dag-Erling Smorgrav - [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message