diff options
Diffstat (limited to 'tools/wasm_compile.h')
-rw-r--r-- | tools/wasm_compile.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/wasm_compile.h b/tools/wasm_compile.h index 4cee1bb..c5ff49c 100644 --- a/tools/wasm_compile.h +++ b/tools/wasm_compile.h @@ -11,8 +11,8 @@ #define STACK_FRAME_BACKUP_ADDR 0x0FFFFC #define STACK_TOP_ADDR 0x0FFFFC #define CODE_BOTTOM_ADDR 0x000000 -#define CODE_TOP_ADDR 0x000200 -#define MEMORY_BOTTOM_ADDR 0x000200 +#define CODE_TOP_ADDR 0x000400 +#define MEMORY_BOTTOM_ADDR 0x000400 /* Error messages */ #define MSG_SIZE_OVERFLOW "Number overflows size_t\n" @@ -70,6 +70,12 @@ struct module { uint32_t exports_count; struct export *exports; struct target *targets; + struct instruction *startup; +}; + +struct translated_word { + uint16_t contents; + struct instruction *instr; }; int leb_32(FILE *handle, uint32_t *result, bool with_sign); @@ -94,7 +100,7 @@ struct module *parse_module(FILE *handle); int translate(FILE *handle, struct function *function, struct module *module); -int assemble(uint32_t memory_size, uint16_t memory[memory_size], +int assemble(uint32_t memory_size, struct translated_word memory[memory_size], struct module *module); #endif /* WASM_COMPILE_H */ |