On Nov 14, 2004, at 9:32 AM, Leopold Toetsch wrote:

Defining now that P5 has to be preserved in main, because it's a possible return result of foo() and therefore may be clobbered by foo() is meaning, that we have effectively just 16 registers per kind available for allocation around a function call.

If the latter is true according to current pdd03 then we are wasting half of our registers for a very doubtful advantage: being able to pass return values in R5..R15.

In effect this is quite similar to the PPC calling conventions: we have roughly half of the registers preserved across function calls. In terms of the volatile registers, it's fine to use them for local calculations, as long as either you're using them to hold values which don't need to persist across function calls, or you preserve-and-restore them yourself.


But that loops back to a previous proposal of mine: If they're not being preserved, and in fact need to be "synced" between caller and callee, then having these registers physically located in the interpreter structure, rather than in the bp-referenced frame, saves all the copying, and makes it more obvious what's going on.

JEff



Reply via email to