aboutsummaryrefslogtreecommitdiff
path: root/src/interp.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/interp.c
parentdcca95ebeef7ad047b437c7e65bcd2d33784cae4 (diff)
downloadejit-cf2459d4cab72e3e0072fdf76ca2f5d8f9593f78.tar.gz
ejit-cf2459d4cab72e3e0072fdf76ca2f5d8f9593f78.zip
jit tests pass (kind of) on x86_64
Diffstat (limited to 'src/interp.c')
-rw-r--r--src/interp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/interp.c b/src/interp.c
index 293da46..5618564 100644
--- a/src/interp.c
+++ b/src/interp.c
@@ -22,6 +22,8 @@ union interp_ret ejit_interp(struct ejit_func *f, size_t argc,
[EXTRU8] = &&EXTRU8,
[EXTRU16] = &&EXTRU16,
[EXTRU32] = &&EXTRU32,
+ [EXTRF] = &&EXTRF,
+ [EXTRD] = &&EXTRD,
[ADDR] = &&ADDR,
[ADDR_F] = &&ADDR_F,
@@ -300,6 +302,14 @@ union interp_ret ejit_interp(struct ejit_func *f, size_t argc,
gpr[i.r0] = (uint32_t)gpr[i.r1];
DISPATCH();
+ DO(EXTRF);
+ fpr[i.r0].f = (float)gpr[i.r1];
+ DISPATCH();
+
+ DO(EXTRD);
+ fpr[i.r0].d = (double)gpr[i.r1];
+ DISPATCH();
+
DO(ADDR);
gpr[i.r0] = gpr[i.r1] + gpr[i.r2];
DISPATCH();