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 /tests/wasm_compile_function_call/instructions.wat | |
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 'tests/wasm_compile_function_call/instructions.wat')
-rw-r--r-- | tests/wasm_compile_function_call/instructions.wat | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/wasm_compile_function_call/instructions.wat b/tests/wasm_compile_function_call/instructions.wat new file mode 100644 index 0000000..ad37037 --- /dev/null +++ b/tests/wasm_compile_function_call/instructions.wat @@ -0,0 +1,13 @@ +(module + (memory 0 2) + (func $main + i32.const 0x17 ;; dynamic offset for memory store instruction + i32.const 0x32 ;; value to substract from + i32.const 0x14 ;; value to substract + call $sub + i32.store offset=0x25 align=2) ;; we store the difference at 0x23C + (func $sub (param $lhs i32) (param $rhs i32) (result i32) + local.get $lhs + local.get $rhs + i32.sub) + (export "main" (func $main))) |