Store the result of OP_POP in the last register as a word
Instead of making routines to handle data in the `ret` register, just store the result of POP into the last word register. This means we are no longer using vm_pop_* or POP_ROUTINES for the vm_execute script on OP_POP: instead we'll just use vm_mov_* which automatically pops the datum for us, while moving the datum to the last register.
This commit is contained in:
@@ -69,6 +69,11 @@ const char *opcode_as_cstr(opcode_t);
|
||||
#define OPCODE_IS_TYPE(OPCODE, OP_TYPE) \
|
||||
(((OPCODE) >= OP_TYPE##_BYTE) && ((OPCODE) <= OP_TYPE##_WORD))
|
||||
|
||||
#define OPCODE_DATA_TYPE(OPCODE, OP_TYPE) \
|
||||
((OPCODE) == OP_TYPE##_BYTE ? DATA_TYPE_BYTE \
|
||||
: ((OPCODE) == OP_TYPE##_HWORD) ? DATA_TYPE_HWORD \
|
||||
: DATA_TYPE_WORD)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
opcode_t opcode;
|
||||
|
||||
Reference in New Issue
Block a user