[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lightning] Support for an "automatic area" on stack
From: |
Paolo Bonzini |
Subject: |
Re: [Lightning] Support for an "automatic area" on stack |
Date: |
Tue, 31 Oct 2006 10:08:05 +0100 |
User-agent: |
Thunderbird 1.5.0.7 (Macintosh/20060909) |
/* Prolog of a 3-arg function, with 8 octets reserved on the stack. */
jit_prolog_with_stack_area (3, 8);
We can have instead jit_allocai or something like that, which could
either do a JIT_SP subtraction or patch the save instruction on the
SPARC. I don't remember the details for leaf functions on the sparc.
Since the exact location of this "automatic area" may vary from one
architecture to another, we can't just let the user assume that this
area is located right above %sp (and we should discourage referring to
`JIT_SP'). Thus we may need additional load and store instructions:
This I'd rather avoid. The i386 has an undocumented JIT_FP macro, we
could provide something similar for other architectures. My preference
would be something like
jit_ldxi_p (regd, JIT_FP, offset)
but I could live with
jit_ldxi_p (regd, JIT_FP, jit_auto (offset))
or
jit_ldxi_p (regd, JIT_FP, JIT_AUTO_BASE + offset)
(Note that I don't like neither jit_auto nor JIT_AUTO_BASE, but this is
just a proof of concept). JIT_AUTO_BASE could access the global state
in _jit, so it it is exactly as powerful as jit_auto.
Paolo