[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Lightning] Re: jit_allocai instruction macro
From: |
Ludovic Courtès |
Subject: |
[Lightning] Re: jit_allocai instruction macro |
Date: |
Wed, 09 Jul 2008 11:32:37 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Hello,
PieSquared <address@hidden> writes:
> The GNU Lightning manual (here:
> http://www.gnu.org/software/lightning/manual/lightning.html) mentions and
> uses the jit_allocai instruction macro, for example in the reverse polish
> notation calculator. However, I cannot seem to find that anywhere...
Make sure you use the latest version of lightning, which must be 1.2c
(1.2c does include it for sure).
> Instead, I see uses of jit_push... and jit_pop..., which aren't really
> documented anywhere, it seems. In a previous mailing list post, it is
> suggested that you use JIT_SP (and subtract from it) in order to achieve
> similar functionality. Am I missing something, or using an out-dated
> version of lightning? Or of it's manual?
Use of `jit_{push,pop} ()' is discouraged because that can't work
portably on all arches, most notably on SPARC (see [0,1] for details).
Likewise, fiddling with `JIT_SP' is not a good idea. So `jit_allocai'
is the recommended way to allocate room on the stack.
Thanks,
Ludovic.
[0] http://lists.gnu.org/archive/html/lightning/2006-10/msg00046.html
[1] http://lists.gnu.org/archive/html/lightning/2006-10/msg00047.html