|
3 | 3 | (type (;1;) (func (param i32 i32 i32 i32) (result i32)))
|
4 | 4 | (type (;2;) (func (param i64) (result)))
|
5 | 5 | (type (;3;) (func (param f64) (result)))
|
6 |
| - (type (;4;) (func (param) (result))) |
7 |
| - (type (;5;) (func (param) (result))) |
8 |
| - (type (;6;) (func (param) (result))) |
| 6 | + (type (;4;) (func (param f32 f32 f32 f32) (result f32 f32))) |
| 7 | + (type (;5;) (func (param f64 f64 f64 f64) (result f64 f64))) |
| 8 | + (type (;6;) (func (param f32 f32 f32 f32) (result f32 f32))) |
| 9 | + (type (;7;) (func (param f64 f64 f64 f64) (result f64 f64))) |
| 10 | + (type (;8;) (func (param f32 f32 f32 f32) (result f32 f32))) |
| 11 | + (type (;9;) (func (param f64 f64 f64 f64) (result f64 f64))) |
| 12 | + (type (;10;) (func (param f32 f32) (result f32))) |
| 13 | + (type (;11;) (func (param f64 f64) (result f64))) |
| 14 | + (type (;12;) (func (param) (result))) |
| 15 | + (type (;13;) (func (param) (result))) |
| 16 | + (type (;14;) (func (param) (result))) |
9 | 17 | (import "wasi_snapshot_preview1" "proc_exit" (func (;0;) (type 0)))
|
10 | 18 | (import "wasi_snapshot_preview1" "fd_write" (func (;1;) (type 1)))
|
11 |
| - (global $0 i32 (i32.const 0)) |
| 19 | + (global $0 (mut i32) (i32.const 0)) |
| 20 | + (global $1 (mut f32) (f32.const 0.000000)) |
| 21 | + (global $2 (mut f64) (f64.const 0.000000)) |
12 | 22 | (func $2 (type 2) (param i64) (result)
|
13 | 23 | (local i64 i64 i64 i64)
|
14 | 24 | local.get 0
|
15 | 25 | i64.const 0
|
16 | 26 | i64.eq
|
17 | 27 | if
|
18 | 28 | i32.const 1
|
19 |
| - i32.const 52 |
| 29 | + i32.const 88 |
20 | 30 | i32.const 1
|
21 | 31 | i32.const 0
|
22 | 32 | call 1
|
|
98 | 108 | i64.rem_s
|
99 | 109 | i64.const 12
|
100 | 110 | i64.mul
|
101 |
| - i64.const 52 |
| 111 | + i64.const 88 |
102 | 112 | i64.add
|
103 | 113 | local.set 0
|
104 | 114 | i32.const 1
|
|
184 | 194 | i64.add
|
185 | 195 | local.set 1
|
186 | 196 | i32.const 1
|
187 |
| - i32.const 52 |
| 197 | + i32.const 88 |
188 | 198 | i32.const 1
|
189 | 199 | i32.const 0
|
190 | 200 | call 1
|
|
197 | 207 | call 2
|
198 | 208 | return
|
199 | 209 | )
|
200 |
| - (func $4 (type 4) (param) (result) |
| 210 | + (func $4 (type 4) (param f32 f32 f32 f32) (result f32 f32) |
201 | 211 | (local)
|
202 |
| - call 5 |
| 212 | + local.get 0 |
| 213 | + local.get 2 |
| 214 | + f32.add |
| 215 | + local.get 1 |
| 216 | + local.get 3 |
| 217 | + f32.add |
| 218 | + return |
| 219 | + ) |
| 220 | + (func $5 (type 5) (param f64 f64 f64 f64) (result f64 f64) |
| 221 | + (local) |
| 222 | + local.get 0 |
| 223 | + local.get 2 |
| 224 | + f64.add |
| 225 | + local.get 1 |
| 226 | + local.get 3 |
| 227 | + f64.add |
| 228 | + return |
| 229 | + ) |
| 230 | + (func $6 (type 6) (param f32 f32 f32 f32) (result f32 f32) |
| 231 | + (local) |
| 232 | + local.get 0 |
| 233 | + local.get 2 |
| 234 | + f32.sub |
| 235 | + local.get 1 |
| 236 | + local.get 3 |
| 237 | + f32.sub |
| 238 | + return |
| 239 | + ) |
| 240 | + (func $7 (type 7) (param f64 f64 f64 f64) (result f64 f64) |
| 241 | + (local) |
| 242 | + local.get 0 |
| 243 | + local.get 2 |
| 244 | + f64.sub |
| 245 | + local.get 1 |
| 246 | + local.get 3 |
| 247 | + f64.sub |
| 248 | + return |
| 249 | + ) |
| 250 | + (func $8 (type 8) (param f32 f32 f32 f32) (result f32 f32) |
| 251 | + (local) |
| 252 | + local.get 0 |
| 253 | + local.get 2 |
| 254 | + f32.mul |
| 255 | + local.get 1 |
| 256 | + local.get 3 |
| 257 | + f32.mul |
| 258 | + f32.sub |
| 259 | + local.get 0 |
| 260 | + local.get 3 |
| 261 | + f32.mul |
| 262 | + local.get 1 |
| 263 | + local.get 2 |
| 264 | + f32.mul |
| 265 | + f32.add |
| 266 | + return |
| 267 | + ) |
| 268 | + (func $9 (type 9) (param f64 f64 f64 f64) (result f64 f64) |
| 269 | + (local) |
| 270 | + local.get 0 |
| 271 | + local.get 2 |
| 272 | + f64.mul |
| 273 | + local.get 1 |
| 274 | + local.get 3 |
| 275 | + f64.mul |
| 276 | + f64.sub |
| 277 | + local.get 0 |
| 278 | + local.get 3 |
| 279 | + f64.mul |
| 280 | + local.get 1 |
| 281 | + local.get 2 |
| 282 | + f64.mul |
| 283 | + f64.add |
| 284 | + return |
| 285 | + ) |
| 286 | + (func $10 (type 10) (param f32 f32) (result f32) |
| 287 | + (local) |
| 288 | + local.get 0 |
| 289 | + local.get 0 |
| 290 | + f32.mul |
| 291 | + local.get 1 |
| 292 | + local.get 1 |
| 293 | + f32.mul |
| 294 | + f32.add |
| 295 | + f32.sqrt |
| 296 | + return |
| 297 | + ) |
| 298 | + (func $11 (type 11) (param f64 f64) (result f64) |
| 299 | + (local) |
| 300 | + local.get 0 |
| 301 | + local.get 0 |
| 302 | + f64.mul |
| 303 | + local.get 1 |
| 304 | + local.get 1 |
| 305 | + f64.mul |
| 306 | + f64.add |
| 307 | + f64.sqrt |
| 308 | + return |
| 309 | + ) |
| 310 | + (func $12 (type 12) (param) (result) |
| 311 | + (local) |
| 312 | + call 13 |
203 | 313 | return
|
204 | 314 | )
|
205 |
| - (func $5 (type 5) (param) (result) |
| 315 | + (func $13 (type 13) (param) (result) |
206 | 316 | (local i32)
|
207 | 317 | i32.const 1
|
208 | 318 | i64.extend_i32_s
|
|
246 | 356 | drop
|
247 | 357 | return
|
248 | 358 | )
|
249 |
| - (func $6 (type 6) (param) (result) |
| 359 | + (func $14 (type 14) (param) (result) |
250 | 360 | (local)
|
251 |
| - call 4 |
| 361 | + call 12 |
252 | 362 | i32.const 0
|
253 | 363 | call 0
|
254 | 364 | return
|
|
257 | 367 | (export "memory" (memory 0))
|
258 | 368 | (export "print_i64" (func 2))
|
259 | 369 | (export "print_f64" (func 3))
|
260 |
| - (export "_lpython_main_program" (func 4)) |
261 |
| - (export "test_bool" (func 5)) |
262 |
| - (export "_start" (func 6)) |
| 370 | + (export "add_c32" (func 4)) |
| 371 | + (export "add_c64" (func 5)) |
| 372 | + (export "sub_c32" (func 6)) |
| 373 | + (export "sub_c64" (func 7)) |
| 374 | + (export "mul_c32" (func 8)) |
| 375 | + (export "mul_c64" (func 9)) |
| 376 | + (export "abs_c32" (func 10)) |
| 377 | + (export "abs_c64" (func 11)) |
| 378 | + (export "_lpython_main_program" (func 12)) |
| 379 | + (export "test_bool" (func 13)) |
| 380 | + (export "_start" (func 14)) |
263 | 381 | (data (;0;) (i32.const 4) "\0c\00\00\00\01\00\00\00")
|
264 | 382 | (data (;1;) (i32.const 12) " ")
|
265 | 383 | (data (;2;) (i32.const 16) "\18\00\00\00\01\00\00\00")
|
|
269 | 387 | (data (;6;) (i32.const 40) "\30\00\00\00\01\00\00\00")
|
270 | 388 | (data (;7;) (i32.const 48) ". ")
|
271 | 389 | (data (;8;) (i32.const 52) "\3c\00\00\00\01\00\00\00")
|
272 |
| - (data (;9;) (i32.const 60) "0 ") |
| 390 | + (data (;9;) (i32.const 60) "( ") |
273 | 391 | (data (;10;) (i32.const 64) "\48\00\00\00\01\00\00\00")
|
274 |
| - (data (;11;) (i32.const 72) "1 ") |
| 392 | + (data (;11;) (i32.const 72) ") ") |
275 | 393 | (data (;12;) (i32.const 76) "\54\00\00\00\01\00\00\00")
|
276 |
| - (data (;13;) (i32.const 84) "2 ") |
| 394 | + (data (;13;) (i32.const 84) ", ") |
277 | 395 | (data (;14;) (i32.const 88) "\60\00\00\00\01\00\00\00")
|
278 |
| - (data (;15;) (i32.const 96) "3 ") |
| 396 | + (data (;15;) (i32.const 96) "0 ") |
279 | 397 | (data (;16;) (i32.const 100) "\6c\00\00\00\01\00\00\00")
|
280 |
| - (data (;17;) (i32.const 108) "4 ") |
| 398 | + (data (;17;) (i32.const 108) "1 ") |
281 | 399 | (data (;18;) (i32.const 112) "\78\00\00\00\01\00\00\00")
|
282 |
| - (data (;19;) (i32.const 120) "5 ") |
| 400 | + (data (;19;) (i32.const 120) "2 ") |
283 | 401 | (data (;20;) (i32.const 124) "\84\00\00\00\01\00\00\00")
|
284 |
| - (data (;21;) (i32.const 132) "6 ") |
| 402 | + (data (;21;) (i32.const 132) "3 ") |
285 | 403 | (data (;22;) (i32.const 136) "\90\00\00\00\01\00\00\00")
|
286 |
| - (data (;23;) (i32.const 144) "7 ") |
| 404 | + (data (;23;) (i32.const 144) "4 ") |
287 | 405 | (data (;24;) (i32.const 148) "\9c\00\00\00\01\00\00\00")
|
288 |
| - (data (;25;) (i32.const 156) "8 ") |
| 406 | + (data (;25;) (i32.const 156) "5 ") |
289 | 407 | (data (;26;) (i32.const 160) "\a8\00\00\00\01\00\00\00")
|
290 |
| - (data (;27;) (i32.const 168) "9 ") |
| 408 | + (data (;27;) (i32.const 168) "6 ") |
| 409 | + (data (;28;) (i32.const 172) "\b4\00\00\00\01\00\00\00") |
| 410 | + (data (;29;) (i32.const 180) "7 ") |
| 411 | + (data (;30;) (i32.const 184) "\c0\00\00\00\01\00\00\00") |
| 412 | + (data (;31;) (i32.const 192) "8 ") |
| 413 | + (data (;32;) (i32.const 196) "\cc\00\00\00\01\00\00\00") |
| 414 | + (data (;33;) (i32.const 204) "9 ") |
291 | 415 | )
|
0 commit comments