Date: Mon, 22 Dec 1997 10:11:13 +1030 From: Greg Lehey <grog@lemis.com> To: Ric Flinn <rmf@radiks.net> Cc: Jason Evans <jasone@canonware.com>, freebsd-sparc@FreeBSD.ORG Subject: Re: Register windowing Message-ID: <19971222101113.50010@lemis.com> In-Reply-To: <349D746C.85A2D84F@radiks.net>; from Ric Flinn on Sun, Dec 21, 1997 at 07:56:28PM %2B0000 References: <Pine.BSF.3.96.971221003424.367P-100000@mozart.canonware.com> <349D746C.85A2D84F@radiks.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971222101113.50010>