]> git.proxmox.com Git - rustc.git/blob - src/binaryen/test/dynamicLibrary.fromasm.clamp
New upstream version 1.23.0+dfsg1
[rustc.git] / src / binaryen / test / dynamicLibrary.fromasm.clamp
1 (module
2 (type $FUNCSIG$vi (func (param i32)))
3 (type $FUNCSIG$ii (func (param i32) (result i32)))
4 (import "env" "memoryBase" (global $memoryBase i32))
5 (import "env" "abortStackOverflow" (func $abortStackOverflow (param i32)))
6 (import "env" "_puts" (func $_puts (param i32) (result i32)))
7 (import "env" "memory" (memory $0 256 256))
8 (import "env" "table" (table 0 0 anyfunc))
9 (import "env" "tableBase" (global $tableBase i32))
10 (global $STACKTOP (mut i32) (i32.const 0))
11 (global $STACK_MAX (mut i32) (i32.const 0))
12 (global $_global i32 (i32.const 5242912))
13 (data (get_global $memoryBase) "dynamicLibrary.asm.js")
14 (export "__ZN3FooC2Ev" (func $__ZN3FooC2Ev))
15 (export "__post_instantiate" (func $__post_instantiate))
16 (export "runPostSets" (func $runPostSets))
17 (export "_global" (global $_global))
18 (func $__ZN3FooC2Ev (; 2 ;) (param $0 i32)
19 (local $1 i32)
20 (set_local $1
21 (get_global $STACKTOP)
22 )
23 (set_global $STACKTOP
24 (i32.add
25 (get_global $STACKTOP)
26 (i32.const 16)
27 )
28 )
29 (if
30 (i32.ge_s
31 (get_global $STACKTOP)
32 (get_global $STACK_MAX)
33 )
34 (call $abortStackOverflow
35 (i32.const 16)
36 )
37 )
38 (drop
39 (call $_puts
40 (get_global $memoryBase)
41 )
42 )
43 (set_global $STACKTOP
44 (get_local $1)
45 )
46 )
47 (func $runPostSets (; 3 ;)
48 (nop)
49 )
50 (func $__post_instantiate (; 4 ;)
51 (set_global $STACKTOP
52 (i32.add
53 (get_global $memoryBase)
54 (i32.const 32)
55 )
56 )
57 (set_global $STACK_MAX
58 (i32.add
59 (get_global $STACKTOP)
60 (i32.const 5242880)
61 )
62 )
63 (call $runPostSets)
64 (call $__ZN3FooC2Ev
65 (i32.add
66 (get_global $memoryBase)
67 (i32.const 5242912)
68 )
69 )
70 )
71 )