aboutsummaryrefslogtreecommitdiffstats
path: root/creole.h
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2023-02-12 18:06:08 +0000
committerGravatar Peter McGoron 2023-02-12 18:06:08 +0000
commit7b3eaf9b4f9aaec02ce63be638de373397fa9460 (patch)
tree8231125e0b6d1dad534fae72fe9880ba1bda33cb /creole.h
parentjump tests (diff)
add pseudoinstructions that compile to regular instructions
Diffstat (limited to '')
-rw-r--r--creole.h28
1 files changed, 13 insertions, 15 deletions
diff --git a/creole.h b/creole.h
index f5b118f..49a411f 100644
--- a/creole.h
+++ b/creole.h
@@ -17,21 +17,18 @@ typedef CREOLE_WORD creole_word;
typedef CREOLE_SIGNED_WORD creole_signed;
enum creole_opcode {
- CREOLE_NOOP = 0,
- CREOLE_PUSH = 1,
- CREOLE_POP = 2,
- CREOLE_ADD = 3,
- CREOLE_MUL = 4,
- CREOLE_DIV = 5,
- CREOLE_SDIV = 6,
- CREOLE_SYS = 7,
- CREOLE_CLB = 8,
- CREOLE_JL = 9,
- CREOLE_JLE = 10,
- CREOLE_JG = 11,
- CREOLE_JGE = 12,
- CREOLE_JE = 13,
- CREOLE_JNE = 14,
+ CREOLE_NOOP,
+ CREOLE_PUSH,
+ CREOLE_POP,
+ CREOLE_ADD,
+ CREOLE_MUL,
+ CREOLE_DIV,
+ CREOLE_SYS,
+ CREOLE_CLB,
+ CREOLE_JL,
+ CREOLE_JLE,
+ CREOLE_JE,
+ CREOLE_JNE,
CREOLE_OPCODE_LEN
};
@@ -66,6 +63,7 @@ enum creole_run_ret {
CREOLE_REGISTER_OVERFLOW,
CREOLE_STEP_UNKNOWN_OPCODE,
CREOLE_DIV_BY_ZERO,
+ CREOLE_STEP_HIGH_BIT_MALFORMED,
CREOLE_RUN_RET_LEN
};