[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lightning] Argument Management
From: |
Sandro Magi |
Subject: |
Re: [Lightning] Argument Management |
Date: |
Wed, 20 Feb 2008 12:02:58 -0500 |
On Wed, Feb 20, 2008 at 11:06 AM, Paolo Bonzini <address@hidden> wrote:
> > Perhaps an additional macro to be defined by each arch is warranted.
> > Something like: JIT_NEEDS_PROLOG. If false, I can use a different
> > calling convention.
>
> There is actually jit_leaf, which would be what you need. But it's not
> implemented for the SPARC (it generates the same prolog) and I don't
> have access to SPARCs anymore.
I don't think we're on the same page. I don't mean another code
generation macro, I meant a simple flag, so that my code generation
routines can switch between a custom calling convention, and the
standard prolog.
void codegen() {
if (JIT_NEEDS_PROLOG) {
jit_prolog(n);
...
} else {
//custom cc
...
}
}
The switch will likely be #ifdef'd, but that's the idea. I don't see
how jit_leaf helps me here. It' sufficient to define:
#ifdef PPC
#define JIT_NEEDS_PROLOG 0
#elif defined(X86)
#define JIT_NEEDS_PROLOG 0
#elif defined(SPARC)
#define JIT_NEEDS_PROLOG 1
#endif
> > I've considered CPS, particularly in conjunction with the Cheney on
> > the MTA-style GC. Unfortunately, CPS just kills the pipeline due to
> > the indirect function calls. Given how deep pipelines are nowadays,
> > and the fact that they're getting deeper, I'm reluctant to go this
> > way.
>
> Do you have so many function calls?
I'm not sure what you mean.
Sandro