aboutsummaryrefslogtreecommitdiff
path: root/tests/wasm_compile_function_call/instructions.wat
blob: ad370377b9d1226d6b84cc0c5e387bb8b0fc0833 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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)))