aboutsummaryrefslogtreecommitdiff
path: root/examples/fib.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2025-04-09 19:56:33 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2025-04-09 19:56:33 +0300
commit6824dd4b1ee22184f0e600115db3998924ed39d6 (patch)
tree0afbf35344313bdd17238b4fb570af0d094f758d /examples/fib.c
parent9e367e1824d62d3759cb19b7c9a433b67b96bd99 (diff)
downloadejit-6824dd4b1ee22184f0e600115db3998924ed39d6.tar.gz
ejit-6824dd4b1ee22184f0e600115db3998924ed39d6.zip
initial tail call stuff
Diffstat (limited to 'examples/fib.c')
-rw-r--r--examples/fib.c4
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 */