aboutsummaryrefslogtreecommitdiff
path: root/tools/assemble.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/assemble.c')
-rw-r--r--tools/assemble.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/assemble.c b/tools/assemble.c
index 07416fd..11bb7c9 100644
--- a/tools/assemble.c
+++ b/tools/assemble.c
@@ -163,14 +163,12 @@ int assemble(uint32_t memory_size, uint16_t memory[memory_size],
goto fail;
}
- // For now we're passing 2 numbers to main(): 0x32 and 0x14.
- // This is just a temporary way to check if our Wasm function
- // actually does anything. In the end - main() will be
- // a function, that doesn't require any arguments.
+ /*
+ * We're first writing some value at STACK_FRAME_BACKUP_ADDR to be able
+ * to check, if the functions we call restore frame address properly
+ */
if (i_const(im(0x23), &startup) ||
i_store(im(STACK_FRAME_BACKUP_ADDR), &startup) ||
- i_const(im(0x32), &startup) ||
- i_const(im(0x14), &startup) ||
i_call (ptr(&main_function->translated_body), &startup) ||
i_halt ( &startup))
goto fail;