From cf2459d4cab72e3e0072fdf76ca2f5d8f9593f78 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 14 Jul 2024 16:15:37 +0300 Subject: jit tests pass (kind of) on x86_64 --- src/ejit.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/ejit.c') 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) { -- cgit v1.2.3