stable
This commit is contained in:
26
assembler/riscv32/symtab_asm.h
Normal file
26
assembler/riscv32/symtab_asm.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef __SMCC_SYMTAB_ASM_H__
|
||||
#define __SMCC_SYMTAB_ASM_H__
|
||||
|
||||
#include <lib/core.h>
|
||||
#include <lib/utils/ds/hashtable.h>
|
||||
|
||||
typedef enum symasm_attr {
|
||||
GLOBAL,
|
||||
LOCAL,
|
||||
} symasm_attr_t;
|
||||
|
||||
typedef struct symasm_entry {
|
||||
const char* name;
|
||||
symasm_attr_t attr;
|
||||
} symasm_entry_t;
|
||||
|
||||
typedef struct symtab_asm {
|
||||
hash_table_t symtab;
|
||||
} symtab_asm_t;
|
||||
|
||||
void init_symtab_asm(symtab_asm_t* symtab);
|
||||
void symtab_asm_put(symtab_asm_t* symtab, symasm_entry_t* entry, u32_t address);
|
||||
u32_t* symtab_asm_get(symtab_asm_t* symtab, symasm_entry_t* entry);
|
||||
void symtab_asm_destroy(symtab_asm_t* symtab);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user