Subject: sparc/sparc64 gcc CFLAGS for optimization
To: port-sparc@netbsd.org, <port-sparc64@netbsd.org>
From: Brian A. Seklecki <lavalamp@burghcom.com>
List: port-sparc64
Date: 11/26/2001 19:08:20
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"