Improve error message for invalid operand kinds

This commit is contained in:
gingerBill
2026-08-11 11:56:03 +01:00
parent 400203c344
commit b0364d2c60
4 changed files with 36 additions and 4 deletions

View File

@@ -5,6 +5,26 @@ enum AsmOperandKind : u8 {
AsmOperand_Register_Or_Memory,
AsmOperand_Immediate,
AsmOperand_Label,
AsmOperand_COUNT
};
gb_global String const asm_operand_kind_strings[AsmOperand_COUNT] = {
str_lit(""),
str_lit("register"),
str_lit("memory"),
str_lit("register or memory"),
str_lit("immediate"),
str_lit("label"),
};
gb_global String const asm_operand_kind_expected_strings[AsmOperand_COUNT] = {
str_lit(""),
str_lit("a register"),
str_lit("a memory"),
str_lit("a register or memory"),
str_lit("an immediate"),
str_lit("a label"),
};
#include "asm_tables_amd64.cpp"