From 81c5f8e750fcda6a2451fb54604130431434f88f Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 17 Aug 2019 02:57:08 +0200 Subject: Implement more instructions, implement function parameters and arguments --- include/bytecode/bytecode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/bytecode') diff --git a/include/bytecode/bytecode.h b/include/bytecode/bytecode.h index 4c54fbd..adad291 100644 --- a/include/bytecode/bytecode.h +++ b/include/bytecode/bytecode.h @@ -48,7 +48,7 @@ typedef enum { AMAL_OP_CMP, /* cmp dst, reg1, reg2 - Set dst to 1 if reg1 equals reg2, otherwise set it to 0 */ AMAL_OP_JZ, /* jz reg, offset - Jump to offset if reg is zero. offset is i16 */ AMAL_OP_JMP, /* jmp offset - Unconditional jump to offset. offset is i16 */ - AMAL_OP_RET, /* ret - Return from the function */ + AMAL_OP_RET, /* ret reg - Return from the function with reg result */ AMAL_OP_FUNC_START, /* func_start num_reg - Start of a function which has num_reg registers allocated. num_reg is a u16 */ AMAL_OP_FUNC_END /* func_end - End of a function. Implementation should do a ret here */ } AmalOpcode; -- cgit v1.2.3