Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Dec 1997 22:30:37 -0500 (EST)
From:      "Christopher R. Bowman" <crb@ChrisBowman.com>
To:        Greg Lehey <grog@lemis.com>
Cc:        Ric Flinn <rmf@radiks.net>, Jason Evans <jasone@canonware.com>, freebsd-sparc@FreeBSD.ORG
Subject:   Re: Register windowing
Message-ID:  <Pine.BSF.3.96.971221222215.257A-100000@quark.ChrisBowman.com>
In-Reply-To: <19971222101113.50010@lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 22 Dec 1997, Greg Lehey wrote:

>On Sun, Dec 21, 1997 at 07:56:28PM +0000, Ric Flinn wrote:
>> There are other ways for an OS to deal with register windows; consider
>> the following: Instead of different register windows being used for
>> function calls, have different windows available for different OS
>> functions, such as interrupts and system calls. This way, when an
>> interrupt occurs, you don't save the user program's registers, but just
>> switch to a differnent (non-adjacent) window, which reduces a bit of
>> overhead. Same with system calls, just switch to the kernel's register
>> window.
>
>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.  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.  There
>is no question of using the register file for anything but local data
>storage in an individual program.
>
>Greg

I haven't had a chance to wade through my Sparc V9 book, but on page xvii
it does say "we've accomplished this by making register windows more
flexible than they were in earlier SPARC processors, allowing the kernel
to provide a separate register bank to each running process. Thus, the
processor can perform a context switch with essentially no overhead ..."

and "We've also added eight new registers called 'alternate globals,' so
the trap handler has a fresh register set to use immediately upon entry..."

Which doesn't really refute what Greg says, but is interesting.

---------
Christopher R. Bowman
crb@ChrisBowman.com
<A HREF="http://www.ChrisBowman.com">My home page</A>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.971221222215.257A-100000>