aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2023-08-26 17:13:56 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2023-08-26 17:13:56 +0300
commit4269b6d3d0aeff1cf1bae3eac5f40cceb75576e0 (patch)
tree3e9cdf4b34f4f2beffa72a837c409e567d84adb2 /src
parente8b00dae488e9c9f6f9ef7de99bc340de61541b7 (diff)
downloadcopyjit-4269b6d3d0aeff1cf1bae3eac5f40cceb75576e0.tar.gz
copyjit-4269b6d3d0aeff1cf1bae3eac5f40cceb75576e0.zip
apply fixes to make jit-comparison easier
Diffstat (limited to 'src')
-rw-r--r--src/copyjit.c8
-rw-r--r--src/copyjit.h4
2 files changed, 8 insertions, 4 deletions
diff --git a/src/copyjit.c b/src/copyjit.c
index 96616e3..8ca35eb 100644
--- a/src/copyjit.c
+++ b/src/copyjit.c
@@ -498,10 +498,12 @@ void compile_finish(ctx_t *ctx)
__builtin___clear_cache(ctx->buf, ctx->buf + ctx->size);
}
-unsigned long run(ctx_t *ctx)
+unsigned long run(ctx_t *ctx,
+ unsigned long a, unsigned long x, unsigned long y,
+ unsigned long o)
{
void *sp = malloc(4096);
- unsigned long a = CALL(ctx->buf, sp, 0, 0, 0, 0);
+ unsigned long r = CALL(ctx->buf, sp, a, x, y, o);
free(sp);
- return a;
+ return r;
}
diff --git a/src/copyjit.h b/src/copyjit.h
index 6104800..3faac44 100644
--- a/src/copyjit.h
+++ b/src/copyjit.h
@@ -46,6 +46,8 @@ void compile_start(ctx_t *ctx);
void compile_finish(ctx_t *ctx);
void compile_destroy(ctx_t *ctx);
-unsigned long run(ctx_t *ctx);
+unsigned long run(ctx_t *ctx,
+ unsigned long a, unsigned long x, unsigned long y,
+ unsigned long o);
#endif /* HMMJIT_H */