diff options
author | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-04-09 19:56:33 +0300 |
---|---|---|
committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-04-09 19:56:33 +0300 |
commit | 6824dd4b1ee22184f0e600115db3998924ed39d6 (patch) | |
tree | 0afbf35344313bdd17238b4fb570af0d094f758d /examples/fib.c | |
parent | 9e367e1824d62d3759cb19b7c9a433b67b96bd99 (diff) | |
download | ejit-6824dd4b1ee22184f0e600115db3998924ed39d6.tar.gz ejit-6824dd4b1ee22184f0e600115db3998924ed39d6.zip |
initial tail call stuff
Diffstat (limited to 'examples/fib.c')
-rw-r--r-- | examples/fib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/fib.c b/examples/fib.c index 999546b..fcb0659 100644 --- a/examples/fib.c +++ b/examples/fib.c @@ -20,12 +20,12 @@ struct ejit_func *compile(bool try_jit, bool im_scawed) struct ejit_operand arg[1] = { EJIT_OPERAND_GPR(0, EJIT_INT32) }; - ejit_calli_i(f, f, 1, arg); + ejit_calli(f, f, 1, arg); ejit_retval(f, EJIT_GPR(1)); /* loc 1 contains temp result */ /* fib(n - 2) */ ejit_subi(f, EJIT_GPR(0), EJIT_GPR(0), 1); - ejit_calli_i(f, f, 1, arg); + ejit_calli(f, f, 1, arg); ejit_retval(f, EJIT_GPR(0)); /* loc 0 now contains second temp result */ ejit_addr(f, EJIT_GPR(0), EJIT_GPR(0), EJIT_GPR(1)); /* add results */ |