From f5c729ea59d227a507f83bd94d07f4366b46d72b Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 14 Mar 2025 21:08:01 +0200 Subject: start supporting 32bit arches --- tests/do_jit.h | 48 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 6 deletions(-) (limited to 'tests/do_jit.h') 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 */ -- cgit v1.2.3