lightning
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lightning] [Fwd: Re: lightning for x86-64???]


From: Paolo Bonzini
Subject: Re: [Lightning] [Fwd: Re: lightning for x86-64???]
Date: Thu, 26 Oct 2006 10:12:32 +0900
User-agent: Thunderbird 1.5.0.7 (Macintosh/20060909)


You probably saw the "README" file in mzscheme/src/lightning. The
addition of "short jump" mode versus "big jump" mode is probably a bad
idea; it's probably better to have different lightning opcodes.
Actually I like the idea of a sort of PIC mode.
Also,
the room for three locals left by PPC jit_prolog() is completely
MzScheme-specific.
Yes, I'm only caring about the x86_64 merge for now.
Some x86_64 notes at the top of MzScheme's "jit.c" actually belong in
the "README" file, now that I think about it:

  3) Immediate operands must be 32-bit values on x86_64, except with
     jit_movi, jit_sti, jit_ld, jit_bXi, jit_calli, and jit_finishi.
Ouch. Need something like the RISC jit_big... later though, or we can just document it as a current restriction -- it's the first 64-bit port anyway.
  4) Function calls are limited to 3 arguments (i.e., jit_prepare()
     must never be called with a number greater than 3). This limit
     is related to the way the x86_64 port shuffles arguments into
     temporary registers.
We'll fix it. Do you have a pointer to a quick description of the ABI? Informatiion that is enough should be: ordering of registers to pass the parameters, caller/callee saved registers.
  5) On x86_64, arguments are delivered in JIT_V2, JIT_V3, and JIT_R2,
     in that order. So don't set JIT_R2 before getting the third
     argument, etc.
Hmm... that's bad...  we should move JIT_Vn/JIT_Rn on x86_64.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]