Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!mit-eddie!uw-beaver!uw-june!dgb From: dgb@cs.washington.edu (David Bradlee) Newsgroups: comp.sys.m88k Subject: Re: Register Allocation (was Re: Info about 88open & standards) Summary: call-with-mask??? Message-ID: <10003@june.cs.washington.edu> Date: 30 Nov 89 16:46:24 GMT References: <1989Nov16.212149.9770@paris.ics.uci.edu> <100050002@hpcuhc.HP.COM> <7263@sybase.sybase.com> Distribution: na Organization: U of Washington, Computer Science, Seattle Lines: 18 In article <7263@sybase.sybase.com>, tim@binky.sybase.com (Tim Wood) writes: > Hmm, seems like it would all be done at compile time. For every > procedure call you compile, note which registers are read or written in > the calling routine (or, if "-O" is set, try to determine which ones are not > live across the call :-). Then, set the bits in the save mask. > Compile in the mask value in your "call-with-mask" instruction sequence > (hey, what a great idea for a single instruction! :-) > Each compiled procedure would have its own mask, a la VAX. > You seem to imply that the mask is a function of the CALLER, meaning the callee has to examine the mask at runtime to save the appropriate registers, which, as pardo indicated, would take extra code. If you knew all the callsites, the callee could save the union, but if you know all the callsites, you can explicitly save the approriate registers in either the callee or at the callsite, without any mask. Ergo, the mask doesn't help you. -- Dave Bradlee, University of Washington