diff options
| author | 2023-02-12 18:06:08 +0000 | |
|---|---|---|
| committer | 2023-02-12 18:06:08 +0000 | |
| commit | 7b3eaf9b4f9aaec02ce63be638de373397fa9460 (patch) | |
| tree | 8231125e0b6d1dad534fae72fe9880ba1bda33cb /creole.h | |
| parent | jump tests (diff) | |
add pseudoinstructions that compile to regular instructions
Diffstat (limited to '')
| -rw-r--r-- | creole.h | 28 |
1 files changed, 13 insertions, 15 deletions
@@ -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 }; |
