aboutsummaryrefslogtreecommitdiff
path: root/src/ejit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ejit.c')
-rw-r--r--src/ejit.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/ejit.c b/src/ejit.c
index 75f6a6a..c997a01 100644
--- a/src/ejit.c
+++ b/src/ejit.c
@@ -901,31 +901,37 @@ void ejit_ret(struct ejit_func *s)
void ejit_retr(struct ejit_func *s, struct ejit_gpr r0)
{
+ assert(s->rtype != EJIT_FLOAT && s->rtype != EJIT_DOUBLE);
emit_insn_oxr(s, EJIT_OP_RETR, r0);
}
void ejit_retr_f(struct ejit_func *s, struct ejit_fpr f0)
{
+ assert(s->rtype == EJIT_FLOAT);
emit_insn_oxf(s, EJIT_OP_RETR_F, f0);
}
void ejit_retr_d(struct ejit_func *s, struct ejit_fpr f0)
{
+ assert(s->rtype == EJIT_DOUBLE);
emit_insn_oxf(s, EJIT_OP_RETR_D, f0);
}
void ejit_reti(struct ejit_func *s, int64_t i)
{
+ assert(s->rtype != EJIT_FLOAT && s->rtype != EJIT_DOUBLE);
emit_insn_oi(s, EJIT_OP_RETI, i);
}
void ejit_reti_f(struct ejit_func *s, float f)
{
+ assert(s->rtype == EJIT_FLOAT);
emit_insn_oF(s, EJIT_OP_RETI_F, f);
}
void ejit_reti_d(struct ejit_func *s, double f)
{
+ assert(s->rtype == EJIT_DOUBLE);
emit_insn_oD(s, EJIT_OP_RETI_D, f);
}
@@ -1382,6 +1388,26 @@ void ejit_sqrtr_d(struct ejit_func *s, struct ejit_fpr r0, struct ejit_fpr r1)
emit_insn_off(s, EJIT_OP_SQRTR_D, r0, r1);
}
+void ejit_minr_f(struct ejit_func *s, struct ejit_fpr r0, struct ejit_fpr r1, struct ejit_fpr r2)
+{
+ emit_insn_offf(s, EJIT_OP_MINR_F, r0, r1, r2);
+}
+
+void ejit_minr_d(struct ejit_func *s, struct ejit_fpr r0, struct ejit_fpr r1, struct ejit_fpr r2)
+{
+ emit_insn_offf(s, EJIT_OP_MINR_D, r0, r1, r2);
+}
+
+void ejit_maxr_f(struct ejit_func *s, struct ejit_fpr r0, struct ejit_fpr r1, struct ejit_fpr r2)
+{
+ emit_insn_offf(s, EJIT_OP_MAXR_F, r0, r1, r2);
+}
+
+void ejit_maxr_d(struct ejit_func *s, struct ejit_fpr r0, struct ejit_fpr r1, struct ejit_fpr r2)
+{
+ emit_insn_offf(s, EJIT_OP_MAXR_D, r0, r1, r2);
+}
+
struct ejit_reloc ejit_bner(struct ejit_func *s, struct ejit_gpr r0,
struct ejit_gpr r1)
{