Path: utzoo!attcan!uunet!cs.utexas.edu!rutgers!gatech!amdcad!crackle!tim From: tim@crackle.amd.com (Tim Olson) Newsgroups: comp.arch Subject: Re: Register usage Message-ID: <25820@amdcad.AMD.COM> Date: 1 Jun 89 21:36:26 GMT References: <259@mindlink.uucp> <25382@ames.arc.nasa.gov> <1RcY6x#64Zq3Y=news@anise.acc.com> <26204@ames.arc.nasa.gov> <20810@orac.mips.COM> Sender: news@amdcad.AMD.COM Reply-To: tim@amd.com (Tim Olson) Organization: Advanced Micro Devices, Inc. Sunnyvale CA Lines: 22 Summary: Expires: Sender: Followup-To: 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? Well, this seems true for SPARC, since the Current Window Pointer field is in the Processor Status Register, which is protected, but it is not true of the Am29000 or the i960. The i960 has a FLUSHREG instruction which seems to be user-accessible, and in the 29k the user has access to all of the local registers and the stack pointer register. The low-level thread package I wrote for the 29k has a swapThread procedure which takes 35 instructions, all in user-mode. -- Tim Olson Advanced Micro Devices (tim@amd.com)