aboutsummaryrefslogtreecommitdiff
path: root/src/copyjit.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2023-08-02 20:54:08 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2023-08-02 20:54:08 +0300
commit9251fddfdfb11b9e1b2dff643aa20ec82e9f7036 (patch)
treefa6045ac60ab66cfd04b820d50b9f92f86f2bfc7 /src/copyjit.c
parent6c12792402503705bf921d56ea3b309408bb417a (diff)
downloadcopyjit-9251fddfdfb11b9e1b2dff643aa20ec82e9f7036.tar.gz
copyjit-9251fddfdfb11b9e1b2dff643aa20ec82e9f7036.zip
add return values to main loop
Diffstat (limited to 'src/copyjit.c')
-rw-r--r--src/copyjit.c5
1 files changed, 3 insertions, 2 deletions
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;
}