Subject: Re: sparc/sparc64 gcc CFLAGS for optimization
To: David Brownlee <email@example.com>
From: Brian A. Seklecki <firstname.lastname@example.org>
Date: 11/27/2001 15:13:55
On Tue, 27 Nov 2001, David Brownlee wrote:
> -msupersparc gets you the int multiply and divide which should
> be a win :)
According to the docs on GCC's site:
These two options select the processor for which the code is
optimized. With -mcypress (the default), the compiler optimizes code for
the Cypress CY7C602 chip, as used in the SparcStation/ SparcServer 3xx
series. This is also appropriate for the older SparcStation 1, 2, IPX,
etc. With -msupersparc the compiler optimizes code for the SuperSparc
CPU, as used in the SparcStation 10, 1000 and 2000 series. This flag also
enables use of the full SPARC v8 instruction set.
**** These options are deprecated and will be deleted in GNU CC 2.9. They
have been replaced with -mcpu=xxx. ****
If that's the case, I suppose that will cause problems if EGCS is ever
replaced by straigh GCC 3?
Also, would it be possible to get some comments about these in the sparc
or sparc64 FAQ on the webpage?
> David/absolute -- www.netbsd.org: No hype required --
> On Mon, 26 Nov 2001, Brian A. Seklecki wrote:
> > On some other operating systems that run on sparc but use gcc 3 for a
> > compiler (that we won't mention here for posterity), you can export your
> > CFLAG environmental to obtain optimizations on a per-cpu class basis. How
> > would these flags affect egcs-2.91.66/egcs-1.1.2, and are they truly worth
> > the wait at compile time? i.e.:
> > export CFLAGS="-O9 -mcpu=ultrasparc -mtune=ultrasparc"
> > export CFLAGS="-O9 -mcpu=v8 -mtune=supersparc"
> > >From the GCC docs:
> > -mcpu=cpu_type
> > Set architecture type and instruction scheduling parameters
> > for machine type cpu_type. Supported values for cpu_type are common,
> > cypress, v8, supersparc, sparclite, f930, f934, sparclet, 90c701, v8plus,
> > v9, and ultrasparc. Specifying ?v9? is only supported on true 64-bit
> > targets. Default instruction scheduling parameters are used for values
> > that select an architecture and not an implementation. These are v7, v8,
> > sparclite, sparclet, v9. The following list shows each supported
> > architecture and their supported implementations.
> > v7: cypress
> > v8: supersparc
> > sparclite: f930, f934
> > sparclet: tsc701
> > v9: ultrasparc
> > -mtune=cpu_type
> > Set the instruction scheduling parameters for machine type, cpu_type,
> > but do not set the architecture type like -mcpu=cpu_type would. The same
> > values for -mcpu=cpu_type are used for -mtune=cpu_type, although the only
> > useful values for those that select a particular CPU implementation:
> > cypress, supersparc, f930, f934, tsc701, and ultrasparc.
> > --Brian
> > ----
> > "GNU/Linux: About as stable as the elements at the bottom of the periodic
> > table"
"GNU/Linux: About as stable as the elements at the bottom of the periodic