aboutsummaryrefslogtreecommitdiff
path: root/src/ejit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ejit.c')
-rw-r--r--src/ejit.c112
1 files changed, 112 insertions, 0 deletions
diff --git a/src/ejit.c b/src/ejit.c
index adba1cc..c4e82b1 100644
--- a/src/ejit.c
+++ b/src/ejit.c
@@ -192,18 +192,107 @@ void ejit_retval(struct ejit_func *s, struct ejit_gpr r0)
emit_insn_i(s, RETVAL, r0.r, 0, 0);
}
+void ejit_retval_f(struct ejit_func *s, struct ejit_fpr r0)
+{
+ emit_insn_i(s, RETVAL_F, r0.f, 0, 0);
+}
+
+void ejit_stxi_8(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1,
+ int64_t o)
+{
+ emit_insn_i(s, STXI8, r0.r, r1.r, o);
+}
+
+void ejit_stxi_16(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1,
+ int64_t o)
+{
+ emit_insn_i(s, STXI16, r0.r, r1.r, o);
+}
+
+void ejit_stxi_32(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1,
+ int64_t o)
+{
+ emit_insn_i(s, STXI32, r0.r, r1.r, o);
+}
+
void ejit_stxi_64(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1,
int64_t o)
{
emit_insn_i(s, STXI64, r0.r, r1.r, o);
}
+void ejit_stxi_f(struct ejit_func *s, struct ejit_fpr r0, struct ejit_gpr r1,
+ int64_t o)
+{
+ emit_insn_i(s, STXIF, r0.f, r1.r, o);
+}
+
+void ejit_stxi_d(struct ejit_func *s, struct ejit_fpr r0, struct ejit_gpr r1,
+ int64_t o)
+{
+ emit_insn_i(s, STXID, r0.f, r1.r, o);
+}
+
+void ejit_ldxi_i8(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1,
+ int64_t o)
+{
+ emit_insn_i(s, LDXI8, r0.r, r1.r, o);
+}
+
+void ejit_ldxi_i16(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1,
+ int64_t o)
+{
+ emit_insn_i(s, LDXI16, r0.r, r1.r, o);
+}
+
+void ejit_ldxi_i32(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1,
+ int64_t o)
+{
+ emit_insn_i(s, LDXI32, r0.r, r1.r, o);
+}
+
+void ejit_ldxi_i64(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1,
+ int64_t o)
+{
+ emit_insn_i(s, LDXI64, r0.r, r1.r, o);
+}
+
+void ejit_ldxi_u8(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1,
+ int64_t o)
+{
+ emit_insn_i(s, LDXIU8, r0.r, r1.r, o);
+}
+
+void ejit_ldxi_u16(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1,
+ int64_t o)
+{
+ emit_insn_i(s, LDXIU16, r0.r, r1.r, o);
+}
+
+void ejit_ldxi_u32(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1,
+ int64_t o)
+{
+ emit_insn_i(s, LDXIU32, r0.r, r1.r, o);
+}
+
void ejit_ldxi_u64(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1,
int64_t o)
{
emit_insn_i(s, LDXIU64, r0.r, r1.r, o);
}
+void ejit_ldxi_f(struct ejit_func *s, struct ejit_fpr r0, struct ejit_gpr r1,
+ int64_t o)
+{
+ emit_insn_i(s, LDXIF, r0.f, r1.r, o);
+}
+
+void ejit_ldxi_d(struct ejit_func *s, struct ejit_fpr r0, struct ejit_gpr r1,
+ int64_t o)
+{
+ emit_insn_i(s, LDXID, r0.f, r1.r, o);
+}
+
void ejit_retr(struct ejit_func *s, struct ejit_gpr r0)
{
emit_insn_r(s, RETR, r0.r, 0, 0);
@@ -277,6 +366,18 @@ void ejit_divr(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1,
emit_insn_r(s, DIVR, r0.r, r1.r, r2.r);
}
+void ejit_divr_u(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1,
+ struct ejit_gpr r2)
+{
+ emit_insn_r(s, DIVR_U, r0.r, r1.r, r2.r);
+}
+
+void ejit_divr_f(struct ejit_func *s, struct ejit_fpr r0, struct ejit_fpr r1,
+ struct ejit_fpr r2)
+{
+ emit_insn_r(s, DIVR_F, r0.f, r1.f, r2.f);
+}
+
void ejit_andr(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1,
struct ejit_gpr r2)
{
@@ -289,6 +390,11 @@ void ejit_andi(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1,
emit_insn_i(s, ANDI, r0.r, r1.r, o);
}
+void ejit_comr(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1)
+{
+ emit_insn_i(s, COMR, r0.r, r1.r, 0);
+}
+
void ejit_negr(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1)
{
emit_insn_i(s, NEGR, r0.r, r1.r, 0);
@@ -313,6 +419,12 @@ void ejit_eqr(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1,
emit_insn_r(s, EQR, r0.r, r1.r, r2.r);
}
+void ejit_eqr_f(struct ejit_func *s, struct ejit_gpr r0, struct ejit_fpr r1,
+ struct ejit_fpr r2)
+{
+ emit_insn_r(s, EQR_F, r0.r, r1.f, r2.f);
+}
+
void ejit_ltr(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1,
struct ejit_gpr r2)
{