Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Dec 1997 02:42:27 +0000
From:      Ric Flinn <rmf@radiks.net>
To:        Greg Lehey <grog@lemis.com>
Cc:        Jason Evans <jasone@canonware.com>, freebsd-sparc@FreeBSD.ORG
Subject:   Re: Register windowing
Message-ID:  <349DD393.42FEC19C@radiks.net>
References:  <Pine.BSF.3.96.971221003424.367P-100000@mozart.canonware.com> <349D746C.85A2D84F@radiks.net> <19971222101113.50010@lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Greg Lehey wrote:
> I think you're misunderstanding the Sparc hardware.  The Sparc has a
> register file (we'll discuss the terminology when I find my Sparc
> books, which are still in the shed since moving house) which is
> addressed something like a stack.  At any time, 24 registers are
> addressable, organized as 8 input, 8 local, and 8 output registers.
> These registers are called the register window.

So far so good, you're terminoligy matches what I remember...

> Each function call
> moves the pointer on by 16 registers, so the output registers of the
> calling function become the input registers of the called function.
> Jason went into more detail about this in an earlier posting.

I was under the impression this was left up to the implementation. The
only experience I have with this processor was dealing with an embedded
OS, which was designed similarly to the method I described (only more
efficienly than my example, I wasn't directly involved with the OS at
that level and can't really remember the details). If I recall this made
the compiler easy to port to the sparc architecture because the
prolog/epilog code was much simpler (since no register window switch for
a function call), and the OS could change the current window freely as
needed.

> There
> is no question of using the register file for anything but local data
> storage in an individual program.

Ok, that makes sense. Like I said, for the embedded os this wasn't the
obvious choice, most likely due to porting time constrains above
performance issues, but I can understand that it would be here. Doesn't
this mean that the os must keep track of which windows need saved during
a context switch (or possibly just save the whole file)?

Ric Flinn
rmf@radiks.net



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