From 3bf4d1ada6df5c74aac2a371d5f1e05fd55b4f02 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Tue, 25 Jun 2024 23:24:08 +0300 Subject: fix some names + Will have to actually implement them at some point as well --- include/ejit/ejit.h | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/include/ejit/ejit.h b/include/ejit/ejit.h index 512cbb8..ee3f466 100644 --- a/include/ejit/ejit.h +++ b/include/ejit/ejit.h @@ -183,6 +183,9 @@ void ejit_ret_f(struct ejit_func *s, struct ejit_fpr r0); void ejit_ret_i(struct ejit_func *s, long i); void ejit_ret_fi(struct ejit_func *s, double f); +void ejit_retval(struct ejit_func *s, struct ejit_gpr r0); +void ejit_retval_f(struct ejit_func *s, struct ejit_fpr r0); + /* move from r1 to r0 */ void ejit_movi(struct ejit_func *s, struct ejit_gpr r0, long i); void ejit_movr(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1); @@ -207,10 +210,10 @@ void ejit_ldxi_16(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, l void ejit_ldxi_32(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, long o); void ejit_ldxi_64(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, long o); -void ejit_ldxi_uc(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, long o); -void ejit_ldxi_us(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, long o); -void ejit_ldxi_ui(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, long o); -void ejit_ldxi_ul(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, long o); +void ejit_ldxi_u8(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, long o); +void ejit_ldxi_u16(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, long o); +void ejit_ldxi_u32(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, long o); +void ejit_ldxi_u64(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, long o); void ejit_ldxi_f(struct ejit_func *s, struct ejit_fpr r0, struct ejit_gpr r1, long o); void ejit_ldxi_d(struct ejit_func *s, struct ejit_fpr r0, struct ejit_gpr r1, long o); @@ -234,11 +237,6 @@ void ejit_stxi_16(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, l void ejit_stxi_32(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, long o); void ejit_stxi_64(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, long o); -void ejit_stxi_u8(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, long o); -void ejit_stxi_u16(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, long o); -void ejit_stxi_u32(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, long o); -void ejit_stxi_u64(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, long o); - void ejit_stxi_f(struct ejit_func *s, struct ejit_fpr r0, struct ejit_gpr r1, long o); void ejit_stxi_d(struct ejit_func *s, struct ejit_fpr r0, struct ejit_gpr r1, long o); @@ -248,8 +246,20 @@ void ejit_addr_f(struct ejit_func *s, struct ejit_fpr r0, struct ejit_fpr r1, st void ejit_subr(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, struct ejit_gpr r2); void ejit_subr_f(struct ejit_func *s, struct ejit_fpr r0, struct ejit_fpr r1, struct ejit_fpr r2); -/** @todo branches, should I do the nifty label trick again? */ +void ejit_mulr(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, struct ejit_gpr r2); +void ejit_mulr_f(struct ejit_func *s, struct ejit_fpr r0, struct ejit_fpr r1, struct ejit_fpr r2); + +void ejit_divr(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, struct ejit_gpr r2); +void ejit_divr_f(struct ejit_func *s, struct ejit_fpr r0, struct ejit_fpr r1, struct ejit_fpr r2); + +void ejit_negr(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1); + +void ejit_eqr(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, struct ejit_gpr r2); +void ejit_ltr(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1, struct ejit_gpr r2); + struct ejit_reloc ejit_bltr(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1); +struct ejit_reloc ejit_bnei(struct ejit_func *s, struct ejit_gpr r0, long o); +struct ejit_reloc ejit_jmp(struct ejit_func *s); void ejit_patch(struct ejit_func *s, struct ejit_reloc r, struct ejit_label l); -- cgit v1.2.3