4 static jit_state_t *_jit;
6 typedef int (*pifi)(int); /* Pointer to Int Function of Int */
8 int main(int argc, char *argv[])
14 _jit = jit_new_state();
16 jit_prolog(); /* @t{ prolog } */
17 in = jit_arg(); /* @t{ in = arg } */
18 jit_getarg(JIT_R0, in); /* @t{ getarg R0 } */
19 jit_addi(JIT_R0, JIT_R0, 1); /* @t{ addi R0\, R0\, 1 } */
20 jit_retr(JIT_R0); /* @t{ retr R0 } */
25 /* call the generated code\, passing 5 as an argument */
26 printf("%d + 1 = %d\n", 5, incr(5));