aboutsummaryrefslogtreecommitdiff
path: root/include/ejit/ejit.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ejit/ejit.h')
-rw-r--r--include/ejit/ejit.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/include/ejit/ejit.h b/include/ejit/ejit.h
index 17fa0fb..aa7cc45 100644
--- a/include/ejit/ejit.h
+++ b/include/ejit/ejit.h
@@ -168,7 +168,7 @@ struct ejit_operand {
enum ejit_type type;
union {
- long r;
+ int64_t r;
double d;
};
};
@@ -178,8 +178,7 @@ struct ejit_func;
struct ejit_func *ejit_create_func(enum ejit_type rtype, size_t argc,
const struct ejit_operand args[argc]);
-void ejit_compile_func(struct ejit_func *f, size_t gpr, size_t fpr,
- bool use_64);
+void ejit_compile_func(struct ejit_func *f);
void ejit_select_compile_func(struct ejit_func *f, size_t gpr, size_t fpr,
bool use_64, bool try_jit);
@@ -532,6 +531,20 @@ static inline void ejit_stxi_ptr(struct ejit_func *s, struct ejit_gpr r0,
double: ejit_stxi_d, \
default: ejit_stxi_ptr)((f), (r0), (r1), (o))
+#define EJIT_STXR(f, t, r0, r1, r2) \
+ _Generic((t)(0), \
+ int8_t: ejit_stxr_8, \
+ uint8_t: ejit_stxr_8, \
+ int16_t: ejit_stxr_16, \
+ uint16_t: ejit_stxr_16, \
+ int32_t: ejit_stxr_32, \
+ uint32_t: ejit_stxr_32, \
+ int64_t: ejit_stxr_64, \
+ uint64_t: ejit_stxr_64, \
+ float: ejit_stxr_f, \
+ double: ejit_stxr_d, \
+ default: ejit_stxi_ptr)((f), (r0), (r1), (r2))
+
void ejit_stxr_8(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1,
struct ejit_gpr r2);