diff options
| author | hachem <im@hachem.wtf> | 2026-09-09 05:43:06 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-09-09 05:43:06 +0200 |
| commit | bf3bd19f79936fa519a5285701763da58935592a (patch) | |
| tree | 9f854e50405a6fabd28d783232360c2c0b26e2f9 /src/sema.c | |
| parent | 8b76d35b0a045e0a3277be422513b938ef33dcce (diff) | |
refactor: split code gen into arch seam
Diffstat (limited to 'src/sema.c')
| -rw-r--r-- | src/sema.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -199,6 +199,8 @@ static bool is_arch_register(struct Token token) "rip", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15", + "cs", "ds", "es", "fs", "gs", "ss", + "cr0", "cr2", "cr3", "cr4", "cr8", }; for (size_t i = 0; i < sizeof(names) / sizeof(names[0]); i += 1) @@ -497,6 +499,11 @@ static void check_statement(struct RefCheck* check, struct Statement* statement) case STATEMENT_LABEL: case STATEMENT_SYSCALL: break; + case STATEMENT_INSTRUCTION: + // a raw instruction is an escape hatch; its operands may name asm + // symbols or registers hdass does not model, so leave them to the + // assembler rather than flagging them as undefined + break; } } |
