Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!sugar!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.arch Subject: Re: register save Message-ID: Date: 7 Mar 91 15:34:34 GMT References: <3219@crdos1.crd.ge.COM> <12234@pt.cs.cmu.edu> <7403@mentor.cc.purdue.edu> <1991Mar07.014907.11081@kithrup.COM> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Organization: Xenix Support, FICC Lines: 23 > and the resgisters saved are described by the bitmask from 0x1234&0x3. Now, > what do you do, however, when you call bar, which uses a mask of 0x1230? > foo does a > call bar, 0x3 > and the resultant mask is 0, thus no registers are saved, *despite* bar > trashing some of foo's caller's registers. You could solve this by keeping running track of "dirty" registers, which get set by "call" and cleared by "save". Let's see how this works here: You have to have "call" or-in the mask to be used, and have "save" clear the bits of the registered saved. That way any bits left over from foo's caller would still be set, unless foo has already saved them. Looks like it'd work. You could even use established VM techniques to decide when to save registers, but that's probably overkill. -- Peter da Silva. `-_-' peter@ferranti.com +1 713 274 5180. 'U` "Have you hugged your wolf today?"