This commit is contained in:
2026-07-16 12:25:32 +10:00
parent b53b4b259f
commit c4b1bb1ed1
3 changed files with 20 additions and 5 deletions

View File

@@ -12,11 +12,16 @@ typedef enum : uint8_t {
} InstructionOpcode;
typedef enum {
// General purpose registers
REG_A, REG_B, REG_C,
// Function arguments
REG_X, REG_Y, REG_Z,
// Return value
REG_R,
// Flags
REG_F,
REG_MAX // all registers should come before this one, this is so we can
@@ -41,4 +46,4 @@ extern const OperandType INSTRUCTION_OPERAND_TYPES[][3];
char* opcodeToCStr(InstructionOpcode opcode);
char* instructionToCStr(Instruction inst);
char* registerToCStr(Register reg);
char* registerToCStr(Register reg);