Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!purdue!mentor.cc.purdue.edu!l.cc.purdue.edu!cik From: cik@l.cc.purdue.edu (Herman Rubin) Newsgroups: comp.arch Subject: Re: Register usage Summary: Registers can be partitioned Message-ID: <1324@l.cc.purdue.edu> Date: 1 Jun 89 11:59:37 GMT References: <259@mindlink.uucp> <25382@ames.arc.nasa.gov> <20810@orac.mips.COM> Organization: Purdue University Statistics Department Lines: 21 In article <20810@orac.mips.COM>, earl@orac.mips.com (Earl Killian) writes: > Another problem with register windows is that they make it difficult > to support coroutines. I typically do queuing simulations by having > multiple coroutines representing separate entities, each with a > separate stack. I've implemented this on VAXs, 68000s, and MIPS boxes > with only 20-50 lines of assemlber. But I can't see any way to do > stack switching on a register window machine without a kernel call > (yuck). Have any of the register window architectures implemented a > way for user code to do stack switching? Suppose you have two coroutines. The the variables fall into three classes; those which belong to both, those which belong to the first, and those which belong to the second. Why not partition the register file accordingly? As far as stack switching, if the instructions have effectively a dedicated stack register, then that register must be saved and restored. But it is necessary to do this anyhow. -- Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907 Phone: (317)494-6054 hrubin@l.cc.purdue.edu (Internet, bitnet, UUCP)