]> git.proxmox.com Git - rustc.git/blob - src/binaryen/test/dynamicLibrary.fromasm.clamp.no-opts
New upstream version 1.23.0+dfsg1
[rustc.git] / src / binaryen / test / dynamicLibrary.fromasm.clamp.no-opts
1 (module
2 (type $FUNCSIG$vi (func (param i32)))
3 (type $FUNCSIG$ii (func (param i32) (result i32)))
4 (import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32))
5 (import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
6 (import "env" "ABORT" (global $ABORT$asm2wasm$import i32))
7 (import "env" "memoryBase" (global $memoryBase i32))
8 (import "env" "tableBase" (global $tableBase i32))
9 (import "global" "NaN" (global $nan$asm2wasm$import f64))
10 (import "global" "Infinity" (global $inf$asm2wasm$import f64))
11 (import "env" "abortStackOverflow" (func $abortStackOverflow (param i32)))
12 (import "env" "_puts" (func $_puts (param i32) (result i32)))
13 (import "env" "memory" (memory $0 256 256))
14 (import "env" "table" (table 0 0 anyfunc))
15 (global $DYNAMICTOP_PTR (mut i32) (get_global $DYNAMICTOP_PTR$asm2wasm$import))
16 (global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
17 (global $ABORT (mut i32) (get_global $ABORT$asm2wasm$import))
18 (global $STACKTOP (mut i32) (i32.const 0))
19 (global $STACK_MAX (mut i32) (i32.const 0))
20 (global $__THREW__ (mut i32) (i32.const 0))
21 (global $threwValue (mut i32) (i32.const 0))
22 (global $setjmpId (mut i32) (i32.const 0))
23 (global $undef (mut i32) (i32.const 0))
24 (global $nan (mut f64) (get_global $nan$asm2wasm$import))
25 (global $inf (mut f64) (get_global $inf$asm2wasm$import))
26 (global $tempInt (mut i32) (i32.const 0))
27 (global $tempBigInt (mut i32) (i32.const 0))
28 (global $tempBigIntP (mut i32) (i32.const 0))
29 (global $tempBigIntS (mut i32) (i32.const 0))
30 (global $tempBigIntR (mut f64) (f64.const 0))
31 (global $tempBigIntI (mut i32) (i32.const 0))
32 (global $tempBigIntD (mut i32) (i32.const 0))
33 (global $tempValue (mut i32) (i32.const 0))
34 (global $tempDouble (mut f64) (f64.const 0))
35 (global $tempRet0 (mut i32) (i32.const 0))
36 (global $tempFloat (mut f32) (f32.const 0))
37 (global $f0 (mut f32) (f32.const 0))
38 (global $_global i32 (i32.const 5242912))
39 (export "__ZN3FooC2Ev" (func $__ZN3FooC2Ev))
40 (export "__post_instantiate" (func $__post_instantiate))
41 (export "runPostSets" (func $runPostSets))
42 (export "_global" (global $_global))
43 (func $stackAlloc (; 2 ;) (param $size i32) (result i32)
44 (local $ret i32)
45 (set_local $ret
46 (get_global $STACKTOP)
47 )
48 (set_global $STACKTOP
49 (i32.add
50 (get_global $STACKTOP)
51 (get_local $size)
52 )
53 )
54 (set_global $STACKTOP
55 (i32.and
56 (i32.add
57 (get_global $STACKTOP)
58 (i32.const 15)
59 )
60 (i32.const -16)
61 )
62 )
63 (if
64 (i32.ge_s
65 (get_global $STACKTOP)
66 (get_global $STACK_MAX)
67 )
68 (call $abortStackOverflow
69 (get_local $size)
70 )
71 )
72 (return
73 (get_local $ret)
74 )
75 )
76 (func $stackSave (; 3 ;) (result i32)
77 (return
78 (get_global $STACKTOP)
79 )
80 )
81 (func $stackRestore (; 4 ;) (param $top i32)
82 (set_global $STACKTOP
83 (get_local $top)
84 )
85 )
86 (func $establishStackSpace (; 5 ;) (param $stackBase i32) (param $stackMax i32)
87 (set_global $STACKTOP
88 (get_local $stackBase)
89 )
90 (set_global $STACK_MAX
91 (get_local $stackMax)
92 )
93 )
94 (func $setThrew (; 6 ;) (param $threw i32) (param $value i32)
95 (if
96 (i32.eq
97 (get_global $__THREW__)
98 (i32.const 0)
99 )
100 (block
101 (set_global $__THREW__
102 (get_local $threw)
103 )
104 (set_global $threwValue
105 (get_local $value)
106 )
107 )
108 )
109 )
110 (func $___cxx_global_var_init (; 7 ;)
111 (local $label i32)
112 (local $sp i32)
113 (set_local $sp
114 (get_global $STACKTOP)
115 )
116 (call $__ZN3FooC2Ev
117 (i32.add
118 (get_global $memoryBase)
119 (i32.const 5242912)
120 )
121 )
122 (return)
123 )
124 (func $__ZN3FooC2Ev (; 8 ;) (param $$0 i32)
125 (local $$1 i32)
126 (local $label i32)
127 (local $sp i32)
128 (set_local $sp
129 (get_global $STACKTOP)
130 )
131 (set_global $STACKTOP
132 (i32.add
133 (get_global $STACKTOP)
134 (i32.const 16)
135 )
136 )
137 (if
138 (i32.ge_s
139 (get_global $STACKTOP)
140 (get_global $STACK_MAX)
141 )
142 (call $abortStackOverflow
143 (i32.const 16)
144 )
145 )
146 (set_local $$1
147 (get_local $$0)
148 )
149 (drop
150 (call $_puts
151 (i32.add
152 (get_global $memoryBase)
153 (i32.const 0)
154 )
155 )
156 )
157 (set_global $STACKTOP
158 (get_local $sp)
159 )
160 (return)
161 )
162 (func $__GLOBAL__sub_I_liblib_cpp (; 9 ;)
163 (local $label i32)
164 (local $sp i32)
165 (set_local $sp
166 (get_global $STACKTOP)
167 )
168 (call $___cxx_global_var_init)
169 (return)
170 )
171 (func $runPostSets (; 10 ;)
172 (local $temp i32)
173 (nop)
174 )
175 (func $__post_instantiate (; 11 ;)
176 (set_global $STACKTOP
177 (i32.add
178 (get_global $memoryBase)
179 (i32.const 32)
180 )
181 )
182 (set_global $STACK_MAX
183 (i32.add
184 (get_global $STACKTOP)
185 (i32.const 5242880)
186 )
187 )
188 (call $runPostSets)
189 (call $__GLOBAL__sub_I_liblib_cpp)
190 )
191 )