From owner-freebsd-sparc Sun Dec 21 11:57:08 1997 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA21639 for sparc-outgoing; Sun, 21 Dec 1997 11:57:08 -0800 (PST) (envelope-from owner-freebsd-sparc@FreeBSD.ORG) Received: from radiks.net (root@sr.radiks.net [205.138.126.6]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id LAA21613 for ; Sun, 21 Dec 1997 11:56:55 -0800 (PST) (envelope-from rmf@radiks.net) Received: from radiks.net (rmf@dmn120.radiks.net [208.154.148.142]) by radiks.net (8.8.8/8.8.8) with ESMTP id NAA09175; Sun, 21 Dec 1997 13:46:57 -0600 (CST) Message-ID: <349D746C.85A2D84F@radiks.net> Date: Sun, 21 Dec 1997 19:56:28 +0000 From: Ric Flinn X-Mailer: Mozilla 4.04 [en] (X11; I; FreeBSD 2.2.5-STABLE i386) MIME-Version: 1.0 To: Jason Evans CC: freebsd-sparc@FreeBSD.ORG Subject: Re: Register windowing References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-sparc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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. Now, I'm not saying that this is a better way, but that it may be one to consider, and may be easier to implement. Wouldn't the compiler have to be aware of windowing if user programs used them for nested function calls? Jason Evans wrote: > 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. I believe most of the newer processors have (at least) 8 (even the embedded SparcLite chip has 8), but I know some older machines 7, maybe some have fewer. Ric Flinn rmf@radiks.net