|
From: | Paolo Bonzini |
Subject: | [Help-smalltalk] Re: [Lightning] Code patching, context switching |
Date: | Wed, 20 Feb 2008 18:19:22 +0100 |
User-agent: | Thunderbird 2.0.0.9 (Macintosh/20071031) |
That's unfortunate. Is there a good reason for this artificial limitation? Seems Lightning would be much more flexible as a code generator with a low-level interface, which is what I assumed JIT_R/V/FPR were, and a higher-level interface, which is what jit_getarg and jit_prolog are. I can understand wanting to insulate the users from inadvertently clobbering the argument registers, but a low-level api would still be nice.
The problem is that jit_pusharg needs to clobber r3-r9, and it would be an unnecessarily complication to say "this and that JIT_Rx register" are clobbered by jit_pusharg, but only on this and that architecture". If you're building your own RA, you can just use integers from 0 to 31 (on PPC) and forget about JIT_R/JIT_V completely.
In general, lightning was thought more for template-based code generation. Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |