Dear Paulo,
thank you very much for your quick reply.
I am thinking of using GNU lightning to implement a small virtual machine that is able to JIT-compile a programming language like Scheme which needs guaranteed tail-calls (and where the existence call/cc forces continuation passing style).
In fact, the VM implementation will have a virtual stack and all internal calls will in fact be jumps as you suggested. Thus, so far I could implement everything in one large function, and everything would be fine.
However, the VM should also support a kind of eval, which should trigger JIT-compilation on the fly. In this case, GNU lightning shall be called from the already running compiled code. GNU lightning will produce a second function at a new address, which I want to tail-call from my already running function. Thus I need to know whether there is a portable way to dynamically jump into this second function.
(Don't hesitate to ask in case my explanation didn't help you.)
Best,
Marc