Subject: Re: What are you using port-sparc for?
To: Holger Weiss <lists@jhweiss.de>
From: Greg A. Woods <woods@weird.com>
List: port-sparc
Date: 09/30/2004 13:15:32
[ On Thursday, September 30, 2004 at 00:07:42 (+0200), Holger Weiss wrote: ]
> Subject: Re: What are you using port-sparc for?
>
> * Greg A. Woods <woods@weird.com> [2004-09-29 15:43]:
> > [ On Tuesday, September 28, 2004 at 04:29:52 (+0200), Holger Weiss wrote: ]
> > > Have you tried recompiling OpenSSH/OpenSSL with "-mcpu=v8" on the SS5?
> > > SSH 2 logins are _way_ faster when using v8 code on sun4m machines. On
> > > sun4c, I'd use SSH 1.
> >
> > You should really use "-O2 -mcpu=v8 -mtune=supersparc", not just cpu=v8...
> 
> Adding "-O2" shouldn't be necessary since normally it's set already when
> building OpenSSH/OpenSSL.

True but the point was to specify it as necessary for good performance.

> And AFAICS, "-mtune=" only defines a subset of
> what is defined via "-mcpu=". However, for both switches "supersparc" or
> "hypersparc" may be used depending on the particular CPU, but "-mv8"
> should do for all sun4m machines.

RTFM!  :-)

(and I mean the true Texinfo documentation -- the manual page sucks when
it gets to describing important details, and it's way out of date too)

In GCC the "-mcpu" option defines which instructions are emitted by the
compiler.

E.g. -mcpu=v8 causes the compiler to use integer multiply and divide
instructions (which do not exist on SPARC v7 CPUs).

  `-mcpu=CPU_TYPE'
     Set the instruction set, register set, and instruction scheduling
     parameters for machine type CPU_TYPE.  Supported values for
     CPU_TYPE are `v7', `cypress', `v8', `supersparc', `sparclite',
     `hypersparc', `sparclite86x', `f930', `f934', `sparclet',
     `tsc701', `v9', and `ultrasparc'.

     Default instruction scheduling parameters are used for values that
     select an architecture and not an implementation.  These are `v7',
     `v8', `sparclite', `sparclet', `v9'.

     Here is a list of each supported architecture and their supported
     implementations.

              v7:             cypress
              v8:             supersparc, hypersparc
              sparclite:      f930, f934, sparclite86x
              sparclet:       tsc701
              v9:             ultrasparc

In GCC the "-mtune" option defines how the compiler schedules
instructions:

  `-mtune=CPU_TYPE'
     Set the instruction scheduling parameters for machine type
     CPU_TYPE, but do not set the instruction set or register set that
     the option `-mcpu='CPU_TYPE would.

     The same values for `-mcpu='CPU_TYPE are used for `-mtune='
     CPU_TYPE, though the only useful values are those that select a
     particular cpu implementation: `cypress', `supersparc',
     `hypersparc', `f930', `f934', `sparclite86x', `tsc701',
     `ultrasparc'.

Note that I specified "-mtune=supersparc", meaning I am choosing
specific instruction scheduling parameters for a specific implementation
of the SPARC v8 CPU.  :-)

I should have also pointed out that those of you using hypersparc CPUs
in your systems may wish to use the "-mtune=hypersparc" option instead.

(I don't know if it makes any big difference or not though in any
average use of a NetBSD system...  :-)


-- 
						Greg A. Woods

+1 416 218-0098                  VE3TCP            RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com>          Secrets of the Weird <woods@weird.com>