diff options
Diffstat (limited to 'src/inst.h')
-rw-r--r-- | src/inst.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -40,6 +40,10 @@ typedef enum OP_MOV_HWORD, OP_MOV_WORD, + OP_DUP_BYTE, + OP_DUP_HWORD, + OP_DUP_WORD, + // Boolean operations OP_NOT_BYTE, OP_NOT_HWORD, @@ -108,6 +112,9 @@ inst_t *insts_read_bytecode_file(FILE *, size_t *); #define INST_PUSH_REG(TYPE, REG) \ ((inst_t){.opcode = OP_PUSH_REGISTER_##TYPE, .operand = D##TYPE(REG)}) +#define INST_DUP(TYPE, OP) \ + ((inst_t){.opcode = OP_DUP_##TYPE, .operand = DWORD(OP)}) + #define INST_NOT(TYPE) ((inst_t){.opcode = OP_NOT_##TYPE}) #define INST_OR(TYPE) ((inst_t){.opcode = OP_OR_##TYPE}) #define INST_AND(TYPE) ((inst_t){.opcode = OP_AND_##TYPE}) |