asm: add different assembler scope types
This commit is contained in:
28
asm/assembler/assembler.h
Normal file
28
asm/assembler/assembler.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef _ASSEMBLER_ASSEMBLER_H_
|
||||
#define _ASSEMBLER_ASSEMBLER_H_
|
||||
|
||||
#include <ivy/asm/assembler.h>
|
||||
#include <stddef.h>
|
||||
|
||||
struct assembler_scope_type;
|
||||
|
||||
struct assembler_scope {
|
||||
enum ivy_assembler_scope_type s_type;
|
||||
struct assembler_scope_type *s_ops;
|
||||
};
|
||||
|
||||
struct assembler_scope_type {
|
||||
size_t s_scope_size;
|
||||
|
||||
enum ivy_status(*s_init_scope)(struct ivy_assembler *, struct assembler_scope *);
|
||||
enum ivy_status(*s_finish_scope)(struct ivy_assembler *, struct assembler_scope *);
|
||||
|
||||
enum ivy_status(*s_put_string)(struct ivy_assembler *, struct assembler_scope *, long, const char *);
|
||||
enum ivy_status(*s_put_ident)(struct ivy_assembler *, struct assembler_scope *, long, const char *);
|
||||
enum ivy_status(*s_put_atom)(struct ivy_assembler *, struct assembler_scope *, long, const char *);
|
||||
enum ivy_status(*s_put_selector)(struct ivy_assembler *, struct assembler_scope *, long, const struct ivy_selector *);
|
||||
enum ivy_status(*s_put_mvar)(struct ivy_assembler *, struct assembler_scope *, long, const char *);
|
||||
enum ivy_status(*s_put_instr)(struct ivy_assembler *, struct assembler_scope *, const struct ivy_instr *);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user