jit_allocai instruction macro

View: New views
2 Messages — Rating Filter:   Alert me  

jit_allocai instruction macro

by Pie Squared :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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... 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?

Thanks.

PS. Here is where I downloaded lightning from: http://ftp.gnu.org/gnu/lightning/ (the previous to last link)

--
~Andrew Gibiansky
_______________________________________________
Lightning mailing list
Lightning@...
http://lists.gnu.org/mailman/listinfo/lightning

Re: jit_allocai instruction macro

by Ludovic Courtès-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

PieSquared <piesquared@...> 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



_______________________________________________
Lightning mailing list
Lightning@...
http://lists.gnu.org/mailman/listinfo/lightning