]>
Commit | Line | Data |
---|---|---|
abe05a73 XL |
1 | (module |
2 | (import "env" "memory" (memory $0 1)) | |
3 | (table 0 anyfunc) | |
4 | (data (i32.const 4) "\10\04\00\00") | |
5 | (export "foo" (func $foo)) | |
6 | (export "stackSave" (func $stackSave)) | |
7 | (export "stackAlloc" (func $stackAlloc)) | |
8 | (export "stackRestore" (func $stackRestore)) | |
9 | (func $foo (; 0 ;) (param $0 i32) (param $1 i32) (param $2 i32) | |
10 | (local $3 i32) | |
11 | (local $4 i32) | |
12 | (local $5 i32) | |
13 | (local $6 i32) | |
14 | (local $7 i32) | |
15 | (local $8 i32) | |
16 | (block $label$0 | |
17 | (br_if $label$0 | |
18 | (i32.lt_s | |
19 | (get_local $2) | |
20 | (i32.const 1) | |
21 | ) | |
22 | ) | |
23 | (set_local $3 | |
24 | (i32.shl | |
25 | (get_local $1) | |
26 | (i32.const 2) | |
27 | ) | |
28 | ) | |
29 | (set_local $5 | |
30 | (i32.const 0) | |
31 | ) | |
32 | (set_local $4 | |
33 | (i32.lt_s | |
34 | (get_local $1) | |
35 | (i32.const 1) | |
36 | ) | |
37 | ) | |
38 | (loop $label$1 | |
39 | (block $label$2 | |
40 | (br_if $label$2 | |
41 | (get_local $4) | |
42 | ) | |
43 | (set_local $6 | |
44 | (i32.const 0) | |
45 | ) | |
46 | (set_local $7 | |
47 | (get_local $0) | |
48 | ) | |
49 | (set_local $8 | |
50 | (get_local $1) | |
51 | ) | |
52 | (loop $label$3 | |
53 | (i32.store | |
54 | (get_local $7) | |
55 | (get_local $6) | |
56 | ) | |
57 | (set_local $6 | |
58 | (i32.add | |
59 | (get_local $6) | |
60 | (get_local $5) | |
61 | ) | |
62 | ) | |
63 | (set_local $7 | |
64 | (i32.add | |
65 | (get_local $7) | |
66 | (i32.const 4) | |
67 | ) | |
68 | ) | |
69 | (br_if $label$3 | |
70 | (tee_local $8 | |
71 | (i32.add | |
72 | (get_local $8) | |
73 | (i32.const -1) | |
74 | ) | |
75 | ) | |
76 | ) | |
77 | ) | |
78 | ) | |
79 | (set_local $0 | |
80 | (i32.add | |
81 | (get_local $0) | |
82 | (get_local $3) | |
83 | ) | |
84 | ) | |
85 | (br_if $label$1 | |
86 | (i32.ne | |
87 | (tee_local $5 | |
88 | (i32.add | |
89 | (get_local $5) | |
90 | (i32.const 1) | |
91 | ) | |
92 | ) | |
93 | (get_local $2) | |
94 | ) | |
95 | ) | |
96 | ) | |
97 | ) | |
98 | ) | |
99 | (func $stackSave (; 1 ;) (result i32) | |
100 | (i32.load offset=4 | |
101 | (i32.const 0) | |
102 | ) | |
103 | ) | |
104 | (func $stackAlloc (; 2 ;) (param $0 i32) (result i32) | |
105 | (local $1 i32) | |
106 | (set_local $1 | |
107 | (i32.load offset=4 | |
108 | (i32.const 0) | |
109 | ) | |
110 | ) | |
111 | (i32.store offset=4 | |
112 | (i32.const 0) | |
113 | (i32.and | |
114 | (i32.sub | |
115 | (get_local $1) | |
116 | (get_local $0) | |
117 | ) | |
118 | (i32.const -16) | |
119 | ) | |
120 | ) | |
121 | (get_local $1) | |
122 | ) | |
123 | (func $stackRestore (; 3 ;) (param $0 i32) | |
124 | (i32.store offset=4 | |
125 | (i32.const 0) | |
126 | (get_local $0) | |
127 | ) | |
128 | ) | |
129 | ) | |
130 | ;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } |