diff options
author | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-03-14 21:08:01 +0200 |
---|---|---|
committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-03-14 21:08:01 +0200 |
commit | f5c729ea59d227a507f83bd94d07f4366b46d72b (patch) | |
tree | 70d1f242100cea09acd38a71ff8c821836117cfd /tests/do_jit.h | |
parent | 57f6b41047e95374701ee276248f0f8615168450 (diff) | |
download | ejit-f5c729ea59d227a507f83bd94d07f4366b46d72b.tar.gz ejit-f5c729ea59d227a507f83bd94d07f4366b46d72b.zip |
start supporting 32bit arches
Diffstat (limited to 'tests/do_jit.h')
-rw-r--r-- | tests/do_jit.h | 48 |
1 files changed, 42 insertions, 6 deletions
diff --git a/tests/do_jit.h b/tests/do_jit.h index 5be682b..08e39c6 100644 --- a/tests/do_jit.h +++ b/tests/do_jit.h @@ -1,12 +1,48 @@ #ifndef DOJIT_H #define DOJIT_H -#define erf3 ejit_run_func_3 -#define erf2 ejit_run_func_2 -#define erf1 ejit_run_func_1 +static inline long erfi1(struct ejit_func *f, struct ejit_arg a0) +{ + return ejit_run_func_i(f, 1, &a0); +} -#define erff3 ejit_run_func_f_3 -#define erff2 ejit_run_func_f_2 -#define erff1 ejit_run_func_f_1 +static inline long erfi2(struct ejit_func *f, struct ejit_arg a0, struct ejit_arg a1) +{ + struct ejit_arg args[2] = {a0, a1}; + return ejit_run_func_i(f, 2, args); +} + +static inline int64_t erfl1(struct ejit_func *f, struct ejit_arg a0) +{ + return ejit_run_func_l(f, 1, &a0); +} + +static inline int64_t erfl2(struct ejit_func *f, struct ejit_arg a0, struct ejit_arg a1) +{ + struct ejit_arg args[2] = {a0, a1}; + return ejit_run_func_l(f, 2, args); +} + +static inline float erff1(struct ejit_func *f, struct ejit_arg a0) +{ + return ejit_run_func_f(f, 1, &a0); +} + +static inline float erff2(struct ejit_func *f, struct ejit_arg a0, struct ejit_arg a1) +{ + struct ejit_arg args[2] = {a0, a1}; + return ejit_run_func_f(f, 2, args); +} + +static inline double erfd1(struct ejit_func *f, struct ejit_arg a0) +{ + return ejit_run_func_d(f, 1, &a0); +} + +static inline double erfd2(struct ejit_func *f, struct ejit_arg a0, struct ejit_arg a1) +{ + struct ejit_arg args[2] = {a0, a1}; + return ejit_run_func_d(f, 2, args); +} #endif /* DOJIT_H */ |