diff options
author | Wojciech Kosior <kwojtus@protonmail.com> | 2020-09-21 11:53:13 +0200 |
---|---|---|
committer | Wojciech Kosior <kwojtus@protonmail.com> | 2020-09-21 11:53:13 +0200 |
commit | ca4e5c1cca9f0e6db5f564e6786a356bcdffb956 (patch) | |
tree | d0d53f9f13bf29271f8207996707d9cd6a7bb76b /tools/assemble.c | |
parent | 6dfb056f484e98f627d16a44eca8f6fff87f5f0e (diff) | |
download | AGH-engineering-thesis-ca4e5c1cca9f0e6db5f564e6786a356bcdffb956.tar.gz AGH-engineering-thesis-ca4e5c1cca9f0e6db5f564e6786a356bcdffb956.zip |
put function call wasm_compile test in separate bench
Diffstat (limited to 'tools/assemble.c')
-rw-r--r-- | tools/assemble.c | 10 |
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; |