aboutsummaryrefslogtreecommitdiff
path: root/src/runtime.h
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2023-10-16 00:59:30 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2023-10-16 01:05:42 +0100
commit0f37a5994046a06cf086b6ac4af62620c5881fc7 (patch)
treec1ce6a8704a746fdac104c75e5b95e69d32b3380 /src/runtime.h
parentcd19f1e1d30f52c073b6871c436e770ce2ffdda0 (diff)
downloadovm-0f37a5994046a06cf086b6ac4af62620c5881fc7.tar.gz
ovm-0f37a5994046a06cf086b6ac4af62620c5881fc7.tar.bz2
ovm-0f37a5994046a06cf086b6ac4af62620c5881fc7.zip
MOV now uses the stack, removed register member in inst_t
Instead of taking an operand and a register, mov just uses the stack for the operand. Therefore, there's no need for a register member in inst_t. As a result, PUSH_*_REGISTER now uses the operand for the register.
Diffstat (limited to 'src/runtime.h')
-rw-r--r--src/runtime.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime.h b/src/runtime.h
index 4efe074..5505fc0 100644
--- a/src/runtime.h
+++ b/src/runtime.h
@@ -69,11 +69,11 @@ static const push_reg_f PUSH_REG_ROUTINES[] = {
[OP_PUSH_FLOAT_REGISTER] = vm_push_float_register,
};
-void vm_mov_byte(vm_t *, data_t, word);
-void vm_mov_word(vm_t *, data_t, word);
-void vm_mov_float(vm_t *, data_t, word);
+data_t vm_mov_byte(vm_t *, word);
+data_t vm_mov_word(vm_t *, word);
+data_t vm_mov_float(vm_t *, word);
-typedef void (*mov_f)(vm_t *, data_t, word);
+typedef data_t (*mov_f)(vm_t *, word);
static const mov_f MOV_ROUTINES[] = {
[OP_MOV_BYTE] = vm_mov_byte,
[OP_MOV_WORD] = vm_mov_word,