]> git.proxmox.com Git - rustc.git/blob - src/binaryen/test/dot_s/memops.wast
New upstream version 1.23.0+dfsg1
[rustc.git] / src / binaryen / test / dot_s / memops.wast
1 (module
2 (type $FUNCSIG$vi (func (param i32)))
3 (import "env" "memory" (memory $0 1))
4 (import "env" "emscripten_asm_const_v" (func $emscripten_asm_const_v (param i32)))
5 (table 0 anyfunc)
6 (data (i32.const 16) "{ Module.print(\"hello, world! \" + HEAP32[8>>2]); }\00")
7 (export "main" (func $main))
8 (export "stackSave" (func $stackSave))
9 (export "stackAlloc" (func $stackAlloc))
10 (export "stackRestore" (func $stackRestore))
11 (func $_Z6reporti (; 1 ;) (param $0 i32)
12 (i32.store
13 (i32.const 8)
14 (get_local $0)
15 )
16 (call $emscripten_asm_const_v
17 (i32.const 0)
18 )
19 (return)
20 )
21 (func $main (; 2 ;) (result i32)
22 (local $0 i32)
23 (local $1 i32)
24 (local $2 i32)
25 (local $3 i32)
26 (local $4 i32)
27 (local $5 i32)
28 (local $6 i32)
29 (local $7 i32)
30 (local $8 i32)
31 (local $9 i32)
32 (local $10 i32)
33 (local $11 i32)
34 (local $12 i32)
35 (set_local $7
36 (i32.const 0)
37 )
38 (set_local $7
39 (i32.load
40 (get_local $7)
41 )
42 )
43 (set_local $8
44 (i32.const 1048576)
45 )
46 (set_local $12
47 (i32.sub
48 (get_local $7)
49 (get_local $8)
50 )
51 )
52 (set_local $8
53 (i32.const 0)
54 )
55 (i32.store
56 (get_local $8)
57 (get_local $12)
58 )
59 (set_local $1
60 (i32.const 0)
61 )
62 (set_local $0
63 (get_local $1)
64 )
65 (set_local $6
66 (get_local $1)
67 )
68 (block $label$0
69 (loop $label$1
70 (set_local $4
71 (get_local $1)
72 )
73 (block $label$2
74 (loop $label$3
75 (set_local $10
76 (i32.const 0)
77 )
78 (set_local $10
79 (i32.add
80 (get_local $12)
81 (get_local $10)
82 )
83 )
84 (i32.store8
85 (i32.add
86 (get_local $10)
87 (get_local $4)
88 )
89 (i32.add
90 (get_local $6)
91 (get_local $4)
92 )
93 )
94 (set_local $2
95 (i32.const 1)
96 )
97 (set_local $4
98 (i32.add
99 (get_local $4)
100 (get_local $2)
101 )
102 )
103 (set_local $3
104 (i32.const 1048576)
105 )
106 (set_local $5
107 (get_local $1)
108 )
109 (br_if $label$3
110 (i32.ne
111 (get_local $4)
112 (get_local $3)
113 )
114 )
115 )
116 )
117 (block $label$4
118 (loop $label$5
119 (set_local $11
120 (i32.const 0)
121 )
122 (set_local $11
123 (i32.add
124 (get_local $12)
125 (get_local $11)
126 )
127 )
128 (set_local $6
129 (i32.add
130 (i32.and
131 (i32.load8_u
132 (i32.add
133 (get_local $11)
134 (get_local $5)
135 )
136 )
137 (get_local $2)
138 )
139 (get_local $6)
140 )
141 )
142 (set_local $5
143 (i32.add
144 (get_local $5)
145 (get_local $2)
146 )
147 )
148 (br_if $label$5
149 (i32.ne
150 (get_local $5)
151 (get_local $3)
152 )
153 )
154 )
155 )
156 (set_local $6
157 (i32.and
158 (i32.add
159 (i32.add
160 (i32.mul
161 (get_local $6)
162 (i32.const 3)
163 )
164 (i32.div_s
165 (get_local $6)
166 (i32.const 5)
167 )
168 )
169 (i32.const 17)
170 )
171 (i32.const 65535)
172 )
173 )
174 (set_local $0
175 (i32.add
176 (get_local $0)
177 (get_local $2)
178 )
179 )
180 (br_if $label$1
181 (i32.ne
182 (get_local $0)
183 (i32.const 100)
184 )
185 )
186 )
187 )
188 (call $_Z6reporti
189 (get_local $6)
190 )
191 (set_local $9
192 (i32.const 1048576)
193 )
194 (set_local $12
195 (i32.add
196 (get_local $12)
197 (get_local $9)
198 )
199 )
200 (set_local $9
201 (i32.const 0)
202 )
203 (i32.store
204 (get_local $9)
205 (get_local $12)
206 )
207 (return
208 (i32.const 0)
209 )
210 )
211 (func $stackSave (; 3 ;) (result i32)
212 (i32.load offset=4
213 (i32.const 0)
214 )
215 )
216 (func $stackAlloc (; 4 ;) (param $0 i32) (result i32)
217 (local $1 i32)
218 (set_local $1
219 (i32.load offset=4
220 (i32.const 0)
221 )
222 )
223 (i32.store offset=4
224 (i32.const 0)
225 (i32.and
226 (i32.sub
227 (get_local $1)
228 (get_local $0)
229 )
230 (i32.const -16)
231 )
232 )
233 (get_local $1)
234 )
235 (func $stackRestore (; 5 ;) (param $0 i32)
236 (i32.store offset=4
237 (i32.const 0)
238 (get_local $0)
239 )
240 )
241 )
242 ;; METADATA: { "asmConsts": {"0": ["{ Module.print(\"hello, world! \" + HEAP32[8>>2]); }", ["v"]]},"staticBump": 67, "initializers": [] }