forked from WebAssembly/binaryen
/
bcp-1.c.s
441 lines (415 loc) · 12 KB
/
bcp-1.c.s
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
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
.text
.file "/usr/local/google/home/jgravelle/code/wasm/waterfall/src/work/gcc/gcc/testsuite/gcc.c-torture/execute/bcp-1.c"
.section .text.bad0,"ax",@progbits
.hidden bad0
.globl bad0
.type bad0,@function
bad0: # @bad0
.result i32
# BB#0: # %entry
i32.const $push0=, 0
# fallthrough-return: $pop0
.endfunc
.Lfunc_end0:
.size bad0, .Lfunc_end0-bad0
.section .text.bad1,"ax",@progbits
.hidden bad1
.globl bad1
.type bad1,@function
bad1: # @bad1
.result i32
# BB#0: # %entry
i32.const $push0=, 0
# fallthrough-return: $pop0
.endfunc
.Lfunc_end1:
.size bad1, .Lfunc_end1-bad1
.section .text.bad2,"ax",@progbits
.hidden bad2
.globl bad2
.type bad2,@function
bad2: # @bad2
.param i32
.result i32
# BB#0: # %entry
i32.const $push0=, 0
# fallthrough-return: $pop0
.endfunc
.Lfunc_end2:
.size bad2, .Lfunc_end2-bad2
.section .text.bad3,"ax",@progbits
.hidden bad3
.globl bad3
.type bad3,@function
bad3: # @bad3
.param i32
.result i32
# BB#0: # %entry
i32.const $push0=, 0
# fallthrough-return: $pop0
.endfunc
.Lfunc_end3:
.size bad3, .Lfunc_end3-bad3
.section .text.bad4,"ax",@progbits
.hidden bad4
.globl bad4
.type bad4,@function
bad4: # @bad4
.param i32
.result i32
# BB#0: # %entry
i32.const $push0=, 0
# fallthrough-return: $pop0
.endfunc
.Lfunc_end4:
.size bad4, .Lfunc_end4-bad4
.section .text.bad5,"ax",@progbits
.hidden bad5
.globl bad5
.type bad5,@function
bad5: # @bad5
.result i32
# BB#0: # %entry
i32.const $push0=, 0
# fallthrough-return: $pop0
.endfunc
.Lfunc_end5:
.size bad5, .Lfunc_end5-bad5
.section .text.bad6,"ax",@progbits
.hidden bad6
.globl bad6
.type bad6,@function
bad6: # @bad6
.param i32
.result i32
# BB#0: # %entry
i32.const $push0=, 0
# fallthrough-return: $pop0
.endfunc
.Lfunc_end6:
.size bad6, .Lfunc_end6-bad6
.section .text.bad7,"ax",@progbits
.hidden bad7
.globl bad7
.type bad7,@function
bad7: # @bad7
.result i32
# BB#0: # %entry
i32.const $push0=, 0
# fallthrough-return: $pop0
.endfunc
.Lfunc_end7:
.size bad7, .Lfunc_end7-bad7
.section .text.bad8,"ax",@progbits
.hidden bad8
.globl bad8
.type bad8,@function
bad8: # @bad8
.result i32
# BB#0: # %entry
i32.const $push0=, 0
# fallthrough-return: $pop0
.endfunc
.Lfunc_end8:
.size bad8, .Lfunc_end8-bad8
.section .text.bad9,"ax",@progbits
.hidden bad9
.globl bad9
.type bad9,@function
bad9: # @bad9
.param i32
.result i32
# BB#0: # %entry
i32.const $push0=, 0
# fallthrough-return: $pop0
.endfunc
.Lfunc_end9:
.size bad9, .Lfunc_end9-bad9
.section .text.bad10,"ax",@progbits
.hidden bad10
.globl bad10
.type bad10,@function
bad10: # @bad10
.result i32
# BB#0: # %entry
i32.const $push0=, 0
# fallthrough-return: $pop0
.endfunc
.Lfunc_end10:
.size bad10, .Lfunc_end10-bad10
.section .text.good0,"ax",@progbits
.hidden good0
.globl good0
.type good0,@function
good0: # @good0
.result i32
# BB#0: # %entry
i32.const $push0=, 1
# fallthrough-return: $pop0
.endfunc
.Lfunc_end11:
.size good0, .Lfunc_end11-good0
.section .text.good1,"ax",@progbits
.hidden good1
.globl good1
.type good1,@function
good1: # @good1
.result i32
# BB#0: # %entry
i32.const $push0=, 1
# fallthrough-return: $pop0
.endfunc
.Lfunc_end12:
.size good1, .Lfunc_end12-good1
.section .text.good2,"ax",@progbits
.hidden good2
.globl good2
.type good2,@function
good2: # @good2
.result i32
# BB#0: # %entry
i32.const $push0=, 1
# fallthrough-return: $pop0
.endfunc
.Lfunc_end13:
.size good2, .Lfunc_end13-good2
.section .text.opt0,"ax",@progbits
.hidden opt0
.globl opt0
.type opt0,@function
opt0: # @opt0
.result i32
# BB#0: # %entry
i32.const $push0=, 0
# fallthrough-return: $pop0
.endfunc
.Lfunc_end14:
.size opt0, .Lfunc_end14-opt0
.section .text.opt1,"ax",@progbits
.hidden opt1
.globl opt1
.type opt1,@function
opt1: # @opt1
.result i32
# BB#0: # %entry
i32.const $push0=, 0
# fallthrough-return: $pop0
.endfunc
.Lfunc_end15:
.size opt1, .Lfunc_end15-opt1
.section .text.opt2,"ax",@progbits
.hidden opt2
.globl opt2
.type opt2,@function
opt2: # @opt2
.result i32
# BB#0: # %entry
i32.const $push0=, 1
# fallthrough-return: $pop0
.endfunc
.Lfunc_end16:
.size opt2, .Lfunc_end16-opt2
.section .text.main,"ax",@progbits
.hidden main
.globl main
.type main,@function
main: # @main
.result i32
# BB#0: # %entry
block
block
block
block
i32.const $push35=, 0
i32.load $push0=, bad_t0($pop35)
i32.call_indirect $push1=, $pop0
br_if 0, $pop1 # 0: down to label3
# BB#1: # %for.cond
i32.const $push36=, 0
i32.load $push2=, bad_t0+4($pop36)
i32.call_indirect $push3=, $pop2
br_if 0, $pop3 # 0: down to label3
# BB#2: # %for.cond.1
i32.const $push37=, 0
i32.load $push4=, bad_t0+8($pop37)
i32.call_indirect $push5=, $pop4
br_if 0, $pop5 # 0: down to label3
# BB#3: # %for.cond.2
i32.const $push38=, 0
i32.load $push6=, bad_t0+12($pop38)
i32.call_indirect $push7=, $pop6
br_if 0, $pop7 # 0: down to label3
# BB#4: # %for.cond.3
i32.const $push39=, 0
i32.load $push8=, bad_t0+16($pop39)
i32.call_indirect $push9=, $pop8
br_if 0, $pop9 # 0: down to label3
# BB#5: # %for.cond.4
i32.const $push40=, 0
i32.load $push10=, bad_t0+20($pop40)
i32.call_indirect $push11=, $pop10
br_if 0, $pop11 # 0: down to label3
# BB#6: # %for.cond.5
i32.const $push42=, 1
i32.const $push41=, 0
i32.load $push12=, bad_t1($pop41)
i32.call_indirect $push13=, $pop42, $pop12
br_if 1, $pop13 # 1: down to label2
# BB#7: # %for.cond1
i32.const $push44=, 1
i32.const $push43=, 0
i32.load $push14=, bad_t1+4($pop43)
i32.call_indirect $push15=, $pop44, $pop14
br_if 1, $pop15 # 1: down to label2
# BB#8: # %for.cond1.1
i32.const $push17=, 1
i32.const $push45=, 0
i32.load $push16=, bad_t1+8($pop45)
i32.call_indirect $push18=, $pop17, $pop16
br_if 1, $pop18 # 1: down to label2
# BB#9: # %for.cond1.2
i32.const $push47=, .L.str
i32.const $push46=, 0
i32.load $push19=, bad_t2($pop46)
i32.call_indirect $push20=, $pop47, $pop19
br_if 2, $pop20 # 2: down to label1
# BB#10: # %for.cond12
i32.const $push49=, .L.str
i32.const $push48=, 0
i32.load $push21=, bad_t2+4($pop48)
i32.call_indirect $push22=, $pop49, $pop21
br_if 2, $pop22 # 2: down to label1
# BB#11: # %for.cond12.1
block
i32.const $push50=, 0
i32.load $push23=, good_t0($pop50)
i32.call_indirect $push24=, $pop23
i32.eqz $push57=, $pop24
br_if 0, $pop57 # 0: down to label4
# BB#12: # %for.cond23
i32.const $push51=, 0
i32.load $push25=, good_t0+4($pop51)
i32.call_indirect $push26=, $pop25
i32.eqz $push58=, $pop26
br_if 0, $pop58 # 0: down to label4
# BB#13: # %for.cond23.1
i32.const $push52=, 0
i32.load $push27=, good_t0+8($pop52)
i32.call_indirect $push28=, $pop27
br_if 4, $pop28 # 4: down to label0
.LBB17_14: # %if.then29
end_block # label4:
call abort@FUNCTION
unreachable
.LBB17_15: # %if.then
end_block # label3:
call abort@FUNCTION
unreachable
.LBB17_16: # %if.then7
end_block # label2:
call abort@FUNCTION
unreachable
.LBB17_17: # %if.then18
end_block # label1:
call abort@FUNCTION
unreachable
.LBB17_18: # %for.cond23.2
end_block # label0:
block
block
i32.const $push53=, 0
i32.load $push29=, opt_t0($pop53)
i32.call_indirect $push30=, $pop29
i32.eqz $push59=, $pop30
br_if 0, $pop59 # 0: down to label6
# BB#19: # %for.cond34
i32.const $push54=, 0
i32.load $push31=, opt_t0+4($pop54)
i32.call_indirect $push32=, $pop31
i32.eqz $push60=, $pop32
br_if 0, $pop60 # 0: down to label6
# BB#20: # %for.cond34.1
i32.const $push55=, 0
i32.load $push33=, opt_t0+8($pop55)
i32.call_indirect $push34=, $pop33
br_if 1, $pop34 # 1: down to label5
.LBB17_21: # %if.then40
end_block # label6:
call abort@FUNCTION
unreachable
.LBB17_22: # %for.cond34.2
end_block # label5:
i32.const $push56=, 0
call exit@FUNCTION, $pop56
unreachable
.endfunc
.Lfunc_end17:
.size main, .Lfunc_end17-main
.hidden bad_t0 # @bad_t0
.type bad_t0,@object
.section .data.bad_t0,"aw",@progbits
.globl bad_t0
.p2align 4
bad_t0:
.int32 bad0@FUNCTION
.int32 bad1@FUNCTION
.int32 bad5@FUNCTION
.int32 bad7@FUNCTION
.int32 bad8@FUNCTION
.int32 bad10@FUNCTION
.size bad_t0, 24
.hidden bad_t1 # @bad_t1
.type bad_t1,@object
.section .data.bad_t1,"aw",@progbits
.globl bad_t1
.p2align 2
bad_t1:
.int32 bad2@FUNCTION
.int32 bad3@FUNCTION
.int32 bad6@FUNCTION
.size bad_t1, 12
.hidden bad_t2 # @bad_t2
.type bad_t2,@object
.section .data.bad_t2,"aw",@progbits
.globl bad_t2
.p2align 2
bad_t2:
.int32 bad4@FUNCTION
.int32 bad9@FUNCTION
.size bad_t2, 8
.hidden good_t0 # @good_t0
.type good_t0,@object
.section .data.good_t0,"aw",@progbits
.globl good_t0
.p2align 2
good_t0:
.int32 good0@FUNCTION
.int32 good1@FUNCTION
.int32 good2@FUNCTION
.size good_t0, 12
.hidden opt_t0 # @opt_t0
.type opt_t0,@object
.section .data.opt_t0,"aw",@progbits
.globl opt_t0
.p2align 2
opt_t0:
.int32 opt0@FUNCTION
.int32 opt1@FUNCTION
.int32 opt2@FUNCTION
.size opt_t0, 12
.type .L.str,@object # @.str
.section .rodata.str1.1,"aMS",@progbits,1
.L.str:
.asciz "hi"
.size .L.str, 3
.hidden global # @global
.type global,@object
.section .bss.global,"aw",@nobits
.globl global
.p2align 2
global:
.int32 0 # 0x0
.size global, 4
.ident "clang version 4.0.0 "
.functype abort, void
.functype exit, void, i32