From 9251fddfdfb11b9e1b2dff643aa20ec82e9f7036 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Wed, 2 Aug 2023 20:54:08 +0300 Subject: add return values to main loop --- src/copyjit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/copyjit.c') diff --git a/src/copyjit.c b/src/copyjit.c index f09cb99..393c8e1 100644 --- a/src/copyjit.c +++ b/src/copyjit.c @@ -476,9 +476,10 @@ void compile_finish(ctx_t *ctx) __builtin___clear_cache(ctx->buf, ctx->buf + ctx->size); } -void run(ctx_t *ctx) +unsigned long run(ctx_t *ctx) { void *sp = malloc(4096); - JUMP(ctx->buf, sp, 0, 0, 0, 0); + unsigned long a = CALL(ctx->buf, sp, 0, 0, 0, 0); free(sp); + return a; } -- cgit v1.3