aboutsummaryrefslogtreecommitdiff
path: root/include/bytecode
diff options
context:
space:
mode:
Diffstat (limited to 'include/bytecode')
-rw-r--r--include/bytecode/bytecode.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/bytecode/bytecode.h b/include/bytecode/bytecode.h
index 30f3bb5..f649368 100644
--- a/include/bytecode/bytecode.h
+++ b/include/bytecode/bytecode.h
@@ -59,7 +59,16 @@ typedef enum {
AMAL_OP_CALL, /* call ii, fi - Call a function in imported file (ii, import index) using function index (fi). The number of arguments is the number of values pushed to stack. ii is u8, fi is u16 */
AMAL_OP_CALLR, /* callr reg - Call a function using a register. Used for function pointers. The number of arguments is the number of values pushed to stack */
AMAL_OP_CALLE, /* calle ii, efi - Call an extern function in imported file (ii, import index) using extern function index (efi). The number of arguments is the number of values pushed to stack. ii is u8, efi is u16 */
- AMAL_OP_CMP, /* cmp dst, reg1, reg2 - Set dst to 1 if reg1 equals reg2, otherwise set it to 0 */
+ AMAL_OP_EQ, /* eq dst, reg1, reg2 - Set dst to 1 if reg1 equals reg2, otherwise set it to 0 */
+ AMAL_OP_NEQ, /* neq dst, reg1, reg2 - Set dst to 1 if reg1 is not equal to reg2, otherwise set it to 0 */
+ AMAL_OP_ILT, /* ilt dst, reg1, reg2 - Set dst to 1 if reg1 is less than reg2 (signed comparison), otherwise set it to 0 */
+ AMAL_OP_ILE, /* ile dst, reg1, reg2 - Set dst to 1 if reg1 is less or equal to reg2 (signed comparison), otherwise set it to 0 */
+ AMAL_OP_IGT, /* igt dst, reg1, reg2 - Set dst to 1 if reg1 is greater than reg2 (signed comparison), otherwise set it to 0 */
+ AMAL_OP_IGE, /* ige dst, reg1, reg2 - Set dst to 1 if reg1 is greater or equal to reg2 (signed comparison), otherwise set it to 0 */
+ AMAL_OP_LT, /* lt dst, reg1, reg2 - Set dst to 1 if reg1 is less than reg2 (unsigned comparison), otherwise set it to 0 */
+ AMAL_OP_LE, /* le dst, reg1, reg2 - Set dst to 1 if reg1 is less or equal to reg2 (unsigned comparison), otherwise set it to 0 */
+ AMAL_OP_GT, /* gt dst, reg1, reg2 - Set dst to 1 if reg1 is greater than reg2 (unsigned comparison), otherwise set it to 0 */
+ AMAL_OP_GE, /* ge dst, reg1, reg2 - Set dst to 1 if reg1 is greater or equal to reg2 (unsigned comparison), otherwise set it to 0 */
AMAL_OP_BIT_AND, /* and dst, reg1, reg2 - Perform bit and on reg1 and reg2, store the result in dst */
AMAL_OP_JZ, /* jz reg, label - Jump to label in the current function if reg is zero. label is u16 */
AMAL_OP_JMP, /* jmp label - Unconditional jump to label in the current function. label is u16 */