Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Dec 1997 19:27:19 -0700
From:      Wes Peters <softweyr@xmission.com>
To:        Jason Evans <jasone@canonware.com>
Cc:        Greg Lehey <grog@lemis.com>, Ric Flinn <rmf@radiks.net>, freebsd-sparc@FreeBSD.ORG
Subject:   Re: Register windowing
Message-ID:  <349DD007.C0745CA9@xmission.com>
References:  <Pine.BSF.3.96.971221003424.367P-100000@mozart.canonware.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Jason Evans wrote:
> 
> On Sun, 21 Dec 1997, Greg Lehey wrote:
> > I think this sums up the issues pretty nicely.  I suppose the only
> > point to be made is that the number of windows in the register file
> > varies greatly from one processor to another.  Considering the
> > interest in older processors, the code should be flexible enough to
> > potentially be able to choose different strategies dependent on the
> > processor.

Not so much as you'd think.  Most implementations have either 7 or 8
windows in the register file, because that is the "sweet spot" for
performance.  Sun did extensive studies of their existing 68K code when
designing the SPARC architecture, and decided that most existing programs
would arrive in steady states where they would stay for long periods of
time needed a window size of 5, 6, or 7.  The processors that have 8
windows in the register file are essentially adding one for performance.

I'm not sure how many windows are typically saved and restored on over/
underflow, but I think it is typically one, to avoid large unexpected
latencies.

> Some definitions gleaned from manuals (used in this context):
> 
> register window (or simply window) - An individual group of 24 registers
> representing the state of a stack frame, as saved when preparing for a
> function call.
> 
> register file - The full set of integer registers available to user code.
> 
> I can't find a term for a group of more than one register window.  Is
> there one?  You refer to the register file, but I think you're actually
> referring to this.  The manuals refer to NWINDOWS as being a constant
> defined by each implementation, but that doesn't work very well for
> discussions.

More than one are referred to as "windows."  ;^)
 
> The sun4u processor has 8 register windows.  Anyone know what the sun4m,
> sun4c, etc. has?  If we use a simple solution such as trying to keep half
> of the windows full, the code won't need to be changed for each processor
> other than a few constants, but still, it would be good to know for future
> reference.

The SPARClite, and several other processors like it (like the TEMIC SPARClet)
have 7.  I think most SPARC v7 processors share this size; this would include
the sun4 and sun4c machines.

By the way, I have a good line on some really cheap ($50) Sun 4/110s, still
running SunOS 4.1.1.  Anyone wanna help do a sun4-nothing (arch = sun4)
port of this?  ;^)  C'mon, 16Mhz SPARCs are great!

-- 
       "Where am I, and what am I doing in this handbasket?"

Wes Peters                                                 Softweyr LLC
http://www.xmission.com/~softweyr                 softweyr@xmission.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?349DD007.C0745CA9>