aboutsummaryrefslogtreecommitdiff
path: root/src/runtime.h
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2023-10-22 20:30:05 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2023-10-22 20:30:05 +0100
commit9da31398baa93e8485aa70fc09cbca66daa0fa40 (patch)
tree7a59ac23e5cbfb3563b4ed80f36615d534fd98a0 /src/runtime.h
parent073a23152e509d42ce256f635fbb3da99e0d176a (diff)
downloadovm-9da31398baa93e8485aa70fc09cbca66daa0fa40.tar.gz
ovm-9da31398baa93e8485aa70fc09cbca66daa0fa40.tar.bz2
ovm-9da31398baa93e8485aa70fc09cbca66daa0fa40.zip
Implemented vm_* routines for OP_DUP and vm_execute code
Diffstat (limited to 'src/runtime.h')
-rw-r--r--src/runtime.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/runtime.h b/src/runtime.h
index 5ee5f9b..b13654e 100644
--- a/src/runtime.h
+++ b/src/runtime.h
@@ -98,6 +98,16 @@ static const mov_f MOV_ROUTINES[] = {
[OP_MOV_WORD] = vm_mov_word,
};
+void vm_dup_byte(vm_t *, word);
+void vm_dup_hword(vm_t *, word);
+void vm_dup_word(vm_t *, word);
+
+typedef void (*dup_f)(vm_t *, word);
+static const dup_f DUP_ROUTINES[] = {
+ [OP_DUP_BYTE] = vm_dup_byte,
+ [OP_DUP_HWORD] = vm_dup_hword,
+ [OP_DUP_WORD] = vm_dup_word,
+};
void vm_not_byte(vm_t *);
void vm_not_hword(vm_t *);