[DGD] llvm/jit
Kris Van Hees
aedil at alchar.org
Tue Feb 19 23:40:20 CET 2013
On Tue, Feb 19, 2013 at 01:39:21PM -0800, Raymond Jennings wrote:
> > I am not sure what you mean by this? Obviously, C is (almost always) a
> > compiled language and thus JIT isn't relevant.
>
> By this I mean how do you turn program flow from C code to JIT code.
Most commonly, you generate machine code as a callable function, and you store
the location of the machine code in a function pointer, so that you can call
the code directly from C just like you would with any other function pointer.
That ensures proper execution flow, and it means you have consistent calling
conventions between C code and JIT-generated machine code.
Cheers,
Kris
--
dr. Kris Van Hees
<aedil at alchar.org>
More information about the DGD
mailing list