aboutsummaryrefslogtreecommitdiff
path: root/src/ejit.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-07-14 16:15:37 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-07-14 16:16:25 +0300
commitcf2459d4cab72e3e0072fdf76ca2f5d8f9593f78 (patch)
tree7a0cd9342047cd2a308d08c6def7bb91e2e83805 /src/ejit.c
parentdcca95ebeef7ad047b437c7e65bcd2d33784cae4 (diff)
downloadejit-cf2459d4cab72e3e0072fdf76ca2f5d8f9593f78.tar.gz
ejit-cf2459d4cab72e3e0072fdf76ca2f5d8f9593f78.zip
jit tests pass (kind of) on x86_64
Diffstat (limited to 'src/ejit.c')
-rw-r--r--src/ejit.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ejit.c b/src/ejit.c
index c6b8f72..74c0ced 100644
--- a/src/ejit.c
+++ b/src/ejit.c
@@ -204,6 +204,11 @@ void ejit_retval_f(struct ejit_func *s, struct ejit_fpr r0)
emit_insn_i(s, RETVAL_F, r0.f, 0, 0);
}
+void ejit_retval_d(struct ejit_func *s, struct ejit_fpr r0)
+{
+ emit_insn_i(s, RETVAL_D, r0.f, 0, 0);
+}
+
void ejit_sti_8(struct ejit_func *s, struct ejit_gpr r0, void *p)
{
emit_insn_p(s, STI8, r0.r, 0, p);
@@ -541,6 +546,16 @@ void ejit_extr_u32(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1)
emit_insn_i(s, EXTRU32, r0.r, r1.r, 0);
}
+void ejit_extr_f(struct ejit_func *s, struct ejit_fpr r0, struct ejit_gpr r1)
+{
+ emit_insn_i(s, EXTRF, r0.f, r1.r, 0);
+}
+
+void ejit_extr_d(struct ejit_func *s, struct ejit_fpr r0, struct ejit_gpr r1)
+{
+ emit_insn_i(s, EXTRD, r0.f, r1.r, 0);
+}
+
void ejit_addr(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1,
struct ejit_gpr r2)
{