1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
|
.text
.file "/b/build/slave/linux/build/src/src/work/gcc/gcc/testsuite/gcc.c-torture/execute/eeprof-1.c"
.section .text.foo,"ax",@progbits
.hidden foo
.globl foo
.type foo,@function
foo: # @foo
# BB#0: # %entry
block
i32.const $push0=, 0
i32.load $push1=, last_fn_entered($pop0)
i32.const $push2=, foo@FUNCTION
i32.ne $push3=, $pop1, $pop2
br_if 0, $pop3 # 0: down to label0
# BB#1: # %if.end
return
.LBB0_2: # %if.then
end_block # label0:
call abort@FUNCTION
unreachable
.endfunc
.Lfunc_end0:
.size foo, .Lfunc_end0-foo
.section .text.nfoo,"ax",@progbits
.hidden nfoo
.globl nfoo
.type nfoo,@function
nfoo: # @nfoo
# BB#0: # %entry
block
block
block
block
block
block
i32.const $push19=, 0
i32.load $push1=, entry_calls($pop19)
i32.const $push18=, 2
i32.ne $push2=, $pop1, $pop18
br_if 0, $pop2 # 0: down to label6
# BB#1: # %entry
i32.const $push21=, 0
i32.load $push0=, exit_calls($pop21)
i32.const $push20=, 2
i32.ne $push3=, $pop0, $pop20
br_if 0, $pop3 # 0: down to label6
# BB#2: # %if.end
i32.const $push22=, 0
i32.load $push4=, last_fn_entered($pop22)
i32.const $push5=, foo@FUNCTION
i32.ne $push6=, $pop4, $pop5
br_if 1, $pop6 # 1: down to label5
# BB#3: # %if.end4
i32.const $push23=, 0
i32.load $push7=, last_fn_exited($pop23)
i32.const $push8=, foo2@FUNCTION
i32.ne $push9=, $pop7, $pop8
br_if 2, $pop9 # 2: down to label4
# BB#4: # %if.end7
call foo@FUNCTION
i32.const $push25=, 0
i32.load $push11=, entry_calls($pop25)
i32.const $push24=, 3
i32.ne $push12=, $pop11, $pop24
br_if 3, $pop12 # 3: down to label3
# BB#5: # %if.end7
i32.const $push27=, 0
i32.load $push10=, exit_calls($pop27)
i32.const $push26=, 3
i32.ne $push13=, $pop10, $pop26
br_if 3, $pop13 # 3: down to label3
# BB#6: # %if.end12
i32.const $push29=, 0
i32.load $push14=, last_fn_entered($pop29)
i32.const $push28=, foo@FUNCTION
i32.ne $push15=, $pop14, $pop28
br_if 4, $pop15 # 4: down to label2
# BB#7: # %if.end15
i32.const $push31=, 0
i32.load $push16=, last_fn_exited($pop31)
i32.const $push30=, foo@FUNCTION
i32.ne $push17=, $pop16, $pop30
br_if 5, $pop17 # 5: down to label1
# BB#8: # %if.end18
return
.LBB1_9: # %if.then
end_block # label6:
call abort@FUNCTION
unreachable
.LBB1_10: # %if.then3
end_block # label5:
call abort@FUNCTION
unreachable
.LBB1_11: # %if.then6
end_block # label4:
call abort@FUNCTION
unreachable
.LBB1_12: # %if.then11
end_block # label3:
call abort@FUNCTION
unreachable
.LBB1_13: # %if.then14
end_block # label2:
call abort@FUNCTION
unreachable
.LBB1_14: # %if.then17
end_block # label1:
call abort@FUNCTION
unreachable
.endfunc
.Lfunc_end1:
.size nfoo, .Lfunc_end1-nfoo
.section .text.main,"ax",@progbits
.hidden main
.globl main
.type main,@function
main: # @main
.result i32
# BB#0: # %entry
block
block
block
block
block
block
i32.const $push21=, 0
i32.load $push1=, exit_calls($pop21)
i32.const $push20=, 0
i32.load $push0=, entry_calls($pop20)
i32.or $push2=, $pop1, $pop0
br_if 0, $pop2 # 0: down to label12
# BB#1: # %if.end
call foo2@FUNCTION
i32.const $push23=, 0
i32.load $push4=, entry_calls($pop23)
i32.const $push22=, 2
i32.ne $push5=, $pop4, $pop22
br_if 1, $pop5 # 1: down to label11
# BB#2: # %if.end
i32.const $push25=, 0
i32.load $push3=, exit_calls($pop25)
i32.const $push24=, 2
i32.ne $push6=, $pop3, $pop24
br_if 1, $pop6 # 1: down to label11
# BB#3: # %if.end6
i32.const $push26=, 0
i32.load $push7=, last_fn_entered($pop26)
i32.const $push8=, foo@FUNCTION
i32.ne $push9=, $pop7, $pop8
br_if 2, $pop9 # 2: down to label10
# BB#4: # %if.end9
i32.const $push27=, 0
i32.load $push10=, last_fn_exited($pop27)
i32.const $push11=, foo2@FUNCTION
i32.ne $push12=, $pop10, $pop11
br_if 3, $pop12 # 3: down to label9
# BB#5: # %if.end12
call nfoo@FUNCTION
i32.const $push29=, 0
i32.load $push14=, entry_calls($pop29)
i32.const $push28=, 3
i32.ne $push15=, $pop14, $pop28
br_if 4, $pop15 # 4: down to label8
# BB#6: # %if.end12
i32.const $push31=, 0
i32.load $push13=, exit_calls($pop31)
i32.const $push30=, 3
i32.ne $push16=, $pop13, $pop30
br_if 4, $pop16 # 4: down to label8
# BB#7: # %if.end17
i32.const $push32=, 0
i32.load $push17=, last_fn_entered($pop32)
i32.const $push18=, foo@FUNCTION
i32.ne $push19=, $pop17, $pop18
br_if 5, $pop19 # 5: down to label7
# BB#8: # %if.end20
i32.const $push33=, 0
return $pop33
.LBB2_9: # %if.then
end_block # label12:
call abort@FUNCTION
unreachable
.LBB2_10: # %if.then5
end_block # label11:
call abort@FUNCTION
unreachable
.LBB2_11: # %if.then8
end_block # label10:
call abort@FUNCTION
unreachable
.LBB2_12: # %if.then11
end_block # label9:
call abort@FUNCTION
unreachable
.LBB2_13: # %if.then16
end_block # label8:
call abort@FUNCTION
unreachable
.LBB2_14: # %if.then19
end_block # label7:
call abort@FUNCTION
unreachable
.endfunc
.Lfunc_end2:
.size main, .Lfunc_end2-main
.section .text.__cyg_profile_func_enter,"ax",@progbits
.hidden __cyg_profile_func_enter
.globl __cyg_profile_func_enter
.type __cyg_profile_func_enter,@function
__cyg_profile_func_enter: # @__cyg_profile_func_enter
.param i32, i32
# BB#0: # %entry
i32.const $push0=, 0
i32.const $push5=, 0
i32.load $push1=, entry_calls($pop5)
i32.const $push2=, 1
i32.add $push3=, $pop1, $pop2
i32.store $discard=, entry_calls($pop0), $pop3
i32.const $push4=, 0
i32.store $discard=, last_fn_entered($pop4), $0
return
.endfunc
.Lfunc_end3:
.size __cyg_profile_func_enter, .Lfunc_end3-__cyg_profile_func_enter
.section .text.__cyg_profile_func_exit,"ax",@progbits
.hidden __cyg_profile_func_exit
.globl __cyg_profile_func_exit
.type __cyg_profile_func_exit,@function
__cyg_profile_func_exit: # @__cyg_profile_func_exit
.param i32, i32
# BB#0: # %entry
i32.const $push0=, 0
i32.const $push5=, 0
i32.load $push1=, exit_calls($pop5)
i32.const $push2=, 1
i32.add $push3=, $pop1, $pop2
i32.store $discard=, exit_calls($pop0), $pop3
i32.const $push4=, 0
i32.store $discard=, last_fn_exited($pop4), $0
return
.endfunc
.Lfunc_end4:
.size __cyg_profile_func_exit, .Lfunc_end4-__cyg_profile_func_exit
.section .text.foo2,"ax",@progbits
.type foo2,@function
foo2: # @foo2
# BB#0: # %entry
block
block
block
block
block
i32.const $push17=, 0
i32.load $push1=, entry_calls($pop17)
i32.const $push2=, 1
i32.ne $push3=, $pop1, $pop2
br_if 0, $pop3 # 0: down to label17
# BB#1: # %entry
i32.const $push18=, 0
i32.load $push0=, exit_calls($pop18)
br_if 0, $pop0 # 0: down to label17
# BB#2: # %if.end
i32.const $push19=, 0
i32.load $push4=, last_fn_entered($pop19)
i32.const $push5=, foo2@FUNCTION
i32.ne $push6=, $pop4, $pop5
br_if 1, $pop6 # 1: down to label16
# BB#3: # %if.end4
call foo@FUNCTION
i32.const $push20=, 0
i32.load $push8=, entry_calls($pop20)
i32.const $push9=, 2
i32.ne $push10=, $pop8, $pop9
br_if 2, $pop10 # 2: down to label15
# BB#4: # %if.end4
i32.const $push21=, 0
i32.load $push7=, exit_calls($pop21)
i32.const $push11=, 1
i32.ne $push12=, $pop7, $pop11
br_if 2, $pop12 # 2: down to label15
# BB#5: # %if.end9
i32.const $push23=, 0
i32.load $push13=, last_fn_entered($pop23)
i32.const $push22=, foo@FUNCTION
i32.ne $push14=, $pop13, $pop22
br_if 3, $pop14 # 3: down to label14
# BB#6: # %if.end12
i32.const $push25=, 0
i32.load $push15=, last_fn_exited($pop25)
i32.const $push24=, foo@FUNCTION
i32.ne $push16=, $pop15, $pop24
br_if 4, $pop16 # 4: down to label13
# BB#7: # %if.end15
return
.LBB5_8: # %if.then
end_block # label17:
call abort@FUNCTION
unreachable
.LBB5_9: # %if.then3
end_block # label16:
call abort@FUNCTION
unreachable
.LBB5_10: # %if.then8
end_block # label15:
call abort@FUNCTION
unreachable
.LBB5_11: # %if.then11
end_block # label14:
call abort@FUNCTION
unreachable
.LBB5_12: # %if.then14
end_block # label13:
call abort@FUNCTION
unreachable
.endfunc
.Lfunc_end5:
.size foo2, .Lfunc_end5-foo2
.hidden last_fn_entered # @last_fn_entered
.type last_fn_entered,@object
.section .bss.last_fn_entered,"aw",@nobits
.globl last_fn_entered
.p2align 2
last_fn_entered:
.int32 0
.size last_fn_entered, 4
.hidden entry_calls # @entry_calls
.type entry_calls,@object
.section .bss.entry_calls,"aw",@nobits
.globl entry_calls
.p2align 2
entry_calls:
.int32 0 # 0x0
.size entry_calls, 4
.hidden exit_calls # @exit_calls
.type exit_calls,@object
.section .bss.exit_calls,"aw",@nobits
.globl exit_calls
.p2align 2
exit_calls:
.int32 0 # 0x0
.size exit_calls, 4
.hidden last_fn_exited # @last_fn_exited
.type last_fn_exited,@object
.section .bss.last_fn_exited,"aw",@nobits
.globl last_fn_exited
.p2align 2
last_fn_exited:
.int32 0
.size last_fn_exited, 4
.ident "clang version 3.9.0 "
|