At 1:02 AM -0500 1/9/04, Michal Wallace wrote:
I changed my compiler to call savetop before every function
call, and that passes my tests but I'm having trouble
visualizing why. Would I ever NOT want to call savetop
before creating a continuation?

Sure. The only reason to call savetop is if you want to save R16-31 of all four register sets. The only reason you'd do this is if you actually *care* about the contents of those four sets. If you don't care about one or more set, for example because your code is entirely PMC based and thus doesn't use the I, S, or N registers, you wouldn't -- it's a waste.


Also, if your compiler's code analysis determines that none of the registers of a particular set are read without a previous write, then there'd be no reason to save that set. It's a matter of tracking register content lifetimes -- if all the registers in a set are effectively dead there's no reason to preserve the contents on the stack.
--
Dan


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to