Subject: re: improving ssh performance on sun4m systems
To: matthew green <>
From: Todd Vierling <>
List: netbsd-users
Date: 03/09/2002 22:02:27
On Sun, 10 Mar 2002, matthew green wrote:

:    [note: -mcpu=v8 means the resulting code will not run on sparc v7 and
:    older systems.]
: this isn't true; we emulate these instructions in the kernel.

However, it's ungodly slow, since the emulation makes the already slow
sun4's and sun4c's have to do even more work.

: /etc/ work needs to be done for sparc.

Yes.  I've already said precisely what needs to be done in the past to make
this less grotty, and it's pretty simple, but I simply don't have the
machinery in easy reach to test it on the varying architectures:

* A flag indicating presence of v8 instructions needs to be in the machdep
  sysctl tree.  I don't know if there is one there already capable of being
  used in

* Given the above, a small `', in the vein of `' for
  i386, can be created that simply contains the v8 instruction replacements
  for the libcalls:

  .mul    .umul    .div    .udiv    .rem    .urem

* can be shipped by default with a libc override, such as:       machdep.v8_present,

With all of the above, you gain *nearly* all the speed all around for v8
instructions on sun4m and sun4u-32 architectures (modulo the overhead of
layering libc_v8 on libc), without hosing speed for the same binaries on v7

-- Todd Vierling <>  *  Wasabi & NetBSD:  Run with it.
-- CDs, Integration, Embedding, Support --