You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bytecode.h 395B

123456789101112131415161718192021222324252627
  1. #ifndef L2_BYTECODE_H
  2. #define L2_BYTECODE_H
  3. #include <stdint.h>
  4. typedef uint32_t l2_word;
  5. enum l2_opcode {
  6. L2_OP_NOP,
  7. L2_OP_PUSH,
  8. L2_OP_POP,
  9. L2_OP_DUP,
  10. L2_OP_ADD,
  11. L2_OP_JUMP,
  12. L2_OP_CALL,
  13. L2_OP_RET,
  14. L2_OP_ALLOC_INTEGER_32,
  15. L2_OP_ALLOC_INTEGER_64,
  16. L2_OP_ALLOC_REAL_32,
  17. L2_OP_ALLOC_REAL_64,
  18. L2_OP_ALLOC_ARRAY,
  19. L2_OP_ALLOC_BUFFER,
  20. L2_OP_ALLOC_BUFFER_CONST,
  21. L2_OP_HALT,
  22. };
  23. #endif