asm: implement parsing of classes, dot-mnemonics

This commit is contained in:
2024-12-14 21:57:29 +00:00
parent 83a021a862
commit 7f5cc3426d
13 changed files with 507 additions and 56 deletions

View File

@@ -0,0 +1,21 @@
#include "assembler.h"
#include <ivy/asm/bin.h>
static enum ivy_status init_scope(
struct ivy_assembler *as, struct assembler_scope *scope,
const ivy_assembler_attrib_table attrib)
{
struct ivy_bin_block header = {0};
header.b_index = b_i32_htob((uint32_t)attrib[IVY_ASM_ATTRIB_INDEX]);
assembler_write_data(as, &header, sizeof header);
return IVY_OK;
}
const struct assembler_scope_type block_scope_type = {
.s_scope_size = sizeof(struct assembler_scope),
.s_init_scope = init_scope,
};