From 0f37a5994046a06cf086b6ac4af62620c5881fc7 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 16 Oct 2023 00:59:30 +0100 Subject: 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. --- src/runtime.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/runtime.h') 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, -- cgit v1.2.3-13-gbd6f