|
From: | Paolo Bonzini |
Subject: | Re: [Lightning] Argument Management |
Date: | Wed, 20 Feb 2008 07:50:58 +0100 |
User-agent: | Thunderbird 2.0.0.9 (Macintosh/20071031) |
Sandro Magi wrote:
Under the "Argument Management" section, it states the following: You cannot pass parameters between subroutines using the six general-purpose registers. This might work only when targeting particular architectures. Does this mean that I can't write a VM which performs interprocedural register allocation using GNU Lightning? Or is this statement intended to apply only when using the C call convention?
It's mostly because of the SPARC, which uses register windows. If you don't care about it, you can pass parameters using GPR.
The way I worked around it in GNU Smalltalk was to run the whole interpreter in "continuation-passing style". Which is, in fact, a different calling convention than the standard one.
I'm assuming this applies only to functions which use the the standard jit_prolog. If I'm generating code using another calling convention using JIT_R/V/FPR, then the above doesn't apply, correct?
With the SPARC caveat -- no, it does not apply. Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |