https://github.com/akkartik/mu/blob/master/apps/mu.subx
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 == data
242
243 Program:
244 _Program-functions:
245 0/imm32
246 _Program-functions->payload:
247 0/imm32
248 _Program-types:
249 0/imm32
250 _Program-types->payload:
251 0/imm32
252
253
254
255
256
257
258
259
260
261
262
263
264 Function-name:
265 0/imm32
266 Function-inouts:
267 8/imm32
268 Function-outputs:
269 0x10/imm32
270 Function-body:
271 0x18/imm32
272 Function-next:
273 0x20/imm32
274 Function-size:
275 0x28/imm32/40
276
277 Primitive-name:
278 0/imm32
279 Primitive-inouts:
280 8/imm32
281 Primitive-outputs:
282 0x10/imm32
283 Primitive-subx-name:
284 0x18/imm32
285 Primitive-subx-rm32:
286 0x20/imm32
287 Primitive-subx-r32:
288 0x24/imm32
289 Primitive-subx-imm32:
290 0x28/imm32
291 Primitive-subx-disp32:
292 0x2c/imm32
293 Primitive-output-is-write-only:
294 0x30/imm32
295 Primitive-next:
296 0x34/imm32
297 Primitive-size:
298 0x3c/imm32/60
299
300 Stmt-tag:
301 0/imm32
302
303 Block-stmts:
304 4/imm32
305 Block-var:
306 0xc/imm32
307
308 Stmt1-operation:
309 4/imm32
310 Stmt1-inouts:
311 0xc/imm32
312 Stmt1-outputs:
313 0x14/imm32
314
315 Vardef-var:
316 4/imm32
317
318 Regvardef-operation:
319 4/imm32
320 Regvardef-inouts:
321 0xc/imm32
322 Regvardef-outputs:
323 0x14/imm32
324
325 Stmt-size:
326 0x1c/imm32
327
328 Var-name:
329 0/imm32
330 Var-type:
331 8/imm32
332 Var-block-depth:
333 0x10/imm32
334 Var-offset:
335 0x14/imm32
336 Var-register:
337 0x18/imm32
338 Var-size:
339 0x20/imm32
340
341 List-value:
342 0/imm32
343 List-next:
344 8/imm32
345 List-size:
346 0x10/imm32
347
348
349 Stmt-var-value:
350 0/imm32
351 Stmt-var-next:
352 8/imm32
353 Stmt-var-is-deref:
354 0x10/imm32
355 Stmt-var-size:
356 0x14/imm32
357
358
359
360 Live-var-value:
361 0/imm32
362 Live-var-register-spilled:
363 8/imm32
364 Live-var-size:
365 0xc/imm32
366
367
368
369 Tree-is-atom:
370 0/imm32
371
372 Tree-value:
373 4/imm32
374
375 Tree-left:
376 4/imm32
377 Tree-right:
378 0xc/imm32
379
380 Tree-size:
381 0x14/imm32
382
383
384
385
386 Type-id:
387 0x20/imm32/write
388 0/imm32/read
389 0x100/imm32/size
390
391 "literal"/imm32
392 "int"/imm32
393 "addr"/imm32
394 "array"/imm32
395 "handle"/imm32
396 "boolean"/imm32
397 "constant"/imm32
398 "offset"/imm32
399
400 "byte"/imm32
401 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
402 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
403 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
404 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
405 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
406 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
407 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
408
409
410
411
412 Typeinfo-id:
413 0/imm32
414 Typeinfo-fields:
415 4/imm32
416
417
418
419
420
421 Typeinfo-total-size-in-bytes:
422 0xc/imm32
423 Typeinfo-next:
424 0x10/imm32
425 Typeinfo-size:
426 0x18/imm32
427
428
429
430 Typeinfo-fields-row-size:
431 0x10/imm32
432
433
434
435
436
437
438
439
440 Typeinfo-entry-input-var:
441 0/imm32
442 Typeinfo-entry-index:
443 8/imm32
444 Typeinfo-entry-output-var:
445 0xc/imm32
446 Typeinfo-entry-size:
447 0x14/imm32
448
449 == code
450
451 Entry:
452
453 89/<- %ebp 4/r32/esp
454 (new-segment *Heap-size Heap)
455
456 {
457
458 81 7/subop/compare *ebp 1/imm32
459 7e/jump-if-<= break/disp8
460
461 (kernel-string-equal? *(ebp+8) "test")
462 3d/compare-eax-and 0/imm32/false
463 74/jump-if-= break/disp8
464
465 (run-tests)
466
467 8b/-> *Num-test-failures 3/r32/ebx
468 eb/jump $mu-main:end/disp8
469 }
470
471 (convert-mu Stdin Stdout Stderr 0)
472 (flush Stdout)
473
474 bb/copy-to-ebx 0/imm32
475 $mu-main:end:
476 e8/call syscall_exit/disp32
477
478 convert-mu:
479
480 55/push-ebp
481 89/<- %ebp 4/r32/esp
482
483 c7 0/subop/copy *Next-block-index 1/imm32
484 c7 0/subop/copy *Type-id 0x24/imm32
485 c7 0/subop/copy *_Program-functions 0/imm32
486 c7 0/subop/copy *_Program-functions->payload 0/imm32
487 c7 0/subop/copy *_Program-types 0/imm32
488 c7 0/subop/copy *_Program-types->payload 0/imm32
489
490 (parse-mu *(ebp+8) *(ebp+0x10) *(ebp+0x14))
491 (populate-mu-type-sizes *(ebp+0x10) *(ebp+0x14))
492
493 (check-mu-types *(ebp+0x10) *(ebp+0x14))
494 (emit-subx *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
495 $convert-mu:end:
496
497 89/<- %esp 5/r32/ebp
498 5d/pop-to-ebp
499 c3/return
500
501 test-convert-empty-input:
502
503
504 55/push-ebp
505 89/<- %ebp 4/r32/esp
506
507 (clear-stream _test-input-stream)
508 (clear-stream $_test-input-buffered-file->buffer)
509 (clear-stream _test-output-stream)
510 (clear-stream $_test-output-buffered-file->buffer)
511
512 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
513 (flush _test-output-buffered-file)
514 (check-stream-equal _test-output-stream "" "F - test-convert-empty-input")
515
516 89/<- %esp 5/r32/ebp
517 5d/pop-to-ebp
518 c3/return
519
520 test-convert-function-skeleton:
521
522 55/push-ebp
523 89/<- %ebp 4/r32/esp
524
525 (clear-stream _test-input-stream)
526 (clear-stream $_test-input-buffered-file->buffer)
527 (clear-stream _test-output-stream)
528 (clear-stream $_test-output-buffered-file->buffer)
529
530 (write _test-input-stream "fn foo {\n")
531 (write _test-input-stream "}\n")
532
533 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
534 (flush _test-output-buffered-file)
535 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
541
542 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-skeleton/0")
543 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-skeleton/1")
544 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-skeleton/2")
545 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-skeleton/3")
546 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-skeleton/4")
547 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-skeleton/5")
548 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-skeleton/6")
549 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-skeleton/7")
550
551 89/<- %esp 5/r32/ebp
552 5d/pop-to-ebp
553 c3/return
554
555 test-convert-multiple-function-skeletons:
556
557 55/push-ebp
558 89/<- %ebp 4/r32/esp
559
560 (clear-stream _test-input-stream)
561 (clear-stream $_test-input-buffered-file->buffer)
562 (clear-stream _test-output-stream)
563 (clear-stream $_test-output-buffered-file->buffer)
564
565 (write _test-input-stream "fn foo {\n")
566 (write _test-input-stream "}\n")
567 (write _test-input-stream "fn bar {\n")
568 (write _test-input-stream "}\n")
569
570 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
571 (flush _test-output-buffered-file)
572 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
578
579 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-multiple-function-skeletons/0")
580 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-multiple-function-skeletons/1")
581 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-multiple-function-skeletons/2")
582 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-multiple-function-skeletons/3")
583 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-multiple-function-skeletons/4")
584 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-multiple-function-skeletons/5")
585 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-multiple-function-skeletons/6")
586 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-multiple-function-skeletons/7")
587
588 (check-next-stream-line-equal _test-output-stream "bar:" "F - test-convert-multiple-function-skeletons/10")
589 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-multiple-function-skeletons/11")
590 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-multiple-function-skeletons/12")
591 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-multiple-function-skeletons/13")
592 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-multiple-function-skeletons/14")
593 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-multiple-function-skeletons/15")
594 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-multiple-function-skeletons/16")
595 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-multiple-function-skeletons/17")
596
597 89/<- %esp 5/r32/ebp
598 5d/pop-to-ebp
599 c3/return
600
601 test-convert-function-with-arg:
602
603 55/push-ebp
604 89/<- %ebp 4/r32/esp
605
606 (clear-stream _test-input-stream)
607 (clear-stream $_test-input-buffered-file->buffer)
608 (clear-stream _test-output-stream)
609 (clear-stream $_test-output-buffered-file->buffer)
610
611 (write _test-input-stream "fn foo n: int {\n")
612 (write _test-input-stream "}\n")
613
614 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
615 (flush _test-output-buffered-file)
616 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
622
623 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-arg/0")
624 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-arg/1")
625 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-arg/2")
626 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-arg/3")
627 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-arg/4")
628 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-arg/5")
629 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-arg/6")
630 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-arg/7")
631
632 89/<- %esp 5/r32/ebp
633 5d/pop-to-ebp
634 c3/return
635
636 test-convert-function-with-arg-and-body:
637
638 55/push-ebp
639 89/<- %ebp 4/r32/esp
640
641 (clear-stream _test-input-stream)
642 (clear-stream $_test-input-buffered-file->buffer)
643 (clear-stream _test-output-stream)
644 (clear-stream $_test-output-buffered-file->buffer)
645
646 (write _test-input-stream "fn foo n: int {\n")
647 (write _test-input-stream " increment n\n")
648 (write _test-input-stream "}\n")
649
650 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
651 (flush _test-output-buffered-file)
652 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
658
659 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-arg-and-body/0")
660 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-arg-and-body/1")
661 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-arg-and-body/2")
662 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-arg-and-body/3")
663 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-arg-and-body/4")
664 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-arg-and-body/5")
665 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-arg-and-body/6")
666 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-arg-and-body/7")
667 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-arg-and-body/8")
668 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-arg-and-body/9")
669 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-arg-and-body/10")
670 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-arg-and-body/11")
671 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-arg-and-body/12")
672
673 89/<- %esp 5/r32/ebp
674 5d/pop-to-ebp
675 c3/return
676
677 test-convert-function-distinguishes-args:
678
679 55/push-ebp
680 89/<- %ebp 4/r32/esp
681
682 (clear-stream _test-input-stream)
683 (clear-stream $_test-input-buffered-file->buffer)
684 (clear-stream _test-output-stream)
685 (clear-stream $_test-output-buffered-file->buffer)
686
687 (write _test-input-stream "fn foo a: int, b: int {\n")
688 (write _test-input-stream " increment b\n")
689 (write _test-input-stream "}\n")
690
691 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
692 (flush _test-output-buffered-file)
693 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
699
700 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-distinguishes-args/0")
701 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-distinguishes-args/1")
702 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-distinguishes-args/2")
703 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-distinguishes-args/3")
704 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-distinguishes-args/4")
705 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-distinguishes-args/5")
706 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x0000000c)" "F - test-convert-function-distinguishes-args/6")
707 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-distinguishes-args/7")
708 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-distinguishes-args/8")
709 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-distinguishes-args/9")
710 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-distinguishes-args/10")
711 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-distinguishes-args/11")
712 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-distinguishes-args/12")
713
714 89/<- %esp 5/r32/ebp
715 5d/pop-to-ebp
716 c3/return
717
718 test-convert-function-returns-result:
719
720 55/push-ebp
721 89/<- %ebp 4/r32/esp
722
723 (clear-stream _test-input-stream)
724 (clear-stream $_test-input-buffered-file->buffer)
725 (clear-stream _test-output-stream)
726 (clear-stream $_test-output-buffered-file->buffer)
727
728 (write _test-input-stream "fn foo a: int, b: int -> result/eax: int {\n")
729 (write _test-input-stream " result <- copy a\n")
730 (write _test-input-stream " result <- increment\n")
731 (write _test-input-stream "}\n")
732
733 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
734 (flush _test-output-buffered-file)
735 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
741
742 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-returns-result/0")
743 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-returns-result/1")
744 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-returns-result/2")
745 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-returns-result/3")
746 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-returns-result/4")
747 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-returns-result/5")
748 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-returns-result/6")
749 (check-next-stream-line-equal _test-output-stream " 40/increment-eax" "F - test-convert-function-returns-result/7")
750 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-returns-result/8")
751 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-returns-result/9")
752 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-returns-result/10")
753 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-returns-result/11")
754 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-returns-result/12")
755 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-returns-result/13")
756
757 89/<- %esp 5/r32/ebp
758 5d/pop-to-ebp
759 c3/return
760
761 test-convert-function-with-literal-arg:
762
763 55/push-ebp
764 89/<- %ebp 4/r32/esp
765
766 (clear-stream _test-input-stream)
767 (clear-stream $_test-input-buffered-file->buffer)
768 (clear-stream _test-output-stream)
769 (clear-stream $_test-output-buffered-file->buffer)
770
771 (write _test-input-stream "fn foo a: int, b: int -> result/eax: int {\n")
772 (write _test-input-stream " result <- copy a\n")
773 (write _test-input-stream " result <- add 1\n")
774 (write _test-input-stream "}\n")
775
776 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
777 (flush _test-output-buffered-file)
778 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
784
785 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-literal-arg/0")
786 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-literal-arg/1")
787 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-literal-arg/2")
788 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-literal-arg/3")
789 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-literal-arg/4")
790 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-literal-arg/5")
791 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-with-literal-arg/6")
792 (check-next-stream-line-equal _test-output-stream " 05/add-to-eax 1/imm32" "F - test-convert-function-with-literal-arg/7")
793 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-literal-arg/8")
794 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-literal-arg/9")
795 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-literal-arg/10")
796 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-literal-arg/11")
797 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-literal-arg/12")
798 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-literal-arg/13")
799
800 89/<- %esp 5/r32/ebp
801 5d/pop-to-ebp
802 c3/return
803
804 test-convert-function-with-literal-arg-2:
805
806 55/push-ebp
807 89/<- %ebp 4/r32/esp
808
809 (clear-stream _test-input-stream)
810 (clear-stream $_test-input-buffered-file->buffer)
811 (clear-stream _test-output-stream)
812 (clear-stream $_test-output-buffered-file->buffer)
813
814 (write _test-input-stream "fn foo a: int, b: int -> result/ebx: int {\n")
815 (write _test-input-stream " result <- copy a\n")
816 (write _test-input-stream " result <- add 1\n")
817 (write _test-input-stream "}\n")
818
819 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
820 (flush _test-output-buffered-file)
821 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
827
828 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-literal-arg-2/0")
829 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-literal-arg-2/1")
830 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-literal-arg-2/2")
831 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-literal-arg-2/3")
832 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-literal-arg-2/4")
833 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-literal-arg-2/5")
834 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000003/r32" "F - test-convert-function-with-literal-arg-2/6")
835 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %ebx 1/imm32" "F - test-convert-function-with-literal-arg-2/7")
836 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-literal-arg-2/8")
837 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-literal-arg-2/9")
838 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-literal-arg-2/10")
839 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-literal-arg-2/11")
840 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-literal-arg-2/12")
841 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-literal-arg-2/13")
842
843 89/<- %esp 5/r32/ebp
844 5d/pop-to-ebp
845 c3/return
846
847 test-convert-function-call-with-literal-arg:
848
849 55/push-ebp
850 89/<- %ebp 4/r32/esp
851
852 (clear-stream _test-input-stream)
853 (clear-stream $_test-input-buffered-file->buffer)
854 (clear-stream _test-output-stream)
855 (clear-stream $_test-output-buffered-file->buffer)
856
857 (write _test-input-stream "fn main -> result/ebx: int {\n")
858 (write _test-input-stream " result <- do-add 3 4\n")
859 (write _test-input-stream "}\n")
860 (write _test-input-stream "fn do-add a: int, b: int -> result/ebx: int {\n")
861 (write _test-input-stream " result <- copy a\n")
862 (write _test-input-stream " result <- add b\n")
863 (write _test-input-stream "}\n")
864
865 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
866 (flush _test-output-buffered-file)
867 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
873
874 (check-next-stream-line-equal _test-output-stream "main:" "F - test-convert-function-call-with-literal-arg/0")
875 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-literal-arg/1")
876 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-literal-arg/2")
877 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-literal-arg/3")
878 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-literal-arg/4")
879 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:loop:" "F - test-convert-function-call-with-literal-arg/5")
880 (check-next-stream-line-equal _test-output-stream " (do-add 3 4)" "F - test-convert-function-call-with-literal-arg/6")
881 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-literal-arg/7")
882 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:break:" "F - test-convert-function-call-with-literal-arg/8")
883 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-literal-arg/9")
884 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-literal-arg/10")
885 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-literal-arg/11")
886 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-literal-arg/12")
887 (check-next-stream-line-equal _test-output-stream "do-add:" "F - test-convert-function-call-with-literal-arg/13")
888 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-literal-arg/14")
889 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-literal-arg/15")
890 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-literal-arg/16")
891 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-literal-arg/17")
892 (check-next-stream-line-equal _test-output-stream "$do-add:0x00000002:loop:" "F - test-convert-function-call-with-literal-arg/18")
893 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/19")
894 (check-next-stream-line-equal _test-output-stream " 03/add *(ebp+0x0000000c) 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/20")
895 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-literal-arg/21")
896 (check-next-stream-line-equal _test-output-stream "$do-add:0x00000002:break:" "F - test-convert-function-call-with-literal-arg/22")
897 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-literal-arg/23")
898 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-literal-arg/24")
899 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-literal-arg/25")
900 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-literal-arg/26")
901
902 89/<- %esp 5/r32/ebp
903 5d/pop-to-ebp
904 c3/return
905
906 test-convert-function-with-local-var-in-mem:
907
908 55/push-ebp
909 89/<- %ebp 4/r32/esp
910
911 (clear-stream _test-input-stream)
912 (clear-stream $_test-input-buffered-file->buffer)
913 (clear-stream _test-output-stream)
914 (clear-stream $_test-output-buffered-file->buffer)
915
916 (write _test-input-stream "fn foo {\n")
917 (write _test-input-stream " var x: int\n")
918 (write _test-input-stream " increment x\n")
919 (write _test-input-stream "}\n")
920
921 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
922 (flush _test-output-buffered-file)
923 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
929
930 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-mem/0")
931 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-mem/1")
932 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-mem/2")
933 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-mem/3")
934 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-mem/4")
935 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-mem/5")
936 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-mem/6")
937 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-local-var-in-mem/7")
938 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-local-var-in-mem/8")
939 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-mem/9")
940 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-mem/10")
941 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-mem/11")
942 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-mem/12")
943 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-mem/13")
944 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-mem/14")
945
946 89/<- %esp 5/r32/ebp
947 5d/pop-to-ebp
948 c3/return
949
950 test-local-var-in-mem-has-no-initializer:
951
952 55/push-ebp
953 89/<- %ebp 4/r32/esp
954
955 (clear-stream _test-input-stream)
956 (clear-stream $_test-input-buffered-file->buffer)
957 (clear-stream _test-output-stream)
958 (clear-stream $_test-output-buffered-file->buffer)
959 (clear-stream _test-error-stream)
960 (clear-stream $_test-error-buffered-file->buffer)
961
962 68/push 0/imm32
963 68/push 0/imm32
964 89/<- %edx 4/r32/esp
965 (tailor-exit-descriptor %edx 0x10)
966
967 (write _test-input-stream "fn foo {\n")
968 (write _test-input-stream " var x: int <- copy 0\n")
969 (write _test-input-stream " increment x\n")
970 (write _test-input-stream "}\n")
971
972 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
973
974
975 89/<- %edx 4/r32/esp
976 (flush _test-output-buffered-file)
977 (flush _test-error-buffered-file)
978 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
984
985 (check-stream-equal _test-output-stream "" "F - test-var-in-mem-has-no-initializer: output should be empty")
986 (check-next-stream-line-equal _test-error-stream "fn foo: var x: variables on the stack can't take an initializer" "F - test-var-in-mem-has-no-initializer: error message")
987
988 (check-ints-equal *(edx+4) 2 "F - test-var-in-mem-has-no-initializer: exit status")
989
990 81 0/subop/add %esp 8/imm32
991
992 5d/pop-to-ebp
993 c3/return
994
995 test-convert-function-with-local-var-with-compound-type-in-mem:
996
997 55/push-ebp
998 89/<- %ebp 4/r32/esp
999
1000 (clear-stream _test-input-stream)
1001 (clear-stream $_test-input-buffered-file->buffer)
1002 (clear-stream _test-output-stream)
1003 (clear-stream $_test-output-buffered-file->buffer)
1004
1005 (write _test-input-stream "fn foo {\n")
1006 (write _test-input-stream " var x: (addr int)\n")
1007 (write _test-input-stream " copy-to x, 0\n")
1008 (write _test-input-stream "}\n")
1009
1010 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1011 (flush _test-output-buffered-file)
1012 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1018
1019 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/0")
1020 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-with-compound-type-in-mem/1")
1021 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-with-compound-type-in-mem/2")
1022 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-with-compound-type-in-mem/3")
1023 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-with-compound-type-in-mem/4")
1024 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/5")
1025 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-with-compound-type-in-mem/6")
1026 (check-next-stream-line-equal _test-output-stream " c7 0/subop/copy *(ebp+0xfffffffc) 0/imm32" "F - test-convert-function-with-local-var-with-compound-type-in-mem/7")
1027 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-local-var-with-compound-type-in-mem/8")
1028 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-with-compound-type-in-mem/9")
1029 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/10")
1030 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-with-compound-type-in-mem/11")
1031 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-with-compound-type-in-mem/12")
1032 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-with-compound-type-in-mem/13")
1033 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-with-compound-type-in-mem/14")
1034
1035 89/<- %esp 5/r32/ebp
1036 5d/pop-to-ebp
1037 c3/return
1038
1039 test-convert-function-with-local-var-in-reg:
1040
1041 55/push-ebp
1042 89/<- %ebp 4/r32/esp
1043
1044 (clear-stream _test-input-stream)
1045 (clear-stream $_test-input-buffered-file->buffer)
1046 (clear-stream _test-output-stream)
1047 (clear-stream $_test-output-buffered-file->buffer)
1048
1049 (write _test-input-stream "fn foo {\n")
1050 (write _test-input-stream " var x/ecx: int <- copy 3\n")
1051 (write _test-input-stream " x <- increment\n")
1052 (write _test-input-stream "}\n")
1053
1054 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1055 (flush _test-output-buffered-file)
1056 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1062
1063 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-reg/0")
1064 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-reg/1")
1065 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-reg/2")
1066 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-reg/3")
1067 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-reg/4")
1068 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-reg/5")
1069 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-local-var-in-reg/6")
1070 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-function-with-local-var-in-reg/7")
1071 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-convert-function-with-local-var-in-reg/8")
1072 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-local-var-in-reg/9")
1073 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-reg/10")
1074 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-reg/11")
1075 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-reg/12")
1076 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-reg/13")
1077 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-reg/14")
1078 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-reg/15")
1079
1080 89/<- %esp 5/r32/ebp
1081 5d/pop-to-ebp
1082 c3/return
1083
1084 test-convert-function-with-second-local-var-in-same-reg:
1085
1086 55/push-ebp
1087 89/<- %ebp 4/r32/esp
1088
1089 (clear-stream _test-input-stream)
1090 (clear-stream $_test-input-buffered-file->buffer)
1091 (clear-stream _test-output-stream)
1092 (clear-stream $_test-output-buffered-file->buffer)
1093
1094 (write _test-input-stream "fn foo {\n")
1095 (write _test-input-stream " var x/ecx: int <- copy 3\n")
1096 (write _test-input-stream " var y/ecx: int <- copy 4\n")
1097 (write _test-input-stream " y <- increment\n")
1098 (write _test-input-stream "}\n")
1099
1100 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1101 (flush _test-output-buffered-file)
1102 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1108
1109 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-second-local-var-in-same-reg/0")
1110 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-second-local-var-in-same-reg/1")
1111 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-second-local-var-in-same-reg/2")
1112 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-second-local-var-in-same-reg/3")
1113 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-second-local-var-in-same-reg/4")
1114 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-second-local-var-in-same-reg/5")
1115 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-second-local-var-in-same-reg/6")
1116 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-function-with-second-local-var-in-same-reg/7")
1117 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-convert-function-with-second-local-var-in-same-reg/8")
1118 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-convert-function-with-second-local-var-in-same-reg/9")
1119 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-second-local-var-in-same-reg/10")
1120 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-second-local-var-in-same-reg/11")
1121 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-second-local-var-in-same-reg/12")
1122 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-second-local-var-in-same-reg/13")
1123 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-second-local-var-in-same-reg/14")
1124 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-second-local-var-in-same-reg/15")
1125 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-second-local-var-in-same-reg/16")
1126
1127 89/<- %esp 5/r32/ebp
1128 5d/pop-to-ebp
1129 c3/return
1130
1131 test-convert-function-call:
1132
1133 55/push-ebp
1134 89/<- %ebp 4/r32/esp
1135
1136 (clear-stream _test-input-stream)
1137 (clear-stream $_test-input-buffered-file->buffer)
1138 (clear-stream _test-output-stream)
1139 (clear-stream $_test-output-buffered-file->buffer)
1140
1141 (write _test-input-stream "fn main -> result/ebx: int {\n")
1142 (write _test-input-stream " result <- foo\n")
1143 (write _test-input-stream "}\n")
1144 (write _test-input-stream "fn foo -> result/ebx: int {\n")
1145 (write _test-input-stream " result <- copy 3\n")
1146 (write _test-input-stream "}\n")
1147
1148 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1149 (flush _test-output-buffered-file)
1150 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1156
1157 (check-next-stream-line-equal _test-output-stream "main:" "F - test-convert-function-call/0")
1158 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call/1")
1159 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call/2")
1160 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call/3")
1161 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call/4")
1162 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:loop:" "F - test-convert-function-call/5")
1163 (check-next-stream-line-equal _test-output-stream " (foo)" "F - test-convert-function-call/6")
1164 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call/7")
1165 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:break:" "F - test-convert-function-call/8")
1166 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call/9")
1167 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call/10")
1168 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call/11")
1169 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call/12")
1170 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call/13")
1171 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call/14")
1172 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call/15")
1173 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call/16")
1174 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call/17")
1175 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-call/18")
1176 (check-next-stream-line-equal _test-output-stream " bb/copy-to-ebx 3/imm32" "F - test-convert-function-call/19")
1177 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call/20")
1178 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-call/21")
1179 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call/22")
1180 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call/23")
1181 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call/24")
1182 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call/25")
1183
1184 89/<- %esp 5/r32/ebp
1185 5d/pop-to-ebp
1186 c3/return
1187
1188 test-convert-function-call-with-incorrect-inout-type:
1189
1190 55/push-ebp
1191 89/<- %ebp 4/r32/esp
1192
1193 (clear-stream _test-input-stream)
1194 (clear-stream $_test-input-buffered-file->buffer)
1195 (clear-stream _test-output-stream)
1196 (clear-stream $_test-output-buffered-file->buffer)
1197 (clear-stream _test-error-stream)
1198 (clear-stream $_test-error-buffered-file->buffer)
1199
1200 68/push 0/imm32
1201 68/push 0/imm32
1202 89/<- %edx 4/r32/esp
1203 (tailor-exit-descriptor %edx 0x10)
1204
1205 (write _test-input-stream "fn f {\n")
1206 (write _test-input-stream " var x: int\n")
1207 (write _test-input-stream " g x\n")
1208 (write _test-input-stream "}\n")
1209 (write _test-input-stream "fn g a: foo {\n")
1210 (write _test-input-stream "}\n")
1211
1212 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1213
1214
1215 89/<- %edx 4/r32/esp
1216 (flush _test-output-buffered-file)
1217 (flush _test-error-buffered-file)
1218 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1224
1225 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-incorrect-inout-type: output should be empty")
1226 (check-next-stream-line-equal _test-error-stream "call g: type for inout 'x' is not right" "F - test-convert-function-call-with-incorrect-inout-type: error message")
1227
1228 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-incorrect-inout-type: exit status")
1229
1230 81 0/subop/add %esp 8/imm32
1231 5d/pop-to-ebp
1232 c3/return
1233
1234 test-convert-function-call-with-too-few-inouts:
1235
1236 55/push-ebp
1237 89/<- %ebp 4/r32/esp
1238
1239 (clear-stream _test-input-stream)
1240 (clear-stream $_test-input-buffered-file->buffer)
1241 (clear-stream _test-output-stream)
1242 (clear-stream $_test-output-buffered-file->buffer)
1243 (clear-stream _test-error-stream)
1244 (clear-stream $_test-error-buffered-file->buffer)
1245
1246 68/push 0/imm32
1247 68/push 0/imm32
1248 89/<- %edx 4/r32/esp
1249 (tailor-exit-descriptor %edx 0x10)
1250
1251 (write _test-input-stream "fn f {\n")
1252 (write _test-input-stream " g\n")
1253 (write _test-input-stream "}\n")
1254 (write _test-input-stream "fn g a: int {\n")
1255 (write _test-input-stream "}\n")
1256
1257 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1258
1259
1260 89/<- %edx 4/r32/esp
1261 (flush _test-output-buffered-file)
1262 (flush _test-error-buffered-file)
1263 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1269
1270 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-few-inouts: output should be empty")
1271 (check-next-stream-line-equal _test-error-stream "call g: too few inouts" "F - test-convert-function-call-with-too-few-inouts: error message")
1272
1273 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-few-inouts: exit status")
1274
1275 81 0/subop/add %esp 8/imm32
1276 5d/pop-to-ebp
1277 c3/return
1278
1279 test-convert-function-call-with-too-many-inouts:
1280
1281 55/push-ebp
1282 89/<- %ebp 4/r32/esp
1283
1284 (clear-stream _test-input-stream)
1285 (clear-stream $_test-input-buffered-file->buffer)
1286 (clear-stream _test-output-stream)
1287 (clear-stream $_test-output-buffered-file->buffer)
1288 (clear-stream _test-error-stream)
1289 (clear-stream $_test-error-buffered-file->buffer)
1290
1291 68/push 0/imm32
1292 68/push 0/imm32
1293 89/<- %edx 4/r32/esp
1294 (tailor-exit-descriptor %edx 0x10)
1295
1296 (write _test-input-stream "fn f {\n")
1297 (write _test-input-stream " var x: int\n")
1298 (write _test-input-stream " g x\n")
1299 (write _test-input-stream "}\n")
1300 (write _test-input-stream "fn g {\n")
1301 (write _test-input-stream "}\n")
1302
1303 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1304
1305
1306 89/<- %edx 4/r32/esp
1307 (flush _test-output-buffered-file)
1308 (flush _test-error-buffered-file)
1309 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1315
1316 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-many-inouts: output should be empty")
1317 (check-next-stream-line-equal _test-error-stream "call g: too many inouts" "F - test-convert-function-call-with-too-many-inouts: error message")
1318
1319 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-many-inouts: exit status")
1320
1321 81 0/subop/add %esp 8/imm32
1322 5d/pop-to-ebp
1323 c3/return
1324
1325 test-convert-function-call-with-incorrect-output-type:
1326
1327 55/push-ebp
1328 89/<- %ebp 4/r32/esp
1329
1330 (clear-stream _test-input-stream)
1331 (clear-stream $_test-input-buffered-file->buffer)
1332 (clear-stream _test-output-stream)
1333 (clear-stream $_test-output-buffered-file->buffer)
1334 (clear-stream _test-error-stream)
1335 (clear-stream $_test-error-buffered-file->buffer)
1336
1337 68/push 0/imm32
1338 68/push 0/imm32
1339 89/<- %edx 4/r32/esp
1340 (tailor-exit-descriptor %edx 0x10)
1341
1342 (write _test-input-stream "fn f {\n")
1343 (write _test-input-stream " var x/eax: int <- g\n")
1344 (write _test-input-stream "}\n")
1345 (write _test-input-stream "fn g -> a/eax: foo {\n")
1346 (write _test-input-stream "}\n")
1347
1348 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1349
1350
1351 89/<- %edx 4/r32/esp
1352 (flush _test-output-buffered-file)
1353 (flush _test-error-buffered-file)
1354 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1360
1361 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-incorrect-output-type: output should be empty")
1362 (check-next-stream-line-equal _test-error-stream "call g: type for output 'x' is not right" "F - test-convert-function-call-with-incorrect-output-type: error message")
1363
1364 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-incorrect-output-type: exit status")
1365
1366 81 0/subop/add %esp 8/imm32
1367 5d/pop-to-ebp
1368 c3/return
1369
1370 test-convert-function-call-with-too-few-outputs:
1371
1372 55/push-ebp
1373 89/<- %ebp 4/r32/esp
1374
1375 (clear-stream _test-input-stream)
1376 (clear-stream $_test-input-buffered-file->buffer)
1377 (clear-stream _test-output-stream)
1378 (clear-stream $_test-output-buffered-file->buffer)
1379 (clear-stream _test-error-stream)
1380 (clear-stream $_test-error-buffered-file->buffer)
1381
1382 68/push 0/imm32
1383 68/push 0/imm32
1384 89/<- %edx 4/r32/esp
1385 (tailor-exit-descriptor %edx 0x10)
1386
1387 (write _test-input-stream "fn f {\n")
1388 (write _test-input-stream " g\n")
1389 (write _test-input-stream "}\n")
1390 (write _test-input-stream "fn g -> a/eax: int {\n")
1391 (write _test-input-stream "}\n")
1392
1393 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1394
1395
1396 89/<- %edx 4/r32/esp
1397 (flush _test-output-buffered-file)
1398 (flush _test-error-buffered-file)
1399 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1405
1406 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-few-outputs: output should be empty")
1407 (check-next-stream-line-equal _test-error-stream "call g: too few outputs" "F - test-convert-function-call-with-too-few-outputs: error message")
1408
1409 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-few-outputs: exit status")
1410
1411 81 0/subop/add %esp 8/imm32
1412 5d/pop-to-ebp
1413 c3/return
1414
1415 test-convert-function-call-with-too-many-outputs:
1416
1417 55/push-ebp
1418 89/<- %ebp 4/r32/esp
1419
1420 (clear-stream _test-input-stream)
1421 (clear-stream $_test-input-buffered-file->buffer)
1422 (clear-stream _test-output-stream)
1423 (clear-stream $_test-output-buffered-file->buffer)
1424 (clear-stream _test-error-stream)
1425 (clear-stream $_test-error-buffered-file->buffer)
1426
1427 68/push 0/imm32
1428 68/push 0/imm32
1429 89/<- %edx 4/r32/esp
1430 (tailor-exit-descriptor %edx 0x10)
1431
1432 (write _test-input-stream "fn f {\n")
1433 (write _test-input-stream " var x/eax: int <- g\n")
1434 (write _test-input-stream "}\n")
1435 (write _test-input-stream "fn g {\n")
1436 (write _test-input-stream "}\n")
1437
1438 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1439
1440
1441 89/<- %edx 4/r32/esp
1442 (flush _test-output-buffered-file)
1443 (flush _test-error-buffered-file)
1444 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1450
1451 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-many-outputs: output should be empty")
1452 (check-next-stream-line-equal _test-error-stream "call g: too many outputs" "F - test-convert-function-call-with-too-many-outputs: error message")
1453
1454 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-many-outputs: exit status")
1455
1456 81 0/subop/add %esp 8/imm32
1457 5d/pop-to-ebp
1458 c3/return
1459
1460 test-convert-function-call-with-incorrect-output-register:
1461
1462 55/push-ebp
1463 89/<- %ebp 4/r32/esp
1464
1465 (clear-stream _test-input-stream)
1466 (clear-stream $_test-input-buffered-file->buffer)
1467 (clear-stream _test-output-stream)
1468 (clear-stream $_test-output-buffered-file->buffer)
1469 (clear-stream _test-error-stream)
1470 (clear-stream $_test-error-buffered-file->buffer)
1471
1472 68/push 0/imm32
1473 68/push 0/imm32
1474 89/<- %edx 4/r32/esp
1475 (tailor-exit-descriptor %edx 0x10)
1476
1477 (write _test-input-stream "fn f {\n")
1478 (write _test-input-stream " var x/ecx: int <- g\n")
1479 (write _test-input-stream "}\n")
1480 (write _test-input-stream "fn g -> a/eax: int {\n")
1481 (write _test-input-stream "}\n")
1482
1483 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1484
1485
1486 89/<- %edx 4/r32/esp
1487 (flush _test-output-buffered-file)
1488 (flush _test-error-buffered-file)
1489 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1495
1496 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-incorrect-output-register: output should be empty")
1497 (check-next-stream-line-equal _test-error-stream "call g: register for output 'x' is not right" "F - test-convert-function-call-with-incorrect-output-register: error message")
1498
1499 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-incorrect-output-register: exit status")
1500
1501 81 0/subop/add %esp 8/imm32
1502 5d/pop-to-ebp
1503 c3/return
1504
1505 test-convert-function-with-local-var-dereferenced:
1506
1507 55/push-ebp
1508 89/<- %ebp 4/r32/esp
1509
1510 (clear-stream _test-input-stream)
1511 (clear-stream $_test-input-buffered-file->buffer)
1512 (clear-stream _test-output-stream)
1513 (clear-stream $_test-output-buffered-file->buffer)
1514
1515 (write _test-input-stream "fn foo {\n")
1516 (write _test-input-stream " var x/ecx: (addr int) <- copy 0\n")
1517 (write _test-input-stream " increment *x\n")
1518 (write _test-input-stream "}\n")
1519
1520 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1521 (flush _test-output-buffered-file)
1522 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1528
1529 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-dereferenced/0")
1530 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-dereferenced/1")
1531 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-dereferenced/2")
1532 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-dereferenced/3")
1533 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-dereferenced/4")
1534 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-dereferenced/5")
1535 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-local-var-dereferenced/6")
1536 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-local-var-dereferenced/7")
1537 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *ecx" "F - test-convert-function-with-local-var-dereferenced/8")
1538 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-local-var-dereferenced/9")
1539 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-dereferenced/10")
1540 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-dereferenced/11")
1541 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-dereferenced/12")
1542 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-dereferenced/13")
1543 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-dereferenced/14")
1544 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-dereferenced/15")
1545
1546 89/<- %esp 5/r32/ebp
1547 5d/pop-to-ebp
1548 c3/return
1549
1550
1551 test-convert-function-with-byte-operations:
1552
1553 55/push-ebp
1554 89/<- %ebp 4/r32/esp
1555
1556 (clear-stream _test-input-stream)
1557 (clear-stream $_test-input-buffered-file->buffer)
1558 (clear-stream _test-output-stream)
1559 (clear-stream $_test-output-buffered-file->buffer)
1560
1561 (write _test-input-stream "fn foo {\n")
1562 (write _test-input-stream " var x/eax: byte <- copy 0\n")
1563 (write _test-input-stream " var y/ecx: byte <- copy 0\n")
1564 (write _test-input-stream " y <- copy-byte x\n")
1565 (write _test-input-stream " var z/edx: (addr byte) <- copy 0\n")
1566 (write _test-input-stream " y <- copy-byte *z\n")
1567 (write _test-input-stream " copy-byte-to *z, x\n")
1568 (write _test-input-stream "}\n")
1569
1570 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1571 (flush _test-output-buffered-file)
1572 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1578
1579 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-byte-operations/0")
1580 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-byte-operations/1")
1581 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-byte-operations/2")
1582 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-byte-operations/3")
1583 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-byte-operations/4")
1584 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-byte-operations/5")
1585 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-byte-operations/6")
1586 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-function-with-byte-operations/7")
1587 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-byte-operations/8")
1588 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-byte-operations/9")
1589 (check-next-stream-line-equal _test-output-stream " 8a/byte-> %eax 0x00000001/r32" "F - test-convert-function-with-byte-operations/10")
1590 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %edx" "F - test-convert-function-with-byte-operations/11")
1591 (check-next-stream-line-equal _test-output-stream " ba/copy-to-edx 0/imm32" "F - test-convert-function-with-byte-operations/12")
1592 (check-next-stream-line-equal _test-output-stream " 8a/byte-> *edx 0x00000001/r32" "F - test-convert-function-with-byte-operations/13")
1593 (check-next-stream-line-equal _test-output-stream " 88/byte<- *edx 0x00000000/r32" "F - test-convert-function-with-byte-operations/14")
1594 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %edx" "F - test-convert-function-with-byte-operations/15")
1595 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-byte-operations/16")
1596 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-byte-operations/17")
1597 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-byte-operations/18")
1598 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-byte-operations/19")
1599 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-byte-operations/20")
1600 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-byte-operations/21")
1601 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-byte-operations/22")
1602 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-byte-operations/23")
1603
1604 89/<- %esp 5/r32/ebp
1605 5d/pop-to-ebp
1606 c3/return
1607
1608
1609 test-copy-byte-var-from-fn-arg:
1610
1611 55/push-ebp
1612 89/<- %ebp 4/r32/esp
1613
1614 (clear-stream _test-input-stream)
1615 (clear-stream $_test-input-buffered-file->buffer)
1616 (clear-stream _test-output-stream)
1617 (clear-stream $_test-output-buffered-file->buffer)
1618
1619 (write _test-input-stream "fn foo x: byte, y: int {\n")
1620 (write _test-input-stream " var a/eax: byte <- copy x\n")
1621 (write _test-input-stream " var b/eax: int <- copy y\n")
1622 (write _test-input-stream "}\n")
1623
1624 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1625 (flush _test-output-buffered-file)
1626 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1632
1633 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-copy-byte-from-fn-arg/0")
1634 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-copy-byte-from-fn-arg/1")
1635 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-copy-byte-from-fn-arg/2")
1636 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-copy-byte-from-fn-arg/3")
1637 (check-next-stream-line-equal _test-output-stream " {" "F - test-copy-byte-from-fn-arg/4")
1638 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-copy-byte-from-fn-arg/5")
1639 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-copy-byte-from-fn-arg/6")
1640 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-copy-byte-from-fn-arg/7")
1641 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x0000000c) 0x00000000/r32" "F - test-copy-byte-from-fn-arg/8")
1642 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-copy-byte-from-fn-arg/9")
1643 (check-next-stream-line-equal _test-output-stream " }" "F - test-copy-byte-from-fn-arg/10")
1644 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-copy-byte-from-fn-arg/11")
1645 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-copy-byte-from-fn-arg/12")
1646 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-copy-byte-from-fn-arg/13")
1647 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-copy-byte-from-fn-arg/14")
1648 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-copy-byte-from-fn-arg/15")
1649
1650 89/<- %esp 5/r32/ebp
1651 5d/pop-to-ebp
1652 c3/return
1653
1654 test-convert-compare-register-with-literal:
1655
1656 55/push-ebp
1657 89/<- %ebp 4/r32/esp
1658
1659 (clear-stream _test-input-stream)
1660 (clear-stream $_test-input-buffered-file->buffer)
1661 (clear-stream _test-output-stream)
1662 (clear-stream $_test-output-buffered-file->buffer)
1663
1664 (write _test-input-stream "fn foo {\n")
1665 (write _test-input-stream " var x/ecx: int <- copy 0\n")
1666 (write _test-input-stream " compare x, 0\n")
1667 (write _test-input-stream "}\n")
1668
1669 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1670 (flush _test-output-buffered-file)
1671 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1677
1678 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-compare-register-with-literal/0")
1679 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-compare-register-with-literal/1")
1680 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-compare-register-with-literal/2")
1681 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-compare-register-with-literal/3")
1682 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-compare-register-with-literal/4")
1683 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-compare-register-with-literal/5")
1684 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-compare-register-with-literal/6")
1685 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-compare-register-with-literal/7")
1686 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %ecx 0/imm32" "F - test-convert-compare-register-with-literal/8")
1687 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-compare-register-with-literal/9")
1688 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-compare-register-with-literal/10")
1689 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-compare-register-with-literal/11")
1690 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-compare-register-with-literal/12")
1691 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-compare-register-with-literal/13")
1692 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-compare-register-with-literal/14")
1693 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-compare-register-with-literal/15")
1694
1695 89/<- %esp 5/r32/ebp
1696 5d/pop-to-ebp
1697 c3/return
1698
1699 test-unknown-variable:
1700
1701 55/push-ebp
1702 89/<- %ebp 4/r32/esp
1703
1704 (clear-stream _test-input-stream)
1705 (clear-stream $_test-input-buffered-file->buffer)
1706 (clear-stream _test-output-stream)
1707 (clear-stream $_test-output-buffered-file->buffer)
1708 (clear-stream _test-error-stream)
1709 (clear-stream $_test-error-buffered-file->buffer)
1710
1711 68/push 0/imm32
1712 68/push 0/imm32
1713 89/<- %edx 4/r32/esp
1714 (tailor-exit-descriptor %edx 0x10)
1715
1716 (write _test-input-stream "fn foo {\n")
1717 (write _test-input-stream " compare x, 0\n")
1718 (write _test-input-stream "}\n")
1719
1720 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1721
1722
1723 89/<- %edx 4/r32/esp
1724 (flush _test-output-buffered-file)
1725 (flush _test-error-buffered-file)
1726 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1732
1733 (check-stream-equal _test-output-stream "" "F - test-unknown-variable: output should be empty")
1734 (check-next-stream-line-equal _test-error-stream "unknown variable 'x'" "F - test-unknown-variable: error message")
1735
1736 (check-ints-equal *(edx+4) 2 "F - test-unknown-variable: exit status")
1737
1738 81 0/subop/add %esp 8/imm32
1739
1740 5d/pop-to-ebp
1741 c3/return
1742
1743 test-convert-function-with-local-var-in-block:
1744
1745 55/push-ebp
1746 89/<- %ebp 4/r32/esp
1747
1748 (clear-stream _test-input-stream)
1749 (clear-stream $_test-input-buffered-file->buffer)
1750 (clear-stream _test-output-stream)
1751 (clear-stream $_test-output-buffered-file->buffer)
1752
1753 (write _test-input-stream "fn foo {\n")
1754 (write _test-input-stream " {\n")
1755 (write _test-input-stream " var x: int\n")
1756 (write _test-input-stream " increment x\n")
1757 (write _test-input-stream " }\n")
1758 (write _test-input-stream "}\n")
1759
1760 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1761 (flush _test-output-buffered-file)
1762 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1768
1769 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-block/0")
1770 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-block/1")
1771 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-block/2")
1772 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-block/3")
1773 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-block/4")
1774 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-block/5")
1775 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-block/6")
1776 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-local-var-in-block/7")
1777 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-block/8")
1778 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-local-var-in-block/9")
1779 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-local-var-in-block/10")
1780 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-block/11")
1781 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-local-var-in-block/12")
1782 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-block/13")
1783 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-block/14")
1784 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-block/15")
1785 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-block/16")
1786 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-block/17")
1787 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-block/18")
1788
1789 89/<- %esp 5/r32/ebp
1790 5d/pop-to-ebp
1791 c3/return
1792
1793 test-convert-function-with-local-var-in-named-block:
1794
1795 55/push-ebp
1796 89/<- %ebp 4/r32/esp
1797
1798 (clear-stream _test-input-stream)
1799 (clear-stream $_test-input-buffered-file->buffer)
1800 (clear-stream _test-output-stream)
1801 (clear-stream $_test-output-buffered-file->buffer)
1802
1803 (write _test-input-stream "fn foo {\n")
1804 (write _test-input-stream " $bar: {\n")
1805 (write _test-input-stream " var x: int\n")
1806 (write _test-input-stream " increment x\n")
1807 (write _test-input-stream " }\n")
1808 (write _test-input-stream "}\n")
1809
1810 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1811 (flush _test-output-buffered-file)
1812 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1818
1819 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-named-block/0")
1820 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-named-block/1")
1821 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-named-block/2")
1822 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-named-block/3")
1823 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-named-block/4")
1824 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-named-block/5")
1825 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-named-block/6")
1826 (check-next-stream-line-equal _test-output-stream "$bar:loop:" "F - test-convert-function-with-local-var-in-named-block/7")
1827 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-named-block/8")
1828 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-local-var-in-named-block/9")
1829 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-local-var-in-named-block/10")
1830 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-named-block/11")
1831 (check-next-stream-line-equal _test-output-stream "$bar:break:" "F - test-convert-function-with-local-var-in-named-block/12")
1832 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-named-block/13")
1833 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-named-block/14")
1834 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-named-block/15")
1835 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-named-block/16")
1836 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-named-block/17")
1837 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-named-block/18")
1838
1839 89/<- %esp 5/r32/ebp
1840 5d/pop-to-ebp
1841 c3/return
1842
1843 test-unknown-variable-in-named-block:
1844
1845 55/push-ebp
1846 89/<- %ebp 4/r32/esp
1847
1848 (clear-stream _test-input-stream)
1849 (clear-stream $_test-input-buffered-file->buffer)
1850 (clear-stream _test-output-stream)
1851 (clear-stream $_test-output-buffered-file->buffer)
1852 (clear-stream _test-error-stream)
1853 (clear-stream $_test-error-buffered-file->buffer)
1854
1855 68/push 0/imm32
1856 68/push 0/imm32
1857 89/<- %edx 4/r32/esp
1858 (tailor-exit-descriptor %edx 0x10)
1859
1860 (write _test-input-stream "fn foo {\n")
1861 (write _test-input-stream " $a: {\n")
1862 (write _test-input-stream " compare x, 0\n")
1863 (write _test-input-stream " }\n")
1864 (write _test-input-stream "}\n")
1865
1866 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1867
1868
1869 89/<- %edx 4/r32/esp
1870 (flush _test-output-buffered-file)
1871 (flush _test-error-buffered-file)
1872 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1878
1879 (check-stream-equal _test-output-stream "" "F - test-unknown-variable-in-named-block: output should be empty")
1880 (check-next-stream-line-equal _test-error-stream "unknown variable 'x'" "F - test-unknown-variable-in-named-block: error message")
1881
1882 (check-ints-equal *(edx+4) 2 "F - test-unknown-variable-in-named-block: exit status")
1883
1884 81 0/subop/add %esp 8/imm32
1885
1886 5d/pop-to-ebp
1887 c3/return
1888
1889 test-always-shadow-outermost-reg-vars-in-function:
1890
1891 55/push-ebp
1892 89/<- %ebp 4/r32/esp
1893
1894 (clear-stream _test-input-stream)
1895 (clear-stream $_test-input-buffered-file->buffer)
1896 (clear-stream _test-output-stream)
1897 (clear-stream $_test-output-buffered-file->buffer)
1898
1899 (write _test-input-stream "fn foo {\n")
1900 (write _test-input-stream " var x/ecx: int <- copy 3\n")
1901 (write _test-input-stream "}\n")
1902
1903 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1904 (flush _test-output-buffered-file)
1905 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1911
1912 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-always-shadow-outermost-reg-vars-in-function/0")
1913 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-always-shadow-outermost-reg-vars-in-function/1")
1914 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-always-shadow-outermost-reg-vars-in-function/2")
1915 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-always-shadow-outermost-reg-vars-in-function/3")
1916 (check-next-stream-line-equal _test-output-stream " {" "F - test-always-shadow-outermost-reg-vars-in-function/4")
1917 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-always-shadow-outermost-reg-vars-in-function/5")
1918 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-compare-register-with-literal/6")
1919 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-always-shadow-outermost-reg-vars-in-function/8")
1920 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-compare-register-with-literal/9")
1921 (check-next-stream-line-equal _test-output-stream " }" "F - test-always-shadow-outermost-reg-vars-in-function/12")
1922 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-always-shadow-outermost-reg-vars-in-function/13")
1923 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-always-shadow-outermost-reg-vars-in-function/14")
1924 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-always-shadow-outermost-reg-vars-in-function/15")
1925 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-always-shadow-outermost-reg-vars-in-function/16")
1926 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-always-shadow-outermost-reg-vars-in-function/17")
1927
1928 89/<- %esp 5/r32/ebp
1929 5d/pop-to-ebp
1930 c3/return
1931
1932 _pending-test-clobber-dead-local:
1933
1934 55/push-ebp
1935 89/<- %ebp 4/r32/esp
1936
1937 (clear-stream _test-input-stream)
1938 (clear-stream $_test-input-buffered-file->buffer)
1939 (clear-stream _test-output-stream)
1940 (clear-stream $_test-output-buffered-file->buffer)
1941
1942 (write _test-input-stream "fn foo {\n")
1943 (write _test-input-stream " var x/ecx: int <- copy 3\n")
1944 (write _test-input-stream " {\n")
1945 (write _test-input-stream " var y/ecx: int <- copy 4\n")
1946 (write _test-input-stream " }\n")
1947 (write _test-input-stream "}\n")
1948
1949 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1950 (flush _test-output-buffered-file)
1951 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1957
1958 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-clobber-dead-local/0")
1959 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-clobber-dead-local/1")
1960 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-clobber-dead-local/2")
1961 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-clobber-dead-local/3")
1962 (check-next-stream-line-equal _test-output-stream " {" "F - test-clobber-dead-local/4")
1963 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-clobber-dead-local/5")
1964 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-clobber-dead-local/6")
1965 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-clobber-dead-local/7")
1966 (check-next-stream-line-equal _test-output-stream " {" "F - test-clobber-dead-local/8")
1967 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-clobber-dead-local/9")
1968 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-clobber-dead-local/10")
1969 (check-next-stream-line-equal _test-output-stream " }" "F - test-clobber-dead-local/11")
1970 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-clobber-dead-local/12")
1971 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-clobber-dead-local/13")
1972 (check-next-stream-line-equal _test-output-stream " }" "F - test-clobber-dead-local/14")
1973 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-clobber-dead-local/15")
1974 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-clobber-dead-local/16")
1975 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-clobber-dead-local/17")
1976 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-clobber-dead-local/18")
1977 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-clobber-dead-local/19")
1978
1979 89/<- %esp 5/r32/ebp
1980 5d/pop-to-ebp
1981 c3/return
1982
1983 test-shadow-live-local:
1984
1985 55/push-ebp
1986 89/<- %ebp 4/r32/esp
1987
1988 (clear-stream _test-input-stream)
1989 (clear-stream $_test-input-buffered-file->buffer)
1990 (clear-stream _test-output-stream)
1991 (clear-stream $_test-output-buffered-file->buffer)
1992
1993 (write _test-input-stream "fn foo {\n")
1994 (write _test-input-stream " var x/ecx: int <- copy 3\n")
1995 (write _test-input-stream " {\n")
1996 (write _test-input-stream " var y/ecx: int <- copy 4\n")
1997 (write _test-input-stream " }\n")
1998 (write _test-input-stream " x <- increment\n")
1999 (write _test-input-stream "}\n")
2000
2001 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2002 (flush _test-output-buffered-file)
2003 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2009
2010 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-live-local/0")
2011 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-live-local/1")
2012 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-live-local/2")
2013 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-live-local/3")
2014 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-live-local/4")
2015 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-live-local/5")
2016 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-live-local/6")
2017 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-live-local/7")
2018 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-live-local/8")
2019 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-live-local/9")
2020 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-live-local/10")
2021 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-shadow-live-local/11")
2022 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-live-local/12")
2023 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-live-local/13")
2024 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-live-local/14")
2025 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-live-local/15")
2026 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-live-local/16")
2027 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-live-local/17")
2028 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-live-local/18")
2029 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-live-local/19")
2030 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-live-local/20")
2031 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-live-local/21")
2032 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-live-local/21")
2033
2034 89/<- %esp 5/r32/ebp
2035 5d/pop-to-ebp
2036 c3/return
2037
2038 test-do-not-spill-same-register-in-block:
2039
2040 55/push-ebp
2041 89/<- %ebp 4/r32/esp
2042
2043 (clear-stream _test-input-stream)
2044 (clear-stream $_test-input-buffered-file->buffer)
2045 (clear-stream _test-output-stream)
2046 (clear-stream $_test-output-buffered-file->buffer)
2047
2048 (write _test-input-stream "fn foo {\n")
2049 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2050 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2051 (write _test-input-stream " y <- increment\n")
2052 (write _test-input-stream "}\n")
2053
2054 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2055 (flush _test-output-buffered-file)
2056 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2062
2063 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-do-not-spill-same-register-in-block/0")
2064 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-do-not-spill-same-register-in-block/1")
2065 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-do-not-spill-same-register-in-block/2")
2066 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-do-not-spill-same-register-in-block/3")
2067 (check-next-stream-line-equal _test-output-stream " {" "F - test-do-not-spill-same-register-in-block/4")
2068 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-do-not-spill-same-register-in-block/5")
2069 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-do-not-spill-same-register-in-block/6")
2070 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-do-not-spill-same-register-in-block/7")
2071 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-do-not-spill-same-register-in-block/8")
2072 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-do-not-spill-same-register-in-block/9")
2073 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-do-not-spill-same-register-in-block/10")
2074 (check-next-stream-line-equal _test-output-stream " }" "F - test-do-not-spill-same-register-in-block/11")
2075 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-do-not-spill-same-register-in-block/12")
2076 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-do-not-spill-same-register-in-block/13")
2077 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-do-not-spill-same-register-in-block/14")
2078 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-do-not-spill-same-register-in-block/15")
2079 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-do-not-spill-same-register-in-block/16")
2080
2081 89/<- %esp 5/r32/ebp
2082 5d/pop-to-ebp
2083 c3/return
2084
2085 test-spill-different-register-in-block:
2086
2087 55/push-ebp
2088 89/<- %ebp 4/r32/esp
2089
2090 (clear-stream _test-input-stream)
2091 (clear-stream $_test-input-buffered-file->buffer)
2092 (clear-stream _test-output-stream)
2093 (clear-stream $_test-output-buffered-file->buffer)
2094
2095 (write _test-input-stream "fn foo {\n")
2096 (write _test-input-stream " var x/eax: int <- copy 3\n")
2097 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2098 (write _test-input-stream " y <- increment\n")
2099 (write _test-input-stream "}\n")
2100
2101 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2102 (flush _test-output-buffered-file)
2103 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2109
2110 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-spill-different-register-in-block/0")
2111 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-spill-different-register-in-block/1")
2112 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-spill-different-register-in-block/2")
2113 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-spill-different-register-in-block/3")
2114 (check-next-stream-line-equal _test-output-stream " {" "F - test-spill-different-register-in-block/4")
2115 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-spill-different-register-in-block/5")
2116 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-spill-different-register-in-block/6")
2117 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-spill-different-register-in-block/7")
2118 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-spill-different-register-in-block/8")
2119 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-spill-different-register-in-block/9")
2120 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-spill-different-register-in-block/10")
2121 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-spill-different-register-in-block/11")
2122 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-spill-different-register-in-block/12")
2123 (check-next-stream-line-equal _test-output-stream " }" "F - test-spill-different-register-in-block/13")
2124 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-spill-different-register-in-block/14")
2125 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-spill-different-register-in-block/15")
2126 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-spill-different-register-in-block/16")
2127 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-spill-different-register-in-block/17")
2128 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-spill-different-register-in-block/18")
2129
2130 89/<- %esp 5/r32/ebp
2131 5d/pop-to-ebp
2132 c3/return
2133
2134 test-shadow-live-output:
2135
2136 55/push-ebp
2137 89/<- %ebp 4/r32/esp
2138
2139 (clear-stream _test-input-stream)
2140 (clear-stream $_test-input-buffered-file->buffer)
2141 (clear-stream _test-output-stream)
2142 (clear-stream $_test-output-buffered-file->buffer)
2143
2144 (write _test-input-stream "fn foo -> x/ecx: int {\n")
2145 (write _test-input-stream " x <- copy 3\n")
2146 (write _test-input-stream " {\n")
2147 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2148 (write _test-input-stream " }\n")
2149 (write _test-input-stream " x <- increment\n")
2150 (write _test-input-stream "}\n")
2151
2152 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2153 (flush _test-output-buffered-file)
2154 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2160
2161 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-live-output/0")
2162 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-live-output/1")
2163 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-live-output/2")
2164 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-live-output/3")
2165 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-live-output/4")
2166 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-live-output/5")
2167 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-live-output/7")
2168 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-live-output/8")
2169 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-live-output/9")
2170 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-live-output/10")
2171 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-shadow-live-output/11")
2172 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-live-output/12")
2173 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-live-output/13")
2174 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-live-output/14")
2175 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-live-output/15")
2176 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-live-output/17")
2177 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-live-output/18")
2178 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-live-output/19")
2179 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-live-output/20")
2180 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-live-output/21")
2181 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-live-output/21")
2182
2183 89/<- %esp 5/r32/ebp
2184 5d/pop-to-ebp
2185 c3/return
2186
2187 test-local-clobbered-by-output:
2188
2189
2190 55/push-ebp
2191 89/<- %ebp 4/r32/esp
2192
2193 (clear-stream _test-input-stream)
2194 (clear-stream $_test-input-buffered-file->buffer)
2195 (clear-stream _test-output-stream)
2196 (clear-stream $_test-output-buffered-file->buffer)
2197
2198 (write _test-input-stream "fn foo -> x/ecx: int {\n")
2199 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2200 (write _test-input-stream " x <- copy y\n")
2201 (write _test-input-stream "}\n")
2202
2203 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2204 (flush _test-output-buffered-file)
2205 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2211
2212 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-local-clobbered-by-output/0")
2213 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-local-clobbered-by-output/1")
2214 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-local-clobbered-by-output/2")
2215 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-local-clobbered-by-output/3")
2216 (check-next-stream-line-equal _test-output-stream " {" "F - test-local-clobbered-by-output/4")
2217 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-local-clobbered-by-output/5")
2218 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-local-clobbered-by-output/6")
2219 (check-next-stream-line-equal _test-output-stream " 89/<- %ecx 0x00000001/r32" "F - test-local-clobbered-by-output/7")
2220 (check-next-stream-line-equal _test-output-stream " }" "F - test-local-clobbered-by-output/8")
2221 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-local-clobbered-by-output/9")
2222 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-local-clobbered-by-output/10")
2223 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-local-clobbered-by-output/11")
2224 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-local-clobbered-by-output/12")
2225 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-local-clobbered-by-output/13")
2226
2227 89/<- %esp 5/r32/ebp
2228 5d/pop-to-ebp
2229 c3/return
2230
2231 test-read-output:
2232
2233
2234 55/push-ebp
2235 89/<- %ebp 4/r32/esp
2236
2237 (clear-stream _test-input-stream)
2238 (clear-stream $_test-input-buffered-file->buffer)
2239 (clear-stream _test-output-stream)
2240 (clear-stream $_test-output-buffered-file->buffer)
2241
2242 (write _test-input-stream "fn foo -> x/ecx: int {\n")
2243 (write _test-input-stream " x <- copy 0x34\n")
2244 (write _test-input-stream " compare x, 0x35\n")
2245 (write _test-input-stream "}\n")
2246
2247 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2248 (flush _test-output-buffered-file)
2249 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2255
2256 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-read-output/0")
2257 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-read-output/1")
2258 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-read-output/2")
2259 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-read-output/3")
2260 (check-next-stream-line-equal _test-output-stream " {" "F - test-read-output/4")
2261 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-read-output/5")
2262 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0x34/imm32" "F - test-read-output/6")
2263 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %ecx 0x35/imm32" "F - test-read-output/7")
2264 (check-next-stream-line-equal _test-output-stream " }" "F - test-read-output/8")
2265 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-read-output/9")
2266 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-read-output/10")
2267 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-read-output/11")
2268 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-read-output/12")
2269 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-read-output/13")
2270
2271 89/<- %esp 5/r32/ebp
2272 5d/pop-to-ebp
2273 c3/return
2274
2275 test-convert-function-with-branches-in-block:
2276
2277 55/push-ebp
2278 89/<- %ebp 4/r32/esp
2279
2280 (clear-stream _test-input-stream)
2281 (clear-stream $_test-input-buffered-file->buffer)
2282 (clear-stream _test-output-stream)
2283 (clear-stream $_test-output-buffered-file->buffer)
2284
2285 (write _test-input-stream "fn foo x: int {\n")
2286 (write _test-input-stream " {\n")
2287 (write _test-input-stream " break-if->=\n")
2288 (write _test-input-stream " loop-if-addr<\n")
2289 (write _test-input-stream " increment x\n")
2290 (write _test-input-stream " loop\n")
2291 (write _test-input-stream " }\n")
2292 (write _test-input-stream "}\n")
2293
2294 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2295 (flush _test-output-buffered-file)
2296 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2302
2303 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-in-block/0")
2304 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-in-block/1")
2305 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-in-block/2")
2306 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-in-block/3")
2307 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/4")
2308 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-in-block/5")
2309 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/6")
2310 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-in-block/7")
2311 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/8")
2312 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-in-block/9")
2313 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-in-block/10")
2314 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/11")
2315 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/12")
2316 (check-next-stream-line-equal _test-output-stream " 0f 83/jump-if-addr>= break/disp32" "F - test-convert-function-with-branches-in-block/13")
2317 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:loop/disp32" "F - test-convert-function-with-branches-in-block/14")
2318 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/15")
2319 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-branches-in-block/16")
2320 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-in-block/17")
2321 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/18")
2322 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-in-block/19")
2323 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/20")
2324 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-in-block/21")
2325 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-in-block/22")
2326 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-in-block/23")
2327 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-in-block/24")
2328 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-in-block/25")
2329
2330 89/<- %esp 5/r32/ebp
2331 5d/pop-to-ebp
2332 c3/return
2333
2334 test-convert-function-with-branches-in-named-block:
2335
2336 55/push-ebp
2337 89/<- %ebp 4/r32/esp
2338
2339 (clear-stream _test-input-stream)
2340 (clear-stream $_test-input-buffered-file->buffer)
2341 (clear-stream _test-output-stream)
2342 (clear-stream $_test-output-buffered-file->buffer)
2343
2344 (write _test-input-stream "fn foo x: int {\n")
2345 (write _test-input-stream " $bar: {\n")
2346 (write _test-input-stream " break-if->= $bar\n")
2347 (write _test-input-stream " loop-if-addr< $bar\n")
2348 (write _test-input-stream " increment x\n")
2349 (write _test-input-stream " loop\n")
2350 (write _test-input-stream " }\n")
2351 (write _test-input-stream "}\n")
2352
2353 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2354 (flush _test-output-buffered-file)
2355 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2361
2362 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-in-named-block/0")
2363 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-in-named-block/1")
2364 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-in-named-block/2")
2365 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-in-named-block/3")
2366 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/4")
2367 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-in-named-block/5")
2368 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/6")
2369 (check-next-stream-line-equal _test-output-stream "$bar:loop:" "F - test-convert-function-with-branches-in-named-block/7")
2370 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/8")
2371 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-in-named-block/9")
2372 (check-next-stream-line-equal _test-output-stream " e9/jump $bar:break/disp32" "F - test-convert-function-with-branches-in-named-block/10")
2373 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/11")
2374 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/12")
2375 (check-next-stream-line-equal _test-output-stream " 0f 83/jump-if-addr>= break/disp32" "F - test-convert-function-with-branches-in-named-block/13")
2376 (check-next-stream-line-equal _test-output-stream " e9/jump $bar:loop/disp32" "F - test-convert-function-with-branches-in-named-block/14")
2377 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/15")
2378 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-branches-in-named-block/16")
2379 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-in-named-block/17")
2380 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/18")
2381 (check-next-stream-line-equal _test-output-stream "$bar:break:" "F - test-convert-function-with-branches-in-named-block/19")
2382 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/20")
2383 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-in-named-block/21")
2384 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-in-named-block/22")
2385 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-in-named-block/23")
2386 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-in-named-block/24")
2387 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-in-named-block/25")
2388
2389 89/<- %esp 5/r32/ebp
2390 5d/pop-to-ebp
2391 c3/return
2392
2393 test-convert-function-with-var-in-nested-block:
2394
2395 55/push-ebp
2396 89/<- %ebp 4/r32/esp
2397
2398 (clear-stream _test-input-stream)
2399 (clear-stream $_test-input-buffered-file->buffer)
2400 (clear-stream _test-output-stream)
2401 (clear-stream $_test-output-buffered-file->buffer)
2402
2403 (write _test-input-stream "fn foo x: int {\n")
2404 (write _test-input-stream " {\n")
2405 (write _test-input-stream " {\n")
2406 (write _test-input-stream " var x: int\n")
2407 (write _test-input-stream " increment x\n")
2408 (write _test-input-stream " }\n")
2409 (write _test-input-stream " }\n")
2410 (write _test-input-stream "}\n")
2411
2412 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2413 (flush _test-output-buffered-file)
2414 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2420
2421 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-var-in-nested-block/0")
2422 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-var-in-nested-block/1")
2423 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-var-in-nested-block/2")
2424 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-var-in-nested-block/3")
2425 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/4")
2426 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-var-in-nested-block/5")
2427 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/6")
2428 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-var-in-nested-block/7")
2429 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/8")
2430 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-var-in-nested-block/9")
2431 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-var-in-nested-block/10")
2432 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-var-in-nested-block/11")
2433 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-var-in-nested-block/12")
2434 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/13")
2435 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-var-in-nested-block/14")
2436 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/15")
2437 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-var-in-nested-block/16")
2438 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/17")
2439 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-var-in-nested-block/18")
2440 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-var-in-nested-block/19")
2441 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-var-in-nested-block/20")
2442 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-var-in-nested-block/21")
2443 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-var-in-nested-block/22")
2444
2445 89/<- %esp 5/r32/ebp
2446 5d/pop-to-ebp
2447 c3/return
2448
2449 test-convert-function-with-multiple-vars-in-nested-blocks:
2450
2451 55/push-ebp
2452 89/<- %ebp 4/r32/esp
2453
2454 (clear-stream _test-input-stream)
2455 (clear-stream $_test-input-buffered-file->buffer)
2456 (clear-stream _test-output-stream)
2457 (clear-stream $_test-output-buffered-file->buffer)
2458
2459 (write _test-input-stream "fn foo x: int {\n")
2460 (write _test-input-stream " {\n")
2461 (write _test-input-stream " var x/eax: int <- copy 0\n")
2462 (write _test-input-stream " {\n")
2463 (write _test-input-stream " var y: int\n")
2464 (write _test-input-stream " x <- add y\n")
2465 (write _test-input-stream " }\n")
2466 (write _test-input-stream " }\n")
2467 (write _test-input-stream "}\n")
2468
2469 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2470 (flush _test-output-buffered-file)
2471 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2477
2478 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/0")
2479 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-multiple-vars-in-nested-blocks/1")
2480 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/2")
2481 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/3")
2482 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/4")
2483 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/5")
2484 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/6")
2485 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/7")
2486 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-multiple-vars-in-nested-blocks/8")
2487 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-function-with-multiple-vars-in-nested-blocks/9")
2488 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/10")
2489 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/11")
2490 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-multiple-vars-in-nested-blocks/12")
2491 (check-next-stream-line-equal _test-output-stream " 03/add *(ebp+0xfffffff8) 0x00000000/r32" "F - test-convert-function-with-multiple-vars-in-nested-blocks/13")
2492 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-multiple-vars-in-nested-blocks/14")
2493 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/15")
2494 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/16")
2495 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-multiple-vars-in-nested-blocks/17")
2496 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/18")
2497 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/19")
2498 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/20")
2499 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/21")
2500 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-multiple-vars-in-nested-blocks/22")
2501 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/23")
2502 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/24")
2503 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-multiple-vars-in-nested-blocks/25")
2504
2505 89/<- %esp 5/r32/ebp
2506 5d/pop-to-ebp
2507 c3/return
2508
2509 test-convert-function-with-branches-and-local-vars:
2510
2511
2512
2513
2514 55/push-ebp
2515 89/<- %ebp 4/r32/esp
2516
2517 (clear-stream _test-input-stream)
2518 (clear-stream $_test-input-buffered-file->buffer)
2519 (clear-stream _test-output-stream)
2520 (clear-stream $_test-output-buffered-file->buffer)
2521
2522 (write _test-input-stream "fn foo {\n")
2523 (write _test-input-stream " {\n")
2524 (write _test-input-stream " var x: int\n")
2525 (write _test-input-stream " break-if->=\n")
2526 (write _test-input-stream " increment x\n")
2527 (write _test-input-stream " }\n")
2528 (write _test-input-stream "}\n")
2529
2530 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2531 (flush _test-output-buffered-file)
2532 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2538
2539 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-and-local-vars/0")
2540 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-and-local-vars/1")
2541 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-and-local-vars/2")
2542 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-and-local-vars/3")
2543 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/4")
2544 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-and-local-vars/5")
2545 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/6")
2546 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-and-local-vars/7")
2547 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-branches-and-local-vars/8")
2548 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/9")
2549 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-and-local-vars/10")
2550 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-branches-and-local-vars/11")
2551 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-and-local-vars/12")
2552 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/13")
2553 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-branches-and-local-vars/14")
2554 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-branches-and-local-vars/15")
2555 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/16")
2556 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-and-local-vars/17")
2557 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/18")
2558 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-and-local-vars/19")
2559 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-and-local-vars/20")
2560 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-and-local-vars/21")
2561 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-and-local-vars/22")
2562 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-and-local-vars/23")
2563
2564 89/<- %esp 5/r32/ebp
2565 5d/pop-to-ebp
2566 c3/return
2567
2568 test-convert-function-with-conditional-loops-and-local-vars:
2569
2570
2571
2572
2573 55/push-ebp
2574 89/<- %ebp 4/r32/esp
2575
2576 (clear-stream _test-input-stream)
2577 (clear-stream $_test-input-buffered-file->buffer)
2578 (clear-stream _test-output-stream)
2579 (clear-stream $_test-output-buffered-file->buffer)
2580
2581 (write _test-input-stream "fn foo {\n")
2582 (write _test-input-stream " {\n")
2583 (write _test-input-stream " var x: int\n")
2584 (write _test-input-stream " loop-if->=\n")
2585 (write _test-input-stream " increment x\n")
2586 (write _test-input-stream " }\n")
2587 (write _test-input-stream "}\n")
2588
2589 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2590 (flush _test-output-buffered-file)
2591 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2597
2598 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-conditional-loops-and-local-vars/0")
2599 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-conditional-loops-and-local-vars/1")
2600 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/2")
2601 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-conditional-loops-and-local-vars/3")
2602 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/4")
2603 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-conditional-loops-and-local-vars/5")
2604 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/6")
2605 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-conditional-loops-and-local-vars/7")
2606 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-conditional-loops-and-local-vars/8")
2607 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/9")
2608 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-conditional-loops-and-local-vars/10")
2609 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-conditional-loops-and-local-vars/11")
2610 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:loop/disp32" "F - test-convert-function-with-conditional-loops-and-local-vars/12")
2611 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/13")
2612 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-conditional-loops-and-local-vars/14")
2613 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-conditional-loops-and-local-vars/15")
2614 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/16")
2615 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-conditional-loops-and-local-vars/17")
2616 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/18")
2617 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-conditional-loops-and-local-vars/19")
2618 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-conditional-loops-and-local-vars/20")
2619 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/21")
2620 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/22")
2621 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-conditional-loops-and-local-vars/23")
2622
2623 89/<- %esp 5/r32/ebp
2624 5d/pop-to-ebp
2625 c3/return
2626
2627 test-convert-function-with-unconditional-loops-and-local-vars:
2628
2629
2630
2631
2632 55/push-ebp
2633 89/<- %ebp 4/r32/esp
2634
2635 (clear-stream _test-input-stream)
2636 (clear-stream $_test-input-buffered-file->buffer)
2637 (clear-stream _test-output-stream)
2638 (clear-stream $_test-output-buffered-file->buffer)
2639
2640 (write _test-input-stream "fn foo {\n")
2641 (write _test-input-stream " {\n")
2642 (write _test-input-stream " var x: int\n")
2643 (write _test-input-stream " loop\n")
2644 (write _test-input-stream " increment x\n")
2645 (write _test-input-stream " }\n")
2646 (write _test-input-stream "}\n")
2647
2648 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2649 (flush _test-output-buffered-file)
2650 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2656
2657 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-unconditional-loops-and-local-vars/0")
2658 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-unconditional-loops-and-local-vars/1")
2659 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/2")
2660 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-unconditional-loops-and-local-vars/3")
2661 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-loops-and-local-vars/4")
2662 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-unconditional-loops-and-local-vars/5")
2663 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-loops-and-local-vars/6")
2664 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-unconditional-loops-and-local-vars/7")
2665 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-loops-and-local-vars/8")
2666 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-unconditional-loops-and-local-vars/9")
2667 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-unconditional-loops-and-local-vars/10")
2668
2669 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-loops-and-local-vars/11")
2670 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-unconditional-loops-and-local-vars/12")
2671 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-loops-and-local-vars/13")
2672 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-unconditional-loops-and-local-vars/14")
2673 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-unconditional-loops-and-local-vars/15")
2674 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/16")
2675 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/17")
2676 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-unconditional-loops-and-local-vars/18")
2677
2678 89/<- %esp 5/r32/ebp
2679 5d/pop-to-ebp
2680 c3/return
2681
2682 test-convert-function-with-branches-and-loops-and-local-vars:
2683
2684 55/push-ebp
2685 89/<- %ebp 4/r32/esp
2686
2687 (clear-stream _test-input-stream)
2688 (clear-stream $_test-input-buffered-file->buffer)
2689 (clear-stream _test-output-stream)
2690 (clear-stream $_test-output-buffered-file->buffer)
2691
2692 (write _test-input-stream "fn foo {\n")
2693 (write _test-input-stream " {\n")
2694 (write _test-input-stream " var x: int\n")
2695 (write _test-input-stream " break-if->=\n")
2696 (write _test-input-stream " increment x\n")
2697 (write _test-input-stream " loop\n")
2698 (write _test-input-stream " }\n")
2699 (write _test-input-stream "}\n")
2700
2701 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2702 (flush _test-output-buffered-file)
2703 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2709
2710 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-and-loops-and-local-vars/0")
2711 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-and-loops-and-local-vars/1")
2712 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-and-loops-and-local-vars/2")
2713 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-and-loops-and-local-vars/3")
2714 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/4")
2715 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-and-loops-and-local-vars/5")
2716 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/6")
2717 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-and-loops-and-local-vars/7")
2718 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-branches-and-loops-and-local-vars/8")
2719 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/9")
2720 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-and-loops-and-local-vars/10")
2721 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-branches-and-loops-and-local-vars/11")
2722 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-and-loops-and-local-vars/12")
2723 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/13")
2724 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-branches-and-loops-and-local-vars/14")
2725 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-branches-and-loops-and-local-vars/15")
2726 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-and-loops-and-local-vars/16")
2727 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/17")
2728 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-and-loops-and-local-vars/18")
2729 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/19")
2730 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-and-loops-and-local-vars/20")
2731 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-and-loops-and-local-vars/21")
2732 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-and-loops-and-local-vars/22")
2733 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-and-loops-and-local-vars/23")
2734 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-and-loops-and-local-vars/24")
2735
2736 89/<- %esp 5/r32/ebp
2737 5d/pop-to-ebp
2738 c3/return
2739
2740 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars:
2741
2742 55/push-ebp
2743 89/<- %ebp 4/r32/esp
2744
2745 (clear-stream _test-input-stream)
2746 (clear-stream $_test-input-buffered-file->buffer)
2747 (clear-stream _test-output-stream)
2748 (clear-stream $_test-output-buffered-file->buffer)
2749
2750 (write _test-input-stream "fn foo {\n")
2751 (write _test-input-stream " a: {\n")
2752 (write _test-input-stream " var x: int\n")
2753 (write _test-input-stream " {\n")
2754 (write _test-input-stream " var y: int\n")
2755 (write _test-input-stream " break-if->= a\n")
2756 (write _test-input-stream " increment x\n")
2757 (write _test-input-stream " loop\n")
2758 (write _test-input-stream " }\n")
2759 (write _test-input-stream " }\n")
2760 (write _test-input-stream "}\n")
2761
2762 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2763 (flush _test-output-buffered-file)
2764 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2770
2771 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/0")
2772 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/1")
2773 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/2")
2774 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/3")
2775 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/4")
2776 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/5")
2777 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/6")
2778 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/7")
2779 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/8")
2780 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/9")
2781 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/10")
2782 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/11")
2783 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/12")
2784 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/13")
2785 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/14")
2786 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/15")
2787 (check-next-stream-line-equal _test-output-stream " e9/jump a:break/disp32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/16")
2788 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/17")
2789 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/18")
2790 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/19")
2791 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/20")
2792 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/21")
2793 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/22")
2794 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/23")
2795 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/24")
2796 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/25")
2797 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/26")
2798 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/27")
2799 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/28")
2800 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/29")
2801 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/30")
2802 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/31")
2803
2804 89/<- %esp 5/r32/ebp
2805 5d/pop-to-ebp
2806 c3/return
2807
2808 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2:
2809
2810 55/push-ebp
2811 89/<- %ebp 4/r32/esp
2812
2813 (clear-stream _test-input-stream)
2814 (clear-stream $_test-input-buffered-file->buffer)
2815 (clear-stream _test-output-stream)
2816 (clear-stream $_test-output-buffered-file->buffer)
2817
2818
2819 (write _test-input-stream "fn foo {\n")
2820 (write _test-input-stream " a: {\n")
2821 (write _test-input-stream " var x: int\n")
2822 (write _test-input-stream " {\n")
2823 (write _test-input-stream " break-if->= a\n")
2824 (write _test-input-stream " }\n")
2825 (write _test-input-stream " }\n")
2826 (write _test-input-stream "}\n")
2827
2828 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2829 (flush _test-output-buffered-file)
2830 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2836
2837 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/0")
2838 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/1")
2839 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/2")
2840 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/3")
2841 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/4")
2842 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/5")
2843 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/6")
2844 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/7")
2845 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/8")
2846 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/9")
2847 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/10")
2848 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/11")
2849 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/12")
2850 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/13")
2851 (check-next-stream-line-equal _test-output-stream " e9/jump a:break/disp32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/14")
2852 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/15")
2853 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/16")
2854 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/17")
2855 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/18")
2856 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/19")
2857 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/20")
2858 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/21")
2859 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/22")
2860 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/23")
2861 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/24")
2862 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/25")
2863 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/26")
2864
2865 89/<- %esp 5/r32/ebp
2866 5d/pop-to-ebp
2867 c3/return
2868
2869 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3:
2870
2871 55/push-ebp
2872 89/<- %ebp 4/r32/esp
2873
2874 (clear-stream _test-input-stream)
2875 (clear-stream $_test-input-buffered-file->buffer)
2876 (clear-stream _test-output-stream)
2877 (clear-stream $_test-output-buffered-file->buffer)
2878
2879
2880 (write _test-input-stream "fn foo {\n")
2881 (write _test-input-stream " a: {\n")
2882 (write _test-input-stream " var x: int\n")
2883 (write _test-input-stream " {\n")
2884 (write _test-input-stream " break a\n")
2885 (write _test-input-stream " }\n")
2886 (write _test-input-stream " }\n")
2887 (write _test-input-stream "}\n")
2888
2889 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2890 (flush _test-output-buffered-file)
2891 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2897
2898 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/0")
2899 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/1")
2900 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/2")
2901 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/3")
2902 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/4")
2903 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/5")
2904 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/6")
2905 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/7")
2906 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/8")
2907 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/9")
2908 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/10")
2909 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/11")
2910 (check-next-stream-line-equal _test-output-stream " e9/jump a:break/disp32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/12")
2911 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/14")
2912 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/15")
2913 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/16")
2914 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/17")
2915 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/18")
2916 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/19")
2917 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/20")
2918 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/21")
2919 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/22")
2920 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/23")
2921 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/24")
2922
2923 89/<- %esp 5/r32/ebp
2924 5d/pop-to-ebp
2925 c3/return
2926
2927 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4:
2928
2929 55/push-ebp
2930 89/<- %ebp 4/r32/esp
2931
2932 (clear-stream _test-input-stream)
2933 (clear-stream $_test-input-buffered-file->buffer)
2934 (clear-stream _test-output-stream)
2935 (clear-stream $_test-output-buffered-file->buffer)
2936
2937 (write _test-input-stream "fn foo {\n")
2938 (write _test-input-stream " a: {\n")
2939 (write _test-input-stream " var x/esi: int <- copy 0\n")
2940 (write _test-input-stream " {\n")
2941 (write _test-input-stream " break a\n")
2942 (write _test-input-stream " }\n")
2943 (write _test-input-stream " }\n")
2944 (write _test-input-stream "}\n")
2945
2946 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2947 (flush _test-output-buffered-file)
2948 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2954
2955 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/0")
2956 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/1")
2957 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/2")
2958 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/3")
2959 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/4")
2960 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/5")
2961 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/6")
2962 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/7")
2963 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/8")
2964 (check-next-stream-line-equal _test-output-stream " be/copy-to-esi 0/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/9")
2965 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/10")
2966 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/11")
2967 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/12")
2968 (check-next-stream-line-equal _test-output-stream " e9/jump a:break/disp32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/13")
2969 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/14")
2970 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/15")
2971 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/16")
2972 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/17")
2973 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/18")
2974 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/19")
2975 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/20")
2976 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/21")
2977 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/22")
2978 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/23")
2979 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/24")
2980
2981 89/<- %esp 5/r32/ebp
2982 5d/pop-to-ebp
2983 c3/return
2984
2985 test-convert-function-with-nonlocal-unconditional-break-and-local-vars:
2986
2987 55/push-ebp
2988 89/<- %ebp 4/r32/esp
2989
2990 (clear-stream _test-input-stream)
2991 (clear-stream $_test-input-buffered-file->buffer)
2992 (clear-stream _test-output-stream)
2993 (clear-stream $_test-output-buffered-file->buffer)
2994
2995 (write _test-input-stream "fn foo {\n")
2996 (write _test-input-stream " a: {\n")
2997 (write _test-input-stream " var x: int\n")
2998 (write _test-input-stream " {\n")
2999 (write _test-input-stream " var y: int\n")
3000 (write _test-input-stream " break a\n")
3001 (write _test-input-stream " increment x\n")
3002 (write _test-input-stream " }\n")
3003 (write _test-input-stream " }\n")
3004 (write _test-input-stream "}\n")
3005
3006 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3007 (flush _test-output-buffered-file)
3008 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3014
3015 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/0")
3016 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/1")
3017 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/2")
3018 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/3")
3019 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/4")
3020 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/5")
3021 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/6")
3022 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/7")
3023 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/8")
3024 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/9")
3025 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/10")
3026 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/11")
3027 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/12")
3028 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/13")
3029 (check-next-stream-line-equal _test-output-stream " e9/jump a:break/disp32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/14")
3030 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/15")
3031 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/16")
3032 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/17")
3033 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/18")
3034 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/19")
3035 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/20")
3036 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/21")
3037 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/22")
3038 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/23")
3039 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/24")
3040 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/25")
3041
3042 89/<- %esp 5/r32/ebp
3043 5d/pop-to-ebp
3044 c3/return
3045
3046 test-convert-function-with-unconditional-break-and-local-vars:
3047
3048 55/push-ebp
3049 89/<- %ebp 4/r32/esp
3050
3051 (clear-stream _test-input-stream)
3052 (clear-stream $_test-input-buffered-file->buffer)
3053 (clear-stream _test-output-stream)
3054 (clear-stream $_test-output-buffered-file->buffer)
3055
3056 (write _test-input-stream "fn foo {\n")
3057 (write _test-input-stream " {\n")
3058 (write _test-input-stream " var x: int\n")
3059 (write _test-input-stream " {\n")
3060 (write _test-input-stream " var y: int\n")
3061 (write _test-input-stream " break\n")
3062 (write _test-input-stream " increment x\n")
3063 (write _test-input-stream " }\n")
3064 (write _test-input-stream " }\n")
3065 (write _test-input-stream "}\n")
3066
3067 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3068 (flush _test-output-buffered-file)
3069 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3075
3076 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-unconditional-break-and-local-vars/0")
3077 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-unconditional-break-and-local-vars/1")
3078 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/2")
3079 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-unconditional-break-and-local-vars/3")
3080 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/4")
3081 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/5")
3082 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/6")
3083 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/7")
3084 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-break-and-local-vars/8")
3085 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/9")
3086 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/10")
3087 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-break-and-local-vars/11")
3088 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-unconditional-break-and-local-vars/12")
3089 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/13")
3090 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/14")
3091 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-unconditional-break-and-local-vars/15")
3092 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/16")
3093 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/17")
3094 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/18")
3095 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/19")
3096 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-unconditional-break-and-local-vars/20")
3097 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/21")
3098 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/22")
3099 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-unconditional-break-and-local-vars/23")
3100
3101 89/<- %esp 5/r32/ebp
3102 5d/pop-to-ebp
3103 c3/return
3104
3105 test-convert-function-with-nonlocal-unconditional-loop-and-local-vars:
3106
3107 55/push-ebp
3108 89/<- %ebp 4/r32/esp
3109
3110 (clear-stream _test-input-stream)
3111 (clear-stream $_test-input-buffered-file->buffer)
3112 (clear-stream _test-output-stream)
3113 (clear-stream $_test-output-buffered-file->buffer)
3114
3115 (write _test-input-stream "fn foo {\n")
3116 (write _test-input-stream " a: {\n")
3117 (write _test-input-stream " var x: int\n")
3118 (write _test-input-stream " {\n")
3119 (write _test-input-stream " var y: int\n")
3120 (write _test-input-stream " loop a\n")
3121 (write _test-input-stream " increment x\n")
3122 (write _test-input-stream " }\n")
3123 (write _test-input-stream " }\n")
3124 (write _test-input-stream "}\n")
3125
3126 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3127 (flush _test-output-buffered-file)
3128 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3134
3135 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/0")
3136 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/1")
3137 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/2")
3138 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/3")
3139 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/4")
3140 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/5")
3141 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/6")
3142 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/7")
3143 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/8")
3144 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/9")
3145 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/10")
3146 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/11")
3147 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/12")
3148 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/13")
3149 (check-next-stream-line-equal _test-output-stream " e9/jump a:loop/disp32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/14")
3150 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/15")
3151 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/16")
3152 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/17")
3153 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/18")
3154 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/19")
3155 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/20")
3156 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/21")
3157 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/22")
3158 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/23")
3159 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/24")
3160 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/25")
3161
3162 89/<- %esp 5/r32/ebp
3163 5d/pop-to-ebp
3164 c3/return
3165
3166 test-convert-function-with-local-array-var-in-mem:
3167
3168 55/push-ebp
3169 89/<- %ebp 4/r32/esp
3170
3171 (clear-stream _test-input-stream)
3172 (clear-stream $_test-input-buffered-file->buffer)
3173 (clear-stream _test-output-stream)
3174 (clear-stream $_test-output-buffered-file->buffer)
3175
3176 (write _test-input-stream "fn foo {\n")
3177 (write _test-input-stream " var x: (array int 3)\n")
3178 (write _test-input-stream "}\n")
3179
3180 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3181 (flush _test-output-buffered-file)
3182 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3188
3189 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-array-var-in-mem/0")
3190 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-array-var-in-mem/1")
3191 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-array-var-in-mem/2")
3192 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-array-var-in-mem/3")
3193 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-array-var-in-mem/4")
3194 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-array-var-in-mem/5")
3195
3196 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-function-with-local-array-var-in-mem/7")
3197 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-function-with-local-array-var-in-mem/8")
3198
3199 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000010/imm32" "F - test-convert-function-with-local-array-var-in-mem/9")
3200
3201 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-array-var-in-mem/10")
3202 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-array-var-in-mem/11")
3203 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-array-var-in-mem/12")
3204 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-array-var-in-mem/13")
3205 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-array-var-in-mem/14")
3206 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-array-var-in-mem/15")
3207
3208 89/<- %esp 5/r32/ebp
3209 5d/pop-to-ebp
3210 c3/return
3211
3212
3213 test-convert-function-with-local-array-of-bytes-in-mem:
3214
3215 55/push-ebp
3216 89/<- %ebp 4/r32/esp
3217
3218 (clear-stream _test-input-stream)
3219 (clear-stream $_test-input-buffered-file->buffer)
3220 (clear-stream _test-output-stream)
3221 (clear-stream $_test-output-buffered-file->buffer)
3222
3223 (write _test-input-stream "fn foo {\n")
3224 (write _test-input-stream " var x: (array byte 3)\n")
3225 (write _test-input-stream "}\n")
3226
3227 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3228 (flush _test-output-buffered-file)
3229 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3235
3236 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-array-of-bytes-in-mem/0")
3237 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-array-of-bytes-in-mem/1")
3238 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-array-of-bytes-in-mem/2")
3239 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-array-of-bytes-in-mem/3")
3240 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-array-of-bytes-in-mem/4")
3241 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-array-of-bytes-in-mem/5")
3242
3243 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x00000003)" "F - test-convert-function-with-local-array-of-bytes-in-mem/7")
3244 (check-next-stream-line-equal _test-output-stream " 68/push 0x00000003/imm32" "F - test-convert-function-with-local-array-of-bytes-in-mem/8")
3245
3246 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000007/imm32" "F - test-convert-function-with-local-array-of-bytes-in-mem/9")
3247
3248 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-array-of-bytes-in-mem/10")
3249 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-array-of-bytes-in-mem/11")
3250 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-array-of-bytes-in-mem/12")
3251 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-array-of-bytes-in-mem/13")
3252 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-array-of-bytes-in-mem/14")
3253 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-array-of-bytes-in-mem/15")
3254
3255 89/<- %esp 5/r32/ebp
3256 5d/pop-to-ebp
3257 c3/return
3258
3259 test-convert-address:
3260
3261 55/push-ebp
3262 89/<- %ebp 4/r32/esp
3263
3264 (clear-stream _test-input-stream)
3265 (clear-stream $_test-input-buffered-file->buffer)
3266 (clear-stream _test-output-stream)
3267 (clear-stream $_test-output-buffered-file->buffer)
3268
3269 (write _test-input-stream "fn foo {\n")
3270 (write _test-input-stream " var a: int\n")
3271 (write _test-input-stream " var b/eax: (addr int) <- address a\n")
3272 (write _test-input-stream "}\n")
3273
3274 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3275 (flush _test-output-buffered-file)
3276 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3282
3283 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-address/0")
3284 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-address/1")
3285 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-address/2")
3286 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-address/3")
3287 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-address/4")
3288 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-address/5")
3289 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-address/6")
3290 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-address/7")
3291 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0xfffffffc) 0x00000000/r32" "F - test-convert-address/8")
3292 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-address/9")
3293 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-address/10")
3294 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-address/11")
3295 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-address/12")
3296 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-address/13")
3297 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-address/14")
3298 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-address/15")
3299 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-address/16")
3300
3301 89/<- %esp 5/r32/ebp
3302 5d/pop-to-ebp
3303 c3/return
3304
3305 test-convert-length-of-array:
3306
3307 55/push-ebp
3308 89/<- %ebp 4/r32/esp
3309
3310 (clear-stream _test-input-stream)
3311 (clear-stream $_test-input-buffered-file->buffer)
3312 (clear-stream _test-output-stream)
3313 (clear-stream $_test-output-buffered-file->buffer)
3314
3315 (write _test-input-stream "fn foo a: (addr array int) {\n")
3316 (write _test-input-stream " var b/eax: (addr array int) <- copy a\n")
3317 (write _test-input-stream " var c/eax: int <- length b\n")
3318 (write _test-input-stream "}\n")
3319
3320 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3321 (flush _test-output-buffered-file)
3322 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3328
3329 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array/0")
3330 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array/1")
3331 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array/2")
3332 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array/3")
3333 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array/4")
3334 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array/5")
3335 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array/6")
3336 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-length-of-array/7")
3337 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array/8")
3338 (check-next-stream-line-equal _test-output-stream " c1/shift 5/subop/>> %eax 0x00000002/imm8" "F - test-convert-length-of-array/9")
3339 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array/10")
3340 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array/11")
3341 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array/12")
3342 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array/13")
3343 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array/14")
3344 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array/15")
3345 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array/16")
3346
3347 89/<- %esp 5/r32/ebp
3348 5d/pop-to-ebp
3349 c3/return
3350
3351
3352 test-convert-length-of-array-of-bytes:
3353
3354 55/push-ebp
3355 89/<- %ebp 4/r32/esp
3356
3357 (clear-stream _test-input-stream)
3358 (clear-stream $_test-input-buffered-file->buffer)
3359 (clear-stream _test-output-stream)
3360 (clear-stream $_test-output-buffered-file->buffer)
3361
3362 (write _test-input-stream "fn foo a: (addr array byte) {\n")
3363 (write _test-input-stream " var b/eax: (addr array byte) <- copy a\n")
3364 (write _test-input-stream " var c/eax: int <- length b\n")
3365 (write _test-input-stream "}\n")
3366
3367 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3368 (flush _test-output-buffered-file)
3369 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3375
3376 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-bytes/0")
3377 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-bytes/1")
3378 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-bytes/2")
3379 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-of-bytes/3")
3380 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-bytes/4")
3381 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-bytes/5")
3382 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-of-bytes/6")
3383 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-length-of-array-of-bytes/7")
3384 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array-of-bytes/8")
3385 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-of-bytes/9")
3386 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-bytes/10")
3387 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-bytes/11")
3388 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-bytes/12")
3389 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-of-bytes/13")
3390 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-of-bytes/14")
3391 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-bytes/15")
3392
3393 89/<- %esp 5/r32/ebp
3394 5d/pop-to-ebp
3395 c3/return
3396
3397 test-convert-length-of-array-on-stack:
3398
3399 55/push-ebp
3400 89/<- %ebp 4/r32/esp
3401
3402 (clear-stream _test-input-stream)
3403 (clear-stream $_test-input-buffered-file->buffer)
3404 (clear-stream _test-output-stream)
3405 (clear-stream $_test-output-buffered-file->buffer)
3406
3407 (write _test-input-stream "fn foo {\n")
3408 (write _test-input-stream " var a: (array int 3)\n")
3409 (write _test-input-stream " var b/eax: int <- length a\n")
3410 (write _test-input-stream "}\n")
3411
3412 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3413 (flush _test-output-buffered-file)
3414 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3420
3421 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-on-stack/0")
3422 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-on-stack/1")
3423 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-on-stack/2")
3424 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-on-stack/3")
3425 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-on-stack/4")
3426 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-on-stack/5")
3427
3428 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-length-of-array-on-stack/6")
3429 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-length-of-array-on-stack/7")
3430 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-on-stack/8")
3431 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0xfffffff0) 0x00000000/r32" "F - test-convert-length-of-array-on-stack/9")
3432 (check-next-stream-line-equal _test-output-stream " c1/shift 5/subop/>> %eax 0x00000002/imm8" "F - test-convert-length-of-array-on-stack/10")
3433 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-on-stack/11")
3434 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000010/imm32" "F - test-convert-length-of-array-on-stack/12")
3435 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-on-stack/13")
3436 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-on-stack/14")
3437 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-on-stack/15")
3438 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-on-stack/16")
3439 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-on-stack/17")
3440 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-on-stack/18")
3441
3442 89/<- %esp 5/r32/ebp
3443 5d/pop-to-ebp
3444 c3/return
3445
3446 test-convert-index-into-array:
3447
3448 55/push-ebp
3449 89/<- %ebp 4/r32/esp
3450
3451 (clear-stream _test-input-stream)
3452 (clear-stream $_test-input-buffered-file->buffer)
3453 (clear-stream _test-output-stream)
3454 (clear-stream $_test-output-buffered-file->buffer)
3455
3456 (write _test-input-stream "fn foo {\n")
3457 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
3458 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
3459 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
3460 (write _test-input-stream "}\n")
3461
3462 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3463 (flush _test-output-buffered-file)
3464 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3470
3471 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array/0")
3472 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array/1")
3473 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array/2")
3474 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array/3")
3475 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array/4")
3476 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array/5")
3477 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array/6")
3478 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array/7")
3479 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array/8")
3480 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array/9")
3481 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx<<0x00000002 + 4) 0x00000000/r32" "F - test-convert-index-into-array/11")
3482 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array/13")
3483 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array/14")
3484 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array/15")
3485 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array/16")
3486 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array/17")
3487 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array/18")
3488 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array/19")
3489 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array/20")
3490
3491 89/<- %esp 5/r32/ebp
3492 5d/pop-to-ebp
3493 c3/return
3494
3495 test-convert-index-into-array-of-bytes:
3496
3497 55/push-ebp
3498 89/<- %ebp 4/r32/esp
3499
3500 (clear-stream _test-input-stream)
3501 (clear-stream $_test-input-buffered-file->buffer)
3502 (clear-stream _test-output-stream)
3503 (clear-stream $_test-output-buffered-file->buffer)
3504
3505 (write _test-input-stream "fn foo {\n")
3506 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
3507 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
3508 (write _test-input-stream " var x/eax: (addr byte) <- index arr, idx\n")
3509 (write _test-input-stream "}\n")
3510
3511 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3512 (flush _test-output-buffered-file)
3513 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3519
3520 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes/0")
3521 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes/1")
3522 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes/2")
3523 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes/3")
3524 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes/4")
3525 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes/5")
3526 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes/6")
3527 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-of-bytes/7")
3528 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-of-bytes/8")
3529 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array-of-bytes/9")
3530 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx<<0x00000000 + 4) 0x00000000/r32" "F - test-convert-index-into-array-of-bytes/11")
3531 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-of-bytes/13")
3532 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes/14")
3533 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes/15")
3534 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes/16")
3535 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes/17")
3536 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes/18")
3537 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes/19")
3538 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes/20")
3539
3540 89/<- %esp 5/r32/ebp
3541 5d/pop-to-ebp
3542 c3/return
3543
3544 test-convert-index-into-array-with-literal:
3545
3546 55/push-ebp
3547 89/<- %ebp 4/r32/esp
3548
3549 (clear-stream _test-input-stream)
3550 (clear-stream $_test-input-buffered-file->buffer)
3551 (clear-stream _test-output-stream)
3552 (clear-stream $_test-output-buffered-file->buffer)
3553
3554 (write _test-input-stream "fn foo {\n")
3555 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
3556 (write _test-input-stream " var x/eax: (addr int) <- index arr, 2\n")
3557 (write _test-input-stream "}\n")
3558
3559 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3560 (flush _test-output-buffered-file)
3561 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3567
3568 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-with-literal/0")
3569 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-with-literal/1")
3570 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-with-literal/2")
3571 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-with-literal/3")
3572 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-with-literal/4")
3573 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-with-literal/5")
3574 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-with-literal/6")
3575 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-with-literal/7")
3576
3577 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x0000000c) 0x00000000/r32" "F - test-convert-index-into-array-with-literal/8")
3578 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-with-literal/9")
3579 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-with-literal/10")
3580 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-with-literal/11")
3581 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-with-literal/12")
3582 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-with-literal/13")
3583 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-with-literal/14")
3584 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-with-literal/15")
3585
3586 89/<- %esp 5/r32/ebp
3587 5d/pop-to-ebp
3588 c3/return
3589
3590 test-convert-index-into-array-of-bytes-with-literal:
3591
3592 55/push-ebp
3593 89/<- %ebp 4/r32/esp
3594
3595 (clear-stream _test-input-stream)
3596 (clear-stream $_test-input-buffered-file->buffer)
3597 (clear-stream _test-output-stream)
3598 (clear-stream $_test-output-buffered-file->buffer)
3599
3600 (write _test-input-stream "fn foo {\n")
3601 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
3602 (write _test-input-stream " var x/eax: (addr byte) <- index arr, 2\n")
3603 (write _test-input-stream "}\n")
3604
3605 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3606 (flush _test-output-buffered-file)
3607 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3613
3614 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-with-literal/0")
3615 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-with-literal/1")
3616 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-with-literal/2")
3617 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes-with-literal/3")
3618 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-with-literal/4")
3619 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-with-literal/5")
3620 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes-with-literal/6")
3621 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-of-bytes-with-literal/7")
3622
3623 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x00000006) 0x00000000/r32" "F - test-convert-index-into-array-of-bytes-with-literal/8")
3624 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-with-literal/9")
3625 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-with-literal/10")
3626 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-with-literal/11")
3627 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-with-literal/12")
3628 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-with-literal/13")
3629 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-with-literal/14")
3630 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-with-literal/15")
3631
3632 89/<- %esp 5/r32/ebp
3633 5d/pop-to-ebp
3634 c3/return
3635
3636 test-convert-index-into-array-on-stack:
3637
3638 55/push-ebp
3639 89/<- %ebp 4/r32/esp
3640
3641 (clear-stream _test-input-stream)
3642 (clear-stream $_test-input-buffered-file->buffer)
3643 (clear-stream _test-output-stream)
3644 (clear-stream $_test-output-buffered-file->buffer)
3645
3646 (write _test-input-stream "fn foo {\n")
3647 (write _test-input-stream " var arr: (array int 3)\n")
3648 (write _test-input-stream " var idx/eax: int <- copy 2\n")
3649 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
3650 (write _test-input-stream "}\n")
3651
3652 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3653 (flush _test-output-buffered-file)
3654 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3660
3661 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-on-stack/0")
3662 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-on-stack/1")
3663 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-on-stack/2")
3664 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-on-stack/3")
3665 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-on-stack/4")
3666 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-on-stack/5")
3667
3668 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-index-into-array-on-stack/6")
3669 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-index-into-array-on-stack/7")
3670
3671 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-on-stack/8")
3672 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 2/imm32" "F - test-convert-index-into-array-on-stack/9")
3673
3674 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp + eax<<0x00000002 + 0xfffffff4) 0x00000000/r32" "F - test-convert-index-into-array-on-stack/10")
3675
3676 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-on-stack/11")
3677
3678 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000010/imm32" "F - test-convert-index-into-array-on-stack/12")
3679
3680 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-on-stack/13")
3681 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-on-stack/14")
3682 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-on-stack/15")
3683 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-on-stack/16")
3684 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-on-stack/17")
3685 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-on-stack/18")
3686
3687 89/<- %esp 5/r32/ebp
3688 5d/pop-to-ebp
3689 c3/return
3690
3691 test-convert-index-into-array-on-stack-with-literal:
3692
3693 55/push-ebp
3694 89/<- %ebp 4/r32/esp
3695
3696 (clear-stream _test-input-stream)
3697 (clear-stream $_test-input-buffered-file->buffer)
3698 (clear-stream _test-output-stream)
3699 (clear-stream $_test-output-buffered-file->buffer)
3700
3701 (write _test-input-stream "fn foo {\n")
3702 (write _test-input-stream " var arr: (array int 3)\n")
3703 (write _test-input-stream " var x/eax: (addr int) <- index arr, 2\n")
3704 (write _test-input-stream "}\n")
3705
3706 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3707 (flush _test-output-buffered-file)
3708 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3714
3715 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-on-stack-with-literal/0")
3716 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-on-stack-with-literal/1")
3717 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-on-stack-with-literal/2")
3718 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-on-stack-with-literal/3")
3719 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-on-stack-with-literal/4")
3720 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-on-stack-with-literal/5")
3721
3722 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-index-into-array-on-stack-with-literal/6")
3723 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-index-into-array-on-stack-with-literal/7")
3724
3725 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-on-stack-with-literal/8")
3726
3727 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp + 0xfffffffc) 0x00000000/r32" "F - test-convert-index-into-array-on-stack-with-literal/9")
3728
3729 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-on-stack-with-literal/10")
3730
3731 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000010/imm32" "F - test-convert-index-into-array-on-stack-with-literal/11")
3732
3733 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-on-stack-with-literal/12")
3734 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-on-stack-with-literal/13")
3735 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-on-stack-with-literal/14")
3736 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-on-stack-with-literal/15")
3737 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-on-stack-with-literal/16")
3738 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-on-stack-with-literal/17")
3739
3740 89/<- %esp 5/r32/ebp
3741 5d/pop-to-ebp
3742 c3/return
3743
3744 test-convert-index-into-array-of-bytes-on-stack-with-literal:
3745
3746 55/push-ebp
3747 89/<- %ebp 4/r32/esp
3748
3749 (clear-stream _test-input-stream)
3750 (clear-stream $_test-input-buffered-file->buffer)
3751 (clear-stream _test-output-stream)
3752 (clear-stream $_test-output-buffered-file->buffer)
3753
3754 (write _test-input-stream "fn foo {\n")
3755 (write _test-input-stream " var arr: (array byte 3)\n")
3756 (write _test-input-stream " var x/eax: (addr byte) <- index arr, 2\n")
3757 (write _test-input-stream "}\n")
3758
3759 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3760 (flush _test-output-buffered-file)
3761 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3767
3768 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/0")
3769 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/1")
3770 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/2")
3771 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/3")
3772 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/4")
3773 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/5")
3774
3775 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x00000003)" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/6")
3776 (check-next-stream-line-equal _test-output-stream " 68/push 0x00000003/imm32" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/7")
3777
3778 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/8")
3779
3780 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp + 0xffffffff) 0x00000000/r32" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/9")
3781
3782 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/10")
3783
3784 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000007/imm32" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/11")
3785
3786 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/12")
3787 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/13")
3788 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/14")
3789 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/15")
3790 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/16")
3791 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/17")
3792
3793 89/<- %esp 5/r32/ebp
3794 5d/pop-to-ebp
3795 c3/return
3796
3797 test-convert-index-into-array-using-offset:
3798
3799 55/push-ebp
3800 89/<- %ebp 4/r32/esp
3801
3802 (clear-stream _test-input-stream)
3803 (clear-stream $_test-input-buffered-file->buffer)
3804 (clear-stream _test-output-stream)
3805 (clear-stream $_test-output-buffered-file->buffer)
3806
3807 (write _test-input-stream "fn foo {\n")
3808 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
3809 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
3810 (write _test-input-stream " var off/ecx: (offset int) <- compute-offset arr, idx\n")
3811 (write _test-input-stream " var x/eax: (addr int) <- index arr, off\n")
3812 (write _test-input-stream "}\n")
3813
3814 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3815 (flush _test-output-buffered-file)
3816 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3822
3823 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-using-offset/0")
3824 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-using-offset/1")
3825 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-using-offset/2")
3826 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-using-offset/3")
3827 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-using-offset/4")
3828 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-using-offset/5")
3829 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-using-offset/6")
3830 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-using-offset/7")
3831 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-using-offset/8")
3832 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array-using-offset/9")
3833 (check-next-stream-line-equal _test-output-stream " 69/multiply %ecx 0x00000004/imm32 0x00000001/r32" "F - test-convert-index-into-array-using-offset/10")
3834 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx + 4) 0x00000000/r32" "F - test-convert-index-into-array-using-offset/11")
3835 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-using-offset/12")
3836 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-using-offset/13")
3837 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-using-offset/14")
3838 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-using-offset/15")
3839 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-using-offset/16")
3840 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-using-offset/17")
3841 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-using-offset/18")
3842 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-using-offset/19")
3843
3844 89/<- %esp 5/r32/ebp
3845 5d/pop-to-ebp
3846 c3/return
3847
3848 test-convert-index-into-array-of-bytes-using-offset:
3849
3850 55/push-ebp
3851 89/<- %ebp 4/r32/esp
3852
3853 (clear-stream _test-input-stream)
3854 (clear-stream $_test-input-buffered-file->buffer)
3855 (clear-stream _test-output-stream)
3856 (clear-stream $_test-output-buffered-file->buffer)
3857
3858 (write _test-input-stream "fn foo {\n")
3859 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
3860 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
3861 (write _test-input-stream " var off/ecx: (offset byte) <- compute-offset arr, idx\n")
3862 (write _test-input-stream " var x/eax: (addr byte) <- index arr, off\n")
3863 (write _test-input-stream "}\n")
3864
3865 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3866 (flush _test-output-buffered-file)
3867 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3873
3874 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-using-offset/0")
3875 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-using-offset/1")
3876 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-using-offset/2")
3877 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes-using-offset/3")
3878 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-using-offset/4")
3879 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-using-offset/5")
3880 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes-using-offset/6")
3881 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-of-bytes-using-offset/7")
3882 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-of-bytes-using-offset/8")
3883 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array-of-bytes-using-offset/9")
3884 (check-next-stream-line-equal _test-output-stream " 69/multiply %ecx 0x00000001/imm32 0x00000001/r32" "F - test-convert-index-into-array-of-bytes-using-offset/10")
3885 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx + 4) 0x00000000/r32" "F - test-convert-index-into-array-of-bytes-using-offset/11")
3886 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-of-bytes-using-offset/12")
3887 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-using-offset/13")
3888 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-using-offset/14")
3889 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-using-offset/15")
3890 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-using-offset/16")
3891 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-using-offset/17")
3892 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-using-offset/18")
3893 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-using-offset/19")
3894
3895 89/<- %esp 5/r32/ebp
3896 5d/pop-to-ebp
3897 c3/return
3898
3899 test-convert-index-into-array-using-offset-on-stack:
3900
3901 55/push-ebp
3902 89/<- %ebp 4/r32/esp
3903
3904 (clear-stream _test-input-stream)
3905 (clear-stream $_test-input-buffered-file->buffer)
3906 (clear-stream _test-output-stream)
3907 (clear-stream $_test-output-buffered-file->buffer)
3908
3909 (write _test-input-stream "fn foo {\n")
3910 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
3911 (write _test-input-stream " var idx: int\n")
3912 (write _test-input-stream " var off/ecx: (offset int) <- compute-offset arr, idx\n")
3913 (write _test-input-stream " var x/eax: (addr int) <- index arr, off\n")
3914 (write _test-input-stream "}\n")
3915
3916 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3917 (flush _test-output-buffered-file)
3918 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3924
3925 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-using-offset-on-stack/0")
3926 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-using-offset-on-stack/1")
3927 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-using-offset-on-stack/2")
3928 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-using-offset-on-stack/3")
3929 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-using-offset-on-stack/4")
3930 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-using-offset-on-stack/5")
3931 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-using-offset-on-stack/6")
3932 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-using-offset-on-stack/7")
3933 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-index-into-array-using-offset-on-stack/8")
3934 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-using-offset-on-stack/9")
3935 (check-next-stream-line-equal _test-output-stream " 69/multiply *(ebp+0xfffffff8) 0x00000004/imm32 0x00000001/r32" "F - test-convert-index-into-array-using-offset-on-stack/10")
3936 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx + 4) 0x00000000/r32" "F - test-convert-index-into-array-using-offset-on-stack/11")
3937 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-using-offset-on-stack/12")
3938 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-index-into-array-using-offset-on-stack/13")
3939 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-using-offset-on-stack/14")
3940 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-using-offset-on-stack/15")
3941 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-using-offset-on-stack/16")
3942 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-using-offset-on-stack/17")
3943 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-using-offset-on-stack/18")
3944 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-using-offset-on-stack/19")
3945 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-using-offset-on-stack/20")
3946
3947 89/<- %esp 5/r32/ebp
3948 5d/pop-to-ebp
3949 c3/return
3950
3951 test-convert-index-into-array-of-bytes-using-offset-on-stack:
3952
3953 55/push-ebp
3954 89/<- %ebp 4/r32/esp
3955
3956 (clear-stream _test-input-stream)
3957 (clear-stream $_test-input-buffered-file->buffer)
3958 (clear-stream _test-output-stream)
3959 (clear-stream $_test-output-buffered-file->buffer)
3960
3961 (write _test-input-stream "fn foo {\n")
3962 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
3963 (write _test-input-stream " var idx: int\n")
3964 (write _test-input-stream " var off/ecx: (offset byte) <- compute-offset arr, idx\n")
3965 (write _test-input-stream " var x/eax: (addr byte) <- index arr, off\n")
3966 (write _test-input-stream "}\n")
3967
3968 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3969 (flush _test-output-buffered-file)
3970 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3976
3977 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/0")
3978 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/1")
3979 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/2")
3980 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/3")
3981 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/4")
3982 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/5")
3983 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/6")
3984 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/7")
3985 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/8")
3986 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/9")
3987 (check-next-stream-line-equal _test-output-stream " 69/multiply *(ebp+0xfffffff8) 0x00000001/imm32 0x00000001/r32" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/10")
3988 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx + 4) 0x00000000/r32" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/11")
3989 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/12")
3990 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/13")
3991 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/14")
3992 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/15")
3993 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/16")
3994 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/17")
3995 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/18")
3996 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/19")
3997 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/20")
3998
3999 89/<- %esp 5/r32/ebp
4000 5d/pop-to-ebp
4001 c3/return
4002
4003 test-convert-function-and-type-definition:
4004
4005 55/push-ebp
4006 89/<- %ebp 4/r32/esp
4007
4008 (clear-stream _test-input-stream)
4009 (clear-stream $_test-input-buffered-file->buffer)
4010 (clear-stream _test-output-stream)
4011 (clear-stream $_test-output-buffered-file->buffer)
4012
4013 (write _test-input-stream "fn foo a: (addr t) {\n")
4014 (write _test-input-stream " var _a/eax: (addr t) <- copy a\n")
4015 (write _test-input-stream " var b/ecx: (addr int) <- get _a, x\n")
4016 (write _test-input-stream " var c/ecx: (addr int) <- get _a, y\n")
4017 (write _test-input-stream "}\n")
4018 (write _test-input-stream "type t {\n")
4019 (write _test-input-stream " x: int\n")
4020 (write _test-input-stream " y: int\n")
4021 (write _test-input-stream "}\n")
4022
4023 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4024 (flush _test-output-buffered-file)
4025 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4031
4032 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-and-type-definition/0")
4033 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-and-type-definition/1")
4034 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-and-type-definition/2")
4035 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-and-type-definition/3")
4036 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-and-type-definition/4")
4037 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-and-type-definition/5")
4038 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-and-type-definition/6")
4039 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-and-type-definition/7")
4040 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-and-type-definition/8")
4041 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x00000000) 0x00000001/r32" "F - test-convert-function-and-type-definition/9")
4042 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x00000004) 0x00000001/r32" "F - test-convert-function-and-type-definition/11")
4043 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-and-type-definition/13")
4044 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-and-type-definition/14")
4045 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-and-type-definition/15")
4046 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-and-type-definition/16")
4047 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-and-type-definition/17")
4048 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-and-type-definition/18")
4049 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-and-type-definition/19")
4050 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-and-type-definition/20")
4051
4052 89/<- %esp 5/r32/ebp
4053 5d/pop-to-ebp
4054 c3/return
4055
4056 test-convert-function-with-local-var-with-user-defined-type:
4057
4058 55/push-ebp
4059 89/<- %ebp 4/r32/esp
4060
4061 (clear-stream _test-input-stream)
4062 (clear-stream $_test-input-buffered-file->buffer)
4063 (clear-stream _test-output-stream)
4064 (clear-stream $_test-output-buffered-file->buffer)
4065
4066 (write _test-input-stream "fn foo {\n")
4067 (write _test-input-stream " var a: t\n")
4068 (write _test-input-stream "}\n")
4069 (write _test-input-stream "type t {\n")
4070 (write _test-input-stream " x: int\n")
4071 (write _test-input-stream " y: int\n")
4072 (write _test-input-stream "}\n")
4073
4074 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4075 (flush _test-output-buffered-file)
4076 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4082
4083 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-with-user-defined-type/0")
4084 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-with-user-defined-type/1")
4085 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-with-user-defined-type/2")
4086 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-with-user-defined-type/3")
4087 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-with-user-defined-type/4")
4088 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-with-user-defined-type/5")
4089 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-with-user-defined-type/6")
4090 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-with-user-defined-type/7")
4091 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000008/imm32" "F - test-convert-function-with-local-var-with-user-defined-type/8")
4092 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-with-user-defined-type/9")
4093 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-with-user-defined-type/10")
4094 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-with-user-defined-type/11")
4095 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-with-user-defined-type/12")
4096 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-with-user-defined-type/13")
4097 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-with-user-defined-type/14")
4098
4099 89/<- %esp 5/r32/ebp
4100 5d/pop-to-ebp
4101 c3/return
4102
4103 test-convert-function-call-with-arg-of-user-defined-type:
4104
4105 55/push-ebp
4106 89/<- %ebp 4/r32/esp
4107
4108 (clear-stream _test-input-stream)
4109 (clear-stream $_test-input-buffered-file->buffer)
4110 (clear-stream _test-output-stream)
4111 (clear-stream $_test-output-buffered-file->buffer)
4112
4113 (write _test-input-stream "fn f {\n")
4114 (write _test-input-stream " var a: t\n")
4115 (write _test-input-stream " foo a\n")
4116 (write _test-input-stream "}\n")
4117 (write _test-input-stream "fn foo x: t {\n")
4118 (write _test-input-stream "}\n")
4119 (write _test-input-stream "type t {\n")
4120 (write _test-input-stream " x: int\n")
4121 (write _test-input-stream " y: int\n")
4122 (write _test-input-stream "}\n")
4123
4124 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4125 (flush _test-output-buffered-file)
4126 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4132
4133 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type/0")
4134 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/1")
4135 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/2")
4136 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-arg-of-user-defined-type/3")
4137 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type/4")
4138 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-arg-of-user-defined-type/5")
4139
4140 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type/6")
4141 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type/7")
4142
4143 (check-next-stream-line-equal _test-output-stream " (foo *(ebp+0xfffffff8) *(ebp+0xfffffffc))" "F - test-convert-function-call-with-arg-of-user-defined-type/8")
4144
4145 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000008/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type/9")
4146 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type/10")
4147 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-arg-of-user-defined-type/11")
4148 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/12")
4149 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/13")
4150 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/14")
4151 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/15")
4152 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type/16")
4153 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/17")
4154 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/18")
4155 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-arg-of-user-defined-type/19")
4156 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/20")
4157 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/21")
4158 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/22")
4159 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/23")
4160
4161 89/<- %esp 5/r32/ebp
4162 5d/pop-to-ebp
4163 c3/return
4164
4165 test-convert-function-call-with-arg-of-user-defined-type-register-indirect:
4166
4167 55/push-ebp
4168 89/<- %ebp 4/r32/esp
4169
4170 (clear-stream _test-input-stream)
4171 (clear-stream $_test-input-buffered-file->buffer)
4172 (clear-stream _test-output-stream)
4173 (clear-stream $_test-output-buffered-file->buffer)
4174
4175 (write _test-input-stream "fn f {\n")
4176 (write _test-input-stream " var a/eax: (addr t) <- copy 0\n")
4177 (write _test-input-stream " foo *a\n")
4178 (write _test-input-stream "}\n")
4179 (write _test-input-stream "fn foo x: t {\n")
4180 (write _test-input-stream "}\n")
4181 (write _test-input-stream "type t {\n")
4182 (write _test-input-stream " x: int\n")
4183 (write _test-input-stream " y: int\n")
4184 (write _test-input-stream "}\n")
4185
4186 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4187 (flush _test-output-buffered-file)
4188 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4194
4195 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type/0")
4196 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/1")
4197 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/2")
4198 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-arg-of-user-defined-type/3")
4199 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type/4")
4200 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-arg-of-user-defined-type/5")
4201
4202 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-call-with-arg-of-user-defined-type/6")
4203 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type/7")
4204
4205 (check-next-stream-line-equal _test-output-stream " (foo *(eax+0x00000000) *(eax+0x00000004))" "F - test-convert-function-call-with-arg-of-user-defined-type/8")
4206
4207 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-call-with-arg-of-user-defined-type/9")
4208 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type/10")
4209 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-arg-of-user-defined-type/11")
4210 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/12")
4211 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/13")
4212 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/14")
4213 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/15")
4214 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type/16")
4215 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/17")
4216 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/18")
4217 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-arg-of-user-defined-type/19")
4218 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/20")
4219 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/21")
4220 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/22")
4221 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/23")
4222
4223 89/<- %esp 5/r32/ebp
4224 5d/pop-to-ebp
4225 c3/return
4226
4227
4228
4229 test-convert-function-call-with-arg-of-user-defined-type-by-reference:
4230
4231 55/push-ebp
4232 89/<- %ebp 4/r32/esp
4233
4234 (clear-stream _test-input-stream)
4235 (clear-stream $_test-input-buffered-file->buffer)
4236 (clear-stream _test-output-stream)
4237 (clear-stream $_test-output-buffered-file->buffer)
4238
4239 (write _test-input-stream "fn f {\n")
4240 (write _test-input-stream " var a: t\n")
4241 (write _test-input-stream " var b/eax: (addr t) <- address a\n")
4242 (write _test-input-stream " foo b\n")
4243 (write _test-input-stream "}\n")
4244 (write _test-input-stream "fn foo x: (addr t) {\n")
4245 (write _test-input-stream " var x/ecx: (addr int) <- copy x\n")
4246 (write _test-input-stream " increment *x\n")
4247 (write _test-input-stream "}\n")
4248 (write _test-input-stream "type t {\n")
4249 (write _test-input-stream " x: int\n")
4250 (write _test-input-stream " y: int\n")
4251 (write _test-input-stream "}\n")
4252
4253 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4254 (flush _test-output-buffered-file)
4255 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4261
4262 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/0")
4263 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/1")
4264 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/2")
4265 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/3")
4266 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/4")
4267 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/5")
4268
4269 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/6")
4270 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/7")
4271
4272 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/8")
4273 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0xfffffff8) 0x00000000/r32" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/9")
4274
4275 (check-next-stream-line-equal _test-output-stream " (foo %eax)" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/10")
4276
4277 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/11")
4278 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000008/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/12")
4279 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/13")
4280 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/14")
4281 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/15")
4282 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/16")
4283 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/17")
4284 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/18")
4285 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/19")
4286 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/20")
4287 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/21")
4288 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/22")
4289 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/23")
4290 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/24")
4291 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/25")
4292 (check-next-stream-line-equal _test-output-stream " 89/<- %ecx 0x00000001/r32" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/26")
4293 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *ecx" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/27")
4294 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/28")
4295 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/29")
4296 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/30")
4297 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/31")
4298 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/32")
4299 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/33")
4300 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/34")
4301
4302 89/<- %esp 5/r32/ebp
4303 5d/pop-to-ebp
4304 c3/return
4305
4306 test-convert-get-on-local-variable:
4307
4308 55/push-ebp
4309 89/<- %ebp 4/r32/esp
4310
4311 (clear-stream _test-input-stream)
4312 (clear-stream $_test-input-buffered-file->buffer)
4313 (clear-stream _test-output-stream)
4314 (clear-stream $_test-output-buffered-file->buffer)
4315
4316 (write _test-input-stream "fn foo {\n")
4317 (write _test-input-stream " var a: t\n")
4318 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
4319 (write _test-input-stream "}\n")
4320 (write _test-input-stream "type t {\n")
4321 (write _test-input-stream " x: int\n")
4322 (write _test-input-stream " y: int\n")
4323 (write _test-input-stream "}\n")
4324
4325 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4326 (flush _test-output-buffered-file)
4327 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4333
4334 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-local-variable/0")
4335 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-local-variable/1")
4336 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-local-variable/2")
4337 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-local-variable/3")
4338 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-local-variable/4")
4339 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-local-variable/5")
4340
4341 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-get-on-local-variable/6")
4342 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-get-on-local-variable/7")
4343
4344 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-local-variable/8")
4345
4346 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0xfffffffc) 0x00000001/r32" "F - test-convert-get-on-local-variable/9")
4347
4348 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-local-variable/10")
4349
4350 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000008/imm32" "F - test-convert-get-on-local-variable/11")
4351 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-local-variable/12")
4352 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-local-variable/13")
4353 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-local-variable/14")
4354 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-local-variable/15")
4355 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-local-variable/16")
4356 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-local-variable/17")
4357
4358 89/<- %esp 5/r32/ebp
4359 5d/pop-to-ebp
4360 c3/return
4361
4362 test-convert-get-on-function-argument:
4363
4364 55/push-ebp
4365 89/<- %ebp 4/r32/esp
4366
4367 (clear-stream _test-input-stream)
4368 (clear-stream $_test-input-buffered-file->buffer)
4369 (clear-stream _test-output-stream)
4370 (clear-stream $_test-output-buffered-file->buffer)
4371
4372 (write _test-input-stream "fn foo a: t {\n")
4373 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
4374 (write _test-input-stream "}\n")
4375 (write _test-input-stream "type t {\n")
4376 (write _test-input-stream " x: int\n")
4377 (write _test-input-stream " y: int\n")
4378 (write _test-input-stream "}\n")
4379
4380 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4381 (flush _test-output-buffered-file)
4382 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4388
4389 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-function-argument/0")
4390 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-function-argument/1")
4391 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-function-argument/2")
4392 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-function-argument/3")
4393 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-function-argument/4")
4394 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-function-argument/5")
4395
4396 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-function-argument/6")
4397
4398 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0x0000000c) 0x00000001/r32" "F - test-convert-get-on-function-argument/7")
4399
4400 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-function-argument/8")
4401 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-function-argument/9")
4402 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-function-argument/10")
4403 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-function-argument/11")
4404 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-function-argument/12")
4405 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-function-argument/13")
4406 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-function-argument/14")
4407
4408 89/<- %esp 5/r32/ebp
4409 5d/pop-to-ebp
4410 c3/return
4411
4412 test-convert-get-on-function-argument-with-known-type:
4413
4414 55/push-ebp
4415 89/<- %ebp 4/r32/esp
4416
4417 (clear-stream _test-input-stream)
4418 (clear-stream $_test-input-buffered-file->buffer)
4419 (clear-stream _test-output-stream)
4420 (clear-stream $_test-output-buffered-file->buffer)
4421
4422 (write _test-input-stream "type t {\n")
4423 (write _test-input-stream " x: int\n")
4424 (write _test-input-stream " y: int\n")
4425 (write _test-input-stream "}\n")
4426 (write _test-input-stream "fn foo a: t {\n")
4427 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
4428 (write _test-input-stream "}\n")
4429
4430 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4431 (flush _test-output-buffered-file)
4432 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4438
4439 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-function-argument-with-known-type/0")
4440 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-function-argument-with-known-type/1")
4441 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-function-argument-with-known-type/2")
4442 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-function-argument-with-known-type/3")
4443 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-function-argument-with-known-type/4")
4444 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-function-argument-with-known-type/5")
4445
4446 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-function-argument-with-known-type/6")
4447
4448 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0x0000000c) 0x00000001/r32" "F - test-convert-get-on-function-argument-with-known-type/7")
4449
4450 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-function-argument-with-known-type/8")
4451 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-function-argument-with-known-type/9")
4452 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-function-argument-with-known-type/10")
4453 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-function-argument-with-known-type/11")
4454 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-function-argument-with-known-type/12")
4455 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-function-argument-with-known-type/13")
4456 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-function-argument-with-known-type/14")
4457
4458 89/<- %esp 5/r32/ebp
4459 5d/pop-to-ebp
4460 c3/return
4461
4462 test-get-with-wrong-field:
4463
4464 55/push-ebp
4465 89/<- %ebp 4/r32/esp
4466
4467 (clear-stream _test-input-stream)
4468 (clear-stream $_test-input-buffered-file->buffer)
4469 (clear-stream _test-output-stream)
4470 (clear-stream $_test-output-buffered-file->buffer)
4471 (clear-stream _test-error-stream)
4472 (clear-stream $_test-error-buffered-file->buffer)
4473
4474 68/push 0/imm32
4475 68/push 0/imm32
4476 89/<- %edx 4/r32/esp
4477 (tailor-exit-descriptor %edx 0x10)
4478
4479 (write _test-input-stream "fn foo {\n")
4480 (write _test-input-stream " var a: t\n")
4481 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
4482 (write _test-input-stream "}\n")
4483 (write _test-input-stream "type t {\n")
4484 (write _test-input-stream " x: int\n")
4485 (write _test-input-stream "}\n")
4486
4487 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
4488
4489
4490 89/<- %edx 4/r32/esp
4491 (flush _test-output-buffered-file)
4492 (flush _test-error-buffered-file)
4493 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
4499
4500 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-field: output should be empty")
4501 (check-next-stream-line-equal _test-error-stream "type 't' has no member called 'y'" "F - test-get-with-wrong-field: error message")
4502
4503 (check-ints-equal *(edx+4) 2 "F - test-var-in-mem-has-no-initializer: exit status")
4504
4505 81 0/subop/add %esp 8/imm32
4506
4507 5d/pop-to-ebp
4508 c3/return
4509
4510 test-convert-array-of-user-defined-types:
4511
4512 55/push-ebp
4513 89/<- %ebp 4/r32/esp
4514
4515 (clear-stream _test-input-stream)
4516 (clear-stream $_test-input-buffered-file->buffer)
4517 (clear-stream _test-output-stream)
4518 (clear-stream $_test-output-buffered-file->buffer)
4519
4520 (write _test-input-stream "type t {\n")
4521 (write _test-input-stream " x: int\n")
4522 (write _test-input-stream " y: int\n")
4523 (write _test-input-stream "}\n")
4524 (write _test-input-stream "fn foo {\n")
4525 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
4526 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
4527 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
4528 (write _test-input-stream "}\n")
4529
4530 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4531 (flush _test-output-buffered-file)
4532 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4538
4539 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-array-of-user-defined-types/0")
4540 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-array-of-user-defined-types/1")
4541 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-array-of-user-defined-types/2")
4542 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-array-of-user-defined-types/3")
4543 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-array-of-user-defined-types/4")
4544 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-array-of-user-defined-types/5")
4545 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-array-of-user-defined-types/6")
4546 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-array-of-user-defined-types/7")
4547 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-array-of-user-defined-types/8")
4548 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-array-of-user-defined-types/9")
4549 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx<<0x00000003 + 4) 0x00000000/r32" "F - test-convert-array-of-user-defined-types/11")
4550 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-array-of-user-defined-types/13")
4551 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-array-of-user-defined-types/14")
4552 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-array-of-user-defined-types/15")
4553 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-array-of-user-defined-types/16")
4554 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-array-of-user-defined-types/17")
4555 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-array-of-user-defined-types/18")
4556 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-array-of-user-defined-types/19")
4557 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-array-of-user-defined-types/20")
4558
4559 89/<- %esp 5/r32/ebp
4560 5d/pop-to-ebp
4561 c3/return
4562
4563 test-convert-length-of-array-of-user-defined-types-to-eax:
4564
4565 55/push-ebp
4566 89/<- %ebp 4/r32/esp
4567
4568 (clear-stream _test-input-stream)
4569 (clear-stream $_test-input-buffered-file->buffer)
4570 (clear-stream _test-output-stream)
4571 (clear-stream $_test-output-buffered-file->buffer)
4572
4573 (write _test-input-stream "type t {\n")
4574 (write _test-input-stream " x: int\n")
4575 (write _test-input-stream " y: int\n")
4576 (write _test-input-stream " z: int\n")
4577 (write _test-input-stream "}\n")
4578 (write _test-input-stream "fn foo {\n")
4579 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
4580 (write _test-input-stream " var x/eax: (addr t) <- length arr\n")
4581 (write _test-input-stream "}\n")
4582
4583 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4584 (flush _test-output-buffered-file)
4585 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4591
4592 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/0")
4593 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-eax/1")
4594 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-eax/2")
4595 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-of-user-defined-types-to-eax/3")
4596 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-eax/4")
4597 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/5")
4598
4599 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-of-user-defined-types-to-eax/6")
4600 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-length-of-array-of-user-defined-types-to-eax/7")
4601
4602 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/8")
4603 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/9")
4604 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array-of-user-defined-types-to-eax/10")
4605 (check-next-stream-line-equal _test-output-stream " 31/xor %edx 2/r32/edx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/11")
4606 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0x0000000c/imm32" "F - test-convert-length-of-array-of-user-defined-types-to-eax/12")
4607 (check-next-stream-line-equal _test-output-stream " f7 7/subop/idiv-eax-edx-by %ecx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/13")
4608 (check-next-stream-line-equal _test-output-stream " 5a/pop-to-edx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/14")
4609 (check-next-stream-line-equal _test-output-stream " 59/pop-to-ecx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/15")
4610
4611 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-of-user-defined-types-to-eax/16")
4612
4613 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-eax/17")
4614 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/18")
4615 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-eax/19")
4616 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-of-user-defined-types-to-eax/20")
4617 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-eax/21")
4618 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-eax/22")
4619
4620 89/<- %esp 5/r32/ebp
4621 5d/pop-to-ebp
4622 c3/return
4623
4624 test-convert-length-of-array-of-user-defined-types-to-ecx:
4625
4626 55/push-ebp
4627 89/<- %ebp 4/r32/esp
4628
4629 (clear-stream _test-input-stream)
4630 (clear-stream $_test-input-buffered-file->buffer)
4631 (clear-stream _test-output-stream)
4632 (clear-stream $_test-output-buffered-file->buffer)
4633
4634 (write _test-input-stream "type t {\n")
4635 (write _test-input-stream " x: int\n")
4636 (write _test-input-stream " y: int\n")
4637 (write _test-input-stream " z: int\n")
4638 (write _test-input-stream "}\n")
4639 (write _test-input-stream "fn foo {\n")
4640 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
4641 (write _test-input-stream " var x/ecx: (addr t) <- length arr\n")
4642 (write _test-input-stream "}\n")
4643
4644 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4645 (flush _test-output-buffered-file)
4646 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4652
4653 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/0")
4654 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/1")
4655 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/2")
4656 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/3")
4657 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/4")
4658 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/5")
4659
4660 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/6")
4661 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/7")
4662
4663 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/8")
4664
4665 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/9")
4666 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/10")
4667 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/11")
4668 (check-next-stream-line-equal _test-output-stream " 31/xor %edx 2/r32/edx" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/12")
4669 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0x0000000c/imm32" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/13")
4670 (check-next-stream-line-equal _test-output-stream " f7 7/subop/idiv-eax-edx-by %ecx" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/14")
4671 (check-next-stream-line-equal _test-output-stream " 89/<- %ecx 0/r32/eax" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/15")
4672 (check-next-stream-line-equal _test-output-stream " 5a/pop-to-edx" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/16")
4673 (check-next-stream-line-equal _test-output-stream " 58/pop-to-eax" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/17")
4674
4675 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/18")
4676
4677 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/19")
4678
4679 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/20")
4680 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/21")
4681 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/22")
4682 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/23")
4683 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/24")
4684 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/25")
4685
4686 89/<- %esp 5/r32/ebp
4687 5d/pop-to-ebp
4688 c3/return
4689
4690 test-convert-length-of-array-of-user-defined-types-to-edx:
4691
4692 55/push-ebp
4693 89/<- %ebp 4/r32/esp
4694
4695 (clear-stream _test-input-stream)
4696 (clear-stream $_test-input-buffered-file->buffer)
4697 (clear-stream _test-output-stream)
4698 (clear-stream $_test-output-buffered-file->buffer)
4699
4700 (write _test-input-stream "type t {\n")
4701 (write _test-input-stream " x: int\n")
4702 (write _test-input-stream " y: int\n")
4703 (write _test-input-stream " z: int\n")
4704 (write _test-input-stream "}\n")
4705 (write _test-input-stream "fn foo {\n")
4706 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
4707 (write _test-input-stream " var x/edx: (addr t) <- length arr\n")
4708 (write _test-input-stream "}\n")
4709
4710 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4711 (flush _test-output-buffered-file)
4712 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4718
4719 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/0")
4720 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-edx/1")
4721 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-edx/2")
4722 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-of-user-defined-types-to-edx/3")
4723 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-edx/4")
4724 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/5")
4725
4726 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-of-user-defined-types-to-edx/6")
4727 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-length-of-array-of-user-defined-types-to-edx/7")
4728
4729 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %edx" "F - test-convert-length-of-array-of-user-defined-types-to-edx/8")
4730
4731 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types-to-edx/9")
4732 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types-to-edx/10")
4733 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array-of-user-defined-types-to-edx/11")
4734 (check-next-stream-line-equal _test-output-stream " 31/xor %edx 2/r32/edx" "F - test-convert-length-of-array-of-user-defined-types-to-edx/12")
4735 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0x0000000c/imm32" "F - test-convert-length-of-array-of-user-defined-types-to-edx/13")
4736 (check-next-stream-line-equal _test-output-stream " f7 7/subop/idiv-eax-edx-by %ecx" "F - test-convert-length-of-array-of-user-defined-types-to-edx/14")
4737 (check-next-stream-line-equal _test-output-stream " 89/<- %edx 0/r32/eax" "F - test-convert-length-of-array-of-user-defined-types-to-edx/15")
4738 (check-next-stream-line-equal _test-output-stream " 59/pop-to-ecx" "F - test-convert-length-of-array-of-user-defined-types-to-edx/16")
4739 (check-next-stream-line-equal _test-output-stream " 58/pop-to-eax" "F - test-convert-length-of-array-of-user-defined-types-to-edx/17")
4740
4741 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %edx" "F - test-convert-length-of-array-of-user-defined-types-to-edx/18")
4742
4743 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-of-user-defined-types-to-edx/19")
4744
4745 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-edx/20")
4746 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/21")
4747 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-edx/22")
4748 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-of-user-defined-types-to-edx/23")
4749 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-edx/24")
4750 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-edx/25")
4751
4752 89/<- %esp 5/r32/ebp
4753 5d/pop-to-ebp
4754 c3/return
4755
4756 test-convert-length-of-array-of-user-defined-types:
4757
4758 55/push-ebp
4759 89/<- %ebp 4/r32/esp
4760
4761 (clear-stream _test-input-stream)
4762 (clear-stream $_test-input-buffered-file->buffer)
4763 (clear-stream _test-output-stream)
4764 (clear-stream $_test-output-buffered-file->buffer)
4765
4766 (write _test-input-stream "type t {\n")
4767 (write _test-input-stream " x: int\n")
4768 (write _test-input-stream " y: int\n")
4769 (write _test-input-stream " z: int\n")
4770 (write _test-input-stream "}\n")
4771 (write _test-input-stream "fn foo {\n")
4772 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
4773 (write _test-input-stream " var x/ebx: (addr t) <- length arr\n")
4774 (write _test-input-stream "}\n")
4775
4776 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4777 (flush _test-output-buffered-file)
4778 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4784
4785 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types/0")
4786 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types/1")
4787 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types/2")
4788 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-of-user-defined-types/3")
4789 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types/4")
4790 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types/5")
4791 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-of-user-defined-types/6")
4792 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-length-of-array-of-user-defined-types/7")
4793 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-length-of-array-of-user-defined-types/8")
4794 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types/9")
4795 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types/10")
4796 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types/11")
4797 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array-of-user-defined-types/12")
4798 (check-next-stream-line-equal _test-output-stream " 31/xor %edx 2/r32/edx" "F - test-convert-length-of-array-of-user-defined-types/13")
4799 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0x0000000c/imm32" "F - test-convert-length-of-array-of-user-defined-types/14")
4800 (check-next-stream-line-equal _test-output-stream " f7 7/subop/idiv-eax-edx-by %ecx" "F - test-convert-length-of-array-of-user-defined-types/15")
4801 (check-next-stream-line-equal _test-output-stream " 89/<- %ebx 0/r32/eax" "F - test-convert-length-of-array-of-user-defined-types/16")
4802 (check-next-stream-line-equal _test-output-stream " 5a/pop-to-edx" "F - test-convert-length-of-array-of-user-defined-types/17")
4803 (check-next-stream-line-equal _test-output-stream " 59/pop-to-ecx" "F - test-convert-length-of-array-of-user-defined-types/18")
4804 (check-next-stream-line-equal _test-output-stream " 58/pop-to-eax" "F - test-convert-length-of-array-of-user-defined-types/19")
4805 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ebx" "F - test-convert-length-of-array-of-user-defined-types/20")
4806 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-of-user-defined-types/21")
4807 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types/22")
4808 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types/23")
4809 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types/24")
4810 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-of-user-defined-types/25")
4811 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-of-user-defined-types/26")
4812 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types/27")
4813
4814 89/<- %esp 5/r32/ebp
4815 5d/pop-to-ebp
4816 c3/return
4817
4818
4819
4820
4821
4822 parse-mu:
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855 55/push-ebp
4856 89/<- %ebp 4/r32/esp
4857
4858 50/push-eax
4859 51/push-ecx
4860 52/push-edx
4861 53/push-ebx
4862 56/push-esi
4863 57/push-edi
4864
4865 81 5/subop/subtract %esp 0x200/imm32
4866 68/push 0x200/imm32/size
4867 68/push 0/imm32/read
4868 68/push 0/imm32/write
4869 89/<- %ecx 4/r32/esp
4870
4871 68/push 0/imm32/end
4872 68/push 0/imm32/start
4873 89/<- %edx 4/r32/esp
4874
4875 bf/copy-to-edi _Program-functions/imm32
4876
4877 81 5/subop/subtract %esp 0xc00/imm32
4878 68/push 0xc00/imm32/size
4879 68/push 0/imm32/top
4880 89/<- %ebx 4/r32/esp
4881 {
4882 $parse-mu:line-loop:
4883 (clear-stream %ecx)
4884 (read-line-buffered *(ebp+8) %ecx)
4885
4886 81 7/subop/compare *ecx 0/imm32
4887 0f 84/jump-if-= break/disp32
4888 +-- 6 lines: #? # dump line ------------------------------------------------------------------------------------------------------------------------------------------------------
4894 (next-mu-token %ecx %edx)
4895
4896 (slice-empty? %edx)
4897 3d/compare-eax-and 0/imm32/false
4898 0f 85/jump-if-!= loop/disp32
4899
4900
4901 8b/-> *edx 0/r32/eax
4902 8a/copy-byte *eax 0/r32/AL
4903 81 4/subop/and %eax 0xff/imm32
4904
4905 3d/compare-eax-and 0x23/imm32/hash
4906 0f 84/jump-if-= loop/disp32
4907
4908 {
4909 $parse-mu:fn:
4910 (slice-equal? %edx "fn")
4911 3d/compare-eax-and 0/imm32/false
4912 0f 84/jump-if-= break/disp32
4913
4914 68/push 0/imm32
4915 68/push 0/imm32
4916 89/<- %esi 4/r32/esp
4917
4918 (allocate Heap *Function-size %esi)
4919
4920 (lookup *esi *(esi+4))
4921 (clear-stack %ebx)
4922 (populate-mu-function-header %ecx %eax %ebx *(ebp+0xc) *(ebp+0x10))
4923 (populate-mu-function-body *(ebp+8) %eax %ebx *(ebp+0xc) *(ebp+0x10))
4924
4925 8b/-> *esi 0/r32/eax
4926 89/<- *edi 0/r32/eax
4927 8b/-> *(esi+4) 0/r32/eax
4928 89/<- *(edi+4) 0/r32/eax
4929
4930
4931 (lookup *esi *(esi+4))
4932
4933 8d/copy-address *(eax+0x20) 7/r32/edi
4934
4935 81 0/subop/add %esp 8/imm32
4936
4937 e9/jump $parse-mu:line-loop/disp32
4938 }
4939
4940 {
4941 $parse-mu:type:
4942 (slice-equal? %edx "type")
4943 3d/compare-eax-and 0/imm32
4944 0f 84/jump-if-= break/disp32
4945 (next-mu-token %ecx %edx)
4946
4947 (pos-or-insert-slice Type-id %edx)
4948
4949 51/push-ecx
4950
4951 68/push 0/imm32
4952 68/push 0/imm32
4953 89/<- %ecx 4/r32/esp
4954 (find-or-create-typeinfo %eax %ecx)
4955
4956 (lookup *ecx *(ecx+4))
4957
4958
4959 (populate-mu-type *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10))
4960
4961
4962 81 0/subop/add %esp 8/imm32
4963
4964 59/pop-to-ecx
4965 e9/jump $parse-mu:line-loop/disp32
4966 }
4967
4968 e9/jump $parse-mu:error1/disp32
4969 }
4970 $parse-mu:end:
4971
4972 81 0/subop/add %esp 0xe1c/imm32
4973
4974 5f/pop-to-edi
4975 5e/pop-to-esi
4976 5b/pop-to-ebx
4977 5a/pop-to-edx
4978 59/pop-to-ecx
4979 58/pop-to-eax
4980
4981 89/<- %esp 5/r32/ebp
4982 5d/pop-to-ebp
4983 c3/return
4984
4985 $parse-mu:error1:
4986
4987 (write-buffered *(ebp+0xc) "unexpected top-level command: ")
4988 (write-slice-buffered *(ebp+0xc) %edx)
4989 (write-buffered *(ebp+0xc) "\n")
4990 (flush *(ebp+0xc))
4991 (stop *(ebp+0x10) 1)
4992
4993
4994 $parse-mu:error2:
4995
4996 (print-int32-buffered *(ebp+0xc) *ebx)
4997 (write-buffered *(ebp+0xc) " vars not reclaimed after fn '")
4998 (write-slice-buffered *(ebp+0xc) *eax)
4999 (write-buffered *(ebp+0xc) "'\n")
5000 (flush *(ebp+0xc))
5001 (stop *(ebp+0x10) 1)
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018 populate-mu-function-header:
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047 55/push-ebp
5048 89/<- %ebp 4/r32/esp
5049
5050 50/push-eax
5051 51/push-ecx
5052 52/push-edx
5053 53/push-ebx
5054 57/push-edi
5055
5056 8b/-> *(ebp+0xc) 7/r32/edi
5057
5058 68/push 0/imm32/end
5059 68/push 0/imm32/start
5060 89/<- %ecx 4/r32/esp
5061
5062 68/push 0/imm32
5063 68/push 0/imm32
5064 89/<- %ebx 4/r32/esp
5065
5066 (next-mu-token *(ebp+8) %ecx)
5067
5068
5069
5070 (slice-equal? %ecx "{")
5071 3d/compare-eax-and 0/imm32/false
5072 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
5073
5074 (slice-equal? %ecx "->")
5075 3d/compare-eax-and 0/imm32/false
5076 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
5077
5078 (slice-equal? %ecx "}")
5079 3d/compare-eax-and 0/imm32/false
5080 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
5081
5082 (slice-to-string Heap %ecx %edi)
5083
5084 {
5085 $populate-mu-function-header:check-for-inout:
5086 (next-mu-token *(ebp+8) %ecx)
5087
5088 (slice-equal? %ecx "{")
5089 3d/compare-eax-and 0/imm32/false
5090 0f 85/jump-if-!= $populate-mu-function-header:done/disp32
5091
5092 (slice-equal? %ecx "->")
5093 3d/compare-eax-and 0/imm32/false
5094 0f 85/jump-if-!= break/disp32
5095
5096 (slice-equal? %ecx "}")
5097 3d/compare-eax-and 0/imm32/false
5098 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
5099
5100 (parse-var-with-type %ecx *(ebp+8) %ebx *(ebp+0x14) *(ebp+0x18))
5101
5102
5103 (lookup *ebx *(ebx+4))
5104 81 7/subop/compare *(eax+0x18) 0/imm32
5105 0f 85/jump-if-!= $populate-mu-function-header:error2/disp32
5106
5107
5108
5109 8d/copy-address *(edi+8) 0/r32/eax
5110 (append-list Heap *ebx *(ebx+4) *(edi+8) *(edi+0xc) %eax)
5111
5112 (push *(ebp+0x10) *ebx)
5113 (push *(ebp+0x10) *(ebx+4))
5114 (push *(ebp+0x10) 0)
5115
5116 e9/jump loop/disp32
5117 }
5118
5119 {
5120 $populate-mu-function-header:check-for-out:
5121 (next-mu-token *(ebp+8) %ecx)
5122
5123 (slice-equal? %ecx "{")
5124 3d/compare-eax-and 0/imm32/false
5125 0f 85/jump-if-!= break/disp32
5126
5127 (slice-equal? %ecx "->")
5128 3d/compare-eax-and 0/imm32/false
5129 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
5130
5131 (slice-equal? %ecx "}")
5132 3d/compare-eax-and 0/imm32/false
5133 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
5134
5135 (parse-var-with-type %ecx *(ebp+8) %ebx *(ebp+0x14) *(ebp+0x18))
5136
5137
5138 (lookup *ebx *(ebx+4))
5139 81 7/subop/compare *(eax+0x18) 0/imm32
5140 0f 84/jump-if-= $populate-mu-function-header:error3/disp32
5141
5142 8d/copy-address *(edi+0x10) 0/r32/eax
5143 (append-list Heap *ebx *(ebx+4) *(edi+0x10) *(edi+0x14) %eax)
5144
5145 e9/jump loop/disp32
5146 }
5147 $populate-mu-function-header:done:
5148 (check-no-tokens-left *(ebp+8))
5149 $populate-mu-function-header:end:
5150
5151 81 0/subop/add %esp 0x10/imm32
5152
5153 5f/pop-to-edi
5154 5b/pop-to-ebx
5155 5a/pop-to-edx
5156 59/pop-to-ecx
5157 58/pop-to-eax
5158
5159 89/<- %esp 5/r32/ebp
5160 5d/pop-to-ebp
5161 c3/return
5162
5163 $populate-mu-function-header:error1:
5164
5165 (write-buffered *(ebp+0x14) "function header not in form 'fn <name> [inouts] [-> outputs] {' -- '")
5166 (flush *(ebp+0x14))
5167 (rewind-stream *(ebp+8))
5168 (write-stream-data *(ebp+0x14) *(ebp+8))
5169 (write-buffered *(ebp+0x14) "'\n")
5170 (flush *(ebp+0x14))
5171 (stop *(ebp+0x18) 1)
5172
5173
5174 $populate-mu-function-header:error2:
5175
5176 (write-buffered *(ebp+0x14) "function inout '")
5177 (write-buffered *(ebp+0x14) *ebx)
5178 (write-buffered *(ebp+0x14) "' cannot be in a register")
5179 (flush *(ebp+0x14))
5180 (stop *(ebp+0x18) 1)
5181
5182
5183 $populate-mu-function-header:error3:
5184
5185 (write-buffered *(ebp+0x14) "function output '")
5186 (lookup *ebx *(ebx+4))
5187 (lookup *eax *(eax+4))
5188 (write-buffered *(ebp+0x14) %eax)
5189 (write-buffered *(ebp+0x14) "' must be in a register, in instruction '")
5190 (rewind-stream *(ebp+8))
5191 (write-stream-data *(ebp+0x14) *(ebp+8))
5192 (write-buffered *(ebp+0x14) "'\n")
5193 (flush *(ebp+0x14))
5194 (stop *(ebp+0x18) 1)
5195
5196
5197 test-function-header-with-arg:
5198
5199 55/push-ebp
5200 89/<- %ebp 4/r32/esp
5201
5202 (clear-stream _test-input-stream)
5203 (write _test-input-stream "foo n: int {\n")
5204
5205 2b/subtract *Function-size 4/r32/esp
5206 89/<- %ecx 4/r32/esp
5207 (zero-out %ecx *Function-size)
5208
5209 81 5/subop/subtract %esp 0xc0/imm32
5210 68/push 0xc0/imm32/size
5211 68/push 0/imm32/top
5212 89/<- %ebx 4/r32/esp
5213
5214 (populate-mu-function-header _test-input-stream %ecx %ebx Stderr 0)
5215
5216 (lookup *ecx *(ecx+4))
5217 (check-strings-equal %eax "foo" "F - test-function-header-with-arg/name")
5218
5219 (lookup *(ecx+8) *(ecx+0xc))
5220 (lookup *eax *(eax+4))
5221 89/<- %edx 0/r32/eax
5222
5223 (lookup *edx *(edx+4))
5224 (check-strings-equal %eax "n" "F - test-function-header-with-arg/inout:0")
5225
5226 (lookup *(edx+8) *(edx+0xc))
5227 (check-ints-equal *eax 1 "F - test-function-header-with-arg/inout:0/type:0")
5228 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-arg/inout:0/type:1")
5229 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-arg/inout:0/type:2")
5230
5231 89/<- %esp 5/r32/ebp
5232 5d/pop-to-ebp
5233 c3/return
5234
5235 test-function-header-with-multiple-args:
5236
5237 55/push-ebp
5238 89/<- %ebp 4/r32/esp
5239
5240 (clear-stream _test-input-stream)
5241 (write _test-input-stream "foo a: int, b: int c: int {\n")
5242
5243 2b/subtract *Function-size 4/r32/esp
5244 89/<- %ecx 4/r32/esp
5245 (zero-out %ecx *Function-size)
5246
5247 81 5/subop/subtract %esp 0xc0/imm32
5248 68/push 0xc0/imm32/size
5249 68/push 0/imm32/top
5250 89/<- %ebx 4/r32/esp
5251
5252 (populate-mu-function-header _test-input-stream %ecx %ebx Stderr 0)
5253
5254 (lookup *ecx *(ecx+4))
5255 (check-strings-equal %eax "foo" "F - test-function-header-with-multiple-args/name")
5256
5257 (lookup *(ecx+8) *(ecx+0xc))
5258 89/<- %edx 0/r32/eax
5259 $test-function-header-with-multiple-args:inout0:
5260
5261 (lookup *edx *(edx+4))
5262 89/<- %ebx 0/r32/eax
5263
5264 (lookup *ebx *(ebx+4))
5265 (check-strings-equal %eax "a" "F - test-function-header-with-multiple-args/inout:0")
5266
5267 (lookup *(ebx+8) *(ebx+0xc))
5268 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:0/type:0")
5269 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:0/type:1")
5270 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:0/type:2")
5271 $test-function-header-with-multiple-args:inout1:
5272
5273 (lookup *(edx+8) *(edx+0xc))
5274 89/<- %edx 0/r32/eax
5275
5276 (lookup *edx *(edx+4))
5277 89/<- %ebx 0/r32/eax
5278
5279 (lookup *ebx *(ebx+4))
5280 (check-strings-equal %eax "b" "F - test-function-header-with-multiple-args/inout:1")
5281
5282 (lookup *(ebx+8) *(ebx+0xc))
5283 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:1/type:0")
5284 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:1/type:1")
5285 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:1/type:2")
5286 $test-function-header-with-multiple-args:inout2:
5287
5288 (lookup *(edx+8) *(edx+0xc))
5289 89/<- %edx 0/r32/eax
5290
5291 (lookup *edx *(edx+4))
5292 89/<- %ebx 0/r32/eax
5293
5294 (lookup *ebx *(ebx+4))
5295 (check-strings-equal %eax "c" "F - test-function-header-with-multiple-args/inout:2")
5296
5297 (lookup *(ebx+8) *(ebx+0xc))
5298 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:2/type:0")
5299 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:2/type:1")
5300 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:2/type:2")
5301
5302 89/<- %esp 5/r32/ebp
5303 5d/pop-to-ebp
5304 c3/return
5305
5306 test-function-header-with-multiple-args-and-outputs:
5307
5308 55/push-ebp
5309 89/<- %ebp 4/r32/esp
5310
5311 (clear-stream _test-input-stream)
5312 (write _test-input-stream "foo a: int, b: int, c: int -> x/ecx: int y/edx: int {\n")
5313
5314 2b/subtract *Function-size 4/r32/esp
5315 89/<- %ecx 4/r32/esp
5316 (zero-out %ecx *Function-size)
5317
5318 81 5/subop/subtract %esp 0xc0/imm32
5319 68/push 0xc0/imm32/size
5320 68/push 0/imm32/top
5321 89/<- %ebx 4/r32/esp
5322
5323 (populate-mu-function-header _test-input-stream %ecx %ebx Stderr 0)
5324
5325 (lookup *ecx *(ecx+4))
5326 (check-strings-equal %eax "foo" "F - test-function-header-with-multiple-args-and-outputs/name")
5327
5328 (lookup *(ecx+8) *(ecx+0xc))
5329 89/<- %edx 0/r32/eax
5330 $test-function-header-with-multiple-args-and-outputs:inout0:
5331
5332 (lookup *edx *(edx+4))
5333 89/<- %ebx 0/r32/eax
5334
5335 (lookup *ebx *(ebx+4))
5336 (check-strings-equal %eax "a" "F - test-function-header-with-multiple-args-and-outputs/inout:0")
5337
5338 (lookup *(ebx+8) *(ebx+0xc))
5339 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:0")
5340 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:1")
5341 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:2")
5342 $test-function-header-with-multiple-args-and-outputs:inout1:
5343
5344 (lookup *(edx+8) *(edx+0xc))
5345 89/<- %edx 0/r32/eax
5346
5347 (lookup *edx *(edx+4))
5348 89/<- %ebx 0/r32/eax
5349
5350 (lookup *ebx *(ebx+4))
5351 (check-strings-equal %eax "b" "F - test-function-header-with-multiple-args-and-outputs/inout:1")
5352
5353 (lookup *(ebx+8) *(ebx+0xc))
5354 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:0")
5355 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:1")
5356 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:2")
5357 $test-function-header-with-multiple-args-and-outputs:inout2:
5358
5359 (lookup *(edx+8) *(edx+0xc))
5360 89/<- %edx 0/r32/eax
5361
5362 (lookup *edx *(edx+4))
5363 89/<- %ebx 0/r32/eax
5364
5365 (lookup *ebx *(ebx+4))
5366 (check-strings-equal %eax "c" "F - test-function-header-with-multiple-args-and-outputs/inout:2")
5367
5368 (lookup *(ebx+8) *(ebx+0xc))
5369 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:0")
5370 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:1")
5371 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:2")
5372 $test-function-header-with-multiple-args-and-outputs:out0:
5373
5374 (lookup *(ecx+0x10) *(ecx+0x14))
5375 89/<- %edx 0/r32/eax
5376
5377 (lookup *edx *(edx+4))
5378 89/<- %ebx 0/r32/eax
5379
5380 (lookup *ebx *(ebx+4))
5381 (check-strings-equal %eax "x" "F - test-function-header-with-multiple-args-and-outputs/output:0")
5382
5383 (lookup *(ebx+0x18) *(ebx+0x1c))
5384 (check-strings-equal %eax "ecx" "F - test-function-header-with-multiple-args-and-outputs/output:0/register")
5385
5386 (lookup *(ebx+8) *(ebx+0xc))
5387 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:0")
5388 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:1")
5389 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:2")
5390 $test-function-header-with-multiple-args-and-outputs:out1:
5391
5392 (lookup *(edx+8) *(edx+0xc))
5393 89/<- %edx 0/r32/eax
5394
5395 (lookup *edx *(edx+4))
5396 89/<- %ebx 0/r32/eax
5397
5398 (lookup *ebx *(ebx+4))
5399 (check-strings-equal %eax "y" "F - test-function-header-with-multiple-args-and-outputs/output:1")
5400
5401 (lookup *(ebx+0x18) *(ebx+0x1c))
5402 (check-strings-equal %eax "edx" "F - test-function-header-with-multiple-args-and-outputs/output:1/register")
5403
5404 (lookup *(ebx+8) *(ebx+0xc))
5405 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:0")
5406 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:1")
5407 (check-ints-equal *(eax+0c) 0 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:2")
5408
5409 89/<- %esp 5/r32/ebp
5410 5d/pop-to-ebp
5411 c3/return
5412
5413
5414
5415
5416
5417
5418
5419
5420 parse-var-with-type:
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437 55/push-ebp
5438 89/<- %ebp 4/r32/esp
5439
5440 50/push-eax
5441 51/push-ecx
5442 52/push-edx
5443 53/push-ebx
5444 56/push-esi
5445 57/push-edi
5446
5447 8b/-> *(ebp+8) 6/r32/esi
5448
5449 8b/-> *(esi+4) 1/r32/ecx
5450 49/decrement-ecx
5451 8a/copy-byte *ecx 1/r32/CL
5452 81 4/subop/and %ecx 0xff/imm32
5453 81 7/subop/compare %ecx 0x3a/imm32/colon
5454 0f 85/jump-if-!= $parse-var-with-type:abort/disp32
5455
5456 ff 1/subop/decrement *(esi+4)
5457
5458 68/push 0/imm32/end
5459 68/push 0/imm32/start
5460 89/<- %ecx 4/r32/esp
5461 $parse-var-with-type:parse-name:
5462 (next-token-from-slice *esi *(esi+4) 0x2f %ecx)
5463 $parse-var-with-type:create-var:
5464
5465 (new-var-from-slice Heap %ecx *(ebp+0x10))
5466
5467 $parse-var-with-type:save-register:
5468
5469 8b/-> *(ebp+0x10) 7/r32/edi
5470 (lookup *edi *(edi+4))
5471 89/<- %edi 0/r32/eax
5472
5473 (next-token-from-slice *(ecx+4) *(esi+4) 0x2f %ecx)
5474
5475 {
5476 $parse-var-with-type:write-register:
5477 (slice-empty? %ecx)
5478 3d/compare-eax-and 0/imm32/false
5479 75/jump-if-!= break/disp8
5480
5481 8d/copy-address *(edi+0x18) 0/r32/eax
5482 (slice-to-string Heap %ecx %eax)
5483 }
5484 $parse-var-with-type:save-type:
5485 8d/copy-address *(edi+8) 0/r32/eax
5486 (parse-type Heap *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
5487 $parse-var-with-type:end:
5488
5489 81 0/subop/add %esp 8/imm32
5490
5491 5f/pop-to-edi
5492 5e/pop-to-esi
5493 5b/pop-to-ebx
5494 5a/pop-to-edx
5495 59/pop-to-ecx
5496 58/pop-to-eax
5497
5498 89/<- %esp 5/r32/ebp
5499 5d/pop-to-ebp
5500 c3/return
5501
5502 $parse-var-with-type:abort:
5503
5504 (write-buffered *(ebp+0x14) "var should have form 'name: type' in '")
5505 (flush *(ebp+0x14))
5506 (rewind-stream *(ebp+0xc))
5507 (write-stream-data *(ebp+0x14) *(ebp+0xc))
5508 (write-buffered *(ebp+0x14) "'\n")
5509 (flush *(ebp+0x14))
5510 (stop *(ebp+0x18) 1)
5511
5512
5513 parse-type:
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532 55/push-ebp
5533 89/<- %ebp 4/r32/esp
5534
5535 50/push-eax
5536 51/push-ecx
5537 52/push-edx
5538
5539 (zero-out *(ebp+0x10) *Handle-size)
5540
5541 68/push 0/imm32
5542 68/push 0/imm32
5543 89/<- %ecx 4/r32/esp
5544
5545 (next-mu-token *(ebp+0xc) %ecx)
5546
5547
5548
5549
5550
5551 (slice-equal? %ecx "")
5552 3d/compare-eax-and 0/imm32/false
5553 0f 85/jump-if-!= $parse-type:abort/disp32
5554
5555 (slice-equal? %ecx "{")
5556 3d/compare-eax-and 0/imm32/false
5557 0f 85/jump-if-!= $parse-type:abort/disp32
5558
5559 (slice-equal? %ecx "}")
5560 3d/compare-eax-and 0/imm32/false
5561 0f 85/jump-if-!= $parse-type:abort/disp32
5562
5563 (slice-equal? %ecx "->")
5564 3d/compare-eax-and 0/imm32/false
5565 0f 85/jump-if-!= $parse-type:abort/disp32
5566
5567 (slice-equal? %ecx ")")
5568 3d/compare-eax-and 0/imm32/false
5569 0f 85/jump-if-!= $parse-type:end/disp32
5570
5571 (allocate *(ebp+8) *Tree-size *(ebp+0x10))
5572
5573 8b/-> *(ebp+0x10) 2/r32/edx
5574 (lookup *edx *(edx+4))
5575 89/<- %edx 0/r32/eax
5576 {
5577
5578 (slice-equal? %ecx "(")
5579 3d/compare-eax-and 0/imm32/false
5580 75/jump-if-!= break/disp8
5581
5582 {
5583 $parse-type:check-for-int:
5584 (is-hex-int? %ecx)
5585 3d/compare-eax-and 0/imm32/false
5586 74/jump-if-= break/disp8
5587 $parse-type:int:
5588 (parse-hex-int-from-slice %ecx)
5589 89/<- *(edx+4) 0/r32/eax
5590 e9/jump $parse-type:end/disp32
5591 }
5592 $parse-type:atom:
5593
5594 c7 0/subop/copy *edx 1/imm32/true
5595
5596 (pos-or-insert-slice Type-id %ecx)
5597 89/<- *(edx+4) 0/r32/eax
5598 e9/jump $parse-type:end/disp32
5599 }
5600 $parse-type:non-atom:
5601
5602
5603 8d/copy-address *(edx+4) 0/r32/eax
5604 (parse-type *(ebp+8) *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
5605
5606 8d/copy-address *(edx+0xc) 0/r32/eax
5607 (parse-type-tree *(ebp+8) *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
5608 $parse-type:end:
5609
5610 81 0/subop/add %esp 8/imm32
5611
5612 5a/pop-to-edx
5613 59/pop-to-ecx
5614 58/pop-to-eax
5615
5616 89/<- %esp 5/r32/ebp
5617 5d/pop-to-ebp
5618 c3/return
5619
5620 $parse-type:abort:
5621
5622 (write-buffered *(ebp+0x14) "unexpected token when parsing type: '")
5623 (write-slice-buffered *(ebp+0x14) %ecx)
5624 (write-buffered *(ebp+0x14) "'\n")
5625 (flush *(ebp+0x14))
5626 (stop *(ebp+0x18) 1)
5627
5628
5629 parse-type-tree:
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639 55/push-ebp
5640 89/<- %ebp 4/r32/esp
5641
5642 50/push-eax
5643 51/push-ecx
5644 52/push-edx
5645
5646 (zero-out *(ebp+0x10) *Handle-size)
5647
5648 68/push 0/imm32
5649 68/push 0/imm32
5650 89/<- %ecx 4/r32/esp
5651
5652 (parse-type *(ebp+8) *(ebp+0xc) %ecx *(ebp+0x14) *(ebp+0x18))
5653
5654 81 7/subop/compare *ecx 0/imm32
5655 74/jump-if-= $parse-type-tree:end/disp8
5656
5657 (allocate *(ebp+8) *Tree-size *(ebp+0x10))
5658
5659 8b/-> *(ebp+0x10) 2/r32/edx
5660 (lookup *edx *(edx+4))
5661 89/<- %edx 0/r32/eax
5662
5663 8b/-> *ecx 0/r32/eax
5664 89/<- *(edx+4) 0/r32/eax
5665 8b/-> *(ecx+4) 0/r32/eax
5666 89/<- *(edx+8) 0/r32/eax
5667
5668 8d/copy-address *(edx+0xc) 0/r32/eax
5669 (parse-type-tree *(ebp+8) *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
5670 $parse-type-tree:end:
5671
5672 81 0/subop/add %esp 8/imm32
5673
5674 5a/pop-to-edx
5675 59/pop-to-ecx
5676 58/pop-to-eax
5677
5678 89/<- %esp 5/r32/ebp
5679 5d/pop-to-ebp
5680 c3/return
5681
5682 next-mu-token:
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727 55/push-ebp
5728 89/<- %ebp 4/r32/esp
5729
5730 50/push-eax
5731 51/push-ecx
5732 56/push-esi
5733 57/push-edi
5734
5735 8b/-> *(ebp+8) 6/r32/esi
5736
5737 8b/-> *(ebp+0xc) 7/r32/edi
5738 $next-mu-token:start:
5739 (skip-chars-matching-whitespace %esi)
5740 $next-mu-token:check0:
5741
5742
5743 8b/-> *(esi+4) 1/r32/ecx
5744
5745 3b/compare<- *esi 1/r32/ecx
5746 c7 0/subop/copy *edi 0/imm32
5747 c7 0/subop/copy *(edi+4) 0/imm32
5748 0f 8d/jump-if->= $next-mu-token:end/disp32
5749
5750 8d/copy-address *(esi+ecx+0xc) 0/r32/eax
5751 89/<- *edi 0/r32/eax
5752
5753 31/xor-with %eax 0/r32/eax
5754 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
5755 {
5756 $next-mu-token:check-for-comma:
5757
5758 3d/compare-eax-and 0x2c/imm32/comma
5759 75/jump-if-!= break/disp8
5760
5761 ff 0/subop/increment *(esi+4)
5762
5763 e9/jump $next-mu-token:start/disp32
5764 }
5765 {
5766 $next-mu-token:check-for-comment:
5767
5768 3d/compare-eax-and 0x23/imm32/pound
5769 75/jump-if-!= break/disp8
5770
5771 e9/jump $next-mu-token:done/disp32
5772 }
5773 {
5774 $next-mu-token:check-for-string-literal:
5775
5776 3d/compare-eax-and 0x22/imm32/dquote
5777 75/jump-if-!= break/disp8
5778 (skip-string %esi)
5779
5780 e9/jump $next-mu-token:done/disp32
5781 }
5782 {
5783 $next-mu-token:check-for-open-paren:
5784
5785 3d/compare-eax-and 0x28/imm32/open-paren
5786 75/jump-if-!= break/disp8
5787
5788 ff 0/subop/increment *(esi+4)
5789
5790 e9/jump $next-mu-token:done/disp32
5791 }
5792 {
5793 $next-mu-token:check-for-close-paren:
5794
5795 3d/compare-eax-and 0x29/imm32/close-paren
5796 75/jump-if-!= break/disp8
5797
5798 ff 0/subop/increment *(esi+4)
5799
5800 e9/jump $next-mu-token:done/disp32
5801 }
5802 {
5803 $next-mu-token:regular-word-without-metadata:
5804
5805
5806 8b/-> *(esi+4) 1/r32/ecx
5807
5808 3b/compare<- *esi 1/r32/ecx
5809 7d/jump-if->= break/disp8
5810
5811 31/xor-with %eax 0/r32/eax
5812 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
5813
5814 3d/compare-eax-and 0x20/imm32/space
5815 74/jump-if-= break/disp8
5816
5817 3d/compare-eax-and 0xd/imm32/carriage-return
5818 74/jump-if-= break/disp8
5819
5820 3d/compare-eax-and 0xa/imm32/newline
5821 74/jump-if-= break/disp8
5822
5823 3d/compare-eax-and 0x28/imm32/open-paren
5824 0f 84/jump-if-= break/disp32
5825
5826 3d/compare-eax-and 0x29/imm32/close-paren
5827 0f 84/jump-if-= break/disp32
5828
5829 3d/compare-eax-and 0x2c/imm32/comma
5830 0f 84/jump-if-= break/disp32
5831
5832 ff 0/subop/increment *(esi+4)
5833
5834 e9/jump loop/disp32
5835 }
5836 $next-mu-token:done:
5837
5838 8b/-> *(esi+4) 1/r32/ecx
5839 8d/copy-address *(esi+ecx+0xc) 0/r32/eax
5840 89/<- *(edi+4) 0/r32/eax
5841 $next-mu-token:end:
5842
5843 5f/pop-to-edi
5844 5e/pop-to-esi
5845 59/pop-to-ecx
5846 58/pop-to-eax
5847
5848 89/<- %esp 5/r32/ebp
5849 5d/pop-to-ebp
5850 c3/return
5851
5852 pos-or-insert-slice:
5853
5854 55/push-ebp
5855 89/<- %ebp 4/r32/esp
5856
5857 (pos-slice *(ebp+8) *(ebp+0xc))
5858 3d/compare-eax-and -1/imm32
5859 75/jump-if-!= $pos-or-insert-slice:end/disp8
5860 $pos-or-insert-slice:insert:
5861
5862 68/push 0/imm32
5863 68/push 0/imm32
5864 89/<- %eax 4/r32/esp
5865 (slice-to-string Heap *(ebp+0xc) %eax)
5866
5867 (lookup *eax *(eax+4))
5868 (write-int *(ebp+8) %eax)
5869 (pos-slice *(ebp+8) *(ebp+0xc))
5870 $pos-or-insert-slice:end:
5871
5872 81 0/subop/add %esp 8/imm32
5873
5874 89/<- %esp 5/r32/ebp
5875 5d/pop-to-ebp
5876 c3/return
5877
5878
5879
5880 pos-slice:
5881
5882 55/push-ebp
5883 89/<- %ebp 4/r32/esp
5884
5885 51/push-ecx
5886 52/push-edx
5887 53/push-ebx
5888 56/push-esi
5889
5890
5891
5892
5893
5894 8b/-> *(ebp+8) 6/r32/esi
5895
5896 b9/copy-to-ecx 0/imm32
5897
5898 8d/copy-address *(esi+0xc) 2/r32/edx
5899
5900 8b/-> *esi 3/r32/ebx
5901 8d/copy-address *(esi+ebx+0xc) 3/r32/ebx
5902 {
5903
5904
5905
5906
5907
5908 39/compare %edx 3/r32/ebx
5909 b8/copy-to-eax -1/imm32
5910 73/jump-if-addr>= $pos-slice:end/disp8
5911
5912 (slice-equal? *(ebp+0xc) *edx)
5913 3d/compare-eax-and 0/imm32/false
5914 75/jump-if-!= break/disp8
5915
5916 41/increment-ecx
5917
5918 81 0/subop/add %edx 4/imm32
5919
5920 eb/jump loop/disp8
5921 }
5922
5923 89/<- %eax 1/r32/ecx
5924 $pos-slice:end:
5925
5926
5927
5928
5929 5e/pop-to-esi
5930 5b/pop-to-ebx
5931 5a/pop-to-edx
5932 59/pop-to-ecx
5933
5934 89/<- %esp 5/r32/ebp
5935 5d/pop-to-ebp
5936 c3/return
5937
5938 test-parse-var-with-type:
5939
5940 55/push-ebp
5941 89/<- %ebp 4/r32/esp
5942
5943 b8/copy-to-eax "x:"/imm32
5944 8b/-> *eax 1/r32/ecx
5945 8d/copy-address *(eax+ecx+4) 1/r32/ecx
5946 05/add-to-eax 4/imm32
5947
5948 51/push-ecx
5949 50/push-eax
5950 89/<- %ecx 4/r32/esp
5951
5952 (clear-stream _test-input-stream)
5953 (write _test-input-stream "int")
5954
5955 68/push 0/imm32
5956 68/push 0/imm32
5957 89/<- %edx 4/r32/esp
5958
5959 (parse-var-with-type %ecx _test-input-stream %edx Stderr 0)
5960
5961 (lookup *edx *(edx+4))
5962 89/<- %edx 0/r32/eax
5963
5964 (lookup *edx *(edx+4))
5965 (check-strings-equal %eax "x" "F - test-parse-var-with-type/name")
5966
5967 (lookup *(edx+8) *(edx+0xc))
5968 (check-ints-equal *eax 1 "F - test-parse-var-with-type/type:0")
5969 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-type/type:1")
5970 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-type/type:2")
5971
5972 89/<- %esp 5/r32/ebp
5973 5d/pop-to-ebp
5974 c3/return
5975
5976 test-parse-var-with-type-and-register:
5977
5978 55/push-ebp
5979 89/<- %ebp 4/r32/esp
5980
5981 b8/copy-to-eax "x/eax:"/imm32
5982 8b/-> *eax 1/r32/ecx
5983 8d/copy-address *(eax+ecx+4) 1/r32/ecx
5984 05/add-to-eax 4/imm32
5985
5986 51/push-ecx
5987 50/push-eax
5988 89/<- %ecx 4/r32/esp
5989
5990 (clear-stream _test-input-stream)
5991 (write _test-input-stream "int")
5992
5993 68/push 0/imm32
5994 68/push 0/imm32
5995 89/<- %edx 4/r32/esp
5996
5997 (parse-var-with-type %ecx _test-input-stream %edx Stderr 0)
5998
5999 (lookup *edx *(edx+4))
6000 89/<- %edx 0/r32/eax
6001
6002 (lookup *edx *(edx+4))
6003 (check-strings-equal %eax "x" "F - test-parse-var-with-type-and-register/name")
6004
6005 (lookup *(edx+0x18) *(edx+0x1c))
6006 (check-strings-equal %eax "eax" "F - test-parse-var-with-type-and-register/register")
6007
6008 (lookup *(edx+8) *(edx+0xc))
6009 (check-ints-equal *eax 1 "F - test-parse-var-with-type-and-register/type:0")
6010 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-type-and-register/type:1")
6011 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-type-and-register/type:2")
6012
6013 89/<- %esp 5/r32/ebp
6014 5d/pop-to-ebp
6015 c3/return
6016
6017 test-parse-var-with-trailing-characters:
6018
6019 55/push-ebp
6020 89/<- %ebp 4/r32/esp
6021
6022 b8/copy-to-eax "x:"/imm32
6023 8b/-> *eax 1/r32/ecx
6024 8d/copy-address *(eax+ecx+4) 1/r32/ecx
6025 05/add-to-eax 4/imm32
6026
6027 51/push-ecx
6028 50/push-eax
6029 89/<- %ecx 4/r32/esp
6030
6031 (clear-stream _test-input-stream)
6032 (write _test-input-stream "int,")
6033
6034 68/push 0/imm32
6035 68/push 0/imm32
6036 89/<- %edx 4/r32/esp
6037
6038 (parse-var-with-type %ecx _test-input-stream %edx Stderr 0)
6039
6040 (lookup *edx *(edx+4))
6041 89/<- %edx 0/r32/eax
6042
6043 (lookup *edx *(edx+4))
6044 (check-strings-equal %eax "x" "F - test-parse-var-with-trailing-characters/name")
6045
6046 (check-ints-equal *(edx+0x18) 0 "F - test-parse-var-with-trailing-characters/register")
6047
6048 (lookup *(edx+8) *(edx+0xc))
6049 (check-ints-equal *eax 1 "F - test-parse-var-with-trailing-characters/type:0")
6050 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-trailing-characters/type:1")
6051 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-trailing-characters/type:1")
6052
6053 89/<- %esp 5/r32/ebp
6054 5d/pop-to-ebp
6055 c3/return
6056
6057 test-parse-var-with-register-and-trailing-characters:
6058
6059 55/push-ebp
6060 89/<- %ebp 4/r32/esp
6061
6062 b8/copy-to-eax "x/eax:"/imm32
6063 8b/-> *eax 1/r32/ecx
6064 8d/copy-address *(eax+ecx+4) 1/r32/ecx
6065 05/add-to-eax 4/imm32
6066
6067 51/push-ecx
6068 50/push-eax
6069 89/<- %ecx 4/r32/esp
6070
6071 (clear-stream _test-input-stream)
6072 (write _test-input-stream "int,")
6073
6074 68/push 0/imm32
6075 68/push 0/imm32
6076 89/<- %edx 4/r32/esp
6077
6078 (parse-var-with-type %ecx _test-input-stream %edx Stderr 0)
6079
6080 (lookup *edx *(edx+4))
6081 89/<- %edx 0/r32/eax
6082
6083 (lookup *edx *(edx+4))
6084 (check-strings-equal %eax "x" "F - test-parse-var-with-register-and-trailing-characters/name")
6085
6086 (lookup *(edx+0x18) *(edx+0x1c))
6087 (check-strings-equal %eax "eax" "F - test-parse-var-with-register-and-trailing-characters/register")
6088
6089 (lookup *(edx+8) *(edx+0xc))
6090 (check-ints-equal *eax 1 "F - test-parse-var-with-register-and-trailing-characters/type:0")
6091 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-register-and-trailing-characters/type:1")
6092 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-register-and-trailing-characters/type:2")
6093
6094 89/<- %esp 5/r32/ebp
6095 5d/pop-to-ebp
6096 c3/return
6097
6098 test-parse-var-with-compound-type:
6099
6100 55/push-ebp
6101 89/<- %ebp 4/r32/esp
6102
6103 b8/copy-to-eax "x:"/imm32
6104 8b/-> *eax 1/r32/ecx
6105 8d/copy-address *(eax+ecx+4) 1/r32/ecx
6106 05/add-to-eax 4/imm32
6107
6108 51/push-ecx
6109 50/push-eax
6110 89/<- %ecx 4/r32/esp
6111
6112 (clear-stream _test-input-stream)
6113 (write _test-input-stream "(addr int)")
6114
6115 68/push 0/imm32
6116 68/push 0/imm32
6117 89/<- %edx 4/r32/esp
6118
6119 (parse-var-with-type %ecx _test-input-stream %edx Stderr 0)
6120
6121 (lookup *edx *(edx+4))
6122 89/<- %edx 0/r32/eax
6123
6124 (lookup *edx *(edx+4))
6125 (check-strings-equal %eax "x" "F - test-parse-var-with-compound-type/name")
6126
6127 (check-ints-equal *(edx+0x18) 0 "F - test-parse-var-with-compound-type/register")
6128
6129
6130 (lookup *(edx+8) *(edx+0xc))
6131 89/<- %edx 0/r32/eax
6132
6133 (check-ints-equal *edx 0 "F - test-parse-var-with-compound-type/type:0")
6134
6135 (lookup *(edx+4) *(edx+8))
6136 (check-ints-equal *eax 1 "F - test-parse-var-with-compound-type/type:1")
6137 (check-ints-equal *(eax+4) 2 "F - test-parse-var-with-compound-type/type:2")
6138
6139 (lookup *(edx+0xc) *(edx+0x10))
6140 (lookup *(eax+4) *(eax+8))
6141 (check-ints-equal *eax 1 "F - test-parse-var-with-compound-type/type:3")
6142 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-compound-type/type:4")
6143
6144 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-compound-type/type:5")
6145
6146 89/<- %esp 5/r32/ebp
6147 5d/pop-to-ebp
6148 c3/return
6149
6150
6151
6152
6153 is-identifier?:
6154
6155 55/push-ebp
6156 89/<- %ebp 4/r32/esp
6157
6158 (slice-empty? *(ebp+8))
6159 3d/compare-eax-and 0/imm32/false
6160 75/jump-if-!= $is-identifier?:false/disp8
6161
6162 8b/-> *(ebp+8) 0/r32/eax
6163 8b/-> *eax 0/r32/eax
6164 8a/copy-byte *eax 0/r32/AL
6165 81 4/subop/and %eax 0xff/imm32
6166
6167 3d/compare-eax-and 0x24/imm32/$
6168 74/jump-if-= $is-identifier?:true/disp8
6169
6170 3d/compare-eax-and 0x5f/imm32/_
6171 74/jump-if-= $is-identifier?:true/disp8
6172
6173 25/and-eax-with 0x5f/imm32
6174
6175 3d/compare-eax-and 0x41/imm32/A
6176 7c/jump-if-< $is-identifier?:false/disp8
6177
6178 3d/compare-eax-and 0x5a/imm32/Z
6179 7f/jump-if-> $is-identifier?:false/disp8
6180
6181 $is-identifier?:true:
6182 b8/copy-to-eax 1/imm32/true
6183 eb/jump $is-identifier?:end/disp8
6184 $is-identifier?:false:
6185 b8/copy-to-eax 0/imm32/false
6186 $is-identifier?:end:
6187
6188 89/<- %esp 5/r32/ebp
6189 5d/pop-to-ebp
6190 c3/return
6191
6192 test-is-identifier-dollar:
6193
6194 55/push-ebp
6195 89/<- %ebp 4/r32/esp
6196
6197 b8/copy-to-eax "$a"/imm32
6198 8b/-> *eax 1/r32/ecx
6199 8d/copy-address *(eax+ecx+4) 1/r32/ecx
6200 05/add-to-eax 4/imm32
6201
6202 51/push-ecx
6203 50/push-eax
6204 89/<- %ecx 4/r32/esp
6205
6206 (is-identifier? %ecx)
6207 (check-ints-equal %eax 1 "F - test-is-identifier-dollar")
6208
6209 89/<- %esp 5/r32/ebp
6210 5d/pop-to-ebp
6211 c3/return
6212
6213 test-is-identifier-underscore:
6214
6215 55/push-ebp
6216 89/<- %ebp 4/r32/esp
6217
6218 b8/copy-to-eax "_a"/imm32
6219 8b/-> *eax 1/r32/ecx
6220 8d/copy-address *(eax+ecx+4) 1/r32/ecx
6221 05/add-to-eax 4/imm32
6222
6223 51/push-ecx
6224 50/push-eax
6225 89/<- %ecx 4/r32/esp
6226
6227 (is-identifier? %ecx)
6228 (check-ints-equal %eax 1 "F - test-is-identifier-underscore")
6229
6230 89/<- %esp 5/r32/ebp
6231 5d/pop-to-ebp
6232 c3/return
6233
6234 test-is-identifier-a:
6235
6236 55/push-ebp
6237 89/<- %ebp 4/r32/esp
6238
6239 b8/copy-to-eax "a$"/imm32
6240 8b/-> *eax 1/r32/ecx
6241 8d/copy-address *(eax+ecx+4) 1/r32/ecx
6242 05/add-to-eax 4/imm32
6243
6244 51/push-ecx
6245 50/push-eax
6246 89/<- %ecx 4/r32/esp
6247
6248 (is-identifier? %ecx)
6249 (check-ints-equal %eax 1 "F - test-is-identifier-a")
6250
6251 89/<- %esp 5/r32/ebp
6252 5d/pop-to-ebp
6253 c3/return
6254
6255 test-is-identifier-z:
6256
6257 55/push-ebp
6258 89/<- %ebp 4/r32/esp
6259
6260 b8/copy-to-eax "z$"/imm32
6261 8b/-> *eax 1/r32/ecx
6262 8d/copy-address *(eax+ecx+4) 1/r32/ecx
6263 05/add-to-eax 4/imm32
6264
6265 51/push-ecx
6266 50/push-eax
6267 89/<- %ecx 4/r32/esp
6268
6269 (is-identifier? %ecx)
6270 (check-ints-equal %eax 1 "F - test-is-identifier-z")
6271
6272 89/<- %esp 5/r32/ebp
6273 5d/pop-to-ebp
6274 c3/return
6275
6276 test-is-identifier-A:
6277
6278 55/push-ebp
6279 89/<- %ebp 4/r32/esp
6280
6281 b8/copy-to-eax "A$"/imm32
6282 8b/-> *eax 1/r32/ecx
6283 8d/copy-address *(eax+ecx+4) 1/r32/ecx
6284 05/add-to-eax 4/imm32
6285
6286 51/push-ecx
6287 50/push-eax
6288 89/<- %ecx 4/r32/esp
6289
6290 (is-identifier? %ecx)
6291 (check-ints-equal %eax 1 "F - test-is-identifier-A")
6292
6293 89/<- %esp 5/r32/ebp
6294 5d/pop-to-ebp
6295 c3/return
6296
6297 test-is-identifier-Z:
6298
6299 55/push-ebp
6300 89/<- %ebp 4/r32/esp
6301
6302 b8/copy-to-eax "Z$"/imm32
6303 8b/-> *eax 1/r32/ecx
6304 8d/copy-address *(eax+ecx+4) 1/r32/ecx
6305 05/add-to-eax 4/imm32
6306
6307 51/push-ecx
6308 50/push-eax
6309 89/<- %ecx 4/r32/esp
6310
6311 (is-identifier? %ecx)
6312 (check-ints-equal %eax 1 "F - test-is-identifier-Z")
6313
6314 89/<- %esp 5/r32/ebp
6315 5d/pop-to-ebp
6316 c3/return
6317
6318 test-is-identifier-at:
6319
6320
6321 55/push-ebp
6322 89/<- %ebp 4/r32/esp
6323
6324 b8/copy-to-eax "@a"/imm32
6325 8b/-> *eax 1/r32/ecx
6326 8d/copy-address *(eax+ecx+4) 1/r32/ecx
6327 05/add-to-eax 4/imm32
6328
6329 51/push-ecx
6330 50/push-eax
6331 89/<- %ecx 4/r32/esp
6332
6333 (is-identifier? %ecx)
6334 (check-ints-equal %eax 0 "F - test-is-identifier-@")
6335
6336 89/<- %esp 5/r32/ebp
6337 5d/pop-to-ebp
6338 c3/return
6339
6340 test-is-identifier-square-bracket:
6341
6342
6343 55/push-ebp
6344 89/<- %ebp 4/r32/esp
6345
6346 b8/copy-to-eax "[a"/imm32
6347 8b/-> *eax 1/r32/ecx
6348 8d/copy-address *(eax+ecx+4) 1/r32/ecx
6349 05/add-to-eax 4/imm32
6350
6351 51/push-ecx
6352 50/push-eax
6353 89/<- %ecx 4/r32/esp
6354
6355 (is-identifier? %ecx)
6356 (check-ints-equal %eax 0 "F - test-is-identifier-@")
6357
6358 89/<- %esp 5/r32/ebp
6359 5d/pop-to-ebp
6360 c3/return
6361
6362 test-is-identifier-backtick:
6363
6364
6365 55/push-ebp
6366 89/<- %ebp 4/r32/esp
6367
6368 b8/copy-to-eax "`a"/imm32
6369 8b/-> *eax 1/r32/ecx
6370 8d/copy-address *(eax+ecx+4) 1/r32/ecx
6371 05/add-to-eax 4/imm32
6372
6373 51/push-ecx
6374 50/push-eax
6375 89/<- %ecx 4/r32/esp
6376
6377 (is-identifier? %ecx)
6378 (check-ints-equal %eax 0 "F - test-is-identifier-backtick")
6379
6380 89/<- %esp 5/r32/ebp
6381 5d/pop-to-ebp
6382 c3/return
6383
6384 test-is-identifier-curly-brace-open:
6385
6386
6387 55/push-ebp
6388 89/<- %ebp 4/r32/esp
6389
6390 b8/copy-to-eax "{a"/imm32
6391 8b/-> *eax 1/r32/ecx
6392 8d/copy-address *(eax+ecx+4) 1/r32/ecx
6393 05/add-to-eax 4/imm32
6394
6395 51/push-ecx
6396 50/push-eax
6397 89/<- %ecx 4/r32/esp
6398
6399 (is-identifier? %ecx)
6400 (check-ints-equal %eax 0 "F - test-is-identifier-curly-brace-open")
6401
6402 89/<- %esp 5/r32/ebp
6403 5d/pop-to-ebp
6404 c3/return
6405
6406 test-is-identifier-curly-brace-close:
6407
6408 55/push-ebp
6409 89/<- %ebp 4/r32/esp
6410
6411 b8/copy-to-eax "}a"/imm32
6412 8b/-> *eax 1/r32/ecx
6413 8d/copy-address *(eax+ecx+4) 1/r32/ecx
6414 05/add-to-eax 4/imm32
6415
6416 51/push-ecx
6417 50/push-eax
6418 89/<- %ecx 4/r32/esp
6419
6420 (is-identifier? %ecx)
6421 (check-ints-equal %eax 0 "F - test-is-identifier-curly-brace-close")
6422
6423 89/<- %esp 5/r32/ebp
6424 5d/pop-to-ebp
6425 c3/return
6426
6427 test-is-identifier-hyphen:
6428
6429
6430 55/push-ebp
6431 89/<- %ebp 4/r32/esp
6432
6433 b8/copy-to-eax "-a"/imm32
6434 8b/-> *eax 1/r32/ecx
6435 8d/copy-address *(eax+ecx+4) 1/r32/ecx
6436 05/add-to-eax 4/imm32
6437
6438 51/push-ecx
6439 50/push-eax
6440 89/<- %ecx 4/r32/esp
6441
6442 (is-identifier? %ecx)
6443 (check-ints-equal %eax 0 "F - test-is-identifier-hyphen")
6444
6445 89/<- %esp 5/r32/ebp
6446 5d/pop-to-ebp
6447 c3/return
6448
6449 populate-mu-function-body:
6450
6451 55/push-ebp
6452 89/<- %ebp 4/r32/esp
6453
6454 50/push-eax
6455 56/push-esi
6456 57/push-edi
6457
6458 8b/-> *(ebp+8) 6/r32/esi
6459
6460 8b/-> *(ebp+0xc) 7/r32/edi
6461
6462 8d/copy-address *(edi+0x18) 0/r32/eax
6463 (parse-mu-block %esi *(ebp+0x10) %edi %eax *(ebp+0x14) *(ebp+0x18))
6464 $populate-mu-function-body:end:
6465
6466 5f/pop-to-edi
6467 5e/pop-to-esi
6468 58/pop-to-eax
6469
6470 89/<- %esp 5/r32/ebp
6471 5d/pop-to-ebp
6472 c3/return
6473
6474
6475 parse-mu-block:
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513 55/push-ebp
6514 89/<- %ebp 4/r32/esp
6515
6516 50/push-eax
6517 51/push-ecx
6518 52/push-edx
6519 53/push-ebx
6520 57/push-edi
6521
6522 81 5/subop/subtract %esp 0x200/imm32
6523 68/push 0x200/imm32/size
6524 68/push 0/imm32/read
6525 68/push 0/imm32/write
6526 89/<- %ecx 4/r32/esp
6527
6528 68/push 0/imm32/end
6529 68/push 0/imm32/start
6530 89/<- %edx 4/r32/esp
6531
6532 (allocate Heap *Stmt-size *(ebp+0x14))
6533
6534 8b/-> *(ebp+0x14) 7/r32/edi
6535 (lookup *edi *(edi+4))
6536 89/<- %edi 0/r32/eax
6537
6538
6539 8d/copy-address *(edi+0xc) 0/r32/eax
6540 (new-block-name *(ebp+0x10) %eax)
6541
6542 (push *(ebp+0xc) *(edi+0xc))
6543 (push *(ebp+0xc) *(edi+0x10))
6544 (push *(ebp+0xc) 0)
6545 {
6546 $parse-mu-block:line-loop:
6547
6548 (clear-stream %ecx)
6549 (read-line-buffered *(ebp+8) %ecx)
6550
6551
6552
6553
6554
6555 81 7/subop/compare *ecx 0/imm32
6556 0f 84/jump-if-= break/disp32
6557
6558 (next-mu-token %ecx %edx)
6559
6560
6561
6562
6563
6564 (slice-empty? %edx)
6565 3d/compare-eax-and 0/imm32/false
6566 0f 85/jump-if-!= loop/disp32
6567
6568
6569 8b/-> *edx 0/r32/eax
6570 8a/copy-byte *eax 0/r32/AL
6571 81 4/subop/and %eax 0xff/imm32
6572
6573 3d/compare-eax-and 0x23/imm32/hash
6574 0f 84/jump-if-= loop/disp32
6575
6576 {
6577 $parse-mu-block:check-for-block:
6578 (slice-equal? %edx "{")
6579 3d/compare-eax-and 0/imm32/false
6580 74/jump-if-= break/disp8
6581 (check-no-tokens-left %ecx)
6582
6583
6584 68/push 0/imm32
6585 68/push 0/imm32
6586 89/<- %eax 4/r32/esp
6587
6588 (parse-mu-block *(ebp+8) *(ebp+0xc) *(ebp+0x10) %eax *(ebp+0x18) *(ebp+0x1c))
6589 (append-to-block Heap %edi *eax *(eax+4))
6590
6591 81 0/subop/add %esp 8/imm32
6592
6593 e9/jump $parse-mu-block:line-loop/disp32
6594 }
6595
6596 $parse-mu-block:check-for-end:
6597 (slice-equal? %edx "}")
6598 3d/compare-eax-and 0/imm32/false
6599 0f 85/jump-if-!= break/disp32
6600
6601 {
6602 $parse-mu-block:check-for-named-block:
6603
6604 8b/-> *(edx+4) 0/r32/eax
6605 48/decrement-eax
6606 8a/copy-byte *eax 0/r32/AL
6607 81 4/subop/and %eax 0xff/imm32
6608
6609 3d/compare-eax-and 0x3a/imm32/colon
6610 0f 85/jump-if-!= break/disp32
6611
6612
6613
6614 ff 1/subop/decrement *(edx+4)
6615
6616 68/push 0/imm32
6617 68/push 0/imm32
6618 89/<- %eax 4/r32/esp
6619
6620 (parse-mu-named-block %edx *(ebp+8) *(ebp+0xc) *(ebp+0x10) %eax *(ebp+0x18) *(ebp+0x1c))
6621 (append-to-block Heap %edi *eax *(eax+4))
6622
6623 81 0/subop/add %esp 8/imm32
6624
6625 e9/jump $parse-mu-block:line-loop/disp32
6626 }
6627
6628 {
6629 $parse-mu-block:check-for-var:
6630 (slice-equal? %edx "var")
6631 3d/compare-eax-and 0/imm32/false
6632 74/jump-if-= break/disp8
6633
6634 68/push 0/imm32
6635 68/push 0/imm32
6636 89/<- %eax 4/r32/esp
6637
6638 (parse-mu-var-def %ecx *(ebp+0xc) %eax *(ebp+0x10) *(ebp+0x18) *(ebp+0x1c))
6639 (append-to-block Heap %edi *eax *(eax+4))
6640
6641 81 0/subop/add %esp 8/imm32
6642
6643 e9/jump $parse-mu-block:line-loop/disp32
6644 }
6645 $parse-mu-block:regular-stmt:
6646
6647
6648 68/push 0/imm32
6649 68/push 0/imm32
6650 89/<- %eax 4/r32/esp
6651
6652 (parse-mu-stmt %ecx *(ebp+0xc) *(ebp+0x10) %eax *(ebp+0x18) *(ebp+0x1c))
6653 (append-to-block Heap %edi *eax *(eax+4))
6654
6655 81 0/subop/add %esp 8/imm32
6656
6657 e9/jump loop/disp32
6658 }
6659
6660 (pop *(ebp+0xc))
6661 (pop *(ebp+0xc))
6662 (pop *(ebp+0xc))
6663 $parse-mu-block:end:
6664
6665 81 0/subop/add %esp 0x214/imm32
6666
6667 5f/pop-to-edi
6668 5b/pop-to-ebx
6669 5a/pop-to-edx
6670 59/pop-to-ecx
6671 58/pop-to-eax
6672
6673 89/<- %esp 5/r32/ebp
6674 5d/pop-to-ebp
6675 c3/return
6676
6677 $parse-mu-block:abort:
6678
6679 (write-buffered *(ebp+0x18) "'{' or '}' should be on its own line, but got '")
6680 (rewind-stream %ecx)
6681 (write-stream-data *(ebp+0x18) %ecx)
6682 (write-buffered *(ebp+0x18) "'\n")
6683 (flush *(ebp+0x18))
6684 (stop *(ebp+0x1c) 1)
6685
6686
6687 new-block-name:
6688
6689 55/push-ebp
6690 89/<- %ebp 4/r32/esp
6691
6692 50/push-eax
6693 51/push-ecx
6694 52/push-edx
6695
6696 8b/-> *(ebp+8) 0/r32/eax
6697 (lookup *eax *(eax+4))
6698 8b/-> *eax 0/r32/eax
6699 05/add-to-eax 0xd/imm32
6700 89/<- %ecx 0/r32/eax
6701
6702 29/subtract-from %esp 1/r32/ecx
6703 ff 6/subop/push %ecx
6704 68/push 0/imm32/read
6705 68/push 0/imm32/write
6706 89/<- %edx 4/r32/esp
6707 (clear-stream %edx)
6708
6709 8b/-> *(ebp+8) 0/r32/eax
6710 (lookup *eax *(eax+4))
6711
6712 (write %edx "$")
6713 (write %edx %eax)
6714 (write %edx ":")
6715 (print-int32 %edx *Next-block-index)
6716 ff 0/subop/increment *Next-block-index
6717
6718
6719 8b/-> *edx 0/r32/eax
6720
6721 8d/copy-address *(edx+0xc) 2/r32/edx
6722
6723 01/add-to %eax 2/r32/edx
6724
6725 ff 6/subop/push %eax
6726 ff 6/subop/push %edx
6727 89/<- %eax 4/r32/esp
6728
6729 (new-literal Heap %eax *(ebp+0xc))
6730
6731
6732
6733
6734
6735
6736
6737 $new-block-name:end:
6738
6739 81 0/subop/add %ecx 0xc/imm32
6740 81 0/subop/add %ecx 8/imm32
6741 01/add-to %esp 1/r32/ecx
6742
6743 5a/pop-to-edx
6744 59/pop-to-ecx
6745 58/pop-to-eax
6746
6747 89/<- %esp 5/r32/ebp
6748 5d/pop-to-ebp
6749 c3/return
6750
6751 == data
6752
6753
6754 Next-block-index:
6755 1/imm32
6756
6757 == code
6758
6759 check-no-tokens-left:
6760
6761 55/push-ebp
6762 89/<- %ebp 4/r32/esp
6763
6764 50/push-eax
6765 51/push-ecx
6766
6767 68/push 0/imm32/end
6768 68/push 0/imm32/start
6769 89/<- %ecx 4/r32/esp
6770
6771 (next-mu-token *(ebp+8) %ecx)
6772
6773 (slice-empty? %ecx)
6774 3d/compare-eax-and 0/imm32/false
6775 75/jump-if-!= $check-no-tokens-left:end/disp8
6776
6777
6778 8b/-> *edx 0/r32/eax
6779 8a/copy-byte *eax 0/r32/AL
6780 81 4/subop/and %eax 0xff/imm32
6781
6782 3d/compare-eax-and 0x23/imm32/hash
6783 74/jump-if-= $check-no-tokens-left:end/disp8
6784
6785 (write-buffered Stderr "'{' or '}' should be on its own line, but got '")
6786 (rewind-stream %ecx)
6787 (write-stream 2 %ecx)
6788 (write-buffered Stderr "'\n")
6789 (flush Stderr)
6790
6791 bb/copy-to-ebx 1/imm32
6792 e8/call syscall_exit/disp32
6793
6794 $check-no-tokens-left:end:
6795
6796 81 0/subop/add %esp 8/imm32
6797
6798 59/pop-to-ecx
6799 58/pop-to-eax
6800
6801 89/<- %esp 5/r32/ebp
6802 5d/pop-to-ebp
6803 c3/return
6804
6805 parse-mu-named-block:
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816 55/push-ebp
6817 89/<- %ebp 4/r32/esp
6818
6819 50/push-eax
6820 51/push-ecx
6821 57/push-edi
6822
6823 68/push 0/imm32
6824 68/push 0/imm32
6825 89/<- %ecx 4/r32/esp
6826
6827 (new-literal Heap *(ebp+8) %ecx)
6828
6829 (push *(ebp+0x10) *ecx)
6830 (push *(ebp+0x10) *(ecx+4))
6831 (push *(ebp+0x10) 0)
6832
6833 (parse-mu-block *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c) *(ebp+0x20))
6834
6835 (pop *(ebp+0x10))
6836 (pop *(ebp+0x10))
6837 (pop *(ebp+0x10))
6838
6839 8b/-> *(ebp+0x18) 7/r32/edi
6840 (lookup *edi *(edi+4))
6841 89/<- %edi 0/r32/eax
6842
6843 c7 0/subop/copy *edi 0/imm32/block
6844
6845 8b/-> *ecx 0/r32/eax
6846 89/<- *(edi+0xc) 0/r32/eax
6847 8b/-> *(ecx+4) 0/r32/eax
6848 89/<- *(edi+0x10) 0/r32/eax
6849 $parse-mu-named-block:end:
6850
6851 81 0/subop/add %esp 8/imm32
6852
6853 5f/pop-to-edi
6854 59/pop-to-ecx
6855 58/pop-to-eax
6856
6857 89/<- %esp 5/r32/ebp
6858 5d/pop-to-ebp
6859 c3/return
6860
6861 parse-mu-var-def:
6862
6863 55/push-ebp
6864 89/<- %ebp 4/r32/esp
6865
6866 50/push-eax
6867 51/push-ecx
6868 52/push-edx
6869 57/push-edi
6870
6871 8b/-> *(ebp+0x10) 7/r32/edi
6872
6873 68/push 0/imm32/end
6874 68/push 0/imm32/start
6875 89/<- %ecx 4/r32/esp
6876
6877 68/push 0/imm32
6878 68/push 0/imm32
6879 89/<- %edx 4/r32/esp
6880
6881 (next-mu-token *(ebp+8) %ecx)
6882 (parse-var-with-type %ecx *(ebp+8) %edx *(ebp+0x18) *(ebp+0x1c))
6883
6884 (push *(ebp+0xc) *edx)
6885 (push *(ebp+0xc) *(edx+4))
6886 (push *(ebp+0xc) 0)
6887
6888 (lookup *edx *(edx+4))
6889 8b/-> *(eax+0x18) 0/r32/eax
6890 3d/compare-eax-and 0/imm32
6891 {
6892 75/jump-if-!= break/disp8
6893
6894
6895 (next-mu-token *(ebp+8) %ecx)
6896 (slice-empty? %ecx)
6897 3d/compare-eax-and 0/imm32/false
6898 0f 84/jump-if-= $parse-mu-var-def:error2/disp32
6899
6900 (new-var-def Heap *edx *(edx+4) %edi)
6901 e9/jump $parse-mu-var-def:end/disp32
6902 }
6903
6904 {
6905 0f 84/jump-if-= break/disp32
6906
6907
6908
6909 (next-mu-token *(ebp+8) %ecx)
6910 (slice-equal? %ecx "<-")
6911 3d/compare-eax-and 0/imm32/false
6912 74/jump-if-= $parse-mu-var-def:error1/disp8
6913
6914 (new-reg-var-def Heap *edx *(edx+4) %edi)
6915 (lookup *edi *(edi+4))
6916 (add-operation-and-inputs-to-stmt %eax *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
6917 }
6918 $parse-mu-var-def:end:
6919
6920 81 0/subop/add %esp 0x10/imm32
6921
6922 5f/pop-to-edi
6923 5a/pop-to-edx
6924 59/pop-to-ecx
6925 58/pop-to-eax
6926
6927 89/<- %esp 5/r32/ebp
6928 5d/pop-to-ebp
6929 c3/return
6930
6931 $parse-mu-var-def:error1:
6932 (rewind-stream *(ebp+8))
6933
6934 (write-buffered *(ebp+0x18) "register variable requires a valid instruction to initialize but got '")
6935 (flush *(ebp+0x18))
6936 (write-stream-data *(ebp+0x18) *(ebp+8))
6937 (write-buffered *(ebp+0x18) "'\n")
6938 (flush *(ebp+0x18))
6939 (stop *(ebp+0x1c) 1)
6940
6941
6942 $parse-mu-var-def:error2:
6943 (rewind-stream *(ebp+8))
6944
6945 (write-buffered *(ebp+0x18) "fn ")
6946 8b/-> *(ebp+0x14) 0/r32/eax
6947 (lookup *eax *(eax+4))
6948 (write-buffered *(ebp+0x18) %eax)
6949 (write-buffered *(ebp+0x18) ": var ")
6950
6951 (lookup *edx *(edx+4))
6952 (lookup *eax *(eax+4))
6953 (write-buffered *(ebp+0x18) %eax)
6954 (write-buffered *(ebp+0x18) ": variables on the stack can't take an initializer\n")
6955 (flush *(ebp+0x18))
6956 (stop *(ebp+0x1c) 1)
6957
6958
6959 test-parse-mu-var-def:
6960
6961
6962 55/push-ebp
6963 89/<- %ebp 4/r32/esp
6964
6965 (clear-stream _test-input-stream)
6966 (write _test-input-stream "n: int\n")
6967
6968 68/push 0/imm32
6969 68/push 0/imm32
6970 89/<- %esi 4/r32/esp
6971
6972 81 5/subop/subtract %esp 0xc0/imm32
6973 68/push 0xc0/imm32/size
6974 68/push 0/imm32/top
6975 89/<- %ecx 4/r32/esp
6976 (clear-stack %ecx)
6977
6978 (parse-mu-var-def _test-input-stream %ecx %esi 0 Stderr 0)
6979
6980 (lookup *esi *(esi+4))
6981 89/<- %esi 0/r32/eax
6982
6983 (check-ints-equal *esi 2 "F - test-parse-mu-var-def/tag")
6984
6985 (lookup *(esi+4) *(esi+8))
6986 89/<- %ecx 0/r32/eax
6987
6988 (lookup *ecx *(ecx+4))
6989 (check-strings-equal %eax "n" "F - test-parse-mu-var-def/var-name")
6990
6991 (check-ints-equal *(ecx+0x18) 0 "F - test-parse-mu-var-def/var-register")
6992
6993 (lookup *(ecx+8) *(ecx+0xc))
6994 (check-ints-equal *eax 1 "F - test-parse-mu-var-def/var-type:0")
6995 (check-ints-equal *(eax+4) 1 "F - test-parse-mu-var-def/var-type:1")
6996 (check-ints-equal *(eax+0xc) 0 "F - test-parse-mu-var-def/var-type:2")
6997
6998 89/<- %esp 5/r32/ebp
6999 5d/pop-to-ebp
7000 c3/return
7001
7002 test-parse-mu-reg-var-def:
7003
7004
7005 55/push-ebp
7006 89/<- %ebp 4/r32/esp
7007
7008 (clear-stream _test-input-stream)
7009 (write _test-input-stream "n/eax: int <- copy 0\n")
7010
7011 68/push 0/imm32
7012 68/push 0/imm32
7013 89/<- %esi 4/r32/esp
7014
7015 81 5/subop/subtract %esp 0xc0/imm32
7016 68/push 0xc0/imm32/size
7017 68/push 0/imm32/top
7018 89/<- %ecx 4/r32/esp
7019 (clear-stack %ecx)
7020
7021 (parse-mu-var-def _test-input-stream %ecx %esi 0 Stderr 0)
7022
7023 (lookup *esi *(esi+4))
7024 89/<- %esi 0/r32/eax
7025
7026 (check-ints-equal *esi 3 "F - test-parse-mu-reg-var-def/tag")
7027
7028
7029 (lookup *(esi+0x14) *(esi+0x18))
7030
7031 (check-ints-equal *(eax+8) 0 "F - test-parse-mu-reg-var-def/single-output")
7032
7033 (lookup *eax *(eax+4))
7034
7035 89/<- %ecx 0/r32/eax
7036
7037 (lookup *ecx *(ecx+4))
7038 (check-strings-equal %eax "n" "F - test-parse-mu-reg-var-def/output-name")
7039
7040 (lookup *(ecx+0x18) *(ecx+0x1c))
7041 (check-strings-equal %eax "eax" "F - test-parse-mu-reg-var-def/output-register")
7042
7043 (lookup *(ecx+8) *(ecx+0xc))
7044 (check-ints-equal *eax 1 "F - test-parse-mu-reg-var-def/output-type:0")
7045 (check-ints-equal *(eax+4) 1 "F - test-parse-mu-reg-var-def/output-type:1")
7046 (check-ints-equal *(eax+0xc) 0 "F - test-parse-mu-reg-var-def/output-type:2")
7047
7048 89/<- %esp 5/r32/ebp
7049 5d/pop-to-ebp
7050 c3/return
7051
7052 parse-mu-stmt:
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068 55/push-ebp
7069 89/<- %ebp 4/r32/esp
7070
7071 50/push-eax
7072 51/push-ecx
7073 52/push-edx
7074 53/push-ebx
7075 57/push-edi
7076
7077 68/push 0/imm32/end
7078 68/push 0/imm32/start
7079 89/<- %ecx 4/r32/esp
7080
7081 ba/copy-to-edx 0/imm32/false
7082
7083 68/push 0/imm32
7084 68/push 0/imm32
7085 89/<- %ebx 4/r32/esp
7086
7087 (allocate Heap *Stmt-size *(ebp+0x14))
7088
7089 8b/-> *(ebp+0x14) 7/r32/edi
7090 (lookup *edi *(edi+4))
7091 89/<- %edi 0/r32/eax
7092
7093 c7 0/subop/copy *edi 1/imm32/stmt1
7094 {
7095 (stmt-has-outputs? *(ebp+8))
7096 3d/compare-eax-and 0/imm32/false
7097 0f 84/jump-if-= break/disp32
7098 {
7099 $parse-mu-stmt:read-outputs:
7100
7101 (next-mu-token *(ebp+8) %ecx)
7102
7103 (slice-empty? %ecx)
7104 3d/compare-eax-and 0/imm32/false
7105 0f 85/jump-if-!= break/disp32
7106
7107 (slice-equal? %ecx "<-")
7108 3d/compare-eax-and 0/imm32/false
7109 0f 85/jump-if-!= break/disp32
7110
7111 ba/copy-to-edx 0/imm32/false
7112
7113 8b/-> *ecx 0/r32/eax
7114 8a/copy-byte *eax 0/r32/AL
7115 81 4/subop/and %eax 0xff/imm32
7116 3d/compare-eax-and 0x2a/imm32/asterisk
7117 {
7118 75/jump-if-!= break/disp8
7119 ff 0/subop/increment *ecx
7120 ba/copy-to-edx 1/imm32/true
7121 }
7122
7123 (is-identifier? %ecx)
7124 3d/compare-eax-and 0/imm32/false
7125 0f 84/jump-if-= $parse-mu-stmt:abort/disp32
7126
7127 (lookup-or-define-var %ecx *(ebp+0xc) *(ebp+0x10) %ebx *(ebp+0x18) *(ebp+0x1c))
7128 8d/copy-address *(edi+0x14) 0/r32/eax
7129 (append-stmt-var Heap *ebx *(ebx+4) *(edi+0x14) *(edi+0x18) %edx %eax)
7130
7131 e9/jump loop/disp32
7132 }
7133 }
7134 (add-operation-and-inputs-to-stmt %edi *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
7135 $parse-mu-stmt:end:
7136
7137 81 0/subop/add %esp 0x10/imm32
7138
7139 5f/pop-to-edi
7140 5b/pop-to-ebx
7141 5a/pop-to-edx
7142 59/pop-to-ecx
7143 58/pop-to-eax
7144
7145 89/<- %esp 5/r32/ebp
7146 5d/pop-to-ebp
7147 c3/return
7148
7149 $parse-mu-stmt:abort:
7150
7151 (write-buffered *(ebp+0x18) "invalid identifier '")
7152 (write-slice-buffered *(ebp+0x18) %ecx)
7153 (write-buffered *(ebp+0x18) "'\n")
7154 (flush *(ebp+0x18))
7155 (stop *(ebp+0x1c) 1)
7156
7157
7158 add-operation-and-inputs-to-stmt:
7159
7160
7161
7162
7163
7164
7165
7166
7167 55/push-ebp
7168 89/<- %ebp 4/r32/esp
7169
7170 50/push-eax
7171 51/push-ecx
7172 52/push-edx
7173 53/push-ebx
7174 56/push-esi
7175 57/push-edi
7176
7177 8b/-> *(ebp+8) 7/r32/edi
7178
7179 68/push 0/imm32/end
7180 68/push 0/imm32/start
7181 89/<- %ecx 4/r32/esp
7182
7183 ba/copy-to-edx 0/imm32/false
7184
7185 68/push 0/imm32
7186 68/push 0/imm32
7187 89/<- %esi 4/r32/esp
7188 $add-operation-and-inputs-to-stmt:read-operation:
7189 (next-mu-token *(ebp+0xc) %ecx)
7190 8d/copy-address *(edi+4) 0/r32/eax
7191 (slice-to-string Heap %ecx %eax)
7192
7193 (slice-equal? %ecx "get")
7194 89/<- %ebx 0/r32/eax
7195 {
7196 $add-operation-and-inputs-to-stmt:read-inouts:
7197
7198 (next-mu-token *(ebp+0xc) %ecx)
7199
7200 (slice-empty? %ecx)
7201 3d/compare-eax-and 0/imm32/false
7202 0f 85/jump-if-!= break/disp32
7203
7204 (slice-equal? %ecx "<-")
7205 3d/compare-eax-and 0/imm32/false
7206 0f 85/jump-if-!= $add-operation-and-inputs-to-stmt:abort/disp32
7207
7208 {
7209 81 7/subop/compare %ebx 0/imm32/false
7210 74/jump-if-= break/disp8
7211 (lookup *(edi+0xc) *(edi+0x10))
7212 3d/compare-eax-and 0/imm32
7213 74/jump-if-= break/disp8
7214 (lookup-or-create-constant %eax %ecx %esi)
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225 e9/jump $add-operation-and-inputs-to-stmt:save-var/disp32
7226 }
7227
7228 ba/copy-to-edx 0/imm32/false
7229
7230 8b/-> *ecx 0/r32/eax
7231 8a/copy-byte *eax 0/r32/AL
7232 81 4/subop/and %eax 0xff/imm32
7233 3d/compare-eax-and 0x2a/imm32/asterisk
7234 {
7235 75/jump-if-!= break/disp8
7236 $add-operation-and-inputs-to-stmt:inout-is-deref:
7237 ff 0/subop/increment *ecx
7238 ba/copy-to-edx 1/imm32/true
7239 }
7240 (lookup-var-or-literal %ecx *(ebp+0x10) %esi *(ebp+0x14) *(ebp+0x18))
7241 $add-operation-and-inputs-to-stmt:save-var:
7242 8d/copy-address *(edi+0xc) 0/r32/eax
7243 (append-stmt-var Heap *esi *(esi+4) *(edi+0xc) *(edi+0x10) %edx %eax)
7244
7245 e9/jump loop/disp32
7246 }
7247 $add-operation-and-inputs-to-stmt:end:
7248
7249 81 0/subop/add %esp 0x10/imm32
7250
7251 5f/pop-to-edi
7252 5e/pop-to-esi
7253 5b/pop-to-ebx
7254 5a/pop-to-edx
7255 59/pop-to-ecx
7256 58/pop-to-eax
7257
7258 89/<- %esp 5/r32/ebp
7259 5d/pop-to-ebp
7260 c3/return
7261
7262 $add-operation-and-inputs-to-stmt:abort:
7263
7264 (rewind-stream *(ebp+8))
7265 (write-buffered *(ebp+0x14) "invalid identifier '")
7266 (write-stream-data *(ebp+0x14) *(ebp+8))
7267 (write-buffered *(ebp+0x14) "'\n")
7268 (flush *(ebp+0x14))
7269 (stop *(ebp+0x18) 1)
7270
7271
7272 stmt-has-outputs?:
7273
7274 55/push-ebp
7275 89/<- %ebp 4/r32/esp
7276
7277 51/push-ecx
7278
7279 68/push 0/imm32/end
7280 68/push 0/imm32/start
7281 89/<- %ecx 4/r32/esp
7282
7283 b8/copy-to-eax 0/imm32/false
7284 (rewind-stream *(ebp+8))
7285 {
7286 (next-mu-token *(ebp+8) %ecx)
7287
7288 (slice-empty? %ecx)
7289 3d/compare-eax-and 0/imm32/false
7290 b8/copy-to-eax 0/imm32/false/result
7291 0f 85/jump-if-!= break/disp32
7292
7293
7294 8b/-> *ecx 0/r32/eax
7295 8a/copy-byte *eax 0/r32/AL
7296 81 4/subop/and %eax 0xff/imm32
7297
7298 3d/compare-eax-and 0x23/imm32/hash
7299 b8/copy-to-eax 0/imm32/false/result
7300 0f 84/jump-if-= break/disp32
7301
7302 (slice-equal? %ecx "<-")
7303 3d/compare-eax-and 0/imm32/false
7304 74/jump-if-= loop/disp8
7305 b8/copy-to-eax 1/imm32/true
7306 }
7307 $stmt-has-outputs:end:
7308 (rewind-stream *(ebp+8))
7309
7310 81 0/subop/add %esp 8/imm32
7311
7312 59/pop-to-ecx
7313
7314 89/<- %esp 5/r32/ebp
7315 5d/pop-to-ebp
7316 c3/return
7317
7318
7319
7320 lookup-var-or-literal:
7321
7322 55/push-ebp
7323 89/<- %ebp 4/r32/esp
7324
7325 50/push-eax
7326 51/push-ecx
7327 56/push-esi
7328
7329 8b/-> *(ebp+8) 6/r32/esi
7330
7331 (slice-empty? %esi)
7332 3d/compare-eax-and 0/imm32/false
7333 0f 85/jump-if-!= $lookup-var-or-literal:abort/disp32
7334
7335 8b/-> *esi 1/r32/ecx
7336 8a/copy-byte *ecx 1/r32/CL
7337 81 4/subop/and %ecx 0xff/imm32
7338
7339 {
7340 (is-decimal-digit? %ecx)
7341 3d/compare-eax-and 0/imm32/false
7342 74/jump-if-= break/disp8
7343 $lookup-var-or-literal:literal:
7344 (new-literal-integer Heap %esi *(ebp+0x10) *(ebp+0x14) *(ebp+0x18))
7345 eb/jump $lookup-var-or-literal:end/disp8
7346 }
7347
7348 {
7349 81 7/subop/compare %ecx 0x22/imm32/dquote
7350 75/jump-if-!= break/disp8
7351 $lookup-var-or-literal:literal-string:
7352 (new-literal Heap %esi *(ebp+0x10))
7353 eb/jump $lookup-var-or-literal:end/disp8
7354 }
7355
7356 {
7357 $lookup-var-or-literal:var:
7358 (lookup-var %esi *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18))
7359 }
7360 $lookup-var-or-literal:end:
7361
7362 5e/pop-to-esi
7363 59/pop-to-ecx
7364 58/pop-to-eax
7365
7366 89/<- %esp 5/r32/ebp
7367 5d/pop-to-ebp
7368 c3/return
7369
7370 $lookup-var-or-literal:abort:
7371 (write-buffered *(ebp+0x14) "empty variable!")
7372 (flush *(ebp+0x14))
7373 (stop *(ebp+0x18) 1)
7374
7375
7376
7377 lookup-var:
7378
7379 55/push-ebp
7380 89/<- %ebp 4/r32/esp
7381
7382 50/push-eax
7383
7384 (lookup-var-helper *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18))
7385
7386 8b/-> *(ebp+0x10) 0/r32/eax
7387 81 7/subop/compare *eax 0/imm32
7388 74/jump-if-= $lookup-var:abort/disp8
7389 $lookup-var:end:
7390
7391 58/pop-to-eax
7392
7393 89/<- %esp 5/r32/ebp
7394 5d/pop-to-ebp
7395 c3/return
7396
7397 $lookup-var:abort:
7398 (write-buffered *(ebp+0x14) "unknown variable '")
7399 (write-slice-buffered *(ebp+0x14) *(ebp+8))
7400 (write-buffered *(ebp+0x14) "'\n")
7401 (flush *(ebp+0x14))
7402 (stop *(ebp+0x18) 1)
7403
7404
7405
7406 lookup-var-helper:
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417 55/push-ebp
7418 89/<- %ebp 4/r32/esp
7419
7420 50/push-eax
7421 51/push-ecx
7422 52/push-edx
7423 53/push-ebx
7424 56/push-esi
7425
7426 (zero-out *(ebp+0x10) *Handle-size)
7427
7428 8b/-> *(ebp+0xc) 6/r32/esi
7429
7430 8b/-> *esi 3/r32/ebx
7431
7432 3b/compare<- *(esi+4) 0/r32/eax
7433 0f 8f/jump-if-> $lookup-var-helper:error1/disp32
7434
7435 8d/copy-address *(esi+8) 2/r32/edx
7436
7437 8d/copy-address *(esi+ebx-4) 3/r32/ebx
7438 {
7439
7440 39/compare %ebx 2/r32/edx
7441 0f 82/jump-if-addr< break/disp32
7442
7443 (lookup *ebx *(ebx+4))
7444 89/<- %ecx 0/r32/eax
7445
7446 (lookup *ecx *(ecx+4))
7447
7448 (slice-equal? *(ebp+8) %eax)
7449 3d/compare-eax-and 0/imm32/false
7450 {
7451 74/jump-if-= break/disp8
7452
7453 8b/-> *(ebp+0x10) 6/r32/esi
7454
7455 8b/-> *ebx 0/r32/eax
7456 89/<- *esi 0/r32/eax
7457 8b/-> *(ebx+4) 0/r32/eax
7458 89/<- *(esi+4) 0/r32/eax
7459
7460 eb/jump $lookup-var-helper:end/disp8
7461 }
7462
7463 81 5/subop/subtract %ebx 0xc/imm32
7464 e9/jump loop/disp32
7465 }
7466 $lookup-var-helper:end:
7467
7468 5e/pop-to-esi
7469 5b/pop-to-ebx
7470 5a/pop-to-edx
7471 59/pop-to-ecx
7472 58/pop-to-eax
7473
7474 89/<- %esp 5/r32/ebp
7475 5d/pop-to-ebp
7476 c3/return
7477
7478 $lookup-var-helper:error1:
7479 (write-buffered *(ebp+0x14) "malformed stack when looking up '")
7480 (write-slice-buffered *(ebp+0x14) *(ebp+8))
7481 (write-buffered *(ebp+0x14) "'\n")
7482 (flush *(ebp+0x14))
7483 (stop *(ebp+0x18) 1)
7484
7485
7486
7487 lookup-or-define-var:
7488
7489 55/push-ebp
7490 89/<- %ebp 4/r32/esp
7491
7492 50/push-eax
7493
7494 (lookup-var-helper *(ebp+8) *(ebp+0xc) *(ebp+0x14))
7495 {
7496
7497 8b/-> *(ebp+0x14) 0/r32/eax
7498 81 7/subop/compare *eax 0/imm32
7499 75/jump-if-!= break/disp8
7500
7501 {
7502 (find-in-function-outputs *(ebp+0x10) *(ebp+8) *(ebp+0x14))
7503 8b/-> *(ebp+0x14) 0/r32/eax
7504 81 7/subop/compare *eax 0/imm32
7505
7506 0f 84/jump-if-= $lookup-or-define-var:abort/disp32
7507
7508 (push *(ebp+0xc) *eax)
7509 (push *(ebp+0xc) *(eax+4))
7510 (push *(ebp+0xc) 0)
7511 }
7512 }
7513 $lookup-or-define-var:end:
7514
7515 58/pop-to-eax
7516
7517 89/<- %esp 5/r32/ebp
7518 5d/pop-to-ebp
7519 c3/return
7520
7521 $lookup-or-define-var:abort:
7522 (write-buffered *(ebp+0x18) "unknown variable '")
7523 (write-slice-buffered *(ebp+0x18) *(ebp+8))
7524 (write-buffered *(ebp+0x18) "'\n")
7525 (flush *(ebp+0x18))
7526 (stop *(ebp+0x1c) 1)
7527
7528
7529 find-in-function-outputs:
7530
7531 55/push-ebp
7532 89/<- %ebp 4/r32/esp
7533
7534 50/push-eax
7535 51/push-ecx
7536
7537 8b/-> *(ebp+8) 1/r32/ecx
7538 (lookup *(ecx+0x10) *(ecx+0x14))
7539 89/<- %ecx 0/r32/eax
7540
7541 {
7542 81 7/subop/compare %ecx 0/imm32
7543 74/jump-if-= break/disp8
7544
7545 (lookup *ecx *(ecx+4))
7546
7547 (lookup *eax *(eax+4))
7548
7549 (slice-equal? *(ebp+0xc) %eax)
7550 3d/compare-eax-and 0/imm32/false
7551 {
7552 74/jump-if-= break/disp8
7553
7554 57/push-edi
7555 8b/-> *(ebp+0x10) 7/r32/edi
7556
7557 8b/-> *ecx 0/r32/eax
7558 89/<- *edi 0/r32/eax
7559 8b/-> *(ecx+4) 0/r32/eax
7560 89/<- *(edi+4) 0/r32/eax
7561
7562 5f/pop-to-edi
7563 eb/jump $find-in-function-outputs:end/disp8
7564 }
7565
7566 (lookup *(ecx+8) *(ecx+0xc))
7567 89/<- %ecx 0/r32/eax
7568
7569 eb/jump loop/disp8
7570 }
7571 b8/copy-to-eax 0/imm32
7572 $find-in-function-outputs:end:
7573
7574 59/pop-to-ecx
7575 58/pop-to-eax
7576
7577 89/<- %esp 5/r32/ebp
7578 5d/pop-to-ebp
7579 c3/return
7580
7581 test-parse-mu-stmt:
7582
7583 55/push-ebp
7584 89/<- %ebp 4/r32/esp
7585
7586 (clear-stream _test-input-stream)
7587 (write _test-input-stream "increment n\n")
7588
7589 81 5/subop/subtract %esp 0xc0/imm32
7590 68/push 0xc0/imm32/size
7591 68/push 0/imm32/top
7592 89/<- %ecx 4/r32/esp
7593 (clear-stack %ecx)
7594
7595 68/push 0/imm32
7596 68/push 0/imm32
7597 89/<- %edx 4/r32/esp
7598
7599 68/push 0/imm32
7600 68/push 0/imm32
7601 89/<- %eax 4/r32/esp
7602
7603 (copy-array Heap "n" %eax)
7604 (new-var Heap *eax *(eax+4) %edx)
7605
7606 (push %ecx *edx)
7607 (push %ecx *(edx+4))
7608 (push %ecx 0)
7609
7610 68/push 0/imm32
7611 68/push 0/imm32
7612 89/<- %eax 4/r32/esp
7613
7614 (parse-mu-stmt _test-input-stream %ecx 0 %eax Stderr 0)
7615
7616 (lookup *eax *(eax+4))
7617 89/<- %edx 0/r32/eax
7618
7619 (check-ints-equal *edx 1 "F - test-parse-mu-stmt/tag")
7620
7621 (lookup *(edx+4) *(edx+8))
7622 (check-strings-equal %eax "increment" "F - test-parse-mu-stmt/name")
7623
7624
7625 (lookup *(edx+0xc) *(edx+0x10))
7626
7627 (lookup *eax *(eax+4))
7628
7629 (lookup *eax *(eax+4))
7630
7631 (check-strings-equal %eax "n" "F - test-parse-mu-stmt/inout:0")
7632
7633 89/<- %esp 5/r32/ebp
7634 5d/pop-to-ebp
7635 c3/return
7636
7637 test-parse-mu-stmt-with-comma:
7638
7639 55/push-ebp
7640 89/<- %ebp 4/r32/esp
7641
7642 (clear-stream _test-input-stream)
7643 (write _test-input-stream "copy-to n, 3\n")
7644
7645 81 5/subop/subtract %esp 0xc0/imm32
7646 68/push 0xc0/imm32/size
7647 68/push 0/imm32/top
7648 89/<- %ecx 4/r32/esp
7649 (clear-stack %ecx)
7650
7651 68/push 0/imm32
7652 68/push 0/imm32
7653 89/<- %edx 4/r32/esp
7654
7655 68/push 0/imm32
7656 68/push 0/imm32
7657 89/<- %eax 4/r32/esp
7658
7659 (copy-array Heap "n" %eax)
7660 (new-var Heap *eax *(eax+4) %edx)
7661
7662 (push %ecx *edx)
7663 (push %ecx *(edx+4))
7664 (push %ecx 0)
7665
7666 68/push 0/imm32
7667 68/push 0/imm32
7668 89/<- %eax 4/r32/esp
7669
7670 (parse-mu-stmt _test-input-stream %ecx 0 %eax Stderr 0)
7671
7672 (lookup *eax *(eax+4))
7673 89/<- %edx 0/r32/eax
7674
7675 (check-ints-equal *edx 1 "F - test-parse-mu-stmt-with-comma/tag")
7676
7677 (lookup *(edx+4) *(edx+8))
7678 (check-strings-equal %eax "copy-to" "F - test-parse-mu-stmt-with-comma/name")
7679
7680
7681 (lookup *(edx+0xc) *(edx+0x10))
7682
7683 (lookup *eax *(eax+4))
7684
7685 (lookup *eax *(eax+4))
7686
7687 (check-strings-equal %eax "n" "F - test-parse-mu-stmt-with-comma/inout:0")
7688
7689 89/<- %esp 5/r32/ebp
7690 5d/pop-to-ebp
7691 c3/return
7692
7693 new-var:
7694
7695 55/push-ebp
7696 89/<- %ebp 4/r32/esp
7697
7698 50/push-eax
7699 51/push-ecx
7700
7701 8b/-> *(ebp+0x14) 1/r32/ecx
7702
7703 (allocate *(ebp+8) *Var-size %ecx)
7704
7705 (lookup *ecx *(ecx+4))
7706
7707 8b/-> *(ebp+0xc) 1/r32/ecx
7708 89/<- *eax 1/r32/ecx
7709 8b/-> *(ebp+0x10) 1/r32/ecx
7710 89/<- *(eax+4) 1/r32/ecx
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720 $new-var:end:
7721
7722 59/pop-to-ecx
7723 58/pop-to-eax
7724
7725 89/<- %esp 5/r32/ebp
7726 5d/pop-to-ebp
7727 c3/return
7728
7729 new-literal-integer:
7730
7731 55/push-ebp
7732 89/<- %ebp 4/r32/esp
7733
7734 50/push-eax
7735 51/push-ecx
7736
7737 (is-hex-int? *(ebp+0xc))
7738 3d/compare-eax-and 0/imm32/false
7739 0f 84/jump-if-= $new-literal-integer:abort/disp32
7740
7741 (new-var-from-slice *(ebp+8) *(ebp+0xc) *(ebp+0x10))
7742
7743 8b/-> *(ebp+0x10) 0/r32/eax
7744 (lookup *eax *(eax+4))
7745 89/<- %ecx 0/r32/eax
7746
7747 8d/copy-address *(ecx+8) 0/r32/eax
7748 (allocate *(ebp+8) *Tree-size %eax)
7749 (lookup *(ecx+8) *(ecx+0xc))
7750 c7 0/subop/copy *eax 1/imm32/true
7751
7752 $new-literal-integer:end:
7753
7754 81 0/subop/add %esp 8/imm32
7755
7756 59/pop-to-ecx
7757 58/pop-to-eax
7758
7759 89/<- %esp 5/r32/ebp
7760 5d/pop-to-ebp
7761 c3/return
7762
7763 $new-literal-integer:abort:
7764 (write-buffered *(ebp+0x14) "variable cannot begin with a digit '")
7765 (write-slice-buffered *(ebp+0x14) *(ebp+0xc))
7766 (write-buffered *(ebp+0x14) "'\n")
7767 (flush *(ebp+0x14))
7768 (stop *(ebp+0x18) 1)
7769
7770
7771 new-literal:
7772
7773 55/push-ebp
7774 89/<- %ebp 4/r32/esp
7775
7776 50/push-eax
7777 51/push-ecx
7778
7779 68/push 0/imm32
7780 68/push 0/imm32
7781 89/<- %ecx 4/r32/esp
7782
7783 (slice-to-string Heap *(ebp+0xc) %ecx)
7784
7785 (new-var *(ebp+8) *ecx *(ecx+4) *(ebp+0x10))
7786
7787 8b/-> *(ebp+0x10) 1/r32/ecx
7788 (lookup *ecx *(ecx+4))
7789 89/<- %ecx 0/r32/eax
7790
7791 8d/copy-address *(ecx+8) 0/r32/eax
7792 (allocate *(ebp+8) *Tree-size %eax)
7793 (lookup *(ecx+8) *(ecx+0xc))
7794
7795 c7 0/subop/copy *eax 1/imm32/true
7796 $new-literal:end:
7797
7798 81 0/subop/add %esp 8/imm32
7799
7800 59/pop-to-ecx
7801 58/pop-to-eax
7802
7803 89/<- %esp 5/r32/ebp
7804 5d/pop-to-ebp
7805 c3/return
7806
7807 new-var-from-slice:
7808
7809 55/push-ebp
7810 89/<- %ebp 4/r32/esp
7811
7812 51/push-ecx
7813
7814 68/push 0/imm32
7815 68/push 0/imm32
7816 89/<- %ecx 4/r32/esp
7817
7818 (slice-to-string Heap *(ebp+0xc) %ecx)
7819
7820 (new-var *(ebp+8) *ecx *(ecx+4) *(ebp+0x10))
7821 $new-var-from-slice:end:
7822
7823 81 0/subop/add %esp 8/imm32
7824
7825 59/pop-to-ecx
7826
7827 89/<- %esp 5/r32/ebp
7828 5d/pop-to-ebp
7829 c3/return
7830
7831 new-var-def:
7832
7833 55/push-ebp
7834 89/<- %ebp 4/r32/esp
7835
7836 50/push-eax
7837 51/push-ecx
7838
7839 (allocate *(ebp+8) *Stmt-size *(ebp+0x14))
7840
7841 8b/-> *(ebp+0x14) 0/r32/eax
7842 (lookup *eax *(eax+4))
7843
7844 c7 0/subop/copy *eax 2/imm32/tag/var-on-stack
7845
7846 8b/-> *(ebp+0xc) 1/r32/ecx
7847 89/<- *(eax+4) 1/r32/ecx
7848 8b/-> *(ebp+0x10) 1/r32/ecx
7849 89/<- *(eax+8) 1/r32/ecx
7850 $new-var-def:end:
7851
7852 59/pop-to-ecx
7853 58/pop-to-eax
7854
7855 89/<- %esp 5/r32/ebp
7856 5d/pop-to-ebp
7857 c3/return
7858
7859 new-reg-var-def:
7860
7861 55/push-ebp
7862 89/<- %ebp 4/r32/esp
7863
7864 50/push-eax
7865
7866 8b/-> *(ebp+0x14) 0/r32/eax
7867
7868 (allocate *(ebp+8) *Stmt-size %eax)
7869
7870 (lookup *eax *(eax+4))
7871
7872 c7 0/subop/copy *eax 3/imm32/tag/var-in-register
7873
7874 8d/copy-address *(eax+0x14) 0/r32/eax
7875 (append-stmt-var Heap *(ebp+0xc) *(ebp+0x10) 0 0 0 %eax)
7876 $new-reg-var-def:end:
7877
7878 58/pop-to-eax
7879
7880 89/<- %esp 5/r32/ebp
7881 5d/pop-to-ebp
7882 c3/return
7883
7884 append-list:
7885
7886 55/push-ebp
7887 89/<- %ebp 4/r32/esp
7888
7889 50/push-eax
7890 51/push-ecx
7891 57/push-edi
7892
7893 8b/-> *(ebp+0x1c) 7/r32/edi
7894
7895 (allocate *(ebp+8) *List-size %edi)
7896
7897 (lookup *edi *(edi+4))
7898 89/<- %edi 0/r32/eax
7899
7900 8b/-> *(ebp+0xc) 0/r32/eax
7901 89/<- *edi 0/r32/eax
7902 8b/-> *(ebp+0x10) 0/r32/eax
7903 89/<- *(edi+4) 0/r32/eax
7904
7905 81 7/subop/compare *(ebp+0x14) 0/imm32
7906 74/jump-if-= $append-list:end/disp8
7907
7908 $append-list:non-empty-list:
7909
7910 (lookup *(ebp+0x14) *(ebp+0x18))
7911
7912 {
7913 81 7/subop/compare *(eax+8) 0/imm32
7914 74/jump-if-= break/disp8
7915
7916 (lookup *(eax+8) *(eax+0xc))
7917
7918 eb/jump loop/disp8
7919 }
7920
7921 8b/-> *(ebp+0x1c) 7/r32/edi
7922
7923 8b/-> *edi 1/r32/ecx
7924 89/<- *(eax+8) 1/r32/ecx
7925 8b/-> *(edi+4) 1/r32/ecx
7926 89/<- *(eax+0xc) 1/r32/ecx
7927
7928 8b/-> *(ebp+0x14) 1/r32/ecx
7929 89/<- *edi 1/r32/ecx
7930 8b/-> *(ebp+0x18) 1/r32/ecx
7931 89/<- *(edi+4) 1/r32/ecx
7932 $append-list:end:
7933
7934 5f/pop-to-edi
7935 59/pop-to-ecx
7936 58/pop-to-eax
7937
7938 89/<- %esp 5/r32/ebp
7939 5d/pop-to-ebp
7940 c3/return
7941
7942 append-stmt-var:
7943
7944 55/push-ebp
7945 89/<- %ebp 4/r32/esp
7946
7947 50/push-eax
7948 51/push-ecx
7949 57/push-edi
7950
7951 8b/-> *(ebp+0x20) 7/r32/edi
7952
7953 (allocate *(ebp+8) *Stmt-var-size %edi)
7954
7955 (lookup *edi *(edi+4))
7956 89/<- %ecx 0/r32/eax
7957
7958 8b/-> *(ebp+0xc) 0/r32/eax
7959 89/<- *ecx 0/r32/eax
7960 8b/-> *(ebp+0x10) 0/r32/eax
7961 89/<- *(ecx+4) 0/r32/eax
7962
7963 8b/-> *(ebp+0x1c) 0/r32/eax
7964 89/<- *(ecx+0x10) 0/r32/eax
7965
7966 81 7/subop/compare *(ebp+0x14) 0/imm32/null
7967 74/jump-if-= $append-stmt-var:end/disp8
7968
7969
7970 (lookup *(ebp+0x14) *(ebp+0x18))
7971
7972 {
7973 81 7/subop/compare *(eax+8) 0/imm32
7974 74/jump-if-= break/disp8
7975
7976 (lookup *(eax+8) *(eax+0xc))
7977
7978 eb/jump loop/disp8
7979 }
7980
7981 8b/-> *edi 1/r32/ecx
7982 89/<- *(eax+8) 1/r32/ecx
7983 8b/-> *(edi+4) 1/r32/ecx
7984 89/<- *(eax+0xc) 1/r32/ecx
7985
7986 8b/-> *(ebp+0x14) 1/r32/ecx
7987 89/<- *edi 1/r32/ecx
7988 8b/-> *(ebp+0x18) 1/r32/ecx
7989 89/<- *(edi+4) 1/r32/ecx
7990 $append-stmt-var:end:
7991
7992 5f/pop-to-edi
7993 59/pop-to-ecx
7994 58/pop-to-eax
7995
7996 89/<- %esp 5/r32/ebp
7997 5d/pop-to-ebp
7998 c3/return
7999
8000 append-to-block:
8001
8002 55/push-ebp
8003 89/<- %ebp 4/r32/esp
8004
8005 50/push-eax
8006 56/push-esi
8007
8008 8b/-> *(ebp+0xc) 6/r32/esi
8009
8010 8d/copy-address *(esi+4) 0/r32/eax
8011 (append-list *(ebp+8) *(ebp+0x10) *(ebp+0x14) *(esi+4) *(esi+8) %eax)
8012 $append-to-block:end:
8013
8014 5e/pop-to-esi
8015 58/pop-to-eax
8016
8017 89/<- %esp 5/r32/ebp
8018 5d/pop-to-ebp
8019 c3/return
8020
8021
8022
8023
8024
8025
8026
8027 lookup-or-create-constant:
8028
8029 55/push-ebp
8030 89/<- %ebp 4/r32/esp
8031
8032 50/push-eax
8033 56/push-esi
8034
8035 (container-type *(ebp+8))
8036 89/<- %esi 0/r32/eax
8037
8038 68/push 0/imm32
8039 68/push 0/imm32
8040 89/<- %eax 4/r32/esp
8041 (find-or-create-typeinfo %esi %eax)
8042
8043 (lookup *eax *(eax+4))
8044
8045
8046
8047
8048
8049 (find-or-create-typeinfo-output-var %eax *(ebp+0xc) *(ebp+0x10))
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063 $lookup-or-create-constant:end:
8064
8065 81 0/subop/add %esp 8/imm32
8066
8067 5e/pop-to-esi
8068 58/pop-to-eax
8069
8070 89/<- %esp 5/r32/ebp
8071 5d/pop-to-ebp
8072 c3/return
8073
8074
8075
8076
8077
8078 container-type:
8079
8080 55/push-ebp
8081 89/<- %ebp 4/r32/esp
8082
8083 8b/-> *(ebp+8) 0/r32/eax
8084 (lookup *eax *(eax+4))
8085 (lookup *(eax+8) *(eax+0xc))
8086 {
8087 81 7/subop/compare *(eax+8) 0/imm32
8088 74/jump-if-= break/disp8
8089 (lookup *(eax+0xc) *(eax+0x10))
8090 (lookup *(eax+4) *(eax+8))
8091 }
8092 8b/-> *(eax+4) 0/r32/eax
8093 $container-type:end:
8094
8095 89/<- %esp 5/r32/ebp
8096 5d/pop-to-ebp
8097 c3/return
8098
8099 find-or-create-typeinfo:
8100
8101 55/push-ebp
8102 89/<- %ebp 4/r32/esp
8103
8104 50/push-eax
8105 51/push-ecx
8106 52/push-edx
8107 57/push-edi
8108
8109 8b/-> *(ebp+0xc) 7/r32/edi
8110
8111 68/push 0/imm32
8112 68/push 0/imm32
8113 89/<- %ecx 4/r32/esp
8114
8115 (find-typeinfo *(ebp+8) %edi)
8116 {
8117
8118 81 7/subop/compare *edi 0/imm32
8119 0f 85/jump-if-!= break/disp32
8120 $find-or-create-typeinfo:create:
8121
8122 (allocate Heap *Typeinfo-size %edi)
8123
8124 (lookup *edi *(edi+4))
8125
8126
8127
8128
8129
8130
8131
8132 8b/-> *(ebp+8) 2/r32/edx
8133 89/<- *eax 2/r32/edx
8134
8135
8136 (new-stream Heap 0x40 *Typeinfo-fields-row-size %ecx)
8137
8138 8b/-> *ecx 2/r32/edx
8139 89/<- *(eax+4) 2/r32/edx
8140 8b/-> *(ecx+4) 2/r32/edx
8141 89/<- *(eax+8) 2/r32/edx
8142
8143 8b/-> *_Program-types 1/r32/ecx
8144 89/<- *(eax+0x10) 1/r32/ecx
8145 8b/-> *_Program-types->payload 1/r32/ecx
8146 89/<- *(eax+0x14) 1/r32/ecx
8147
8148 8b/-> *edi 1/r32/ecx
8149 89/<- *_Program-types 1/r32/ecx
8150 8b/-> *(edi+4) 1/r32/ecx
8151 89/<- *_Program-types->payload 1/r32/ecx
8152 }
8153 $find-or-create-typeinfo:end:
8154
8155 81 0/subop/add %esp 8/imm32
8156
8157 5f/pop-to-edi
8158 5a/pop-to-edx
8159 59/pop-to-ecx
8160 58/pop-to-eax
8161
8162 89/<- %esp 5/r32/ebp
8163 5d/pop-to-ebp
8164 c3/return
8165
8166 find-typeinfo:
8167
8168 55/push-ebp
8169 89/<- %ebp 4/r32/esp
8170
8171 50/push-eax
8172 51/push-ecx
8173 52/push-edx
8174 57/push-edi
8175
8176 8b/-> *(ebp+8) 1/r32/ecx
8177
8178 8b/-> *(ebp+0xc) 7/r32/edi
8179
8180 8b/-> *_Program-types 0/r32/eax
8181 89/<- *edi 0/r32/eax
8182 8b/-> *_Program-types->payload 0/r32/eax
8183 89/<- *(edi+4) 0/r32/eax
8184 {
8185
8186 81 7/subop/compare *edi 0/imm32
8187 74/jump-if-= break/disp8
8188
8189 (lookup *edi *(edi+4))
8190
8191 39/compare *eax 1/r32/ecx
8192 74/jump-if-= break/disp8
8193
8194 8b/-> *(eax+0x10) 2/r32/edx
8195 89/<- *edi 2/r32/edx
8196 8b/-> *(eax+0x14) 2/r32/edx
8197 89/<- *(edi+4) 2/r32/edx
8198
8199 eb/jump loop/disp8
8200 }
8201 $find-typeinfo:end:
8202
8203 5f/pop-to-edi
8204 5a/pop-to-edx
8205 59/pop-to-ecx
8206 58/pop-to-eax
8207
8208 89/<- %esp 5/r32/ebp
8209 5d/pop-to-ebp
8210 c3/return
8211
8212 find-or-create-typeinfo-output-var:
8213
8214 55/push-ebp
8215 89/<- %ebp 4/r32/esp
8216
8217 50/push-eax
8218 52/push-edx
8219 57/push-edi
8220
8221 68/push 0/imm32
8222 68/push 0/imm32
8223 89/<- %edi 4/r32/esp
8224
8225 (find-or-create-typeinfo-fields *(ebp+8) *(ebp+0xc) %edi)
8226
8227 (lookup *edi *(edi+4))
8228 89/<- %edi 0/r32/eax
8229
8230 {
8231 81 7/subop/compare *(edi+0xc) 0/imm32
8232 0f 85/jump-if-!= break/disp32
8233
8234
8235 68/push 0/imm32
8236 68/push 0/imm32
8237 89/<- %eax 4/r32/esp
8238 (copy-array Heap "field" %eax)
8239
8240 8d/copy-address *(edi+0xc) 2/r32/edx
8241 (new-var Heap *eax *(eax+4) %edx)
8242
8243 81 0/subop/add %esp 8/imm32
8244
8245 (lookup *(edi+0xc) *(edi+0x10))
8246 89/<- %edx 0/r32/eax
8247
8248 8d/copy-address *(edx+8) 0/r32/eax
8249 (allocate Heap *Tree-size %eax)
8250 (lookup *(edx+8) *(edx+0xc))
8251 c7 0/subop/copy *eax 1/imm32/true
8252 c7 0/subop/copy *(eax+4) 6/imm32/constant
8253 c7 0/subop/copy *(eax+8) 0/imm32
8254 c7 0/subop/copy *(eax+0xc) 0/imm32
8255 c7 0/subop/copy *(eax+0x10) 0/imm32
8256
8257 c7 0/subop/copy *(edx+0x14) -1/imm32/uninitialized
8258 }
8259
8260 8b/-> *(ebp+0x10) 2/r32/edx
8261 8b/-> *(edi+0xc) 0/r32/eax
8262 89/<- *edx 0/r32/eax
8263 8b/-> *(edi+0x10) 0/r32/eax
8264 89/<- *(edx+4) 0/r32/eax
8265 $find-or-create-typeinfo-output-var:end:
8266
8267 81 0/subop/add %esp 8/imm32
8268
8269 5f/pop-to-edi
8270 5a/pop-to-edx
8271 58/pop-to-eax
8272
8273 89/<- %esp 5/r32/ebp
8274 5d/pop-to-ebp
8275 c3/return
8276
8277 find-or-create-typeinfo-fields:
8278
8279 55/push-ebp
8280 89/<- %ebp 4/r32/esp
8281
8282 50/push-eax
8283 56/push-esi
8284 57/push-edi
8285
8286 8b/-> *(ebp+8) 0/r32/eax
8287 (lookup *(eax+4) *(eax+8))
8288
8289 8b/-> *(ebp+0x10) 7/r32/edi
8290
8291 (get-or-insert-slice %eax *(ebp+0xc) *Typeinfo-fields-row-size Heap)
8292 89/<- %esi 0/r32/eax
8293
8294 {
8295 81 7/subop/compare *esi 0/imm32
8296 75/jump-if-!= break/disp8
8297 (allocate Heap *Typeinfo-entry-size %esi)
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313 }
8314
8315
8316 8b/-> *esi 0/r32/eax
8317 89/<- *edi 0/r32/eax
8318 8b/-> *(esi+4) 0/r32/eax
8319 89/<- *(edi+4) 0/r32/eax
8320 $find-or-create-typeinfo-fields:end:
8321
8322 5f/pop-to-edi
8323 5e/pop-to-esi
8324 58/pop-to-eax
8325
8326 89/<- %esp 5/r32/ebp
8327 5d/pop-to-ebp
8328 c3/return
8329
8330 populate-mu-type:
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357 55/push-ebp
8358 89/<- %ebp 4/r32/esp
8359
8360 68/push 0/imm32
8361
8362 50/push-eax
8363 51/push-ecx
8364 52/push-edx
8365 53/push-ebx
8366 56/push-esi
8367 57/push-edi
8368
8369 8b/-> *(ebp+0xc) 7/r32/edi
8370
8371 81 5/subop/subtract %esp 0x200/imm32
8372 68/push 0x200/imm32/size
8373 68/push 0/imm32/read
8374 68/push 0/imm32/write
8375 89/<- %ecx 4/r32/esp
8376
8377 68/push 0/imm32/end
8378 68/push 0/imm32/start
8379 89/<- %edx 4/r32/esp
8380
8381 68/push 0/imm32
8382 68/push 0/imm32
8383 89/<- %esi 4/r32/esp
8384
8385 68/push 0/imm32
8386 68/push 0/imm32
8387 89/<- %ebx 4/r32/esp
8388 {
8389 $populate-mu-type:line-loop:
8390 (clear-stream %ecx)
8391 (read-line-buffered *(ebp+8) %ecx)
8392
8393 81 7/subop/compare *ecx 0/imm32
8394 0f 84/jump-if-= $populate-mu-type:abort/disp32
8395 +-- 6 lines: #? # dump line ------------------------------------------------------------------------------------------------------------------------------------------------------
8401 (next-mu-token %ecx %edx)
8402
8403 (slice-empty? %edx)
8404 3d/compare-eax-and 0/imm32
8405 0f 85/jump-if-!= loop/disp32
8406
8407 (slice-equal? %edx "}")
8408 3d/compare-eax-and 0/imm32
8409 0f 85/jump-if-!= break/disp32
8410 $populate-mu-type:parse-element:
8411
8412
8413
8414
8415 (parse-var-with-type %edx %ecx %esi *(ebp+0x10) *(ebp+0x14))
8416
8417 51/push-ecx
8418 $populate-mu-type:create-typeinfo-fields:
8419
8420 (find-or-create-typeinfo-fields %edi %edx %ebx)
8421
8422 (lookup *ebx *(ebx+4))
8423 8b/-> *(ebp-4) 1/r32/ecx
8424
8425
8426
8427
8428
8429
8430 89/<- *(eax+8) 1/r32/ecx
8431
8432 ff 0/subop/increment *(ebp-4)
8433 $populate-mu-type:set-input-type:
8434
8435 8b/-> *esi 1/r32/ecx
8436 89/<- *eax 1/r32/ecx
8437 8b/-> *(esi+4) 1/r32/ecx
8438 89/<- *(eax+4) 1/r32/ecx
8439 59/pop-to-ecx
8440 {
8441 $populate-mu-type:create-output-type:
8442
8443 81 7/subop/compare *(eax+0xc) 0/imm32
8444 75/jump-if-!= break/disp8
8445 8d/copy-address *(eax+0xc) 0/r32/eax
8446 (new-literal Heap %edx %eax)
8447 }
8448 e9/jump loop/disp32
8449 }
8450 $populate-mu-type:invalidate-total-size-in-bytes:
8451
8452
8453
8454 c7 0/subop/copy *(edi+0xc) -2/imm32/uninitialized
8455 $populate-mu-type:validate:
8456 (check-input-vars *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
8457 $populate-mu-type:end:
8458
8459 81 0/subop/add %esp 0x224/imm32
8460
8461 5f/pop-to-edi
8462 5e/pop-to-esi
8463 5b/pop-to-ebx
8464 5a/pop-to-edx
8465 59/pop-to-ecx
8466 58/pop-to-eax
8467
8468 81 0/subop/add %esp 4/imm32
8469
8470 89/<- %esp 5/r32/ebp
8471 5d/pop-to-ebp
8472 c3/return
8473
8474 $populate-mu-type:abort:
8475
8476 (write-buffered *(ebp+0x10) "incomplete type definition '")
8477 (type-name *edi)
8478 (write-buffered *(ebp+0x10) %eax)
8479 (write-buffered *(ebp+0x10) "\n")
8480 (flush *(ebp+0x10))
8481 (stop *(ebp+0x14) 1)
8482
8483
8484 check-input-vars:
8485
8486 55/push-ebp
8487 89/<- %ebp 4/r32/esp
8488
8489 50/push-eax
8490 51/push-ecx
8491 52/push-edx
8492
8493 8b/-> *(ebp+8) 0/r32/eax
8494 (lookup *(eax+4) *(eax+8))
8495 89/<- %ecx 0/r32/eax
8496
8497 8b/-> *ecx 2/r32/edx
8498
8499 8d/copy-address *(ecx+0xc) 1/r32/ecx
8500
8501 8d/copy-address *(ecx+edx) 2/r32/edx
8502 {
8503 $check-input-vars:loop:
8504
8505 39/compare %ecx 2/r32/edx
8506 73/jump-if-addr>= break/disp8
8507 (lookup *ecx *(ecx+4))
8508
8509 (lookup *(ecx+8) *(ecx+0xc))
8510
8511 8b/-> *eax 0/r32/eax
8512 3d/compare-eax-and 0/imm32/null
8513 0f 84/jump-if-= $check-input-vars:abort/disp32
8514
8515 81 0/subop/add %ecx 0x10/imm32
8516
8517 eb/jump loop/disp8
8518 }
8519 $check-input-vars:end:
8520
8521 5a/pop-to-edx
8522 59/pop-to-ecx
8523 58/pop-to-eax
8524
8525 89/<- %esp 5/r32/ebp
8526 5d/pop-to-ebp
8527 c3/return
8528
8529 $check-input-vars:abort:
8530
8531 (write-buffered *(ebp+0xc) "type '")
8532
8533 8b/-> *(ebp+8) 0/r32/eax
8534 8b/-> *eax 2/r32/edx
8535 c1/shift 4/subop/left %edx 2/imm8
8536
8537 b8/copy-to-eax Type-id/imm32
8538 8b/-> *(eax+edx+0xc) 2/r32/edx
8539 (write-buffered *(ebp+0xc) %edx)
8540 (write-buffered *(ebp+0xc) "' has no member called '")
8541 (lookup *ecx *(ecx+4))
8542 (write-buffered *(ebp+0xc) %eax)
8543 (write-buffered *(ebp+0xc) "'\n")
8544 (flush *(ebp+0xc))
8545 (stop *(ebp+0x10) 1)
8546
8547
8548 type-name:
8549
8550 55/push-ebp
8551 89/<- %ebp 4/r32/esp
8552
8553 (index Type-id *(ebp+8))
8554 $type-name:end:
8555
8556 89/<- %esp 5/r32/ebp
8557 5d/pop-to-ebp
8558 c3/return
8559
8560 index:
8561
8562 55/push-ebp
8563 89/<- %ebp 4/r32/esp
8564
8565 56/push-esi
8566
8567
8568 8b/-> *(ebp+8) 6/r32/esi
8569
8570 8b/-> *(ebp+0xc) 0/r32/eax
8571
8572 8b/-> *(esi+eax+0xc) 0/r32/eax
8573 $index:end:
8574
8575 5e/pop-to-esi
8576
8577 89/<- %esp 5/r32/ebp
8578 5d/pop-to-ebp
8579 c3/return
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590 populate-mu-type-sizes:
8591
8592 55/push-ebp
8593 89/<- %ebp 4/r32/esp
8594 $populate-mu-type-sizes:total-sizes:
8595
8596 (lookup *_Program-types *_Program-types->payload)
8597 {
8598
8599 3d/compare-eax-and 0/imm32/null
8600 74/jump-if-= break/disp8
8601 (populate-mu-type-sizes-in-type %eax *(ebp+8) *(ebp+0xc))
8602
8603 (lookup *(eax+0x10) *(eax+0x14))
8604 eb/jump loop/disp8
8605 }
8606 $populate-mu-type-sizes:offsets:
8607
8608 (lookup *_Program-types *_Program-types->payload)
8609 {
8610
8611 3d/compare-eax-and 0/imm32/null
8612 74/jump-if-= break/disp8
8613 (populate-mu-type-offsets %eax *(ebp+8) *(ebp+0xc))
8614
8615 (lookup *(eax+0x10) *(eax+0x14))
8616 eb/jump loop/disp8
8617 }
8618 $populate-mu-type-sizes:end:
8619
8620 89/<- %esp 5/r32/ebp
8621 5d/pop-to-ebp
8622 c3/return
8623
8624
8625
8626
8627 populate-mu-type-sizes-in-type:
8628
8629 55/push-ebp
8630 89/<- %ebp 4/r32/esp
8631
8632 50/push-eax
8633 51/push-ecx
8634 52/push-edx
8635 56/push-esi
8636 57/push-edi
8637
8638 8b/-> *(ebp+8) 6/r32/esi
8639
8640 81 7/subop/compare *(esi+0xc) 0/imm32
8641 0f 8d/jump-if->= $populate-mu-type-sizes-in-type:end/disp32
8642
8643 81 7/subop/compare *(esi+0xc) -1/imm32/being-computed
8644 0f 84/jump-if-= $populate-mu-type-sizes-in-type:abort/disp32
8645
8646 c7 0/subop/copy *(esi+0xc) -1/imm32/being-computed
8647
8648 bf/copy-to-edi 0/imm32
8649
8650
8651 (lookup *(esi+4) *(esi+8))
8652 89/<- %ecx 0/r32/eax
8653
8654 8b/-> *ecx 2/r32/edx
8655
8656 8d/copy-address *(ecx+0xc) 1/r32/ecx
8657
8658 8d/copy-address *(ecx+edx) 2/r32/edx
8659 {
8660 $populate-mu-type-sizes-in-type:loop:
8661
8662 39/compare %ecx 2/r32/edx
8663 73/jump-if-addr>= break/disp8
8664
8665 (lookup *(ecx+8) *(ecx+0xc))
8666
8667 (lookup *eax *(eax+4))
8668 (compute-size-of-var %eax)
8669
8670 01/add-to %edi 0/r32/eax
8671
8672 81 0/subop/add %ecx 0x10/imm32
8673
8674 eb/jump loop/disp8
8675 }
8676
8677 89/<- *(esi+0xc) 7/r32/edi
8678 $populate-mu-type-sizes-in-type:end:
8679
8680 5f/pop-to-edi
8681 5e/pop-to-esi
8682 5a/pop-to-edx
8683 59/pop-to-ecx
8684 58/pop-to-eax
8685
8686 89/<- %esp 5/r32/ebp
8687 5d/pop-to-ebp
8688 c3/return
8689
8690 $populate-mu-type-sizes-in-type:abort:
8691 (write-buffered *(ebp+0xc) "cycle in type definitions\n")
8692 (flush *(ebp+0xc))
8693 (stop *(ebp+0x10) 1)
8694
8695
8696
8697
8698 compute-size-of-var:
8699
8700 55/push-ebp
8701 89/<- %ebp 4/r32/esp
8702
8703 51/push-ecx
8704
8705 8b/-> *(ebp+8) 1/r32/ecx
8706 (lookup *(ecx+8) *(ecx+0xc))
8707 89/<- %ecx 0/r32/eax
8708
8709 {
8710 81 7/subop/compare *ecx 0/imm32/false
8711 75/jump-if-!= break/disp8
8712 (lookup *(ecx+4) *(ecx+8))
8713 89/<- %ecx 0/r32/eax
8714 }
8715
8716 (compute-size-of-type-id *(ecx+4))
8717 $compute-size-of-var:end:
8718
8719 59/pop-to-ecx
8720
8721 89/<- %esp 5/r32/ebp
8722 5d/pop-to-ebp
8723 c3/return
8724
8725 compute-size-of-type-id:
8726
8727 55/push-ebp
8728 89/<- %ebp 4/r32/esp
8729
8730 51/push-ecx
8731
8732 68/push 0/imm32
8733 68/push 0/imm32
8734 89/<- %ecx 4/r32/esp
8735
8736 8b/-> *(ebp+8) 0/r32/eax
8737
8738 3d/compare-eax-and 0/imm32/literal
8739 0f 84/jump-if-= $compute-size-of-type-id:end/disp32
8740
8741 3d/compare-eax-and 8/imm32/byte
8742 {
8743 75/jump-if-!= break/disp8
8744 b8/copy-to-eax 4/imm32
8745 eb/jump $compute-size-of-type-id:end/disp8
8746 }
8747
8748 3d/compare-eax-and 4/imm32/handle
8749 {
8750 75/jump-if-!= break/disp8
8751 b8/copy-to-eax 8/imm32
8752 eb/jump $compute-size-of-type-id:end/disp8
8753 }
8754
8755
8756 (find-typeinfo %eax %ecx)
8757 {
8758 81 7/subop/compare *ecx 0/imm32
8759 74/jump-if-= break/disp8
8760 $compute-size-of-type-id:user-defined:
8761 (populate-mu-type-sizes %eax)
8762 8b/-> *(eax+0xc) 0/r32/eax
8763 eb/jump $compute-size-of-type-id:end/disp8
8764 }
8765
8766 b8/copy-to-eax 4/imm32
8767 $compute-size-of-type-id:end:
8768
8769 81 0/subop/add %esp 8/imm32
8770
8771 59/pop-to-ecx
8772
8773 89/<- %esp 5/r32/ebp
8774 5d/pop-to-ebp
8775 c3/return
8776
8777
8778
8779
8780 populate-mu-type-offsets:
8781
8782 55/push-ebp
8783 89/<- %ebp 4/r32/esp
8784
8785 50/push-eax
8786 51/push-ecx
8787 52/push-edx
8788 53/push-ebx
8789 56/push-esi
8790 57/push-edi
8791
8792
8793 bf/copy-to-edi 0/imm32
8794
8795 8b/-> *(ebp+8) 1/r32/ecx
8796 (lookup *(ecx+4) *(ecx+8))
8797 89/<- %ecx 0/r32/eax
8798
8799 8b/-> *ecx 2/r32/edx
8800 c1 5/subop/shift-right-logical %edx 4/imm8
8801
8802 bb/copy-to-ebx 0/imm32
8803 {
8804 $populate-mu-type-offsets:loop:
8805 39/compare %ebx 2/r32/edx
8806 7d/jump-if->= break/disp8
8807
8808
8809
8810
8811
8812
8813
8814 (locate-typeinfo-entry-with-index %ecx %ebx *(ebp+0xc) *(ebp+0x10))
8815 89/<- %esi 0/r32/eax
8816
8817
8818 (lookup *(esi+0xc) *(esi+0x10))
8819 89/<- *(eax+0x14) 7/r32/edi
8820
8821 (lookup *esi *(esi+4))
8822 (size-of %eax)
8823 01/add-to %edi 0/r32/eax
8824
8825 43/increment-ebx
8826 eb/jump loop/disp8
8827 }
8828 $populate-mu-type-offsets:end:
8829
8830 5f/pop-to-edi
8831 5e/pop-to-esi
8832 5b/pop-to-ebx
8833 5a/pop-to-edx
8834 59/pop-to-ecx
8835 58/pop-to-eax
8836
8837 89/<- %esp 5/r32/ebp
8838 5d/pop-to-ebp
8839 c3/return
8840
8841 locate-typeinfo-entry-with-index:
8842
8843 55/push-ebp
8844 89/<- %ebp 4/r32/esp
8845
8846 51/push-ecx
8847 52/push-edx
8848 53/push-ebx
8849 56/push-esi
8850 57/push-edi
8851
8852 8b/-> *(ebp+8) 6/r32/esi
8853
8854 8d/copy-address *(esi+0xc) 1/r32/ecx
8855
8856 8b/-> *esi 2/r32/edx
8857 8d/copy-address *(ecx+edx) 2/r32/edx
8858 {
8859 $locate-typeinfo-entry-with-index:loop:
8860 39/compare %ecx 2/r32/edx
8861 73/jump-if-addr>= $locate-typeinfo-entry-with-index:abort/disp8
8862
8863 (lookup *(ecx+8) *(ecx+0xc))
8864
8865 8b/-> *(eax+8) 3/r32/ebx
8866
8867
8868
8869
8870
8871
8872 39/compare *(ebp+0xc) 3/r32/ebx
8873 74/jump-if-= $locate-typeinfo-entry-with-index:end/disp8
8874
8875 81 0/subop/add %ecx 0x10/imm32
8876
8877 eb/jump loop/disp8
8878 }
8879
8880 b8/copy-to-eax 0/imm32
8881 $locate-typeinfo-entry-with-index:end:
8882
8883
8884
8885
8886
8887 5f/pop-to-edi
8888 5e/pop-to-esi
8889 5b/pop-to-ebx
8890 5a/pop-to-edx
8891 59/pop-to-ecx
8892
8893 89/<- %esp 5/r32/ebp
8894 5d/pop-to-ebp
8895 c3/return
8896
8897 $locate-typeinfo-entry-with-index:abort:
8898 (write-buffered *(ebp+0x10) "overflowing typeinfo-entry->index ")
8899 (print-int32-buffered *(ebp+0x10) %ecx)
8900 (write-buffered *(ebp+0x10) "\n")
8901 (flush *(ebp+0x10))
8902 (stop *(ebp+0x14) 1)
8903
8904
8905 dump-typeinfos:
8906
8907 55/push-ebp
8908 89/<- %ebp 4/r32/esp
8909
8910 50/push-eax
8911
8912 (write-buffered Stderr *(ebp+8))
8913 (flush Stderr)
8914
8915 (lookup *_Program-types *_Program-types->payload)
8916 {
8917
8918 3d/compare-eax-and 0/imm32
8919 74/jump-if-= break/disp8
8920 (write-buffered Stderr "---\n")
8921 (flush Stderr)
8922 (dump-typeinfo %eax)
8923
8924 (lookup *(eax+0x10) *(eax+0x14))
8925 eb/jump loop/disp8
8926 }
8927 $dump-typeinfos:end:
8928
8929 58/pop-to-eax
8930
8931 89/<- %esp 5/r32/ebp
8932 5d/pop-to-ebp
8933 c3/return
8934
8935 dump-typeinfo:
8936
8937 55/push-ebp
8938 89/<- %ebp 4/r32/esp
8939
8940 50/push-eax
8941 51/push-ecx
8942 52/push-edx
8943 53/push-ebx
8944 56/push-esi
8945 57/push-edi
8946
8947 8b/-> *(ebp+8) 6/r32/esi
8948
8949 (lookup *(esi+4) *(esi+8))
8950 89/<- %ecx 0/r32/eax
8951 (write-buffered Stderr "id:")
8952 (print-int32-buffered Stderr *esi)
8953 (write-buffered Stderr "\n")
8954 (write-buffered Stderr "fields @ ")
8955 (print-int32-buffered Stderr %ecx)
8956 (write-buffered Stderr Newline)
8957 (flush Stderr)
8958 (write-buffered Stderr " write: ")
8959 (print-int32-buffered Stderr *ecx)
8960 (write-buffered Stderr Newline)
8961 (flush Stderr)
8962 (write-buffered Stderr " read: ")
8963 (print-int32-buffered Stderr *(ecx+4))
8964 (write-buffered Stderr Newline)
8965 (flush Stderr)
8966 (write-buffered Stderr " size: ")
8967 (print-int32-buffered Stderr *(ecx+8))
8968 (write-buffered Stderr Newline)
8969 (flush Stderr)
8970
8971 8b/-> *ecx 2/r32/edx
8972
8973 8d/copy-address *(ecx+0xc) 1/r32/ecx
8974
8975 8d/copy-address *(ecx+edx) 2/r32/edx
8976 {
8977 $dump-typeinfo:loop:
8978
8979 39/compare %ecx 2/r32/edx
8980 0f 83/jump-if-addr>= break/disp32
8981 (write-buffered Stderr " row:\n")
8982 (write-buffered Stderr " key: ")
8983 (print-int32-buffered Stderr *ecx)
8984 (write-buffered Stderr ",")
8985 (print-int32-buffered Stderr *(ecx+4))
8986 (write-buffered Stderr " = '")
8987 (lookup *ecx *(ecx+4))
8988 (write-buffered Stderr %eax)
8989 (write-buffered Stderr "' @ ")
8990 (print-int32-buffered Stderr %eax)
8991 (write-buffered Stderr Newline)
8992 (flush Stderr)
8993 (write-buffered Stderr " value: ")
8994 (print-int32-buffered Stderr *(ecx+8))
8995 (write-buffered Stderr ",")
8996 (print-int32-buffered Stderr *(ecx+0xc))
8997 (write-buffered Stderr " = typeinfo-entry@")
8998 (lookup *(ecx+8) *(ecx+0xc))
8999 (print-int32-buffered Stderr %eax)
9000 (write-buffered Stderr Newline)
9001 (flush Stderr)
9002 (write-buffered Stderr " input var@")
9003 (print-int32-buffered Stderr *eax)
9004 (write-buffered Stderr ",")
9005 (print-int32-buffered Stderr *(eax+4))
9006 (write-buffered Stderr "->")
9007 (lookup *eax *(eax+4))
9008 (print-int32-buffered Stderr %eax)
9009 {
9010 3d/compare-eax-and 0/imm32
9011 74/jump-if-= break/disp8
9012 (write-buffered Stderr " ")
9013
9014 }
9015 (write-buffered Stderr Newline)
9016 (flush Stderr)
9017 (lookup *(ecx+8) *(ecx+0xc))
9018 (write-buffered Stderr " index: ")
9019 (print-int32-buffered Stderr *(eax+8))
9020 (write-buffered Stderr Newline)
9021 (flush Stderr)
9022 (write-buffered Stderr " output var@")
9023 (print-int32-buffered Stderr *(eax+0xc))
9024 (write-buffered Stderr ",")
9025 (print-int32-buffered Stderr *(eax+0x10))
9026 (write-buffered Stderr "->")
9027 (lookup *(eax+0xc) *(eax+0x10))
9028 (print-int32-buffered Stderr %eax)
9029 (write-buffered Stderr Newline)
9030 (flush Stderr)
9031 {
9032 3d/compare-eax-and 0/imm32
9033 0f 84/jump-if-= break/disp32
9034 (write-buffered Stderr " name: ")
9035 89/<- %ebx 0/r32/eax
9036 (print-int32-buffered Stderr *ebx)
9037 (write-buffered Stderr ",")
9038 (print-int32-buffered Stderr *(ebx+4))
9039 (write-buffered Stderr "->")
9040 (lookup *ebx *(ebx+4))
9041 (print-int32-buffered Stderr %eax)
9042 {
9043 3d/compare-eax-and 0/imm32
9044 74/jump-if-= break/disp8
9045 (write-buffered Stderr Space)
9046 (write-buffered Stderr %eax)
9047 }
9048 (write-buffered Stderr Newline)
9049 (flush Stderr)
9050 (write-buffered Stderr " block depth: ")
9051 (print-int32-buffered Stderr *(ebx+0x10))
9052 (write-buffered Stderr Newline)
9053 (flush Stderr)
9054 (write-buffered Stderr " stack offset: ")
9055 (print-int32-buffered Stderr *(ebx+0x14))
9056 (write-buffered Stderr Newline)
9057 (flush Stderr)
9058 (write-buffered Stderr " reg: ")
9059 (print-int32-buffered Stderr *(ebx+0x18))
9060 (write-buffered Stderr ",")
9061 (print-int32-buffered Stderr *(ebx+0x1c))
9062 (write-buffered Stderr "->")
9063 (flush Stderr)
9064 (lookup *(ebx+0x18) *(ebx+0x1c))
9065 (print-int32-buffered Stderr %eax)
9066 {
9067 3d/compare-eax-and 0/imm32
9068 74/jump-if-= break/disp8
9069 (write-buffered Stderr Space)
9070 (write-buffered Stderr %eax)
9071 }
9072 (write-buffered Stderr Newline)
9073 (flush Stderr)
9074 }
9075 (flush Stderr)
9076
9077 81 0/subop/add %ecx 0x10/imm32
9078
9079 e9/jump loop/disp32
9080 }
9081 $dump-typeinfo:end:
9082
9083 5f/pop-to-edi
9084 5e/pop-to-esi
9085 5b/pop-to-ebx
9086 5a/pop-to-edx
9087 59/pop-to-ecx
9088 58/pop-to-eax
9089
9090 89/<- %esp 5/r32/ebp
9091 5d/pop-to-ebp
9092 c3/return
9093
9094
9095
9096
9097
9098 check-mu-types:
9099
9100 55/push-ebp
9101 89/<- %ebp 4/r32/esp
9102
9103 50/push-eax
9104
9105 (lookup *_Program-functions *_Program-functions->payload)
9106 {
9107 $check-mu-types:loop:
9108
9109 3d/compare-eax-and 0/imm32
9110 0f 84/jump-if-= break/disp32
9111 (check-mu-function %eax *(ebp+8) *(ebp+0xc))
9112
9113 (lookup *(eax+0x20) *(eax+0x24))
9114 e9/jump loop/disp32
9115 }
9116 $check-mu-types:end:
9117
9118 58/pop-to-eax
9119
9120 89/<- %esp 5/r32/ebp
9121 5d/pop-to-ebp
9122 c3/return
9123
9124 check-mu-function:
9125
9126 55/push-ebp
9127 89/<- %ebp 4/r32/esp
9128
9129 50/push-eax
9130
9131 8b/-> *(ebp+8) 0/r32/eax
9132
9133
9134 (lookup *(eax+0x18) *(eax+0x1c))
9135 (check-mu-block %eax *(ebp+0xc) *(ebp+0x10))
9136 $check-mu-function:end:
9137
9138 58/pop-to-eax
9139
9140 89/<- %esp 5/r32/ebp
9141 5d/pop-to-ebp
9142 c3/return
9143
9144 check-mu-block:
9145
9146 55/push-ebp
9147 89/<- %ebp 4/r32/esp
9148
9149 50/push-eax
9150
9151 8b/-> *(ebp+8) 0/r32/eax
9152
9153 (lookup *(eax+4) *(eax+8))
9154
9155 {
9156 $check-mu-block:check-empty:
9157 3d/compare-eax-and 0/imm32
9158 0f 84/jump-if-= break/disp32
9159
9160 (check-mu-stmt-list %eax *(ebp+0xc) *(ebp+0x10))
9161 }
9162 $check-mu-block:end:
9163
9164 58/pop-to-eax
9165
9166 89/<- %esp 5/r32/ebp
9167 5d/pop-to-ebp
9168 c3/return
9169
9170 check-mu-stmt-list:
9171
9172 55/push-ebp
9173 89/<- %ebp 4/r32/esp
9174
9175 50/push-eax
9176 56/push-esi
9177
9178 8b/-> *(ebp+8) 6/r32/esi
9179 {
9180 $check-mu-stmt-list:loop:
9181 81 7/subop/compare %esi 0/imm32
9182 0f 84/jump-if-= break/disp32
9183
9184 (lookup *esi *(esi+4))
9185 {
9186 $check-mu-stmt-list:check-for-block:
9187 81 7/subop/compare *eax 0/imm32/block
9188 75/jump-if-!= break/disp8
9189 $check-mu-stmt-list:block:
9190 (check-mu-block %eax *(ebp+0xc) *(ebp+0x10))
9191 eb/jump $check-mu-stmt-list:continue/disp8
9192 }
9193 {
9194 $check-mu-stmt-list:check-for-stmt1:
9195 81 7/subop/compare *eax 1/imm32/stmt1
9196 0f 85/jump-if-!= break/disp32
9197 $check-mu-stmt-list:stmt1:
9198 (check-mu-stmt %eax *(ebp+0xc) *(ebp+0x10))
9199 eb/jump $check-mu-stmt-list:continue/disp8
9200 }
9201 {
9202 $check-mu-stmt-list:check-for-reg-var-def:
9203 81 7/subop/compare *eax 3/imm32/reg-var-def
9204 0f 85/jump-if-!= break/disp32
9205 $check-mu-stmt-list:reg-var-def:
9206 (check-mu-stmt %eax *(ebp+0xc) *(ebp+0x10))
9207 eb/jump $check-mu-stmt-list:continue/disp8
9208 }
9209 $check-mu-stmt-list:continue:
9210
9211 (lookup *(esi+8) *(esi+0xc))
9212 89/<- %esi 0/r32/eax
9213 e9/jump loop/disp32
9214 }
9215 $check-mu-stmt-list:end:
9216
9217 5e/pop-to-esi
9218 58/pop-to-eax
9219
9220 89/<- %esp 5/r32/ebp
9221 5d/pop-to-ebp
9222 c3/return
9223
9224 check-mu-stmt:
9225
9226 55/push-ebp
9227 89/<- %ebp 4/r32/esp
9228
9229 50/push-eax
9230 51/push-ecx
9231 52/push-edx
9232 53/push-ebx
9233 56/push-esi
9234 57/push-edi
9235
9236 8b/-> *(ebp+8) 6/r32/esi
9237
9238 (lookup *_Program-functions *_Program-functions->payload)
9239 (find-matching-function %eax *(ebp+8))
9240 89/<- %edi 0/r32/eax
9241 {
9242 $check-mu-stmt:check-for-call:
9243 81 7/subop/compare %edi 0/imm32
9244 0f 84/jump-if-= break/disp32
9245 $check-mu-stmt:is-call:
9246
9247 (lookup *(esi+0xc) *(esi+0x10))
9248 89/<- %ecx 0/r32/eax
9249
9250 (lookup *(edi+8) *(edi+0xc))
9251 89/<- %edx 0/r32/eax
9252 {
9253 $check-mu-stmt:check-for-inouts:
9254
9255 81 7/subop/compare %ecx 0/imm32
9256 0f 84/jump-if-= break/disp32
9257
9258 81 7/subop/compare %edx 0/imm32
9259 0f 84/jump-if-= break/disp32
9260 $check-mu-stmt:check-inout-type:
9261
9262 (lookup *ecx *(ecx+4))
9263
9264 (lookup *(eax+8) *(eax+0xc))
9265 89/<- %ebx 0/r32/eax
9266
9267 81 7/subop/compare *(ecx+0x10) 0/imm32/false
9268 {
9269 74/jump-if-= break/disp8
9270 (lookup *(ebx+0xc) *(ebx+0x10))
9271 89/<- %ebx 0/r32/eax
9272
9273 81 7/subop/compare *(ebx+0xc) 0/imm32
9274 75/jump-if-!= break/disp8
9275 (lookup *(ebx+4) *(ebx+8))
9276 89/<- %ebx 0/r32/eax
9277 }
9278
9279 (lookup *edx *(edx+4))
9280
9281 (lookup *(eax+8) *(eax+0xc))
9282
9283 (type-match? %eax %ebx)
9284 3d/compare-eax-and 0/imm32/false
9285 {
9286 0f 85/jump-if-!= break/disp32
9287 (write-buffered *(ebp+0xc) "call ")
9288 (lookup *edi *(edi+4))
9289 (write-buffered *(ebp+0xc) %eax)
9290 (write-buffered *(ebp+0xc) ": type for inout '")
9291 (lookup *ecx *(ecx+4))
9292 (lookup *eax *(eax+4))
9293 (write-buffered *(ebp+0xc) %eax)
9294 (write-buffered *(ebp+0xc) "' is not right\n")
9295 (flush *(ebp+0xc))
9296 (stop *(ebp+0x10) 1)
9297 }
9298 $check-mu-stmt:continue-to-next-inout:
9299
9300 (lookup *(ecx+8) *(ecx+0xc))
9301 89/<- %ecx 0/r32/eax
9302
9303 (lookup *(edx+8) *(edx+0xc))
9304 89/<- %edx 0/r32/eax
9305
9306 e9/jump loop/disp32
9307 }
9308 $check-mu-stmt:check-inout-count:
9309
9310 39/compare %ecx 2/r32/edx
9311 {
9312 0f 84/jump-if-= break/disp32
9313
9314
9315 {
9316 81 7/subop/compare %ecx 0/imm32
9317 74/jump-if-= break/disp8
9318 (write-buffered *(ebp+0xc) "call ")
9319 (lookup *edi *(edi+4))
9320 (write-buffered *(ebp+0xc) %eax)
9321 (write-buffered *(ebp+0xc) ": too many inouts\n")
9322 (flush *(ebp+0xc))
9323 (stop *(ebp+0x10) 1)
9324 }
9325
9326 {
9327 81 7/subop/compare %edx 0/imm32
9328 74/jump-if-= break/disp8
9329 (write-buffered *(ebp+0xc) "call ")
9330 (lookup *edi *(edi+4))
9331 (write-buffered *(ebp+0xc) %eax)
9332 (write-buffered *(ebp+0xc) ": too few inouts\n")
9333 (flush *(ebp+0xc))
9334 (stop *(ebp+0x10) 1)
9335 }
9336 }
9337 $check-mu-stmt:check-outputs:
9338
9339 (lookup *(esi+0x14) *(esi+0x18))
9340 89/<- %ecx 0/r32/eax
9341
9342 (lookup *(edi+0x10) *(edi+0x14))
9343 89/<- %edx 0/r32/eax
9344 {
9345 $check-mu-stmt:check-for-outputs:
9346
9347 81 7/subop/compare %ecx 0/imm32
9348 0f 84/jump-if-= break/disp32
9349
9350 81 7/subop/compare %edx 0/imm32
9351 0f 84/jump-if-= break/disp32
9352 $check-mu-stmt:check-output-type:
9353
9354 (lookup *ecx *(ecx+4))
9355
9356 (lookup *(eax+8) *(eax+0xc))
9357 89/<- %ebx 0/r32/eax
9358
9359 81 7/subop/compare *(ecx+0x10) 0/imm32/false
9360 {
9361 74/jump-if-= break/disp8
9362 (lookup *(ebx+0xc) *(ebx+0x10))
9363 89/<- %ebx 0/r32/eax
9364 }
9365
9366 (lookup *edx *(edx+4))
9367
9368 (lookup *(eax+8) *(eax+0xc))
9369
9370 (type-equal? %eax %ebx)
9371 3d/compare-eax-and 0/imm32/false
9372 {
9373 0f 85/jump-if-!= break/disp32
9374 (write-buffered *(ebp+0xc) "call ")
9375 (lookup *edi *(edi+4))
9376 (write-buffered *(ebp+0xc) %eax)
9377 (write-buffered *(ebp+0xc) ": type for output '")
9378 (lookup *ecx *(ecx+4))
9379 (lookup *eax *(eax+4))
9380 (write-buffered *(ebp+0xc) %eax)
9381 (write-buffered *(ebp+0xc) "' is not right\n")
9382 (flush *(ebp+0xc))
9383 (stop *(ebp+0x10) 1)
9384 }
9385 $check-mu-stmt:check-output-register:
9386
9387 (lookup *ecx *(ecx+4))
9388
9389 (lookup *(eax+18) *(eax+0x1c))
9390 89/<- %ebx 0/r32/eax
9391
9392 (lookup *edx *(edx+4))
9393
9394 (lookup *(eax+18) *(eax+0x1c))
9395
9396 (string-equal? %eax %ebx)
9397 3d/compare-eax-and 0/imm32/false
9398 {
9399 0f 85/jump-if-!= break/disp32
9400 (write-buffered *(ebp+0xc) "call ")
9401 (lookup *edi *(edi+4))
9402 (write-buffered *(ebp+0xc) %eax)
9403 (write-buffered *(ebp+0xc) ": register for output '")
9404 (lookup *ecx *(ecx+4))
9405 (lookup *eax *(eax+4))
9406 (write-buffered *(ebp+0xc) %eax)
9407 (write-buffered *(ebp+0xc) "' is not right\n")
9408 (flush *(ebp+0xc))
9409 (stop *(ebp+0x10) 1)
9410 }
9411 $check-mu-stmt:continue-to-next-output:
9412
9413 (lookup *(ecx+8) *(ecx+0xc))
9414 89/<- %ecx 0/r32/eax
9415
9416 (lookup *(edx+8) *(edx+0xc))
9417 89/<- %edx 0/r32/eax
9418
9419 e9/jump loop/disp32
9420 }
9421 $check-mu-stmt:check-output-count:
9422
9423 39/compare %ecx 2/r32/edx
9424 {
9425 0f 84/jump-if-= break/disp32
9426
9427
9428 {
9429 81 7/subop/compare %ecx 0/imm32
9430 74/jump-if-= break/disp8
9431 (write-buffered *(ebp+0xc) "call ")
9432 (lookup *edi *(edi+4))
9433 (write-buffered *(ebp+0xc) %eax)
9434 (write-buffered *(ebp+0xc) ": too many outputs\n")
9435 (flush *(ebp+0xc))
9436 (stop *(ebp+0x10) 1)
9437 }
9438
9439 {
9440 81 7/subop/compare %edx 0/imm32
9441 74/jump-if-= break/disp8
9442 (write-buffered *(ebp+0xc) "call ")
9443 (lookup *edi *(edi+4))
9444 (write-buffered *(ebp+0xc) %eax)
9445 (write-buffered *(ebp+0xc) ": too few outputs\n")
9446 (flush *(ebp+0xc))
9447 (stop *(ebp+0x10) 1)
9448 }
9449 }
9450 }
9451 $check-mu-stmt:end:
9452
9453 5f/pop-to-edi
9454 5e/pop-to-esi
9455 5b/pop-to-ebx
9456 5a/pop-to-edx
9457 59/pop-to-ecx
9458 58/pop-to-eax
9459
9460 89/<- %esp 5/r32/ebp
9461 5d/pop-to-ebp
9462 c3/return
9463
9464
9465 type-match?:
9466
9467 55/push-ebp
9468 89/<- %ebp 4/r32/esp
9469
9470 (is-simple-mu-type? *(ebp+0xc) 0)
9471 3d/compare-eax-and 0/imm32/false
9472 b8/copy-to-eax 1/imm32/true
9473 75/jump-if-!= $type-match?:end/disp8
9474 $type-match?:baseline:
9475
9476 (type-equal? *(ebp+8) *(ebp+0xc))
9477 $type-match?:end:
9478
9479 89/<- %esp 5/r32/ebp
9480 5d/pop-to-ebp
9481 c3/return
9482
9483 size-of:
9484
9485 55/push-ebp
9486 89/<- %ebp 4/r32/esp
9487
9488 51/push-ecx
9489
9490 8b/-> *(ebp+8) 1/r32/ecx
9491
9492
9493
9494
9495
9496
9497
9498 (lookup *(ecx+8) *(ecx+0xc))
9499 89/<- %ecx 0/r32/eax
9500
9501 {
9502 (is-mu-array? %ecx)
9503 3d/compare-eax-and 0/imm32/false
9504 74/jump-if-= break/disp8
9505 (size-of-array %ecx)
9506 eb/jump $size-of:end/disp8
9507 }
9508
9509 {
9510 81 7/subop/compare *ecx 0/imm32/false
9511 75/jump-if-!= break/disp8
9512 (lookup *(ecx+4) *(ecx+8))
9513 89/<- %ecx 0/r32/eax
9514 }
9515
9516 (size-of-type-id *(ecx+4))
9517 $size-of:end:
9518
9519 59/pop-to-ecx
9520
9521 89/<- %esp 5/r32/ebp
9522 5d/pop-to-ebp
9523 c3/return
9524
9525 size-of-deref:
9526
9527 55/push-ebp
9528 89/<- %ebp 4/r32/esp
9529
9530 51/push-ecx
9531
9532 8b/-> *(ebp+8) 1/r32/ecx
9533 (lookup *(ecx+8) *(ecx+0xc))
9534 89/<- %ecx 0/r32/eax
9535
9536
9537 (lookup *(ecx+0xc) *(ecx+0x10))
9538 89/<- %ecx 0/r32/eax
9539
9540 {
9541 (is-mu-array? %ecx)
9542 3d/compare-eax-and 0/imm32/false
9543 74/jump-if-= break/disp8
9544 (size-of-array %ecx)
9545 eb/jump $size-of:end/disp8
9546 }
9547
9548 {
9549 81 7/subop/compare *ecx 0/imm32/false
9550 75/jump-if-!= break/disp8
9551 (lookup *(ecx+4) *(ecx+8))
9552 89/<- %ecx 0/r32/eax
9553 }
9554
9555 (size-of-type-id *(ecx+4))
9556 $size-of-deref:end:
9557
9558 59/pop-to-ecx
9559
9560 89/<- %esp 5/r32/ebp
9561 5d/pop-to-ebp
9562 c3/return
9563
9564 is-mu-array?:
9565
9566 55/push-ebp
9567 89/<- %ebp 4/r32/esp
9568
9569 51/push-ecx
9570
9571 8b/-> *(ebp+8) 1/r32/ecx
9572
9573 81 7/subop/compare *ecx 0/imm32/false
9574 75/jump-if-!= $is-mu-array?:return-false/disp8
9575
9576 (lookup *(ecx+4) *(ecx+8))
9577 81 7/subop/compare *eax 0/imm32/false
9578 74/jump-if-= $is-mu-array?:return-false/disp8
9579
9580 81 7/subop/compare *(eax+4) 3/imm32/array-type-id
9581 0f 94/set-if-= %al
9582 81 4/subop/and %eax 0xff/imm32
9583 eb/jump $is-mu-array?:end/disp8
9584 $is-mu-array?:return-false:
9585 b8/copy-to-eax 0/imm32/false
9586 $is-mu-array?:end:
9587
9588 59/pop-to-ecx
9589
9590 89/<- %esp 5/r32/ebp
9591 5d/pop-to-ebp
9592 c3/return
9593
9594 size-of-array:
9595
9596 55/push-ebp
9597 89/<- %ebp 4/r32/esp
9598
9599 51/push-ecx
9600 52/push-edx
9601
9602 8b/-> *(ebp+8) 1/r32/ecx
9603
9604 (lookup *(ecx+0xc) *(ecx+0x10))
9605 89/<- %ecx 0/r32/eax
9606
9607 (lookup *(ecx+4) *(ecx+8))
9608 8b/-> *(eax+4) 2/r32/edx
9609
9610 (lookup *(ecx+0xc) *(ecx+0x10))
9611 (lookup *(eax+4) *(eax+8))
9612 8b/-> *(eax+4) 1/r32/ecx
9613
9614 (size-of-type-id-as-array-element %edx)
9615 f7 4/subop/multiply-into-eax %ecx
9616 05/add-to-eax 4/imm32
9617 $size-of-array:end:
9618
9619 5a/pop-to-edx
9620 59/pop-to-ecx
9621
9622 89/<- %esp 5/r32/ebp
9623 5d/pop-to-ebp
9624 c3/return
9625
9626 size-of-type-id:
9627
9628 55/push-ebp
9629 89/<- %ebp 4/r32/esp
9630
9631 51/push-ecx
9632
9633 68/push 0/imm32
9634 68/push 0/imm32
9635 89/<- %ecx 4/r32/esp
9636
9637 8b/-> *(ebp+8) 0/r32/eax
9638
9639 3d/compare-eax-and 0/imm32
9640 0f 84/jump-if-= $size-of-type-id:end/disp32
9641
9642 3d/compare-eax-and 8/imm32/byte
9643 {
9644 75/jump-if-!= break/disp8
9645 b8/copy-to-eax 4/imm32
9646 eb/jump $size-of-type-id:end/disp8
9647 }
9648
9649 3d/compare-eax-and 4/imm32/handle
9650 {
9651 75/jump-if-!= break/disp8
9652 b8/copy-to-eax 8/imm32
9653 eb/jump $size-of-type-id:end/disp8
9654 }
9655
9656
9657 (find-typeinfo %eax %ecx)
9658 {
9659 81 7/subop/compare *ecx 0/imm32
9660 74/jump-if-= break/disp8
9661 $size-of-type-id:user-defined:
9662 (lookup *ecx *(ecx+4))
9663 8b/-> *(eax+0xc) 0/r32/eax
9664 eb/jump $size-of-type-id:end/disp8
9665 }
9666
9667 b8/copy-to-eax 4/imm32
9668 $size-of-type-id:end:
9669
9670 81 0/subop/add %esp 8/imm32
9671
9672 59/pop-to-ecx
9673
9674 89/<- %esp 5/r32/ebp
9675 5d/pop-to-ebp
9676 c3/return
9677
9678 type-equal?:
9679
9680 55/push-ebp
9681 89/<- %ebp 4/r32/esp
9682
9683 51/push-ecx
9684 52/push-edx
9685 53/push-ebx
9686
9687 8b/-> *(ebp+8) 1/r32/ecx
9688
9689 8b/-> *(ebp+0xc) 2/r32/edx
9690 $type-equal?:compare-addr:
9691
9692 8b/-> %ecx 0/r32/eax
9693 39/compare %edx 0/r32/eax
9694 b8/copy-to-eax 1/imm32/true
9695 0f 84/jump-if-= $type-equal?:end/disp32
9696 $type-equal?:compare-atom-state:
9697
9698 8b/-> *ecx 3/r32/ebx
9699 39/compare *edx 3/r32/ebx
9700 b8/copy-to-eax 0/imm32/false
9701 0f 85/jump-if-!= $type-equal?:end/disp32
9702
9703 {
9704 $type-equal?:check-atom:
9705 81 7/subop/compare %ebx 0/imm32/false
9706 74/jump-if-= break/disp8
9707 $type-equal?:is-atom:
9708 8b/-> *(ecx+4) 0/r32/eax
9709 39/compare *(edx+4) 0/r32/eax
9710 0f 94/set-if-= %al
9711 81 4/subop/and %eax 0xff/imm32
9712 e9/jump $type-equal?:end/disp32
9713 }
9714 $type-equal?:check-left:
9715
9716 (lookup *(ecx+4) *(ecx+8))
9717 89/<- %ebx 0/r32/eax
9718 (lookup *(edx+4) *(edx+8))
9719 (type-equal? %eax %ebx)
9720 3d/compare-eax-and 0/imm32/false
9721 74/jump-if-= $type-equal?:end/disp8
9722 $type-equal?:check-right:
9723
9724 (lookup *(ecx+0xc) *(ecx+0x10))
9725 89/<- %ebx 0/r32/eax
9726 (lookup *(edx+0xc) *(edx+0x10))
9727 (type-equal? %eax %ebx)
9728 $type-equal?:end:
9729
9730 5b/pop-to-ebx
9731 5a/pop-to-edx
9732 59/pop-to-ecx
9733
9734 89/<- %esp 5/r32/ebp
9735 5d/pop-to-ebp
9736 c3/return
9737
9738
9739
9740
9741
9742 == data
9743
9744 Curr-block-depth:
9745 0/imm32
9746 Curr-local-stack-offset:
9747 0/imm32
9748
9749 == code
9750
9751 emit-subx:
9752
9753 55/push-ebp
9754 89/<- %ebp 4/r32/esp
9755
9756 50/push-eax
9757
9758 (lookup *_Program-functions *_Program-functions->payload)
9759 {
9760
9761 3d/compare-eax-and 0/imm32
9762 0f 84/jump-if-= break/disp32
9763 (emit-subx-function *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10))
9764
9765 (lookup *(eax+0x20) *(eax+0x24))
9766 e9/jump loop/disp32
9767 }
9768 $emit-subx:end:
9769
9770 58/pop-to-eax
9771
9772 89/<- %esp 5/r32/ebp
9773 5d/pop-to-ebp
9774 c3/return
9775
9776 emit-subx-function:
9777
9778 55/push-ebp
9779 89/<- %ebp 4/r32/esp
9780
9781 (populate-mu-type-offsets-in-inouts *(ebp+0xc))
9782
9783 50/push-eax
9784 51/push-ecx
9785 52/push-edx
9786 57/push-edi
9787
9788 c7 0/subop/copy *Curr-block-depth 1/imm32
9789 c7 0/subop/copy *Curr-local-stack-offset 0/imm32
9790
9791 8b/-> *(ebp+0xc) 1/r32/ecx
9792
9793 81 5/subop/subtract %esp 0xc00/imm32
9794 68/push 0xc00/imm32/size
9795 68/push 0/imm32/top
9796 89/<- %edx 4/r32/esp
9797
9798 (lookup *ecx *(ecx+4))
9799
9800 (write-buffered *(ebp+8) %eax)
9801 (write-buffered *(ebp+8) ":\n")
9802 (emit-subx-prologue *(ebp+8))
9803
9804 (lookup *(ecx+0x10) *(ecx+0x14))
9805 89/<- %edi 0/r32/eax
9806
9807 (lookup *(ecx+0x18) *(ecx+0x1c))
9808
9809 (emit-subx-block *(ebp+8) %eax %edx %edi *(ebp+0x10) *(ebp+0x14))
9810 (emit-subx-epilogue *(ebp+8))
9811
9812
9813 $emit-subx-function:end:
9814
9815 81 0/subop/add %esp 0xc08/imm32
9816
9817 5f/pop-to-edi
9818 5a/pop-to-edx
9819 59/pop-to-ecx
9820 58/pop-to-eax
9821
9822 89/<- %esp 5/r32/ebp
9823 5d/pop-to-ebp
9824 c3/return
9825
9826 populate-mu-type-offsets-in-inouts:
9827
9828 55/push-ebp
9829 89/<- %ebp 4/r32/esp
9830
9831 50/push-eax
9832 51/push-ecx
9833 52/push-edx
9834 53/push-ebx
9835 57/push-edi
9836
9837 ba/copy-to-edx 8/imm32
9838
9839 8b/-> *(ebp+8) 1/r32/ecx
9840 (lookup *(ecx+8) *(ecx+0xc))
9841 89/<- %ecx 0/r32/eax
9842 {
9843 $populate-mu-type-offsets-in-inouts:loop:
9844 81 7/subop/compare %ecx 0/imm32
9845 74/jump-if-= break/disp8
9846
9847 (lookup *ecx *(ecx+4))
9848 89/<- %ebx 0/r32/eax
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859 89/<- *(ebx+0x14) 2/r32/edx
9860
9861 (size-of %ebx)
9862 01/add-to %edx 0/r32/eax
9863
9864 (lookup *(ecx+8) *(ecx+0xc))
9865 89/<- %ecx 0/r32/eax
9866
9867 eb/jump loop/disp8
9868 }
9869 $populate-mu-type-offsets-in-inouts:end:
9870
9871 5f/pop-to-edi
9872 5b/pop-to-ebx
9873 5a/pop-to-edx
9874 59/pop-to-ecx
9875 58/pop-to-eax
9876
9877 89/<- %esp 5/r32/ebp
9878 5d/pop-to-ebp
9879 c3/return
9880
9881 emit-subx-stmt-list:
9882
9883 55/push-ebp
9884 89/<- %ebp 4/r32/esp
9885
9886 50/push-eax
9887 51/push-ecx
9888 53/push-ebx
9889 56/push-esi
9890
9891 8b/-> *(ebp+0xc) 6/r32/esi
9892
9893 {
9894 $emit-subx-stmt-list:loop:
9895 81 7/subop/compare %esi 0/imm32
9896 0f 84/jump-if-= break/disp32
9897
9898 (lookup *esi *(esi+4))
9899 89/<- %ecx 0/r32/eax
9900 {
9901 $emit-subx-stmt-list:check-for-block:
9902 81 7/subop/compare *ecx 0/imm32/block
9903 75/jump-if-!= break/disp8
9904 $emit-subx-stmt-list:block:
9905 (emit-subx-block *(ebp+8) %ecx *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
9906 }
9907 {
9908 $emit-subx-stmt-list:check-for-stmt:
9909 81 7/subop/compare *ecx 1/imm32/stmt1
9910 0f 85/jump-if-!= break/disp32
9911 $emit-subx-stmt-list:stmt1:
9912 {
9913 (is-mu-branch? %ecx)
9914 3d/compare-eax-and 0/imm32/false
9915 0f 84/jump-if-= break/disp32
9916 $emit-subx-stmt-list:branch-stmt:
9917 +-- 27 lines: # unconditional loops -----------------------------------------------------------------------------------------------------------------------------------------------------
9944 +-- 16 lines: # unconditional breaks ----------------------------------------------------------------------------------------------------------------------------------------------------
9960 +-- 38 lines: # simple conditional branches without a target ----------------------------------------------------------------------------------------------------------------------------
9998 +-- 19 lines: # conditional branches with an explicit target ----------------------------------------------------------------------------------------------------------------------------
10017 }
10018 $emit-subx-stmt-list:1-to-1:
10019 (emit-subx-stmt *(ebp+8) %ecx Primitives *(ebp+0x18) *(ebp+0x1c))
10020 e9/jump $emit-subx-stmt-list:continue/disp32
10021 }
10022 {
10023 $emit-subx-stmt-list:check-for-var-def:
10024 81 7/subop/compare *ecx 2/imm32/var-def
10025 75/jump-if-!= break/disp8
10026 $emit-subx-stmt-list:var-def:
10027 (emit-subx-var-def *(ebp+8) %ecx)
10028 (push *(ebp+0x10) *(ecx+4))
10029 (push *(ebp+0x10) *(ecx+8))
10030 (push *(ebp+0x10) 0)
10031
10032 eb/jump $emit-subx-stmt-list:continue/disp8
10033 }
10034 {
10035 $emit-subx-stmt-list:check-for-reg-var-def:
10036 81 7/subop/compare *ecx 3/imm32/reg-var-def
10037 0f 85/jump-if-!= break/disp32
10038 $emit-subx-stmt-list:reg-var-def:
10039
10040 (push-output-and-maybe-emit-spill *(ebp+8) %ecx *(ebp+0x10) %esi *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
10041
10042 (emit-subx-stmt *(ebp+8) %ecx Primitives *(ebp+0x18) *(ebp+0x1c))
10043
10044 eb/jump $emit-subx-stmt-list:continue/disp8
10045 }
10046 $emit-subx-stmt-list:continue:
10047
10048 (lookup *(esi+8) *(esi+0xc))
10049 89/<- %esi 0/r32/eax
10050 e9/jump loop/disp32
10051 }
10052 $emit-subx-stmt-list:emit-cleanup:
10053 (emit-cleanup-code-until-depth *(ebp+8) *(ebp+0x10) *Curr-block-depth)
10054 $emit-subx-stmt-list:clean-up:
10055 (clean-up-blocks *(ebp+0x10) *Curr-block-depth)
10056 $emit-subx-stmt-list:end:
10057
10058 5e/pop-to-esi
10059 5b/pop-to-ebx
10060 59/pop-to-ecx
10061 58/pop-to-eax
10062
10063 89/<- %esp 5/r32/ebp
10064 5d/pop-to-ebp
10065 c3/return
10066
10067
10068 push-output-and-maybe-emit-spill:
10069
10070 55/push-ebp
10071 89/<- %ebp 4/r32/esp
10072
10073 50/push-eax
10074 51/push-ecx
10075 52/push-edx
10076
10077 8b/-> *(ebp+0xc) 1/r32/ecx
10078
10079 (lookup *(ecx+0x14) *(ecx+0x18))
10080
10081
10082 (lookup *eax *(eax+4))
10083 89/<- %ecx 0/r32/eax
10084
10085 8b/-> *Curr-block-depth 0/r32/eax
10086 89/<- *(ecx+0x10) 0/r32/eax
10087
10088
10089
10090
10091
10092
10093
10094
10095 81 7/subop/compare *(ecx+0x18) 0/imm32
10096 0f 84/jump-if-= $push-output-and-maybe-emit-spill:abort/disp32
10097
10098 (not-yet-spilled-this-block? %ecx *(ebp+0x10))
10099 89/<- %edx 0/r32/eax
10100 3d/compare-eax-and 0/imm32/false
10101 0f 84/jump-if-= $push-output-and-maybe-emit-spill:push/disp32
10102 (will-not-write-some-register? %ecx *(ebp+0x14) *(ebp+0x18))
10103 89/<- %edx 0/r32/eax
10104
10105 3d/compare-eax-and 0/imm32/false
10106 0f 84/jump-if-= $push-output-and-maybe-emit-spill:push/disp32
10107
10108
10109 81 5/subop/subtract *Curr-local-stack-offset 4/imm32
10110
10111 (emit-indent *(ebp+8) *Curr-block-depth)
10112 (write-buffered *(ebp+8) "ff 6/subop/push %")
10113 (lookup *(ecx+0x18) *(ecx+0x1c))
10114 (write-buffered *(ebp+8) %eax)
10115 (write-buffered *(ebp+8) Newline)
10116 $push-output-and-maybe-emit-spill:push:
10117 8b/-> *(ebp+0xc) 1/r32/ecx
10118 (lookup *(ecx+0x14) *(ecx+0x18))
10119
10120 (push *(ebp+0x10) *eax)
10121 (push *(ebp+0x10) *(eax+4))
10122 (push *(ebp+0x10) %edx)
10123 $push-output-and-maybe-emit-spill:end:
10124
10125 5a/pop-to-edx
10126 59/pop-to-ecx
10127 58/pop-to-eax
10128
10129 89/<- %esp 5/r32/ebp
10130 5d/pop-to-ebp
10131 c3/return
10132
10133 $push-output-and-maybe-emit-spill:abort:
10134
10135 (write-buffered *(ebp+0x1c) "var '")
10136 (write-buffered *(ebp+0x1c) *eax)
10137 (write-buffered *(ebp+0x1c) "' initialized from an instruction must live in a register\n")
10138 (flush *(ebp+0x1c))
10139 (stop *(ebp+0x20) 1)
10140
10141
10142 emit-subx-cleanup-and-unconditional-nonlocal-branch:
10143
10144 55/push-ebp
10145 89/<- %ebp 4/r32/esp
10146
10147 50/push-eax
10148 51/push-ecx
10149
10150 8b/-> *(ebp+0xc) 1/r32/ecx
10151
10152 (lookup *(ecx+0xc) *(ecx+0x10))
10153 (lookup *eax *(eax+4))
10154 (lookup *eax *(eax+4))
10155
10156 (emit-cleanup-code-until-target *(ebp+8) *(ebp+0x10) %eax)
10157
10158 (emit-indent *(ebp+8) *Curr-block-depth)
10159 (write-buffered *(ebp+8) "e9/jump ")
10160 (write-buffered *(ebp+8) %eax)
10161 (lookup *(ecx+4) *(ecx+8))
10162 (string-starts-with? %eax "break")
10163 3d/compare-eax-and 0/imm32/false
10164 {
10165 74/jump-if-= break/disp8
10166 (write-buffered *(ebp+8) ":break/disp32\n")
10167 }
10168 3d/compare-eax-and 0/imm32/false
10169 {
10170 75/jump-if-!= break/disp8
10171 (write-buffered *(ebp+8) ":loop/disp32\n")
10172 }
10173 $emit-subx-cleanup-and-unconditional-nonlocal-branch:end:
10174
10175 59/pop-to-ecx
10176 58/pop-to-eax
10177
10178 89/<- %esp 5/r32/ebp
10179 5d/pop-to-ebp
10180 c3/return
10181
10182 is-mu-branch?:
10183
10184 55/push-ebp
10185 89/<- %ebp 4/r32/esp
10186
10187 51/push-ecx
10188
10189 8b/-> *(ebp+8) 1/r32/ecx
10190 (lookup *(ecx+4) *(ecx+8))
10191 89/<- %ecx 0/r32/eax
10192
10193 (string-starts-with? %ecx "loop")
10194 3d/compare-eax-and 0/imm32/false
10195 75/jump-if-not-equal $is-mu-branch?:end/disp8
10196
10197 (string-starts-with? %ecx "break")
10198 $is-mu-branch?:end:
10199
10200 59/pop-to-ecx
10201
10202 89/<- %esp 5/r32/ebp
10203 5d/pop-to-ebp
10204 c3/return
10205
10206 emit-reverse-break:
10207
10208 55/push-ebp
10209 89/<- %ebp 4/r32/esp
10210
10211 50/push-eax
10212
10213 8b/-> *(ebp+0xc) 0/r32/eax
10214
10215 (lookup *(eax+4) *(eax+8))
10216 (get Reverse-branch %eax 0x10 "reverse-branch: ")
10217 (emit-indent *(ebp+8) *Curr-block-depth)
10218 (lookup *eax *(eax+4))
10219 (write-buffered *(ebp+8) %eax)
10220 (write-buffered *(ebp+8) " break/disp32\n")
10221 $emit-reverse-break:end:
10222
10223 58/pop-to-eax
10224
10225 89/<- %esp 5/r32/ebp
10226 5d/pop-to-ebp
10227 c3/return
10228
10229 == data
10230
10231
10232 Reverse-branch:
10233
10234 0x140/imm32/write
10235 0/imm32/read
10236 0x140/imm32/size
10237
10238 0x11/imm32/alloc-id _string-break-if-=/imm32 0x11/imm32/alloc-id _string_0f_85_jump_label/imm32
10239 0x11/imm32/alloc-id _string-loop-if-=/imm32 0x11/imm32/alloc-id _string_0f_85_jump_label/imm32
10240 0x11/imm32/alloc-id _string-break-if-!=/imm32 0x11/imm32/alloc-id _string_0f_84_jump_label/imm32
10241 0x11/imm32/alloc-id _string-loop-if-!=/imm32 0x11/imm32/alloc-id _string_0f_84_jump_label/imm32
10242 0x11/imm32/alloc-id _string-break-if-</imm32 0x11/imm32/alloc-id _string_0f_8d_jump_label/imm32
10243 0x11/imm32/alloc-id _string-loop-if-</imm32 0x11/imm32/alloc-id _string_0f_8d_jump_label/imm32
10244 0x11/imm32/alloc-id _string-break-if->/imm32 0x11/imm32/alloc-id _string_0f_8e_jump_label/imm32
10245 0x11/imm32/alloc-id _string-loop-if->/imm32 0x11/imm32/alloc-id _string_0f_8e_jump_label/imm32
10246 0x11/imm32/alloc-id _string-break-if-<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
10247 0x11/imm32/alloc-id _string-loop-if-<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
10248 0x11/imm32/alloc-id _string-break-if->=/imm32 0x11/imm32/alloc-id _string_0f_8c_jump_label/imm32
10249 0x11/imm32/alloc-id _string-loop-if->=/imm32 0x11/imm32/alloc-id _string_0f_8c_jump_label/imm32
10250 0x11/imm32/alloc-id _string-break-if-addr</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
10251 0x11/imm32/alloc-id _string-loop-if-addr</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
10252 0x11/imm32/alloc-id _string-break-if-addr>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
10253 0x11/imm32/alloc-id _string-loop-if-addr>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
10254 0x11/imm32/alloc-id _string-break-if-addr<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
10255 0x11/imm32/alloc-id _string-loop-if-addr<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
10256 0x11/imm32/alloc-id _string-break-if-addr>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
10257 0x11/imm32/alloc-id _string-loop-if-addr>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
10258
10259 == code
10260
10261 emit-unconditional-jump-to-depth:
10262
10263 55/push-ebp
10264 89/<- %ebp 4/r32/esp
10265
10266 50/push-eax
10267 51/push-ecx
10268 52/push-edx
10269 53/push-ebx
10270 56/push-esi
10271
10272 8b/-> *(ebp+0xc) 1/r32/ecx
10273
10274 8b/-> *ecx 0/r32/eax
10275
10276 8d/copy-address *(ecx+eax-4) 6/r32/esi
10277
10278 8d/copy-address *(ecx+8) 1/r32/ecx
10279
10280 8b/-> *(ebp+0x10) 2/r32/edx
10281 {
10282 $emit-unconditional-jump-to-depth:loop:
10283
10284 39/compare %esi 1/r32/ecx
10285 0f 82/jump-if-addr< break/disp32
10286
10287 (lookup *esi *(esi+4))
10288 89/<- %ebx 0/r32/eax
10289
10290 39/compare *(ebx+0x10) 2/r32/edx
10291 0f 8c/jump-if-< break/disp32
10292 {
10293 $emit-unconditional-jump-to-depth:check:
10294
10295 39/compare *(ebx+0x10) 2/r32/edx
10296 0f 85/jump-if-!= break/disp32
10297 $emit-unconditional-jump-to-depth:depth-found:
10298
10299 (size-of %ebx)
10300 3d/compare-eax-and 0/imm32
10301 0f 85/jump-if-!= break/disp32
10302 $emit-unconditional-jump-to-depth:label-found:
10303
10304 (emit-indent *(ebp+8) *Curr-block-depth)
10305 (write-buffered *(ebp+8) "e9/jump ")
10306 (lookup *ebx *(ebx+4))
10307 (write-buffered *(ebp+8) %eax)
10308 (write-buffered *(ebp+8) ":")
10309 (write-buffered *(ebp+8) *(ebp+0x14))
10310 (write-buffered *(ebp+8) "/disp32\n")
10311 eb/jump $emit-unconditional-jump-to-depth:end/disp8
10312 }
10313
10314 81 5/subop/subtract %esi 0xc/imm32
10315 e9/jump loop/disp32
10316 }
10317
10318 $emit-unconditional-jump-to-depth:end:
10319
10320 5e/pop-to-esi
10321 5b/pop-to-ebx
10322 5a/pop-to-edx
10323 59/pop-to-ecx
10324 58/pop-to-eax
10325
10326 89/<- %esp 5/r32/ebp
10327 5d/pop-to-ebp
10328 c3/return
10329
10330
10331
10332 emit-cleanup-code-until-depth:
10333
10334 55/push-ebp
10335 89/<- %ebp 4/r32/esp
10336
10337 50/push-eax
10338 51/push-ecx
10339 52/push-edx
10340 53/push-ebx
10341 56/push-esi
10342
10343
10344
10345 8b/-> *(ebp+0xc) 1/r32/ecx
10346
10347 8b/-> *ecx 6/r32/esi
10348
10349 8d/copy-address *(ecx+esi-4) 6/r32/esi
10350
10351 81 0/subop/add %ecx 8/imm32
10352
10353 8b/-> *(ebp+0x10) 2/r32/edx
10354 {
10355 $emit-cleanup-code-until-depth:loop:
10356
10357 39/compare %esi 1/r32/ecx
10358 0f 82/jump-if-addr< break/disp32
10359
10360 (lookup *esi *(esi+4))
10361 89/<- %ebx 0/r32/eax
10362
10363
10364
10365
10366
10367
10368 39/compare *(ebx+0x10) 2/r32/edx
10369 0f 8c/jump-if-< break/disp32
10370
10371 81 7/subop/compare *(ebx+0x18) 0/imm32
10372 {
10373 0f 84/jump-if-= break/disp32
10374 {
10375 $emit-cleanup-code-until-depth:check-for-previous-spill:
10376 8b/-> *(esi+8) 0/r32/eax
10377 3d/compare-eax-and 0/imm32/false
10378 74/jump-if-= break/disp8
10379 $emit-cleanup-code-until-depth:reclaim-var-in-register:
10380 (emit-indent *(ebp+8) *Curr-block-depth)
10381 (write-buffered *(ebp+8) "8f 0/subop/pop %")
10382 (lookup *(ebx+0x18) *(ebx+0x1c))
10383 (write-buffered *(ebp+8) %eax)
10384 (write-buffered *(ebp+8) Newline)
10385 }
10386 eb/jump $emit-cleanup-code-until-depth:continue/disp8
10387 }
10388
10389 {
10390 75/jump-if-!= break/disp8
10391 $emit-cleanup-code-until-depth:var-on-stack:
10392 (size-of %ebx)
10393
10394 3d/compare-eax-and 0/imm32
10395 74/jump-if-= break/disp8
10396 $emit-cleanup-code-until-depth:reclaim-var-on-stack:
10397 (emit-indent *(ebp+8) *Curr-block-depth)
10398 (write-buffered *(ebp+8) "81 0/subop/add %esp ")
10399 (print-int32-buffered *(ebp+8) %eax)
10400 (write-buffered *(ebp+8) "/imm32\n")
10401 }
10402 $emit-cleanup-code-until-depth:continue:
10403
10404 81 5/subop/subtract %esi 0xc/imm32
10405 e9/jump loop/disp32
10406 }
10407 $emit-cleanup-code-until-depth:end:
10408
10409 5e/pop-to-esi
10410 5b/pop-to-ebx
10411 5a/pop-to-edx
10412 59/pop-to-ecx
10413 58/pop-to-eax
10414
10415 89/<- %esp 5/r32/ebp
10416 5d/pop-to-ebp
10417 c3/return
10418
10419
10420
10421 emit-cleanup-code-until-target:
10422
10423 55/push-ebp
10424 89/<- %ebp 4/r32/esp
10425
10426 50/push-eax
10427 51/push-ecx
10428 52/push-edx
10429 53/push-ebx
10430
10431 8b/-> *(ebp+0xc) 1/r32/ecx
10432
10433 8b/-> *ecx 0/r32/eax
10434
10435 8d/copy-address *(ecx+eax-4) 2/r32/edx
10436
10437 81 0/subop/add %ecx 8/imm32
10438 {
10439 $emit-cleanup-code-until-target:loop:
10440
10441 39/compare %edx 1/r32/ecx
10442 0f 82/jump-if-addr< break/disp32
10443
10444 (lookup *edx *(edx+4))
10445 89/<- %ebx 0/r32/eax
10446
10447 (lookup *ebx *(ebx+4))
10448 (string-equal? %eax *(ebp+0x10))
10449 3d/compare-eax-and 0/imm32/false
10450 0f 85/jump-if-!= break/disp32
10451
10452 81 7/subop/compare *(ebx+0x18) 0/imm32
10453 {
10454 0f 84/jump-if-= break/disp32
10455 {
10456 $emit-cleanup-code-until-target:check-for-previous-spill:
10457 8b/-> *(edx+8) 0/r32/eax
10458 3d/compare-eax-and 0/imm32/false
10459 74/jump-if-= break/disp8
10460 $emit-cleanup-code-until-target:reclaim-var-in-register:
10461 (emit-indent *(ebp+8) *Curr-block-depth)
10462 (write-buffered *(ebp+8) "8f 0/subop/pop %")
10463 (lookup *(ebx+0x18) *(ebx+0x1c))
10464 (write-buffered *(ebp+8) %eax)
10465 (write-buffered *(ebp+8) Newline)
10466 }
10467 eb/jump $emit-cleanup-code-until-target:continue/disp8
10468 }
10469
10470 {
10471 75/jump-if-!= break/disp8
10472 $emit-cleanup-code-until-target:reclaim-var-on-stack:
10473 (size-of %ebx)
10474
10475 3d/compare-eax-and 0/imm32
10476 74/jump-if-= break/disp8
10477
10478 (emit-indent *(ebp+8) *Curr-block-depth)
10479 (write-buffered *(ebp+8) "81 0/subop/add %esp ")
10480 (print-int32-buffered *(ebp+8) %eax)
10481 (write-buffered *(ebp+8) "/imm32\n")
10482 }
10483 $emit-cleanup-code-until-target:continue:
10484
10485 81 5/subop/subtract %edx 0xc/imm32
10486 e9/jump loop/disp32
10487 }
10488 $emit-cleanup-code-until-target:end:
10489
10490 5b/pop-to-ebx
10491 5a/pop-to-edx
10492 59/pop-to-ecx
10493 58/pop-to-eax
10494
10495 89/<- %esp 5/r32/ebp
10496 5d/pop-to-ebp
10497 c3/return
10498
10499
10500
10501
10502 not-yet-spilled-this-block?:
10503
10504 55/push-ebp
10505 89/<- %ebp 4/r32/esp
10506
10507 51/push-ecx
10508 52/push-edx
10509 53/push-ebx
10510 56/push-esi
10511 57/push-edi
10512
10513 8b/-> *(ebp+0xc) 1/r32/ecx
10514
10515 8b/-> *ecx 0/r32/eax
10516
10517 8d/copy-address *(ecx+eax-4) 2/r32/edx
10518
10519 8d/copy-address *(ecx+8) 1/r32/ecx
10520
10521 8b/-> *(ebp+8) 3/r32/ebx
10522 8b/-> *(ebx+0x10) 3/r32/ebx
10523
10524 8b/-> *(ebp+8) 6/r32/esi
10525 (lookup *(esi+0x18) *(esi+0x1c))
10526 89/<- %esi 0/r32/eax
10527 {
10528 $not-yet-spilled-this-block?:loop:
10529
10530 39/compare %edx 1/r32/ecx
10531 0f 82/jump-if-addr< break/disp32
10532
10533 (lookup *edx *(edx+4))
10534 89/<- %edi 0/r32/eax
10535
10536 39/compare *(edi+0x10) 3/r32/ebx
10537 0f 8c/jump-if-< break/disp32
10538
10539 (lookup *(edi+0x18) *(edi+0x1c))
10540 89/<- %edi 0/r32/eax
10541
10542 {
10543 $not-yet-spilled-this-block?:check-reg:
10544 81 7/subop/compare %edi 0/imm32
10545 0f 84/jump-if-= break/disp32
10546
10547 (string-equal? %esi %edi)
10548 3d/compare-eax-and 0/imm32/false
10549 74/jump-if-= break/disp8
10550 $not-yet-spilled-this-block?:return-false:
10551 b8/copy-to-eax 0/imm32/false
10552 eb/jump $not-yet-spilled-this-block?:end/disp8
10553 }
10554 $not-yet-spilled-this-block?:continue:
10555
10556 81 5/subop/subtract %edx 0xc/imm32
10557 e9/jump loop/disp32
10558 }
10559 $not-yet-spilled-this-block?:return-true:
10560
10561 b8/copy-to-eax 1/imm32/true
10562 $not-yet-spilled-this-block?:end:
10563
10564 5f/pop-to-edi
10565 5e/pop-to-esi
10566 5b/pop-to-ebx
10567 5a/pop-to-edx
10568 59/pop-to-ecx
10569
10570 89/<- %esp 5/r32/ebp
10571 5d/pop-to-ebp
10572 c3/return
10573
10574
10575 will-not-write-some-register?:
10576
10577 55/push-ebp
10578 89/<- %ebp 4/r32/esp
10579
10580 8b/-> *(ebp+8) 0/r32/eax
10581
10582 (lookup *(eax+0x18) *(eax+0x1c))
10583
10584 (find-register *(ebp+0x10) %eax)
10585
10586 {
10587 3d/compare-eax-and 0/imm32
10588 75/jump-if-!= break/disp8
10589 b8/copy-to-eax 1/imm32/true
10590 eb/jump $will-not-write-some-register?:end/disp8
10591 }
10592
10593 (assigns-in-stmts? *(ebp+0xc) %eax)
10594 3d/compare-eax-and 0/imm32/false
10595
10596 0f 94/set-if-= %al
10597 $will-not-write-some-register?:end:
10598
10599 89/<- %esp 5/r32/ebp
10600 5d/pop-to-ebp
10601 c3/return
10602
10603
10604
10605 find-register:
10606
10607 55/push-ebp
10608 89/<- %ebp 4/r32/esp
10609
10610 51/push-ecx
10611
10612 8b/-> *(ebp+8) 1/r32/ecx
10613 {
10614 $find-register:loop:
10615
10616 81 7/subop/compare %ecx 0/imm32
10617 74/jump-if-= break/disp8
10618
10619 (lookup *ecx *(ecx+4))
10620 (lookup *(eax+0x18) *(eax+0x1c))
10621
10622 $find-register:compare:
10623 (string-equal? *(ebp+0xc) %eax)
10624 {
10625 3d/compare-eax-and 0/imm32/false
10626 74/jump-if-= break/disp8
10627 $find-register:found:
10628 (lookup *ecx *(ecx+4))
10629 eb/jump $find-register:end/disp8
10630 }
10631
10632 (lookup *(ecx+8) *(ecx+0xc))
10633 89/<- %ecx 0/r32/eax
10634
10635 eb/jump loop/disp8
10636 }
10637 $find-register:end:
10638
10639 59/pop-to-ecx
10640
10641 89/<- %esp 5/r32/ebp
10642 5d/pop-to-ebp
10643 c3/return
10644
10645 assigns-in-stmts?:
10646
10647 55/push-ebp
10648 89/<- %ebp 4/r32/esp
10649
10650 51/push-ecx
10651
10652 8b/-> *(ebp+8) 1/r32/ecx
10653 {
10654
10655 81 7/subop/compare %ecx 0/imm32
10656 74/jump-if-= break/disp8
10657
10658 (lookup *ecx *(ecx+4))
10659 (assigns-in-stmt? %eax *(ebp+0xc))
10660 3d/compare-eax-and 0/imm32/false
10661 75/jump-if-!= break/disp8
10662
10663 (lookup *(ecx+8) *(ecx+0xc))
10664 89/<- %ecx 0/r32/eax
10665
10666 eb/jump loop/disp8
10667 }
10668 $assigns-in-stmts?:end:
10669
10670 59/pop-to-ecx
10671
10672 89/<- %esp 5/r32/ebp
10673 5d/pop-to-ebp
10674 c3/return
10675
10676 assigns-in-stmt?:
10677
10678 55/push-ebp
10679 89/<- %ebp 4/r32/esp
10680
10681 51/push-ecx
10682
10683 8b/-> *(ebp+8) 1/r32/ecx
10684
10685 {
10686 81 7/subop/compare *ecx 1/imm32/stmt1
10687 75/jump-if-!= break/disp8
10688 (lookup *(ecx+0x14) *(ecx+0x18))
10689 (assigns-in-stmt-vars? %eax *(ebp+0xc))
10690 eb/jump $assigns-in-stmt?:end/disp8
10691 }
10692
10693 {
10694 81 7/subop/compare *ecx 0/imm32/block
10695 75/jump-if-!= break/disp8
10696 (lookup *(ecx+4) *(ecx+8))
10697 (assigns-in-stmts? %eax *(ebp+0xc))
10698 eb/jump $assigns-in-stmt?:end/disp8
10699 }
10700
10701 b8/copy 0/imm32/false
10702 $assigns-in-stmt?:end:
10703
10704 59/pop-to-ecx
10705
10706 89/<- %esp 5/r32/ebp
10707 5d/pop-to-ebp
10708 c3/return
10709
10710 assigns-in-stmt-vars?:
10711
10712 55/push-ebp
10713 89/<- %ebp 4/r32/esp
10714
10715 51/push-ecx
10716
10717 8b/-> *(ebp+8) 1/r32/ecx
10718 {
10719
10720 81 7/subop/compare %ecx 0/imm32
10721 74/jump-if-= break/disp8
10722
10723 (lookup *ecx *(ecx+4))
10724
10725 {
10726 39/compare *(ebp+0xc) 0/r32/eax
10727 75/jump-if-!= break/disp8
10728 81 7/subop/compare *(ecx+0x10) 0/imm32/false
10729 75/jump-if-!= break/disp8
10730 b8/copy-to-eax 1/imm32/true
10731 eb/jump $assigns-in-stmt-vars?:end/disp8
10732 }
10733
10734 (lookup *(ecx+8) *(ecx+0xc))
10735 89/<- %ecx 0/r32/eax
10736
10737 eb/jump loop/disp8
10738 }
10739 $assigns-in-stmt-vars?:end:
10740
10741 59/pop-to-ecx
10742
10743 89/<- %esp 5/r32/ebp
10744 5d/pop-to-ebp
10745 c3/return
10746
10747
10748
10749
10750
10751 same-register-spilled-before?:
10752
10753 55/push-ebp
10754 89/<- %ebp 4/r32/esp
10755
10756 51/push-ecx
10757 52/push-edx
10758 53/push-ebx
10759 56/push-esi
10760 57/push-edi
10761
10762 8b/-> *(ebp+8) 1/r32/ecx
10763
10764 (lookup *(ecx+0x18) *(ecx+0x1c))
10765 89/<- %edx 0/r32/eax
10766
10767 8b/-> *(ecx+0x10) 3/r32/ebx
10768
10769 8b/-> *(ebp+0xc) 1/r32/ecx
10770 81 0/subop/add %ecx 8/imm32
10771
10772
10773
10774 8b/-> *(ebp+0x10) 6/r32/esi
10775
10776 81 5/subop/subtract %esi 8/imm32
10777 {
10778 $same-register-spilled-before?:loop:
10779
10780 39/compare %esi 1/r32/ecx
10781 0f 82/jump-if-addr< break/disp32
10782
10783 (lookup *esi *(esi+4))
10784
10785 39/compare *(eax+0x10) 3/r32/ebx
10786 0f 8c/jump-if-< break/disp32
10787
10788 81 7/subop/compare *(eax+0x18) 0/imm32
10789 74/jump-if-= $same-register-spilled-before?:continue/disp8
10790
10791 (lookup *(eax+0x18) *(eax+0x1c))
10792 (string-equal? %eax %edx)
10793 3d/compare-eax-and 0/imm32/false
10794 b8/copy-to-eax 1/imm32/true
10795 75/jump-if-!= $same-register-spilled-before?:end/disp8
10796 $same-register-spilled-before?:continue:
10797
10798 81 5/subop/subtract %esi 8/imm32
10799 e9/jump loop/disp32
10800 }
10801 $same-register-spilled-before?:false:
10802 b8/copy-to-eax 0/imm32/false
10803 $same-register-spilled-before?:end:
10804
10805 5f/pop-to-edi
10806 5e/pop-to-esi
10807 5b/pop-to-ebx
10808 5a/pop-to-edx
10809 59/pop-to-ecx
10810
10811 89/<- %esp 5/r32/ebp
10812 5d/pop-to-ebp
10813 c3/return
10814
10815
10816 clean-up-blocks:
10817
10818 55/push-ebp
10819 89/<- %ebp 4/r32/esp
10820
10821 50/push-eax
10822 51/push-ecx
10823 56/push-esi
10824
10825 8b/-> *(ebp+8) 6/r32/esi
10826
10827 8b/-> *(ebp+0xc) 1/r32/ecx
10828 {
10829 $clean-up-blocks:reclaim-loop:
10830
10831 8b/-> *esi 0/r32/eax
10832 3d/compare-eax-and 0/imm32
10833 0f 8e/jump-if-<= break/disp32
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844 (lookup *(esi+eax-4) *(esi+eax))
10845
10846 39/compare *(eax+0x10) 1/r32/ecx
10847 7c/jump-if-< break/disp8
10848
10849 81 7/subop/compare *(eax+0x18) 0/imm32
10850 {
10851 75/jump-if-!= break/disp8
10852 $clean-up-blocks:reclaim-var-on-stack:
10853 (size-of %eax)
10854 01/add-to *Curr-local-stack-offset 0/r32/eax
10855 }
10856 (pop %esi)
10857 (pop %esi)
10858 (pop %esi)
10859 e9/jump loop/disp32
10860 }
10861 $clean-up-blocks:end:
10862
10863 5e/pop-to-esi
10864 59/pop-to-ecx
10865 58/pop-to-eax
10866
10867 89/<- %esp 5/r32/ebp
10868 5d/pop-to-ebp
10869 c3/return
10870
10871 emit-subx-var-def:
10872
10873 55/push-ebp
10874 89/<- %ebp 4/r32/esp
10875
10876 50/push-eax
10877 51/push-ecx
10878 52/push-edx
10879
10880 8b/-> *(ebp+0xc) 0/r32/eax
10881
10882 (lookup *(eax+4) *(eax+8))
10883 89/<- %ecx 0/r32/eax
10884
10885 8b/-> *Curr-block-depth 0/r32/eax
10886 89/<- *(ecx+0x10) 0/r32/eax
10887
10888 (size-of %ecx)
10889 89/<- %edx 0/r32/eax
10890
10891 29/subtract-from *Curr-local-stack-offset 2/r32/edx
10892
10893 8b/-> *Curr-local-stack-offset 0/r32/eax
10894 89/<- *(ecx+0x14) 0/r32/eax
10895
10896 {
10897 (lookup *(ecx+8) *(ecx+0xc))
10898 (is-mu-array? %eax)
10899 3d/compare-eax-and 0/imm32/false
10900 0f 84/jump-if-= break/disp32
10901
10902 81 5/subop/subtract %edx 4/imm32
10903 (emit-indent *(ebp+8) *Curr-block-depth)
10904 (write-buffered *(ebp+8) "(push-n-zero-bytes ")
10905 (print-int32-buffered *(ebp+8) %edx)
10906 (write-buffered *(ebp+8) ")\n")
10907 (emit-indent *(ebp+8) *Curr-block-depth)
10908 (write-buffered *(ebp+8) "68/push ")
10909 (print-int32-buffered *(ebp+8) %edx)
10910 (write-buffered *(ebp+8) "/imm32\n")
10911 eb/jump $emit-subx-var-def:end/disp8
10912 }
10913
10914 {
10915 81 7/subop/compare %edx 0/imm32
10916 7e/jump-if-<= break/disp8
10917 (emit-indent *(ebp+8) *Curr-block-depth)
10918 (write-buffered *(ebp+8) "68/push 0/imm32\n")
10919
10920 81 5/subop/subtract %edx 4/imm32
10921
10922 eb/jump loop/disp8
10923 }
10924 $emit-subx-var-def:end:
10925
10926 5a/pop-to-edx
10927 59/pop-to-ecx
10928 58/pop-to-eax
10929
10930 89/<- %esp 5/r32/ebp
10931 5d/pop-to-ebp
10932 c3/return
10933
10934 emit-subx-stmt:
10935
10936 55/push-ebp
10937 89/<- %ebp 4/r32/esp
10938
10939 50/push-eax
10940 51/push-ecx
10941
10942
10943 8b/-> *(ebp+0xc) 1/r32/ecx
10944 (lookup *(ecx+4) *(ecx+8))
10945 89/<- %ecx 0/r32/eax
10946
10947 {
10948
10949 (string-equal? %ecx "length")
10950 3d/compare-eax-and 0/imm32
10951 0f 84/jump-if-= break/disp32
10952 (translate-mu-length-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
10953 e9/jump $emit-subx-stmt:end/disp32
10954 }
10955
10956 {
10957
10958 (string-equal? %ecx "index")
10959 3d/compare-eax-and 0/imm32
10960 0f 84/jump-if-= break/disp32
10961 (translate-mu-index-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
10962 e9/jump $emit-subx-stmt:end/disp32
10963 }
10964
10965 {
10966
10967 (string-equal? %ecx "compute-offset")
10968 3d/compare-eax-and 0/imm32
10969 0f 84/jump-if-= break/disp32
10970 (translate-mu-compute-index-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
10971 e9/jump $emit-subx-stmt:end/disp32
10972 }
10973
10974 {
10975
10976 (string-equal? %ecx "get")
10977 3d/compare-eax-and 0/imm32
10978 0f 84/jump-if-= break/disp32
10979 (translate-mu-get-stmt *(ebp+8) *(ebp+0xc))
10980 e9/jump $emit-subx-stmt:end/disp32
10981 }
10982
10983 {
10984 $emit-subx-stmt:check-for-primitive:
10985
10986 (find-matching-primitive *(ebp+0x10) *(ebp+0xc))
10987 3d/compare-eax-and 0/imm32
10988 74/jump-if-= break/disp8
10989 $emit-subx-stmt:primitive:
10990 (emit-subx-primitive *(ebp+8) *(ebp+0xc) %eax)
10991 e9/jump $emit-subx-stmt:end/disp32
10992 }
10993
10994
10995 $emit-subx-stmt:call:
10996 (emit-call *(ebp+8) *(ebp+0xc))
10997 $emit-subx-stmt:end:
10998
10999 59/pop-to-ecx
11000 58/pop-to-eax
11001
11002 89/<- %esp 5/r32/ebp
11003 5d/pop-to-ebp
11004 c3/return
11005
11006 translate-mu-length-stmt:
11007
11008 55/push-ebp
11009 89/<- %ebp 4/r32/esp
11010
11011 50/push-eax
11012 51/push-ecx
11013 52/push-edx
11014 53/push-ebx
11015 56/push-esi
11016
11017 8b/-> *(ebp+0xc) 6/r32/esi
11018
11019 (lookup *(esi+0xc) *(esi+0x10))
11020 (lookup *eax *(eax+4))
11021 89/<- %ebx 0/r32/eax
11022
11023 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
11024 89/<- %ecx 0/r32/eax
11025
11026 (lookup *(esi+0x14) *(esi+0x18))
11027 (lookup *eax *(eax+4))
11028 (lookup *(eax+0x18) *(eax+0x1c))
11029 89/<- %edx 0/r32/eax
11030
11031 {
11032 81 7/subop/compare %ecx 1/imm32
11033 75/jump-if-!= break/disp8
11034 $translate-mu-length-stmt:size-1:
11035 (emit-save-size-to *(ebp+8) %ebx %edx)
11036 e9/jump $translate-mu-length-stmt:end/disp32
11037 }
11038
11039 {
11040 (power-of-2? %ecx *(ebp+0x10) *(ebp+0x14))
11041 3d/compare-eax-and 0/imm32/false
11042 74/jump-if-= break/disp8
11043 81 7/subop/compare %ecx 0xff/imm32
11044 7f/jump-if-> break/disp8
11045 $translate-mu-length-stmt:size-power-of-2:
11046 (emit-save-size-to *(ebp+8) %ebx %edx)
11047 (emit-divide-by-shift-right *(ebp+8) %edx %ecx)
11048 e9/jump $translate-mu-length-stmt:end/disp32
11049 }
11050
11051
11052 {
11053 $translate-mu-length-stmt:complex:
11054 (string-equal? %edx "eax")
11055 3d/compare-eax-and 0/imm32/false
11056 75/break-if-!= break/disp8
11057 (emit-indent *(ebp+8) *Curr-block-depth)
11058 (write-buffered *(ebp+8) "50/push-eax\n")
11059 }
11060 {
11061 (string-equal? %edx "ecx")
11062 3d/compare-eax-and 0/imm32/false
11063 75/break-if-!= break/disp8
11064 (emit-indent *(ebp+8) *Curr-block-depth)
11065 (write-buffered *(ebp+8) "51/push-ecx\n")
11066 }
11067 {
11068 (string-equal? %edx "edx")
11069 3d/compare-eax-and 0/imm32/false
11070 75/break-if-!= break/disp8
11071 (emit-indent *(ebp+8) *Curr-block-depth)
11072 (write-buffered *(ebp+8) "52/push-edx\n")
11073 }
11074
11075 (emit-save-size-to *(ebp+8) %ebx "eax")
11076 (emit-indent *(ebp+8) *Curr-block-depth)
11077 (write-buffered *(ebp+8) "31/xor %edx 2/r32/edx\n")
11078 (emit-indent *(ebp+8) *Curr-block-depth)
11079 (write-buffered *(ebp+8) "b9/copy-to-ecx ")
11080 (print-int32-buffered *(ebp+8) %ecx)
11081 (write-buffered *(ebp+8) "/imm32\n")
11082 (emit-indent *(ebp+8) *Curr-block-depth)
11083 (write-buffered *(ebp+8) "f7 7/subop/idiv-eax-edx-by %ecx\n")
11084 {
11085 (string-equal? %edx "eax")
11086 3d/compare-eax-and 0/imm32/false
11087 75/break-if-!= break/disp8
11088 (emit-indent *(ebp+8) *Curr-block-depth)
11089 (write-buffered *(ebp+8) "89/<- %")
11090 (write-buffered *(ebp+8) %edx)
11091 (write-buffered *(ebp+8) " 0/r32/eax\n")
11092 }
11093
11094 {
11095 (string-equal? %edx "edx")
11096 3d/compare-eax-and 0/imm32/false
11097 75/break-if-!= break/disp8
11098 (emit-indent *(ebp+8) *Curr-block-depth)
11099 (write-buffered *(ebp+8) "5a/pop-to-edx\n")
11100 }
11101 {
11102 (string-equal? %edx "ecx")
11103 3d/compare-eax-and 0/imm32/false
11104 75/break-if-!= break/disp8
11105 (emit-indent *(ebp+8) *Curr-block-depth)
11106 (write-buffered *(ebp+8) "59/pop-to-ecx\n")
11107 }
11108 {
11109 (string-equal? %edx "eax")
11110 3d/compare-eax-and 0/imm32/false
11111 75/break-if-!= break/disp8
11112 (emit-indent *(ebp+8) *Curr-block-depth)
11113 (write-buffered *(ebp+8) "58/pop-to-eax\n")
11114 }
11115 $translate-mu-length-stmt:end:
11116
11117 5e/pop-to-esi
11118 5b/pop-to-ebx
11119 5a/pop-to-edx
11120 59/pop-to-ecx
11121 58/pop-to-eax
11122
11123 89/<- %esp 5/r32/ebp
11124 5d/pop-to-ebp
11125 c3/return
11126
11127 array-element-size:
11128
11129 55/push-ebp
11130 89/<- %ebp 4/r32/esp
11131
11132 (array-element-type-id *(ebp+8) *(ebp+0xc) *(ebp+0x10))
11133 (size-of-type-id-as-array-element %eax)
11134 $array-element-size:end:
11135
11136 89/<- %esp 5/r32/ebp
11137 5d/pop-to-ebp
11138 c3/return
11139
11140 size-of-type-id-as-array-element:
11141
11142 55/push-ebp
11143 89/<- %ebp 4/r32/esp
11144
11145 8b/-> *(ebp+8) 0/r32/eax
11146
11147 3d/compare-eax-and 8/imm32/byte
11148 {
11149 75/jump-if-!= break/disp8
11150 b8/copy-to-eax 1/imm32
11151 eb/jump $array-element-size:end/disp8
11152 }
11153
11154 (size-of-type-id %eax)
11155 $size-of-type-id-as-array-element:end:
11156
11157 89/<- %esp 5/r32/ebp
11158 5d/pop-to-ebp
11159 c3/return
11160
11161 emit-save-size-to:
11162
11163 55/push-ebp
11164 89/<- %ebp 4/r32/esp
11165
11166 50/push-eax
11167 53/push-ebx
11168
11169 8b/-> *(ebp+0xc) 3/r32/ebx
11170 (emit-indent *(ebp+8) *Curr-block-depth)
11171 (write-buffered *(ebp+8) "8b/-> *")
11172
11173 {
11174 81 7/subop/compare *(ebx+0x18)) 0/imm32
11175 74/jump-if-= break/disp8
11176 $emit-save-size-to:emit-base-from-register:
11177 (lookup *(ebx+0x18) *(ebx+0x1c))
11178 (write-buffered *(ebp+8) %eax)
11179 eb/jump $emit-save-size-to:emit-output/disp8
11180 }
11181
11182 {
11183 81 7/subop/compare *(ebx+0x14)) 0/imm32
11184 74/jump-if-= break/disp8
11185 $emit-save-size-to:emit-base-from-stack:
11186 (write-buffered *(ebp+8) "(ebp+")
11187 (print-int32-buffered *(ebp+8) *(ebx+0x14))
11188 (write-buffered *(ebp+8) ")")
11189 }
11190 $emit-save-size-to:emit-output:
11191 (write-buffered *(ebp+8) " ")
11192 (get Registers *(ebp+0x10) 0xc "Registers")
11193 (print-int32-buffered *(ebp+8) *eax)
11194 (write-buffered *(ebp+8) "/r32\n")
11195 $emit-save-size-to:end:
11196
11197 5b/pop-to-ebx
11198 58/pop-to-eax
11199
11200 89/<- %esp 5/r32/ebp
11201 5d/pop-to-ebp
11202 c3/return
11203
11204 emit-divide-by-shift-right:
11205
11206 55/push-ebp
11207 89/<- %ebp 4/r32/esp
11208
11209 50/push-eax
11210
11211 (emit-indent *(ebp+8) *Curr-block-depth)
11212 (write-buffered *(ebp+8) "c1/shift 5/subop/>> %")
11213 (write-buffered *(ebp+8) *(ebp+0xc))
11214 (write-buffered *(ebp+8) Space)
11215 (num-shift-rights *(ebp+0x10))
11216 (print-int32-buffered *(ebp+8) %eax)
11217 (write-buffered *(ebp+8) "/imm8\n")
11218 $emit-divide-by-shift-right:end:
11219
11220 58/pop-to-eax
11221
11222 89/<- %esp 5/r32/ebp
11223 5d/pop-to-ebp
11224 c3/return
11225
11226 translate-mu-index-stmt:
11227
11228 55/push-ebp
11229 89/<- %ebp 4/r32/esp
11230
11231 51/push-ecx
11232
11233 8b/-> *(ebp+0xc) 1/r32/ecx
11234
11235 (lookup *(ecx+0xc) *(ecx+0x10))
11236 (lookup *eax *(eax+4))
11237 89/<- %ecx 0/r32/eax
11238
11239 {
11240 81 7/subop/compare *(ecx+0x18) 0/imm32
11241 74/jump-if-= break/disp8
11242
11243 (translate-mu-index-stmt-with-array-in-register *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
11244 eb/jump $translate-mu-index-stmt:end/disp8
11245 }
11246
11247 {
11248 81 7/subop/compare *(ecx+0x14) 0/imm32
11249 74/jump-if-= break/disp8
11250
11251 (translate-mu-index-stmt-with-array-on-stack *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
11252 eb/jump $translate-mu-index-stmt:end/disp8
11253 }
11254 $translate-mu-index-stmt:end:
11255
11256 59/pop-to-ecx
11257
11258 89/<- %esp 5/r32/ebp
11259 5d/pop-to-ebp
11260 c3/return
11261
11262 $translate-mu-index-stmt-with-array:error1:
11263 (write-buffered *(ebp+0x10) "couldn't translate an index instruction. second (index) input must either lie in a register or be a literal\n")
11264 (flush *(ebp+0x10))
11265 (stop *(ebp+0x14) 1)
11266
11267
11268 $translate-mu-index-stmt-with-array:error2:
11269 (write-buffered *(ebp+0x10) "couldn't translate an index instruction. second (index) input when in a register must be an int or offset\n")
11270 (flush *(ebp+0x10))
11271 (stop *(ebp+0x14) 1)
11272
11273
11274 translate-mu-index-stmt-with-array-in-register:
11275
11276 55/push-ebp
11277 89/<- %ebp 4/r32/esp
11278
11279 50/push-eax
11280 51/push-ecx
11281 52/push-edx
11282 53/push-ebx
11283
11284 (emit-indent *(ebp+8) *Curr-block-depth)
11285 (write-buffered *(ebp+8) "8d/copy-address *(")
11286
11287 $translate-mu-index-stmt-with-array-in-register:emit-base:
11288
11289 8b/-> *(ebp+0xc) 1/r32/ecx
11290
11291 (lookup *(ecx+0xc) *(ecx+0x10))
11292 (lookup *eax *(eax+4))
11293 89/<- %ebx 0/r32/eax
11294
11295 (lookup *(ebx+0x18) *(ebx+0x1c))
11296 (write-buffered *(ebp+8) %eax)
11297 (write-buffered *(ebp+8) " + ")
11298
11299 (lookup *(ecx+0xc) *(ecx+0x10))
11300 (lookup *(eax+8) *(eax+0xc))
11301 (lookup *eax *(eax+4))
11302 89/<- %edx 0/r32/eax
11303
11304 81 7/subop/compare *(edx+0x18) 0/imm32
11305 {
11306 0f 84/jump-if-= break/disp32
11307 $translate-mu-index-stmt-with-array-in-register:emit-register-index:
11308
11309 (lookup *(edx+8) *(edx+0xc))
11310 (is-simple-mu-type? %eax 1)
11311 3d/compare-eax-and 0/imm32/false
11312 {
11313 0f 84/jump-if-= break/disp32
11314 $translate-mu-index-stmt-with-array-in-register:emit-int-register-index:
11315
11316
11317 (lookup *(edx+0x18) *(edx+0x1c))
11318 (write-buffered *(ebp+8) %eax)
11319 (write-buffered *(ebp+8) "<<")
11320
11321
11322 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
11323 (num-shift-rights %eax)
11324 (print-int32-buffered *(ebp+8) %eax)
11325 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-register-index-done/disp32
11326 }
11327
11328 (lookup *(edx+8) *(edx+0xc))
11329 81 7/subop/compare *eax 0/imm32/false
11330 0f 85/jump-if-!= $translate-mu-index-stmt-with-array:error2/disp32
11331
11332 (lookup *(eax+4) *(eax+8))
11333 (is-simple-mu-type? %eax 7)
11334 3d/compare-eax-and 0/imm32/false
11335 {
11336 0f 84/jump-if-= break/disp32
11337
11338 $translate-mu-index-stmt-with-array-in-register:emit-offset-register-index:
11339 (lookup *(edx+0x18) *(edx+0x1c))
11340 (write-buffered *(ebp+8) %eax)
11341 }
11342 $translate-mu-index-stmt-with-array-in-register:emit-register-index-done:
11343 (write-buffered *(ebp+8) " + 4) ")
11344 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-output/disp32
11345 }
11346
11347 (lookup *(edx+8) *(edx+0xc))
11348 (is-simple-mu-type? %eax 0)
11349 3d/compare-eax-and 0/imm32/false
11350 {
11351 0f 84/jump-if-= break/disp32
11352 $translate-mu-index-stmt-with-array-in-register:emit-literal-index:
11353
11354 (lookup *edx *(edx+4))
11355 (parse-hex-int %eax)
11356 89/<- %edx 0/r32/eax
11357
11358 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
11359 f7 4/subop/multiply-into-eax %edx
11360
11361 05/add-to-eax 4/imm32
11362
11363
11364 (print-int32-buffered *(ebp+8) %eax)
11365 (write-buffered *(ebp+8) ") ")
11366 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-output/disp32
11367 }
11368
11369 e9/jump $translate-mu-index-stmt-with-array:error1/disp32
11370 $translate-mu-index-stmt-with-array-in-register:emit-output:
11371
11372 8b/-> *(ebp+0xc) 1/r32/ecx
11373 (lookup *(ecx+0x14) *(ecx+0x18))
11374 (lookup *eax *(eax+4))
11375 (lookup *(eax+0x18) *(eax+0x1c))
11376 (get Registers %eax 0xc "Registers")
11377 (print-int32-buffered *(ebp+8) *eax)
11378 (write-buffered *(ebp+8) "/r32\n")
11379 $translate-mu-index-stmt-with-array-in-register:end:
11380
11381 5b/pop-to-ebx
11382 5a/pop-to-edx
11383 59/pop-to-ecx
11384 58/pop-to-eax
11385
11386 89/<- %esp 5/r32/ebp
11387 5d/pop-to-ebp
11388 c3/return
11389
11390 translate-mu-index-stmt-with-array-on-stack:
11391
11392 55/push-ebp
11393 89/<- %ebp 4/r32/esp
11394
11395 50/push-eax
11396 51/push-ecx
11397 52/push-edx
11398 53/push-ebx
11399
11400 (emit-indent *(ebp+8) *Curr-block-depth)
11401 (write-buffered *(ebp+8) "8d/copy-address *(ebp + ")
11402
11403 8b/-> *(ebp+0xc) 0/r32/eax
11404 (lookup *(eax+0xc) *(eax+0x10))
11405 89/<- %edx 0/r32/eax
11406
11407 (lookup *eax *(eax+4))
11408 89/<- %ecx 0/r32/eax
11409
11410 (lookup *(edx+8) *(edx+0xc))
11411
11412 (lookup *eax *(eax+4))
11413 89/<- %edx 0/r32/eax
11414
11415 81 7/subop/compare *(edx+0x18) 0/imm32
11416 {
11417 0f 84/jump-if-= break/disp32
11418 $translate-mu-index-stmt-with-array-on-stack:emit-register-index:
11419
11420 (lookup *(edx+8) *(edx+0xc))
11421 (is-simple-mu-type? %eax 1)
11422 3d/compare-eax-and 0/imm32/false
11423 {
11424 0f 84/jump-if-= break/disp32
11425 $translate-mu-index-stmt-with-array-on-stack:emit-int-register-index:
11426
11427
11428 (lookup *(edx+0x18) *(edx+0x1c))
11429 (write-buffered *(ebp+8) %eax)
11430 (write-buffered *(ebp+8) "<<")
11431
11432
11433 (array-element-size %ecx *(ebp+0x10) *(ebp+0x14))
11434 (num-shift-rights %eax)
11435 (print-int32-buffered *(ebp+8) %eax)
11436
11437 (write-buffered *(ebp+8) " + ")
11438
11439 8b/-> *(ecx+0x14) 0/r32/eax
11440 05/add-to-eax 4/imm32
11441 (print-int32-buffered *(ebp+8) %eax)
11442 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-register-index-done/disp32
11443 }
11444
11445 (lookup *(edx+8) *(edx+0xc))
11446 81 7/subop/compare *eax 0/imm32/false
11447 0f 85/jump-if-!= $translate-mu-index-stmt-with-array:error2/disp32
11448
11449 (lookup *(eax+4) *(eax+8))
11450 (is-simple-mu-type? %eax 7)
11451 3d/compare-eax-and 0/imm32/false
11452 {
11453 0f 84/jump-if-= break/disp32
11454
11455 $translate-mu-index-stmt-with-array-on-stack:emit-offset-register-index:
11456 (lookup *(edx+0x18) *(edx+0x1c))
11457 (write-buffered *(ebp+8) %eax)
11458 }
11459 $translate-mu-index-stmt-with-array-on-stack:emit-register-index-done:
11460 (write-buffered *(ebp+8) ") ")
11461 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-output/disp32
11462 }
11463
11464 (lookup *(edx+8) *(edx+0xc))
11465 (is-simple-mu-type? %eax 0)
11466 3d/compare-eax-and 0/imm32/false
11467 {
11468 0f 84/jump-if-= break/disp32
11469 $translate-mu-index-stmt-with-array-on-stack:emit-literal-index:
11470
11471 (lookup *edx *(edx+4))
11472 (parse-hex-int %eax)
11473 89/<- %edx 0/r32/eax
11474
11475 (array-element-size %ecx *(ebp+0x10) *(ebp+0x14))
11476 f7 4/subop/multiply-into-eax %edx
11477
11478 03/add *(ecx+0x14) 0/r32/eax
11479
11480 05/add-to-eax 4/imm32
11481
11482
11483 (print-int32-buffered *(ebp+8) %eax)
11484 (write-buffered *(ebp+8) ") ")
11485 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-output/disp32
11486 }
11487
11488 e9/jump $translate-mu-index-stmt-with-array:error1/disp32
11489 $translate-mu-index-stmt-with-array-on-stack:emit-output:
11490
11491 8b/-> *(ebp+0xc) 0/r32/eax
11492 (lookup *(eax+0x14) *(eax+0x18))
11493 (lookup *eax *(eax+4))
11494 (lookup *(eax+0x18) *(eax+0x1c))
11495 (get Registers %eax 0xc "Registers")
11496 (print-int32-buffered *(ebp+8) *eax)
11497 (write-buffered *(ebp+8) "/r32\n")
11498 $translate-mu-index-stmt-with-array-on-stack:end:
11499
11500 5b/pop-to-ebx
11501 5a/pop-to-edx
11502 59/pop-to-ecx
11503 58/pop-to-eax
11504
11505 89/<- %esp 5/r32/ebp
11506 5d/pop-to-ebp
11507 c3/return
11508
11509 translate-mu-compute-index-stmt:
11510
11511 55/push-ebp
11512 89/<- %ebp 4/r32/esp
11513
11514 50/push-eax
11515 51/push-ecx
11516 52/push-edx
11517 53/push-ebx
11518
11519 (emit-indent *(ebp+8) *Curr-block-depth)
11520 (write-buffered *(ebp+8) "69/multiply")
11521
11522 8b/-> *(ebp+0xc) 1/r32/ecx
11523
11524 (lookup *(ecx+0xc) *(ecx+0x10))
11525 89/<- %ebx 0/r32/eax
11526 $translate-mu-compute-index-stmt:emit-index:
11527 (lookup *(ebx+8) *(ebx+0xc))
11528 (emit-subx-var-as-rm32 *(ebp+8) %eax)
11529 (write-buffered *(ebp+8) Space)
11530 $translate-mu-compute-index-stmt:emit-elem-size:
11531
11532 (lookup *ebx *(ebx+4))
11533 89/<- %ebx 0/r32/eax
11534
11535 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
11536 (print-int32-buffered *(ebp+8) %eax)
11537 (write-buffered *(ebp+8) "/imm32 ")
11538 $translate-mu-compute-index-stmt:emit-output:
11539
11540 (lookup *(ecx+0x14) *(ecx+0x18))
11541 (lookup *eax *(eax+4))
11542 (lookup *(eax+0x18) *(eax+0x1c))
11543 (get Registers %eax 0xc "Registers")
11544 (print-int32-buffered *(ebp+8) *eax)
11545 (write-buffered *(ebp+8) "/r32\n")
11546 $translate-mu-compute-index-stmt:end:
11547
11548 5b/pop-to-ebx
11549 5a/pop-to-edx
11550 59/pop-to-ecx
11551 58/pop-to-eax
11552
11553 89/<- %esp 5/r32/ebp
11554 5d/pop-to-ebp
11555 c3/return
11556
11557 translate-mu-get-stmt:
11558
11559 55/push-ebp
11560 89/<- %ebp 4/r32/esp
11561
11562 50/push-eax
11563 51/push-ecx
11564 52/push-edx
11565
11566 (emit-indent *(ebp+8) *Curr-block-depth)
11567 (write-buffered *(ebp+8) "8d/copy-address ")
11568
11569 8b/-> *(ebp+0xc) 1/r32/ecx
11570
11571 (mu-get-offset %ecx)
11572 89/<- %edx 0/r32/eax
11573
11574 (lookup *(ecx+0xc) *(ecx+0x10))
11575 (lookup *eax *(eax+4))
11576
11577 81 7/subop/compare *(eax+0x18) 0/imm32
11578 {
11579 0f 84/jump-if-= break/disp32
11580 $translate-mu-get-stmt:emit-register-input:
11581
11582 (write-buffered *(ebp+8) "*(")
11583 (lookup *(eax+0x18) *(eax+0x1c))
11584 (write-buffered *(ebp+8) %eax)
11585 (write-buffered *(ebp+8) " + ")
11586 (print-int32-buffered *(ebp+8) %edx)
11587 (write-buffered *(ebp+8) ") ")
11588 e9/jump $translate-mu-get-stmt:emit-output/disp32
11589 }
11590
11591 {
11592 $translate-mu-get-stmt:emit-stack-input:
11593
11594 (write-buffered *(ebp+8) "*(ebp+")
11595 03/add *(eax+0x14) 2/r32/edx
11596 (print-int32-buffered *(ebp+8) %edx)
11597 (write-buffered *(ebp+8) ") ")
11598 eb/jump $translate-mu-get-stmt:emit-output/disp8
11599 }
11600 $translate-mu-get-stmt:emit-output:
11601
11602 (lookup *(ecx+0x14) *(ecx+0x18))
11603 (lookup *eax *(eax+4))
11604
11605 (lookup *(eax+0x18) *(eax+0x1c))
11606 (get Registers %eax 0xc "Registers")
11607 (print-int32-buffered *(ebp+8) *eax)
11608 (write-buffered *(ebp+8) "/r32\n")
11609 $translate-mu-get-stmt:end:
11610
11611 5a/pop-to-edx
11612 59/pop-to-ecx
11613 58/pop-to-eax
11614
11615 89/<- %esp 5/r32/ebp
11616 5d/pop-to-ebp
11617 c3/return
11618
11619 array-element-type-id:
11620
11621
11622 55/push-ebp
11623 89/<- %ebp 4/r32/esp
11624
11625 8b/-> *(ebp+8) 0/r32/eax
11626
11627 (lookup *(eax+8) *(eax+0xc))
11628
11629 3d/compare-eax-with 0/imm32
11630 0f 84/jump-if-== $array-element-type-id:error0/disp32
11631
11632 81 7/subop/compare *eax 0/imm32/false
11633 0f 85/jump-if-!= $array-element-type-id:error1/disp32
11634
11635 {
11636 50/push-eax
11637 (lookup *(eax+4) *(eax+8))
11638 (is-simple-mu-type? %eax 2)
11639 3d/compare-eax-with 0/imm32/false
11640 58/pop-to-eax
11641 74/jump-if-= break/disp8
11642 $array-element-type-id:skip-addr:
11643 (lookup *(eax+0xc) *(eax+0x10))
11644 }
11645
11646 3d/compare-eax-with 0/imm32
11647 0f 84/jump-if-= $array-element-type-id:error2/disp32
11648
11649 81 7/subop/compare *eax 0/imm32/false
11650 0f 85/jump-if-!= $array-element-type-id:error2/disp32
11651
11652 {
11653 50/push-eax
11654 (lookup *(eax+4) *(eax+8))
11655 (is-simple-mu-type? %eax 3)
11656 3d/compare-eax-with 0/imm32/false
11657 58/pop-to-eax
11658 $array-element-type-id:no-array:
11659 0f 84/jump-if-= $array-element-type-id:error2/disp32
11660 }
11661 $array-element-type-id:skip-array:
11662
11663 (lookup *(eax+0xc) *(eax+0x10))
11664
11665 3d/compare-eax-with 0/imm32
11666 0f 84/jump-if-= $array-element-type-id:error2/disp32
11667
11668 81 7/subop/compare *eax 0/imm32/false
11669 0f 85/jump-if-!= $array-element-type-id:error2/disp32
11670
11671 (lookup *(eax+4) *(eax+8))
11672 8b/-> *(eax+4) 0/r32/eax
11673 $array-element-type-id:end:
11674
11675 89/<- %esp 5/r32/ebp
11676 5d/pop-to-ebp
11677 c3/return
11678
11679 $array-element-type-id:error0:
11680 (write-buffered *(ebp+0xc) "array-element-type-id: var '")
11681 50/push-eax
11682 8b/-> *(ebp+8) 0/r32/eax
11683 (lookup *eax *(eax+4))
11684 (write-buffered *(ebp+0xc) %eax)
11685 58/pop-to-eax
11686 (write-buffered *(ebp+0xc) "' has no type\n")
11687 (flush *(ebp+0xc))
11688 (stop *(ebp+0x10) 1)
11689
11690
11691 $array-element-type-id:error1:
11692 (write-buffered *(ebp+0xc) "array-element-type-id: var '")
11693 50/push-eax
11694 8b/-> *(ebp+8) 0/r32/eax
11695 (lookup *eax *(eax+4))
11696 (write-buffered *(ebp+0xc) %eax)
11697 58/pop-to-eax
11698 (write-buffered *(ebp+0xc) "' has atomic type ")
11699 (print-int32-buffered *(ebp+0xc) *(eax+4))
11700 (write-buffered *(ebp+0xc) Newline)
11701 (flush *(ebp+0xc))
11702 (stop *(ebp+0x10) 1)
11703
11704
11705 $array-element-type-id:error2:
11706 (write-buffered *(ebp+0xc) "array-element-type-id: var '")
11707 50/push-eax
11708 8b/-> *(ebp+8) 0/r32/eax
11709 (lookup *eax *(eax+4))
11710 (write-buffered *(ebp+0xc) %eax)
11711 58/pop-to-eax
11712 (write-buffered *(ebp+0xc) "' has non-array type\n")
11713 (flush *(ebp+0xc))
11714 (stop *(ebp+0x10) 1)
11715
11716
11717 power-of-2?:
11718
11719
11720 55/push-ebp
11721 89/<- %ebp 4/r32/esp
11722
11723 8b/-> *(ebp+8) 0/r32/eax
11724
11725 3d/compare-eax-with 0/imm32
11726 0f 8c/jump-if-< $power-of-2?:abort/disp32
11727
11728 48/decrement-eax
11729
11730 23/and-> *(ebp+8) 0/r32/eax
11731
11732 3d/compare-eax-and 0/imm32
11733 0f 94/set-byte-if-= %al
11734 81 4/subop/and %eax 0xff/imm32
11735 $power-of-2?:end:
11736
11737 89/<- %esp 5/r32/ebp
11738 5d/pop-to-ebp
11739 c3/return
11740
11741 $power-of-2?:abort:
11742 (write-buffered *(ebp+0xc) "power-of-2?: negative number\n")
11743 (flush *(ebp+0xc))
11744 (stop *(ebp+0x10) 1)
11745
11746
11747 num-shift-rights:
11748
11749
11750 55/push-ebp
11751 89/<- %ebp 4/r32/esp
11752
11753 51/push-ecx
11754
11755 8b/-> *(ebp+8) 1/r32/ecx
11756
11757 b8/copy-to-eax 0/imm32
11758 {
11759
11760 81 7/subop/compare %ecx 1/imm32
11761 7e/jump-if-<= break/disp8
11762 40/increment-eax
11763 c1/shift 5/subop/arithmetic-right %ecx 1/imm8
11764 eb/jump loop/disp8
11765 }
11766 $num-shift-rights:end:
11767
11768 59/pop-to-ecx
11769
11770 89/<- %esp 5/r32/ebp
11771 5d/pop-to-ebp
11772 c3/return
11773
11774 mu-get-offset:
11775
11776 55/push-ebp
11777 89/<- %ebp 4/r32/esp
11778
11779 8b/-> *(ebp+8) 0/r32/eax
11780 (lookup *(eax+0xc) *(eax+0x10))
11781 (lookup *(eax+8) *(eax+0xc))
11782
11783 (lookup *eax *(eax+4))
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794 8b/-> *(eax+0x14) 0/r32/eax
11795
11796
11797
11798
11799 $emit-get-offset:end:
11800
11801 89/<- %esp 5/r32/ebp
11802 5d/pop-to-ebp
11803 c3/return
11804
11805 emit-subx-block:
11806
11807 55/push-ebp
11808 89/<- %ebp 4/r32/esp
11809
11810 50/push-eax
11811 51/push-ecx
11812 56/push-esi
11813
11814 8b/-> *(ebp+0xc) 6/r32/esi
11815
11816 (lookup *(esi+0xc) *(esi+0x10))
11817 8b/-> *Curr-block-depth 1/r32/ecx
11818 89/<- *(eax+0x10) 1/r32/ecx
11819
11820 (lookup *(esi+4) *(esi+8))
11821
11822 {
11823 $emit-subx-block:check-empty:
11824 3d/compare-eax-and 0/imm32
11825 0f 84/jump-if-= break/disp32
11826 (emit-indent *(ebp+8) *Curr-block-depth)
11827 (write-buffered *(ebp+8) "{\n")
11828
11829 (lookup *(esi+0xc) *(esi+0x10))
11830 89/<- %ecx 0/r32/eax
11831
11832 (lookup *ecx *(ecx+4))
11833 (write-buffered *(ebp+8) %eax)
11834 (write-buffered *(ebp+8) ":loop:\n")
11835 ff 0/subop/increment *Curr-block-depth
11836 (push *(ebp+0x10) *(esi+0xc))
11837 (push *(ebp+0x10) *(esi+0x10))
11838 (push *(ebp+0x10) 0)
11839
11840 (lookup *(esi+4) *(esi+8))
11841 (emit-subx-stmt-list *(ebp+8) %eax *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
11842 (pop *(ebp+0x10))
11843 (pop *(ebp+0x10))
11844 (pop *(ebp+0x10))
11845 ff 1/subop/decrement *Curr-block-depth
11846 (emit-indent *(ebp+8) *Curr-block-depth)
11847 (write-buffered *(ebp+8) "}\n")
11848 (lookup *ecx *(ecx+4))
11849 (write-buffered *(ebp+8) %eax)
11850 (write-buffered *(ebp+8) ":break:\n")
11851 }
11852 $emit-subx-block:end:
11853
11854 5e/pop-to-esi
11855 59/pop-to-ecx
11856 58/pop-to-eax
11857
11858 89/<- %esp 5/r32/ebp
11859 5d/pop-to-ebp
11860 c3/return
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911 == data
11912 Primitives:
11913
11914 _Primitive-increment-eax:
11915
11916 0x11/imm32/alloc-id:fake
11917 _string-increment/imm32/name
11918 0/imm32/no-inouts
11919 0/imm32/no-inouts
11920 0x11/imm32/alloc-id:fake
11921 Single-int-var-in-eax/imm32/outputs
11922 0x11/imm32/alloc-id:fake
11923 _string_40_increment_eax/imm32/subx-name
11924 0/imm32/no-rm32
11925 0/imm32/no-r32
11926 0/imm32/no-imm32
11927 0/imm32/no-disp32
11928 0/imm32/output-is-write-only
11929 0x11/imm32/alloc-id:fake
11930 _Primitive-increment-ecx/imm32/next
11931 _Primitive-increment-ecx:
11932 0x11/imm32/alloc-id:fake:payload
11933
11934 0x11/imm32/alloc-id:fake
11935 _string-increment/imm32/name
11936 0/imm32/no-inouts
11937 0/imm32/no-inouts
11938 0x11/imm32/alloc-id:fake
11939 Single-int-var-in-ecx/imm32/outputs
11940 0x11/imm32/alloc-id:fake
11941 _string_41_increment_ecx/imm32/subx-name
11942 0/imm32/no-rm32
11943 0/imm32/no-r32
11944 0/imm32/no-imm32
11945 0/imm32/no-disp32
11946 0/imm32/output-is-write-only
11947 0x11/imm32/alloc-id:fake
11948 _Primitive-increment-edx/imm32/next
11949 _Primitive-increment-edx:
11950 0x11/imm32/alloc-id:fake:payload
11951
11952 0x11/imm32/alloc-id:fake
11953 _string-increment/imm32/name
11954 0/imm32/no-inouts
11955 0/imm32/no-inouts
11956 0x11/imm32/alloc-id:fake
11957 Single-int-var-in-edx/imm32/outputs
11958 0x11/imm32/alloc-id:fake
11959 _string_42_increment_edx/imm32/subx-name
11960 0/imm32/no-rm32
11961 0/imm32/no-r32
11962 0/imm32/no-imm32
11963 0/imm32/no-disp32
11964 0/imm32/output-is-write-only
11965 0x11/imm32/alloc-id:fake
11966 _Primitive-increment-ebx/imm32/next
11967 _Primitive-increment-ebx:
11968 0x11/imm32/alloc-id:fake:payload
11969
11970 0x11/imm32/alloc-id:fake
11971 _string-increment/imm32/name
11972 0/imm32/no-inouts
11973 0/imm32/no-inouts
11974 0x11/imm32/alloc-id:fake
11975 Single-int-var-in-ebx/imm32/outputs
11976 0x11/imm32/alloc-id:fake
11977 _string_43_increment_ebx/imm32/subx-name
11978 0/imm32/no-rm32
11979 0/imm32/no-r32
11980 0/imm32/no-imm32
11981 0/imm32/no-disp32
11982 0/imm32/output-is-write-only
11983 0x11/imm32/alloc-id:fake
11984 _Primitive-increment-esi/imm32/next
11985 _Primitive-increment-esi:
11986 0x11/imm32/alloc-id:fake:payload
11987
11988 0x11/imm32/alloc-id:fake
11989 _string-increment/imm32/name
11990 0/imm32/no-inouts
11991 0/imm32/no-inouts
11992 0x11/imm32/alloc-id:fake
11993 Single-int-var-in-esi/imm32/outputs
11994 0x11/imm32/alloc-id:fake
11995 _string_46_increment_esi/imm32/subx-name
11996 0/imm32/no-rm32
11997 0/imm32/no-r32
11998 0/imm32/no-imm32
11999 0/imm32/no-disp32
12000 0/imm32/output-is-write-only
12001 0x11/imm32/alloc-id:fake
12002 _Primitive-increment-edi/imm32/next
12003 _Primitive-increment-edi:
12004 0x11/imm32/alloc-id:fake:payload
12005
12006 0x11/imm32/alloc-id:fake
12007 _string-increment/imm32/name
12008 0/imm32/no-inouts
12009 0/imm32/no-inouts
12010 0x11/imm32/alloc-id:fake
12011 Single-int-var-in-edi/imm32/outputs
12012 0x11/imm32/alloc-id:fake
12013 _string_47_increment_edi/imm32/subx-name
12014 0/imm32/no-rm32
12015 0/imm32/no-r32
12016 0/imm32/no-imm32
12017 0/imm32/no-disp32
12018 0/imm32/output-is-write-only
12019 0x11/imm32/alloc-id:fake
12020 _Primitive-decrement-eax/imm32/next
12021 _Primitive-decrement-eax:
12022 0x11/imm32/alloc-id:fake:payload
12023
12024 0x11/imm32/alloc-id:fake
12025 _string-decrement/imm32/name
12026 0/imm32/no-inouts
12027 0/imm32/no-inouts
12028 0x11/imm32/alloc-id:fake
12029 Single-int-var-in-eax/imm32/outputs
12030 0x11/imm32/alloc-id:fake
12031 _string_48_decrement_eax/imm32/subx-name
12032 0/imm32/no-rm32
12033 0/imm32/no-r32
12034 0/imm32/no-imm32
12035 0/imm32/no-disp32
12036 0/imm32/output-is-write-only
12037 0x11/imm32/alloc-id:fake
12038 _Primitive-decrement-ecx/imm32/next
12039 _Primitive-decrement-ecx:
12040 0x11/imm32/alloc-id:fake:payload
12041
12042 0x11/imm32/alloc-id:fake
12043 _string-decrement/imm32/name
12044 0/imm32/no-inouts
12045 0/imm32/no-inouts
12046 0x11/imm32/alloc-id:fake
12047 Single-int-var-in-ecx/imm32/outputs
12048 0x11/imm32/alloc-id:fake
12049 _string_49_decrement_ecx/imm32/subx-name
12050 0/imm32/no-rm32
12051 0/imm32/no-r32
12052 0/imm32/no-imm32
12053 0/imm32/no-disp32
12054 0/imm32/output-is-write-only
12055 0x11/imm32/alloc-id:fake
12056 _Primitive-decrement-edx/imm32/next
12057 _Primitive-decrement-edx:
12058 0x11/imm32/alloc-id:fake:payload
12059
12060 0x11/imm32/alloc-id:fake
12061 _string-decrement/imm32/name
12062 0/imm32/no-inouts
12063 0/imm32/no-inouts
12064 0x11/imm32/alloc-id:fake
12065 Single-int-var-in-edx/imm32/outputs
12066 0x11/imm32/alloc-id:fake
12067 _string_4a_decrement_edx/imm32/subx-name
12068 0/imm32/no-rm32
12069 0/imm32/no-r32
12070 0/imm32/no-imm32
12071 0/imm32/no-disp32
12072 0/imm32/output-is-write-only
12073 0x11/imm32/alloc-id:fake
12074 _Primitive-decrement-ebx/imm32/next
12075 _Primitive-decrement-ebx:
12076 0x11/imm32/alloc-id:fake:payload
12077
12078 0x11/imm32/alloc-id:fake
12079 _string-decrement/imm32/name
12080 0/imm32/no-inouts
12081 0/imm32/no-inouts
12082 0x11/imm32/alloc-id:fake
12083 Single-int-var-in-ebx/imm32/outputs
12084 0x11/imm32/alloc-id:fake
12085 _string_4b_decrement_ebx/imm32/subx-name
12086 0/imm32/no-rm32
12087 0/imm32/no-r32
12088 0/imm32/no-imm32
12089 0/imm32/no-disp32
12090 0/imm32/output-is-write-only
12091 0x11/imm32/alloc-id:fake
12092 _Primitive-decrement-esi/imm32/next
12093 _Primitive-decrement-esi:
12094 0x11/imm32/alloc-id:fake:payload
12095
12096 0x11/imm32/alloc-id:fake
12097 _string-decrement/imm32/name
12098 0/imm32/no-inouts
12099 0/imm32/no-inouts
12100 0x11/imm32/alloc-id:fake
12101 Single-int-var-in-esi/imm32/outputs
12102 0x11/imm32/alloc-id:fake
12103 _string_4e_decrement_esi/imm32/subx-name
12104 0/imm32/no-rm32
12105 0/imm32/no-r32
12106 0/imm32/no-imm32
12107 0/imm32/no-disp32
12108 0/imm32/output-is-write-only
12109 0x11/imm32/alloc-id:fake
12110 _Primitive-decrement-edi/imm32/next
12111 _Primitive-decrement-edi:
12112 0x11/imm32/alloc-id:fake:payload
12113
12114 0x11/imm32/alloc-id:fake
12115 _string-decrement/imm32/name
12116 0/imm32/no-inouts
12117 0/imm32/no-inouts
12118 0x11/imm32/alloc-id:fake
12119 Single-int-var-in-edi/imm32/outputs
12120 0x11/imm32/alloc-id:fake
12121 _string_4f_decrement_edi/imm32/subx-name
12122 0/imm32/no-rm32
12123 0/imm32/no-r32
12124 0/imm32/no-imm32
12125 0/imm32/no-disp32
12126 0/imm32/output-is-write-only
12127 0x11/imm32/alloc-id:fake
12128 _Primitive-increment-mem/imm32/next
12129 _Primitive-increment-mem:
12130 0x11/imm32/alloc-id:fake:payload
12131
12132 0x11/imm32/alloc-id:fake
12133 _string-increment/imm32/name
12134 0x11/imm32/alloc-id:fake
12135 Single-int-var-in-mem/imm32/inouts
12136 0/imm32/no-outputs
12137 0/imm32/no-outputs
12138 0x11/imm32/alloc-id:fake
12139 _string_ff_subop_increment/imm32/subx-name
12140 1/imm32/rm32-is-first-inout
12141 0/imm32/no-r32
12142 0/imm32/no-imm32
12143 0/imm32/no-disp32
12144 0/imm32/output-is-write-only
12145 0x11/imm32/alloc-id:fake
12146 _Primitive-increment-reg/imm32/next
12147 _Primitive-increment-reg:
12148 0x11/imm32/alloc-id:fake:payload
12149
12150 0x11/imm32/alloc-id:fake
12151 _string-increment/imm32/name
12152 0/imm32/no-inouts
12153 0/imm32/no-inouts
12154 0x11/imm32/alloc-id:fake
12155 Single-int-var-in-some-register/imm32/outputs
12156 0x11/imm32/alloc-id:fake
12157 _string_ff_subop_increment/imm32/subx-name
12158 3/imm32/rm32-is-first-output
12159 0/imm32/no-r32
12160 0/imm32/no-imm32
12161 0/imm32/no-disp32
12162 0/imm32/output-is-write-only
12163 0x11/imm32/alloc-id:fake
12164 _Primitive-decrement-mem/imm32/next
12165 _Primitive-decrement-mem:
12166 0x11/imm32/alloc-id:fake:payload
12167
12168 0x11/imm32/alloc-id:fake
12169 _string-decrement/imm32/name
12170 0x11/imm32/alloc-id:fake
12171 Single-int-var-in-mem/imm32/inouts
12172 0/imm32/no-outputs
12173 0/imm32/no-outputs
12174 0x11/imm32/alloc-id:fake
12175 _string_ff_subop_decrement/imm32/subx-name
12176 1/imm32/rm32-is-first-inout
12177 0/imm32/no-r32
12178 0/imm32/no-imm32
12179 0/imm32/no-disp32
12180 0/imm32/output-is-write-only
12181 0x11/imm32/alloc-id:fake
12182 _Primitive-decrement-reg/imm32/next
12183 _Primitive-decrement-reg:
12184 0x11/imm32/alloc-id:fake:payload
12185
12186 0x11/imm32/alloc-id:fake
12187 _string-decrement/imm32/name
12188 0/imm32/no-inouts
12189 0/imm32/no-inouts
12190 0x11/imm32/alloc-id:fake
12191 Single-int-var-in-some-register/imm32/outputs
12192 0x11/imm32/alloc-id:fake
12193 _string_ff_subop_decrement/imm32/subx-name
12194 3/imm32/rm32-is-first-output
12195 0/imm32/no-r32
12196 0/imm32/no-imm32
12197 0/imm32/no-disp32
12198 0/imm32/output-is-write-only
12199 0x11/imm32/alloc-id:fake
12200 _Primitive-add-to-eax/imm32/next
12201
12202 _Primitive-add-to-eax:
12203 0x11/imm32/alloc-id:fake:payload
12204
12205 0x11/imm32/alloc-id:fake
12206 _string-add/imm32/name
12207 0x11/imm32/alloc-id:fake
12208 Single-lit-var/imm32/inouts
12209 0x11/imm32/alloc-id:fake
12210 Single-int-var-in-eax/imm32/outputs
12211 0x11/imm32/alloc-id:fake
12212 _string_05_add_to_eax/imm32/subx-name
12213 0/imm32/no-rm32
12214 0/imm32/no-r32
12215 1/imm32/imm32-is-first-inout
12216 0/imm32/no-disp32
12217 0/imm32/output-is-write-only
12218 0x11/imm32/alloc-id:fake
12219 _Primitive-add-reg-to-reg/imm32/next
12220 _Primitive-add-reg-to-reg:
12221 0x11/imm32/alloc-id:fake:payload
12222
12223 0x11/imm32/alloc-id:fake
12224 _string-add/imm32/name
12225 0x11/imm32/alloc-id:fake
12226 Single-int-var-in-some-register/imm32/inouts
12227 0x11/imm32/alloc-id:fake
12228 Single-int-var-in-some-register/imm32/outputs
12229 0x11/imm32/alloc-id:fake
12230 _string_01_add_to/imm32/subx-name
12231 3/imm32/rm32-is-first-output
12232 1/imm32/r32-is-first-inout
12233 0/imm32/no-imm32
12234 0/imm32/no-disp32
12235 0/imm32/output-is-write-only
12236 0x11/imm32/alloc-id:fake
12237 _Primitive-add-reg-to-mem/imm32/next
12238 _Primitive-add-reg-to-mem:
12239 0x11/imm32/alloc-id:fake:payload
12240
12241 0x11/imm32/alloc-id:fake
12242 _string-add-to/imm32/name
12243 0x11/imm32/alloc-id:fake
12244 Two-args-int-stack-int-reg/imm32/inouts
12245 0/imm32/no-outputs
12246 0/imm32/no-outputs
12247 0x11/imm32/alloc-id:fake
12248 _string_01_add_to/imm32/subx-name
12249 1/imm32/rm32-is-first-inout
12250 2/imm32/r32-is-second-inout
12251 0/imm32/no-imm32
12252 0/imm32/no-disp32
12253 0/imm32/output-is-write-only
12254 0x11/imm32/alloc-id:fake
12255 _Primitive-add-mem-to-reg/imm32/next
12256 _Primitive-add-mem-to-reg:
12257 0x11/imm32/alloc-id:fake:payload
12258
12259 0x11/imm32/alloc-id:fake
12260 _string-add/imm32/name
12261 0x11/imm32/alloc-id:fake
12262 Single-int-var-in-mem/imm32/inouts
12263 0x11/imm32/alloc-id:fake
12264 Single-int-var-in-some-register/imm32/outputs
12265 0x11/imm32/alloc-id:fake
12266 _string_03_add/imm32/subx-name
12267 1/imm32/rm32-is-first-inout
12268 3/imm32/r32-is-first-output
12269 0/imm32/no-imm32
12270 0/imm32/no-disp32
12271 0/imm32/output-is-write-only
12272 0x11/imm32/alloc-id:fake
12273 _Primitive-add-lit-to-reg/imm32/next
12274 _Primitive-add-lit-to-reg:
12275 0x11/imm32/alloc-id:fake:payload
12276
12277 0x11/imm32/alloc-id:fake
12278 _string-add/imm32/name
12279 0x11/imm32/alloc-id:fake
12280 Single-lit-var/imm32/inouts
12281 0x11/imm32/alloc-id:fake
12282 Single-int-var-in-some-register/imm32/outputs
12283 0x11/imm32/alloc-id:fake
12284 _string_81_subop_add/imm32/subx-name
12285 3/imm32/rm32-is-first-output
12286 0/imm32/no-r32
12287 1/imm32/imm32-is-first-inout
12288 0/imm32/no-disp32
12289 0/imm32/output-is-write-only
12290 0x11/imm32/alloc-id:fake
12291 _Primitive-add-lit-to-mem/imm32/next
12292 _Primitive-add-lit-to-mem:
12293 0x11/imm32/alloc-id:fake:payload
12294
12295 0x11/imm32/alloc-id:fake
12296 _string-add-to/imm32/name
12297 0x11/imm32/alloc-id:fake
12298 Int-var-and-literal/imm32/inouts
12299 0/imm32/no-outputs
12300 0/imm32/no-outputs
12301 0x11/imm32/alloc-id:fake
12302 _string_81_subop_add/imm32/subx-name
12303 1/imm32/rm32-is-first-inout
12304 0/imm32/no-r32
12305 2/imm32/imm32-is-second-inout
12306 0/imm32/no-disp32
12307 0/imm32/output-is-write-only
12308 0x11/imm32/alloc-id:fake
12309 _Primitive-subtract-from-eax/imm32/next
12310
12311 _Primitive-subtract-from-eax:
12312 0x11/imm32/alloc-id:fake:payload
12313
12314 0x11/imm32/alloc-id:fake
12315 _string-subtract/imm32/name
12316 0x11/imm32/alloc-id:fake
12317 Single-lit-var/imm32/inouts
12318 0x11/imm32/alloc-id:fake
12319 Single-int-var-in-eax/imm32/outputs
12320 0x11/imm32/alloc-id:fake
12321 _string_2d_subtract_from_eax/imm32/subx-name
12322 0/imm32/no-rm32
12323 0/imm32/no-r32
12324 1/imm32/imm32-is-first-inout
12325 0/imm32/no-disp32
12326 0/imm32/output-is-write-only
12327 0x11/imm32/alloc-id:fake
12328 _Primitive-subtract-reg-from-reg/imm32/next
12329 _Primitive-subtract-reg-from-reg:
12330 0x11/imm32/alloc-id:fake:payload
12331
12332 0x11/imm32/alloc-id:fake
12333 _string-subtract/imm32/name
12334 0x11/imm32/alloc-id:fake
12335 Single-int-var-in-some-register/imm32/inouts
12336 0x11/imm32/alloc-id:fake
12337 Single-int-var-in-some-register/imm32/outputs
12338 0x11/imm32/alloc-id:fake
12339 _string_29_subtract_from/imm32/subx-name
12340 3/imm32/rm32-is-first-output
12341 1/imm32/r32-is-first-inout
12342 0/imm32/no-imm32
12343 0/imm32/no-disp32
12344 0/imm32/output-is-write-only
12345 0x11/imm32/alloc-id:fake
12346 _Primitive-subtract-reg-from-mem/imm32/next
12347 _Primitive-subtract-reg-from-mem:
12348 0x11/imm32/alloc-id:fake:payload
12349
12350 0x11/imm32/alloc-id:fake
12351 _string-subtract-from/imm32/name
12352 0x11/imm32/alloc-id:fake
12353 Two-args-int-stack-int-reg/imm32/inouts
12354 0/imm32/no-outputs
12355 0/imm32/no-outputs
12356 0x11/imm32/alloc-id:fake
12357 _string_29_subtract_from/imm32/subx-name
12358 1/imm32/rm32-is-first-inout
12359 2/imm32/r32-is-second-inout
12360 0/imm32/no-imm32
12361 0/imm32/no-disp32
12362 0/imm32/output-is-write-only
12363 0x11/imm32/alloc-id:fake
12364 _Primitive-subtract-mem-from-reg/imm32/next
12365 _Primitive-subtract-mem-from-reg:
12366 0x11/imm32/alloc-id:fake:payload
12367
12368 0x11/imm32/alloc-id:fake
12369 _string-subtract/imm32/name
12370 0x11/imm32/alloc-id:fake
12371 Single-int-var-in-mem/imm32/inouts
12372 0x11/imm32/alloc-id:fake
12373 Single-int-var-in-some-register/imm32/outputs
12374 0x11/imm32/alloc-id:fake
12375 _string_2b_subtract/imm32/subx-name
12376 1/imm32/rm32-is-first-inout
12377 3/imm32/r32-is-first-output
12378 0/imm32/no-imm32
12379 0/imm32/no-disp32
12380 0/imm32/output-is-write-only
12381 0x11/imm32/alloc-id:fake
12382 _Primitive-subtract-lit-from-reg/imm32/next
12383 _Primitive-subtract-lit-from-reg:
12384 0x11/imm32/alloc-id:fake:payload
12385
12386 0x11/imm32/alloc-id:fake
12387 _string-subtract/imm32/name
12388 0x11/imm32/alloc-id:fake
12389 Single-lit-var/imm32/inouts
12390 0x11/imm32/alloc-id:fake
12391 Single-int-var-in-some-register/imm32/outputs
12392 0x11/imm32/alloc-id:fake
12393 _string_81_subop_subtract/imm32/subx-name
12394 3/imm32/rm32-is-first-output
12395 0/imm32/no-r32
12396 1/imm32/imm32-is-first-inout
12397 0/imm32/no-disp32
12398 0/imm32/output-is-write-only
12399 0x11/imm32/alloc-id:fake
12400 _Primitive-subtract-lit-from-mem/imm32/next
12401 _Primitive-subtract-lit-from-mem:
12402 0x11/imm32/alloc-id:fake:payload
12403
12404 0x11/imm32/alloc-id:fake
12405 _string-subtract-from/imm32/name
12406 0x11/imm32/alloc-id:fake
12407 Int-var-and-literal/imm32/inouts
12408 0/imm32/no-outputs
12409 0/imm32/no-outputs
12410 0x11/imm32/alloc-id:fake
12411 _string_81_subop_subtract/imm32/subx-name
12412 1/imm32/rm32-is-first-inout
12413 0/imm32/no-r32
12414 2/imm32/imm32-is-first-inout
12415 0/imm32/no-disp32
12416 0/imm32/output-is-write-only
12417 0x11/imm32/alloc-id:fake
12418 _Primitive-and-with-eax/imm32/next
12419
12420 _Primitive-and-with-eax:
12421 0x11/imm32/alloc-id:fake:payload
12422
12423 0x11/imm32/alloc-id:fake
12424 _string-and/imm32/name
12425 0x11/imm32/alloc-id:fake
12426 Single-lit-var/imm32/inouts
12427 0x11/imm32/alloc-id:fake
12428 Single-int-var-in-eax/imm32/outputs
12429 0x11/imm32/alloc-id:fake
12430 _string_25_and_with_eax/imm32/subx-name
12431 0/imm32/no-rm32
12432 0/imm32/no-r32
12433 1/imm32/imm32-is-first-inout
12434 0/imm32/no-disp32
12435 0/imm32/output-is-write-only
12436 0x11/imm32/alloc-id:fake
12437 _Primitive-and-reg-with-reg/imm32/next
12438 _Primitive-and-reg-with-reg:
12439 0x11/imm32/alloc-id:fake:payload
12440
12441 0x11/imm32/alloc-id:fake
12442 _string-and/imm32/name
12443 0x11/imm32/alloc-id:fake
12444 Single-int-var-in-some-register/imm32/inouts
12445 0x11/imm32/alloc-id:fake
12446 Single-int-var-in-some-register/imm32/outputs
12447 0x11/imm32/alloc-id:fake
12448 _string_21_and_with/imm32/subx-name
12449 3/imm32/rm32-is-first-output
12450 1/imm32/r32-is-first-inout
12451 0/imm32/no-imm32
12452 0/imm32/no-disp32
12453 0/imm32/output-is-write-only
12454 0x11/imm32/alloc-id:fake
12455 _Primitive-and-reg-with-mem/imm32/next
12456 _Primitive-and-reg-with-mem:
12457 0x11/imm32/alloc-id:fake:payload
12458
12459 0x11/imm32/alloc-id:fake
12460 _string-and-with/imm32/name
12461 0x11/imm32/alloc-id:fake
12462 Two-args-int-stack-int-reg/imm32/inouts
12463 0/imm32/no-outputs
12464 0/imm32/no-outputs
12465 0x11/imm32/alloc-id:fake
12466 _string_21_and_with/imm32/subx-name
12467 1/imm32/rm32-is-first-inout
12468 2/imm32/r32-is-second-inout
12469 0/imm32/no-imm32
12470 0/imm32/no-disp32
12471 0/imm32/output-is-write-only
12472 0x11/imm32/alloc-id:fake
12473 _Primitive-and-mem-with-reg/imm32/next
12474 _Primitive-and-mem-with-reg:
12475 0x11/imm32/alloc-id:fake:payload
12476
12477 0x11/imm32/alloc-id:fake
12478 _string-and/imm32/name
12479 0x11/imm32/alloc-id:fake
12480 Single-int-var-in-mem/imm32/inouts
12481 0x11/imm32/alloc-id:fake
12482 Single-int-var-in-some-register/imm32/outputs
12483 0x11/imm32/alloc-id:fake
12484 _string_23_and/imm32/subx-name
12485 1/imm32/rm32-is-first-inout
12486 3/imm32/r32-is-first-output
12487 0/imm32/no-imm32
12488 0/imm32/no-disp32
12489 0/imm32/output-is-write-only
12490 0x11/imm32/alloc-id:fake
12491 _Primitive-and-lit-with-reg/imm32/next
12492 _Primitive-and-lit-with-reg:
12493 0x11/imm32/alloc-id:fake:payload
12494
12495 0x11/imm32/alloc-id:fake
12496 _string-and/imm32/name
12497 0x11/imm32/alloc-id:fake
12498 Single-lit-var/imm32/inouts
12499 0x11/imm32/alloc-id:fake
12500 Single-int-var-in-some-register/imm32/outputs
12501 0x11/imm32/alloc-id:fake
12502 _string_81_subop_and/imm32/subx-name
12503 3/imm32/rm32-is-first-output
12504 0/imm32/no-r32
12505 1/imm32/imm32-is-first-inout
12506 0/imm32/no-disp32
12507 0/imm32/output-is-write-only
12508 0x11/imm32/alloc-id:fake
12509 _Primitive-and-lit-with-mem/imm32/next
12510 _Primitive-and-lit-with-mem:
12511 0x11/imm32/alloc-id:fake:payload
12512
12513 0x11/imm32/alloc-id:fake
12514 _string-and-with/imm32/name
12515 0x11/imm32/alloc-id:fake
12516 Int-var-and-literal/imm32/inouts
12517 0/imm32/no-outputs
12518 0/imm32/no-outputs
12519 0x11/imm32/alloc-id:fake
12520 _string_81_subop_and/imm32/subx-name
12521 1/imm32/rm32-is-first-inout
12522 0/imm32/no-r32
12523 2/imm32/imm32-is-first-inout
12524 0/imm32/no-disp32
12525 0/imm32/output-is-write-only
12526 0x11/imm32/alloc-id:fake
12527 _Primitive-or-with-eax/imm32/next
12528
12529 _Primitive-or-with-eax:
12530 0x11/imm32/alloc-id:fake:payload
12531
12532 0x11/imm32/alloc-id:fake
12533 _string-or/imm32/name
12534 0x11/imm32/alloc-id:fake
12535 Single-lit-var/imm32/inouts
12536 0x11/imm32/alloc-id:fake
12537 Single-int-var-in-eax/imm32/outputs
12538 0x11/imm32/alloc-id:fake
12539 _string_0d_or_with_eax/imm32/subx-name
12540 0/imm32/no-rm32
12541 0/imm32/no-r32
12542 1/imm32/imm32-is-first-inout
12543 0/imm32/no-disp32
12544 0/imm32/output-is-write-only
12545 0x11/imm32/alloc-id:fake
12546 _Primitive-or-reg-with-reg/imm32/next
12547 _Primitive-or-reg-with-reg:
12548 0x11/imm32/alloc-id:fake:payload
12549
12550 0x11/imm32/alloc-id:fake
12551 _string-or/imm32/name
12552 0x11/imm32/alloc-id:fake
12553 Single-int-var-in-some-register/imm32/inouts
12554 0x11/imm32/alloc-id:fake
12555 Single-int-var-in-some-register/imm32/outputs
12556 0x11/imm32/alloc-id:fake
12557 _string_09_or_with/imm32/subx-name
12558 3/imm32/rm32-is-first-output
12559 1/imm32/r32-is-first-inout
12560 0/imm32/no-imm32
12561 0/imm32/no-disp32
12562 0/imm32/output-is-write-only
12563 0x11/imm32/alloc-id:fake
12564 _Primitive-or-reg-with-mem/imm32/next
12565 _Primitive-or-reg-with-mem:
12566 0x11/imm32/alloc-id:fake:payload
12567
12568 0x11/imm32/alloc-id:fake
12569 _string-or-with/imm32/name
12570 0x11/imm32/alloc-id:fake
12571 Two-args-int-stack-int-reg/imm32/inouts
12572 0/imm32/no-outputs
12573 0/imm32/no-outputs
12574 0x11/imm32/alloc-id:fake
12575 _string_09_or_with/imm32/subx-name
12576 1/imm32/rm32-is-first-inout
12577 2/imm32/r32-is-second-inout
12578 0/imm32/no-imm32
12579 0/imm32/no-disp32
12580 0/imm32/output-is-write-only
12581 0x11/imm32/alloc-id:fake
12582 _Primitive-or-mem-with-reg/imm32/next
12583 _Primitive-or-mem-with-reg:
12584 0x11/imm32/alloc-id:fake:payload
12585
12586 0x11/imm32/alloc-id:fake
12587 _string-or/imm32/name
12588 0x11/imm32/alloc-id:fake
12589 Single-int-var-in-mem/imm32/inouts
12590 0x11/imm32/alloc-id:fake
12591 Single-int-var-in-some-register/imm32/outputs
12592 0x11/imm32/alloc-id:fake
12593 _string_0b_or/imm32/subx-name
12594 1/imm32/rm32-is-first-inout
12595 3/imm32/r32-is-first-output
12596 0/imm32/no-imm32
12597 0/imm32/no-disp32
12598 0/imm32/output-is-write-only
12599 0x11/imm32/alloc-id:fake
12600 _Primitive-or-lit-with-reg/imm32/next
12601 _Primitive-or-lit-with-reg:
12602 0x11/imm32/alloc-id:fake:payload
12603
12604 0x11/imm32/alloc-id:fake
12605 _string-or/imm32/name
12606 0x11/imm32/alloc-id:fake
12607 Single-lit-var/imm32/inouts
12608 0x11/imm32/alloc-id:fake
12609 Single-int-var-in-some-register/imm32/outputs
12610 0x11/imm32/alloc-id:fake
12611 _string_81_subop_or/imm32/subx-name
12612 3/imm32/rm32-is-first-output
12613 0/imm32/no-r32
12614 1/imm32/imm32-is-first-inout
12615 0/imm32/no-disp32
12616 0/imm32/output-is-write-only
12617 0x11/imm32/alloc-id:fake
12618 _Primitive-or-lit-with-mem/imm32/next
12619 _Primitive-or-lit-with-mem:
12620 0x11/imm32/alloc-id:fake:payload
12621
12622 0x11/imm32/alloc-id:fake
12623 _string-or-with/imm32/name
12624 0x11/imm32/alloc-id:fake
12625 Int-var-and-literal/imm32/inouts
12626 0/imm32/no-outputs
12627 0/imm32/no-outputs
12628 0x11/imm32/alloc-id:fake
12629 _string_81_subop_or/imm32/subx-name
12630 1/imm32/rm32-is-first-inout
12631 0/imm32/no-r32
12632 2/imm32/imm32-is-second-inout
12633 0/imm32/no-disp32
12634 0/imm32/output-is-write-only
12635 0x11/imm32/alloc-id:fake
12636 _Primitive-xor-with-eax/imm32/next
12637
12638 _Primitive-xor-with-eax:
12639 0x11/imm32/alloc-id:fake:payload
12640
12641 0x11/imm32/alloc-id:fake
12642 _string-xor/imm32/name
12643 0x11/imm32/alloc-id:fake
12644 Single-lit-var/imm32/inouts
12645 0x11/imm32/alloc-id:fake
12646 Single-int-var-in-eax/imm32/outputs
12647 0x11/imm32/alloc-id:fake
12648 _string_35_xor_with_eax/imm32/subx-name
12649 0/imm32/no-rm32
12650 0/imm32/no-r32
12651 1/imm32/imm32-is-first-inout
12652 0/imm32/no-disp32
12653 0/imm32/output-is-write-only
12654 0x11/imm32/alloc-id:fake
12655 _Primitive-xor-reg-with-reg/imm32/next
12656 _Primitive-xor-reg-with-reg:
12657 0x11/imm32/alloc-id:fake:payload
12658
12659 0x11/imm32/alloc-id:fake
12660 _string-xor/imm32/name
12661 0x11/imm32/alloc-id:fake
12662 Single-int-var-in-some-register/imm32/inouts
12663 0x11/imm32/alloc-id:fake
12664 Single-int-var-in-some-register/imm32/outputs
12665 0x11/imm32/alloc-id:fake
12666 _string_31_xor_with/imm32/subx-name
12667 3/imm32/rm32-is-first-output
12668 1/imm32/r32-is-first-inout
12669 0/imm32/no-imm32
12670 0/imm32/no-disp32
12671 0/imm32/output-is-write-only
12672 0x11/imm32/alloc-id:fake
12673 _Primitive-xor-reg-with-mem/imm32/next
12674 _Primitive-xor-reg-with-mem:
12675 0x11/imm32/alloc-id:fake:payload
12676
12677 0x11/imm32/alloc-id:fake
12678 _string-xor-with/imm32/name
12679 0x11/imm32/alloc-id:fake
12680 Two-args-int-stack-int-reg/imm32/inouts
12681 0/imm32/no-outputs
12682 0/imm32/no-outputs
12683 0x11/imm32/alloc-id:fake
12684 _string_31_xor_with/imm32/subx-name
12685 1/imm32/rm32-is-first-inout
12686 2/imm32/r32-is-second-inout
12687 0/imm32/no-imm32
12688 0/imm32/no-disp32
12689 0/imm32/output-is-write-only
12690 0x11/imm32/alloc-id:fake
12691 _Primitive-xor-mem-with-reg/imm32/next
12692 _Primitive-xor-mem-with-reg:
12693 0x11/imm32/alloc-id:fake:payload
12694
12695 0x11/imm32/alloc-id:fake
12696 _string-xor/imm32/name
12697 0x11/imm32/alloc-id:fake
12698 Single-int-var-in-mem/imm32/inouts
12699 0x11/imm32/alloc-id:fake
12700 Single-int-var-in-some-register/imm32/outputs
12701 0x11/imm32/alloc-id:fake
12702 _string_33_xor/imm32/subx-name
12703 1/imm32/rm32-is-first-inout
12704 3/imm32/r32-is-first-output
12705 0/imm32/no-imm32
12706 0/imm32/no-disp32
12707 0/imm32/output-is-write-only
12708 0x11/imm32/alloc-id:fake
12709 _Primitive-xor-lit-with-reg/imm32/next
12710 _Primitive-xor-lit-with-reg:
12711 0x11/imm32/alloc-id:fake:payload
12712
12713 0x11/imm32/alloc-id:fake
12714 _string-xor/imm32/name
12715 0x11/imm32/alloc-id:fake
12716 Single-lit-var/imm32/inouts
12717 0x11/imm32/alloc-id:fake
12718 Single-int-var-in-some-register/imm32/outputs
12719 0x11/imm32/alloc-id:fake
12720 _string_81_subop_xor/imm32/subx-name
12721 3/imm32/rm32-is-first-output
12722 0/imm32/no-r32
12723 1/imm32/imm32-is-first-inout
12724 0/imm32/no-disp32
12725 0/imm32/output-is-write-only
12726 0x11/imm32/alloc-id:fake
12727 _Primitive-xor-lit-with-mem/imm32/next
12728 _Primitive-xor-lit-with-mem:
12729 0x11/imm32/alloc-id:fake:payload
12730
12731 0x11/imm32/alloc-id:fake
12732 _string-xor-with/imm32/name
12733 0x11/imm32/alloc-id:fake
12734 Int-var-and-literal/imm32/inouts
12735 0/imm32/no-outputs
12736 0/imm32/no-outputs
12737 0x11/imm32/alloc-id:fake
12738 _string_81_subop_xor/imm32/subx-name
12739 1/imm32/rm32-is-first-inout
12740 0/imm32/no-r32
12741 2/imm32/imm32-is-first-inout
12742 0/imm32/no-disp32
12743 0/imm32/output-is-write-only
12744 0x11/imm32/alloc-id:fake
12745 _Primitive-copy-to-eax/imm32/next
12746
12747 _Primitive-copy-to-eax:
12748 0x11/imm32/alloc-id:fake:payload
12749
12750 0x11/imm32/alloc-id:fake
12751 _string-copy/imm32/name
12752 0x11/imm32/alloc-id:fake
12753 Single-lit-var/imm32/inouts
12754 0x11/imm32/alloc-id:fake
12755 Single-int-var-in-eax/imm32/outputs
12756 0x11/imm32/alloc-id:fake
12757 _string_b8_copy_to_eax/imm32/subx-name
12758 0/imm32/no-rm32
12759 0/imm32/no-r32
12760 1/imm32/imm32-is-first-inout
12761 0/imm32/no-disp32
12762 1/imm32/output-is-write-only
12763 0x11/imm32/alloc-id:fake
12764 _Primitive-copy-to-ecx/imm32/next
12765 _Primitive-copy-to-ecx:
12766 0x11/imm32/alloc-id:fake:payload
12767
12768 0x11/imm32/alloc-id:fake
12769 _string-copy/imm32/name
12770 0x11/imm32/alloc-id:fake
12771 Single-lit-var/imm32/inouts
12772 0x11/imm32/alloc-id:fake
12773 Single-int-var-in-ecx/imm32/outputs
12774 0x11/imm32/alloc-id:fake
12775 _string_b9_copy_to_ecx/imm32/subx-name
12776 0/imm32/no-rm32
12777 0/imm32/no-r32
12778 1/imm32/imm32-is-first-inout
12779 0/imm32/no-disp32
12780 1/imm32/output-is-write-only
12781 0x11/imm32/alloc-id:fake
12782 _Primitive-copy-to-edx/imm32/next
12783 _Primitive-copy-to-edx:
12784 0x11/imm32/alloc-id:fake:payload
12785
12786 0x11/imm32/alloc-id:fake
12787 _string-copy/imm32/name
12788 0x11/imm32/alloc-id:fake
12789 Single-lit-var/imm32/inouts
12790 0x11/imm32/alloc-id:fake
12791 Single-int-var-in-edx/imm32/outputs
12792 0x11/imm32/alloc-id:fake
12793 _string_ba_copy_to_edx/imm32/subx-name
12794 0/imm32/no-rm32
12795 0/imm32/no-r32
12796 1/imm32/imm32-is-first-inout
12797 0/imm32/no-disp32
12798 1/imm32/output-is-write-only
12799 0x11/imm32/alloc-id:fake
12800 _Primitive-copy-to-ebx/imm32/next
12801 _Primitive-copy-to-ebx:
12802 0x11/imm32/alloc-id:fake:payload
12803
12804 0x11/imm32/alloc-id:fake
12805 _string-copy/imm32/name
12806 0x11/imm32/alloc-id:fake
12807 Single-lit-var/imm32/inouts
12808 0x11/imm32/alloc-id:fake
12809 Single-int-var-in-ebx/imm32/outputs
12810 0x11/imm32/alloc-id:fake
12811 _string_bb_copy_to_ebx/imm32/subx-name
12812 0/imm32/no-rm32
12813 0/imm32/no-r32
12814 1/imm32/imm32-is-first-inout
12815 0/imm32/no-disp32
12816 1/imm32/output-is-write-only
12817 0x11/imm32/alloc-id:fake
12818 _Primitive-copy-to-esi/imm32/next
12819 _Primitive-copy-to-esi:
12820 0x11/imm32/alloc-id:fake:payload
12821
12822 0x11/imm32/alloc-id:fake
12823 _string-copy/imm32/name
12824 0x11/imm32/alloc-id:fake
12825 Single-lit-var/imm32/inouts
12826 0x11/imm32/alloc-id:fake
12827 Single-int-var-in-esi/imm32/outputs
12828 0x11/imm32/alloc-id:fake
12829 _string_be_copy_to_esi/imm32/subx-name
12830 0/imm32/no-rm32
12831 0/imm32/no-r32
12832 1/imm32/imm32-is-first-inout
12833 0/imm32/no-disp32
12834 1/imm32/output-is-write-only
12835 0x11/imm32/alloc-id:fake
12836 _Primitive-copy-to-edi/imm32/next
12837 _Primitive-copy-to-edi:
12838 0x11/imm32/alloc-id:fake:payload
12839
12840 0x11/imm32/alloc-id:fake
12841 _string-copy/imm32/name
12842 0x11/imm32/alloc-id:fake
12843 Single-lit-var/imm32/inouts
12844 0x11/imm32/alloc-id:fake
12845 Single-int-var-in-edi/imm32/outputs
12846 0x11/imm32/alloc-id:fake
12847 _string_bf_copy_to_edi/imm32/subx-name
12848 0/imm32/no-rm32
12849 0/imm32/no-r32
12850 1/imm32/imm32-is-first-inout
12851 0/imm32/no-disp32
12852 1/imm32/output-is-write-only
12853 0x11/imm32/alloc-id:fake
12854 _Primitive-copy-reg-to-reg/imm32/next
12855 _Primitive-copy-reg-to-reg:
12856 0x11/imm32/alloc-id:fake:payload
12857
12858 0x11/imm32/alloc-id:fake
12859 _string-copy/imm32/name
12860 0x11/imm32/alloc-id:fake
12861 Single-int-var-in-some-register/imm32/inouts
12862 0x11/imm32/alloc-id:fake
12863 Single-int-var-in-some-register/imm32/outputs
12864 0x11/imm32/alloc-id:fake
12865 _string_89_<-/imm32/subx-name
12866 3/imm32/rm32-is-first-output
12867 1/imm32/r32-is-first-inout
12868 0/imm32/no-imm32
12869 0/imm32/no-disp32
12870 1/imm32/output-is-write-only
12871 0x11/imm32/alloc-id:fake
12872 _Primitive-copy-reg-to-mem/imm32/next
12873 _Primitive-copy-reg-to-mem:
12874 0x11/imm32/alloc-id:fake:payload
12875
12876 0x11/imm32/alloc-id:fake
12877 _string-copy-to/imm32/name
12878 0x11/imm32/alloc-id:fake
12879 Two-args-int-stack-int-reg/imm32/inouts
12880 0/imm32/no-outputs
12881 0/imm32/no-outputs
12882 0x11/imm32/alloc-id:fake
12883 _string_89_<-/imm32/subx-name
12884 1/imm32/rm32-is-first-inout
12885 2/imm32/r32-is-second-inout
12886 0/imm32/no-imm32
12887 0/imm32/no-disp32
12888 1/imm32/output-is-write-only
12889 0x11/imm32/alloc-id:fake
12890 _Primitive-copy-mem-to-reg/imm32/next
12891 _Primitive-copy-mem-to-reg:
12892 0x11/imm32/alloc-id:fake:payload
12893
12894 0x11/imm32/alloc-id:fake
12895 _string-copy/imm32/name
12896 0x11/imm32/alloc-id:fake
12897 Single-int-var-in-mem/imm32/inouts
12898 0x11/imm32/alloc-id:fake
12899 Single-int-var-in-some-register/imm32/outputs
12900 0x11/imm32/alloc-id:fake
12901 _string_8b_->/imm32/subx-name
12902 1/imm32/rm32-is-first-inout
12903 3/imm32/r32-is-first-output
12904 0/imm32/no-imm32
12905 0/imm32/no-disp32
12906 1/imm32/output-is-write-only
12907 0x11/imm32/alloc-id:fake
12908 _Primitive-copy-lit-to-reg/imm32/next
12909 _Primitive-copy-lit-to-reg:
12910 0x11/imm32/alloc-id:fake:payload
12911
12912 0x11/imm32/alloc-id:fake
12913 _string-copy/imm32/name
12914 0x11/imm32/alloc-id:fake
12915 Single-lit-var/imm32/inouts
12916 0x11/imm32/alloc-id:fake
12917 Single-int-var-in-some-register/imm32/outputs
12918 0x11/imm32/alloc-id:fake
12919 _string_c7_subop_copy/imm32/subx-name
12920 3/imm32/rm32-is-first-output
12921 0/imm32/no-r32
12922 1/imm32/imm32-is-first-inout
12923 0/imm32/no-disp32
12924 1/imm32/output-is-write-only
12925 0x11/imm32/alloc-id:fake
12926 _Primitive-copy-lit-to-mem/imm32/next
12927 _Primitive-copy-lit-to-mem:
12928 0x11/imm32/alloc-id:fake:payload
12929
12930 0x11/imm32/alloc-id:fake
12931 _string-copy-to/imm32/name
12932 0x11/imm32/alloc-id:fake
12933 Int-var-and-literal/imm32/inouts
12934 0/imm32/no-outputs
12935 0/imm32/no-outputs
12936 0x11/imm32/alloc-id:fake
12937 _string_c7_subop_copy/imm32/subx-name
12938 1/imm32/rm32-is-first-inout
12939 0/imm32/no-r32
12940 2/imm32/imm32-is-first-inout
12941 0/imm32/no-disp32
12942 1/imm32/output-is-write-only
12943 0x11/imm32/alloc-id:fake
12944 _Primitive-copy-byte-from-reg/imm32/next
12945
12946 _Primitive-copy-byte-from-reg:
12947 0x11/imm32/alloc-id:fake:payload
12948
12949 0x11/imm32/alloc-id:fake
12950 _string-copy-byte/imm32/name
12951 0x11/imm32/alloc-id:fake
12952 Single-byte-var-in-some-register/imm32/inouts
12953 0x11/imm32/alloc-id:fake
12954 Single-byte-var-in-some-register/imm32/outputs
12955 0x11/imm32/alloc-id:fake
12956 _string_8a_copy_byte/imm32/subx-name
12957 1/imm32/rm32-is-first-inout
12958 3/imm32/r32-is-first-output
12959 0/imm32/no-imm32
12960 0/imm32/no-disp32
12961 1/imm32/output-is-write-only
12962 0x11/imm32/alloc-id:fake
12963 _Primitive-copy-byte-from-mem/imm32/next
12964 _Primitive-copy-byte-from-mem:
12965 0x11/imm32/alloc-id:fake:payload
12966
12967 0x11/imm32/alloc-id:fake
12968 _string-copy-byte/imm32/name
12969 0x11/imm32/alloc-id:fake
12970 Single-byte-var-in-mem/imm32/inouts
12971 0x11/imm32/alloc-id:fake
12972 Single-byte-var-in-some-register/imm32/outputs
12973 0x11/imm32/alloc-id:fake
12974 _string_8a_copy_byte/imm32/subx-name
12975 1/imm32/rm32-is-first-inout
12976 3/imm32/r32-is-first-output
12977 0/imm32/no-imm32
12978 0/imm32/no-disp32
12979 1/imm32/output-is-write-only
12980 0x11/imm32/alloc-id:fake
12981 _Primitive-copy-byte-to-mem/imm32/next
12982 _Primitive-copy-byte-to-mem:
12983 0x11/imm32/alloc-id:fake:payload
12984
12985 0x11/imm32/alloc-id:fake
12986 _string-copy-byte-to/imm32/name
12987 0x11/imm32/alloc-id:fake
12988 Two-args-byte-stack-byte-reg/imm32/inouts
12989 0/imm32/no-outputs
12990 0/imm32/no-outputs
12991 0x11/imm32/alloc-id:fake
12992 _string_88_copy_byte/imm32/subx-name
12993 1/imm32/rm32-is-first-inout
12994 2/imm32/r32-is-second-inout
12995 0/imm32/no-imm32
12996 0/imm32/no-disp32
12997 0/imm32/output-is-write-only
12998 0x11/imm32/alloc-id:fake
12999 _Primitive-address/imm32/next
13000
13001 _Primitive-address:
13002 0x11/imm32/alloc-id:fake:payload
13003
13004 0x11/imm32/alloc-id:fake
13005 _string-address/imm32/name
13006 0x11/imm32/alloc-id:fake
13007 Single-int-var-in-mem/imm32/inouts
13008 0x11/imm32/alloc-id:fake
13009 Single-addr-var-in-some-register/imm32/outputs
13010 0x11/imm32/alloc-id:fake
13011 _string_8d_copy_address/imm32/subx-name
13012 1/imm32/rm32-is-first-inout
13013 3/imm32/r32-is-first-output
13014 0/imm32/no-imm32
13015 0/imm32/no-disp32
13016 1/imm32/output-is-write-only
13017 0x11/imm32/alloc-id:fake
13018 _Primitive-compare-reg-with-reg/imm32/next
13019
13020 _Primitive-compare-reg-with-reg:
13021 0x11/imm32/alloc-id:fake:payload
13022
13023 0x11/imm32/alloc-id:fake
13024 _string-compare/imm32/name
13025 0x11/imm32/alloc-id:fake
13026 Two-int-args-in-regs/imm32/inouts
13027 0/imm32/no-outputs
13028 0/imm32/no-outputs
13029 0x11/imm32/alloc-id:fake
13030 _string_39_compare->/imm32/subx-name
13031 1/imm32/rm32-is-first-inout
13032 2/imm32/r32-is-second-inout
13033 0/imm32/no-imm32
13034 0/imm32/no-disp32
13035 0/imm32/output-is-write-only
13036 0x11/imm32/alloc-id:fake
13037 _Primitive-compare-mem-with-reg/imm32/next
13038 _Primitive-compare-mem-with-reg:
13039 0x11/imm32/alloc-id:fake:payload
13040
13041 0x11/imm32/alloc-id:fake
13042 _string-compare/imm32/name
13043 0x11/imm32/alloc-id:fake
13044 Two-args-int-stack-int-reg/imm32/inouts
13045 0/imm32/no-outputs
13046 0/imm32/no-outputs
13047 0x11/imm32/alloc-id:fake
13048 _string_39_compare->/imm32/subx-name
13049 1/imm32/rm32-is-first-inout
13050 2/imm32/r32-is-second-inout
13051 0/imm32/no-imm32
13052 0/imm32/no-disp32
13053 0/imm32/output-is-write-only
13054 0x11/imm32/alloc-id:fake
13055 _Primitive-compare-reg-with-mem/imm32/next
13056 _Primitive-compare-reg-with-mem:
13057 0x11/imm32/alloc-id:fake:payload
13058
13059 0x11/imm32/alloc-id:fake
13060 _string-compare/imm32/name
13061 0x11/imm32/alloc-id:fake
13062 Two-args-int-reg-int-stack/imm32/inouts
13063 0/imm32/no-outputs
13064 0/imm32/no-outputs
13065 0x11/imm32/alloc-id:fake
13066 _string_3b_compare<-/imm32/subx-name
13067 2/imm32/rm32-is-second-inout
13068 1/imm32/r32-is-first-inout
13069 0/imm32/no-imm32
13070 0/imm32/no-disp32
13071 0/imm32/output-is-write-only
13072 0x11/imm32/alloc-id:fake
13073 _Primitive-compare-eax-with-literal/imm32/next
13074 _Primitive-compare-eax-with-literal:
13075 0x11/imm32/alloc-id:fake:payload
13076
13077 0x11/imm32/alloc-id:fake
13078 _string-compare/imm32/name
13079 0x11/imm32/alloc-id:fake
13080 Two-args-int-eax-int-literal/imm32/inouts
13081 0/imm32/no-outputs
13082 0/imm32/no-outputs
13083 0x11/imm32/alloc-id:fake
13084 _string_3d_compare_eax_with/imm32/subx-name
13085 0/imm32/no-rm32
13086 0/imm32/no-r32
13087 2/imm32/imm32-is-second-inout
13088 0/imm32/no-disp32
13089 0/imm32/output-is-write-only
13090 0x11/imm32/alloc-id:fake
13091 _Primitive-compare-reg-with-literal/imm32/next
13092 _Primitive-compare-reg-with-literal:
13093 0x11/imm32/alloc-id:fake:payload
13094
13095 0x11/imm32/alloc-id:fake
13096 _string-compare/imm32/name
13097 0x11/imm32/alloc-id:fake
13098 Int-var-in-register-and-literal/imm32/inouts
13099 0/imm32/no-outputs
13100 0/imm32/no-outputs
13101 0x11/imm32/alloc-id:fake
13102 _string_81_subop_compare/imm32/subx-name
13103 1/imm32/rm32-is-first-inout
13104 0/imm32/no-r32
13105 2/imm32/imm32-is-second-inout
13106 0/imm32/no-disp32
13107 0/imm32/output-is-write-only
13108 0x11/imm32/alloc-id:fake
13109 _Primitive-compare-mem-with-literal/imm32/next
13110 _Primitive-compare-mem-with-literal:
13111 0x11/imm32/alloc-id:fake:payload
13112
13113 0x11/imm32/alloc-id:fake
13114 _string-compare/imm32/name
13115 0x11/imm32/alloc-id:fake
13116 Int-var-and-literal/imm32/inouts
13117 0/imm32/no-outputs
13118 0/imm32/no-outputs
13119 0x11/imm32/alloc-id:fake
13120 _string_81_subop_compare/imm32/subx-name
13121 1/imm32/rm32-is-first-inout
13122 0/imm32/no-r32
13123 2/imm32/imm32-is-second-inout
13124 0/imm32/no-disp32
13125 0/imm32/output-is-write-only
13126 0x11/imm32/alloc-id:fake
13127 _Primitive-multiply-reg-by-reg/imm32/next
13128
13129 _Primitive-multiply-reg-by-reg:
13130 0x11/imm32/alloc-id:fake:payload
13131
13132 0x11/imm32/alloc-id:fake
13133 _string-multiply/imm32/name
13134 0x11/imm32/alloc-id:fake
13135 Single-int-var-in-some-register/imm32/inouts
13136 0x11/imm32/alloc-id:fake
13137 Single-int-var-in-some-register/imm32/outputs
13138 0x11/imm32/alloc-id:fake
13139 _string_0f_af_multiply/imm32/subx-name
13140 1/imm32/rm32-is-first-inout
13141 3/imm32/r32-is-first-output
13142 0/imm32/no-imm32
13143 0/imm32/no-disp32
13144 0/imm32/output-is-write-only
13145 0x11/imm32/alloc-id:fake
13146 _Primitive-multiply-reg-by-mem/imm32/next
13147 _Primitive-multiply-reg-by-mem:
13148 0x11/imm32/alloc-id:fake:payload
13149
13150 0x11/imm32/alloc-id:fake
13151 _string-multiply/imm32/name
13152 0x11/imm32/alloc-id:fake
13153 Single-int-var-in-mem/imm32/inouts
13154 0x11/imm32/alloc-id:fake
13155 Single-int-var-in-some-register/imm32/outputs
13156 0x11/imm32/alloc-id:fake
13157 _string_0f_af_multiply/imm32/subx-name
13158 1/imm32/rm32-is-first-inout
13159 3/imm32/r32-is-first-output
13160 0/imm32/no-imm32
13161 0/imm32/no-disp32
13162 0/imm32/output-is-write-only
13163 0x11/imm32/alloc-id:fake
13164 _Primitive-break-if-addr</imm32/next
13165
13166 _Primitive-break-if-addr<:
13167 0x11/imm32/alloc-id:fake:payload
13168 0x11/imm32/alloc-id:fake
13169 _string-break-if-addr</imm32/name
13170 0/imm32/no-inouts
13171 0/imm32/no-inouts
13172 0/imm32/no-outputs
13173 0/imm32/no-outputs
13174 0x11/imm32/alloc-id:fake
13175 _string_0f_82_jump_break/imm32/subx-name
13176 0/imm32/no-rm32
13177 0/imm32/no-r32
13178 0/imm32/no-imm32
13179 0/imm32/no-disp32
13180 0/imm32/no-output
13181 0x11/imm32/alloc-id:fake
13182 _Primitive-break-if-addr>=/imm32/next
13183 _Primitive-break-if-addr>=:
13184 0x11/imm32/alloc-id:fake:payload
13185 0x11/imm32/alloc-id:fake
13186 _string-break-if-addr>=/imm32/name
13187 0/imm32/no-inouts
13188 0/imm32/no-inouts
13189 0/imm32/no-outputs
13190 0/imm32/no-outputs
13191 0x11/imm32/alloc-id:fake
13192 _string_0f_83_jump_break/imm32/subx-name
13193 0/imm32/no-rm32
13194 0/imm32/no-r32
13195 0/imm32/no-imm32
13196 0/imm32/no-disp32
13197 0/imm32/no-output
13198 0x11/imm32/alloc-id:fake
13199 _Primitive-break-if-=/imm32/next
13200 _Primitive-break-if-=:
13201 0x11/imm32/alloc-id:fake:payload
13202 0x11/imm32/alloc-id:fake
13203 _string-break-if-=/imm32/name
13204 0/imm32/no-inouts
13205 0/imm32/no-inouts
13206 0/imm32/no-outputs
13207 0/imm32/no-outputs
13208 0x11/imm32/alloc-id:fake
13209 _string_0f_84_jump_break/imm32/subx-name
13210 0/imm32/no-rm32
13211 0/imm32/no-r32
13212 0/imm32/no-imm32
13213 0/imm32/no-disp32
13214 0/imm32/no-output
13215 0x11/imm32/alloc-id:fake
13216 _Primitive-break-if-!=/imm32/next
13217 _Primitive-break-if-!=:
13218 0x11/imm32/alloc-id:fake:payload
13219 0x11/imm32/alloc-id:fake
13220 _string-break-if-!=/imm32/name
13221 0/imm32/no-inouts
13222 0/imm32/no-inouts
13223 0/imm32/no-outputs
13224 0/imm32/no-outputs
13225 0x11/imm32/alloc-id:fake
13226 _string_0f_85_jump_break/imm32/subx-name
13227 0/imm32/no-rm32
13228 0/imm32/no-r32
13229 0/imm32/no-imm32
13230 0/imm32/no-disp32
13231 0/imm32/no-output
13232 0x11/imm32/alloc-id:fake
13233 _Primitive-break-if-addr<=/imm32/next
13234 _Primitive-break-if-addr<=:
13235 0x11/imm32/alloc-id:fake:payload
13236 0x11/imm32/alloc-id:fake
13237 _string-break-if-addr<=/imm32/name
13238 0/imm32/no-inouts
13239 0/imm32/no-inouts
13240 0/imm32/no-outputs
13241 0/imm32/no-outputs
13242 0x11/imm32/alloc-id:fake
13243 _string_0f_86_jump_break/imm32/subx-name
13244 0/imm32/no-rm32
13245 0/imm32/no-r32
13246 0/imm32/no-imm32
13247 0/imm32/no-disp32
13248 0/imm32/no-output
13249 0x11/imm32/alloc-id:fake
13250 _Primitive-break-if-addr>/imm32/next
13251 _Primitive-break-if-addr>:
13252 0x11/imm32/alloc-id:fake:payload
13253 0x11/imm32/alloc-id:fake
13254 _string-break-if-addr>/imm32/name
13255 0/imm32/no-inouts
13256 0/imm32/no-inouts
13257 0/imm32/no-outputs
13258 0/imm32/no-outputs
13259 0x11/imm32/alloc-id:fake
13260 _string_0f_87_jump_break/imm32/subx-name
13261 0/imm32/no-rm32
13262 0/imm32/no-r32
13263 0/imm32/no-imm32
13264 0/imm32/no-disp32
13265 0/imm32/no-output
13266 0x11/imm32/alloc-id:fake
13267 _Primitive-break-if-</imm32/next
13268 _Primitive-break-if-<:
13269 0x11/imm32/alloc-id:fake:payload
13270 0x11/imm32/alloc-id:fake
13271 _string-break-if-</imm32/name
13272 0/imm32/no-inouts
13273 0/imm32/no-inouts
13274 0/imm32/no-outputs
13275 0/imm32/no-outputs
13276 0x11/imm32/alloc-id:fake
13277 _string_0f_8c_jump_break/imm32/subx-name
13278 0/imm32/no-rm32
13279 0/imm32/no-r32
13280 0/imm32/no-imm32
13281 0/imm32/no-disp32
13282 0/imm32/no-output
13283 0x11/imm32/alloc-id:fake
13284 _Primitive-break-if->=/imm32/next
13285 _Primitive-break-if->=:
13286 0x11/imm32/alloc-id:fake:payload
13287 0x11/imm32/alloc-id:fake
13288 _string-break-if->=/imm32/name
13289 0/imm32/no-inouts
13290 0/imm32/no-inouts
13291 0/imm32/no-outputs
13292 0/imm32/no-outputs
13293 0x11/imm32/alloc-id:fake
13294 _string_0f_8d_jump_break/imm32/subx-name
13295 0/imm32/no-rm32
13296 0/imm32/no-r32
13297 0/imm32/no-imm32
13298 0/imm32/no-disp32
13299 0/imm32/no-output
13300 0x11/imm32/alloc-id:fake
13301 _Primitive-break-if-<=/imm32/next
13302 _Primitive-break-if-<=:
13303 0x11/imm32/alloc-id:fake:payload
13304 0x11/imm32/alloc-id:fake
13305 _string-break-if-<=/imm32/name
13306 0/imm32/no-inouts
13307 0/imm32/no-inouts
13308 0/imm32/no-outputs
13309 0/imm32/no-outputs
13310 0x11/imm32/alloc-id:fake
13311 _string_0f_8e_jump_break/imm32/subx-name
13312 0/imm32/no-rm32
13313 0/imm32/no-r32
13314 0/imm32/no-imm32
13315 0/imm32/no-disp32
13316 0/imm32/no-output
13317 0x11/imm32/alloc-id:fake
13318 _Primitive-break-if->/imm32/next
13319 _Primitive-break-if->:
13320 0x11/imm32/alloc-id:fake:payload
13321 0x11/imm32/alloc-id:fake
13322 _string-break-if->/imm32/name
13323 0/imm32/no-inouts
13324 0/imm32/no-inouts
13325 0/imm32/no-outputs
13326 0/imm32/no-outputs
13327 0x11/imm32/alloc-id:fake
13328 _string_0f_8f_jump_break/imm32/subx-name
13329 0/imm32/no-rm32
13330 0/imm32/no-r32
13331 0/imm32/no-imm32
13332 0/imm32/no-disp32
13333 0/imm32/no-output
13334 0x11/imm32/alloc-id:fake
13335 _Primitive-break/imm32/next
13336 _Primitive-break:
13337 0x11/imm32/alloc-id:fake:payload
13338 0x11/imm32/alloc-id:fake
13339 _string-break/imm32/name
13340 0/imm32/no-inouts
13341 0/imm32/no-inouts
13342 0/imm32/no-outputs
13343 0/imm32/no-outputs
13344 0x11/imm32/alloc-id:fake
13345 _string_e9_jump_break/imm32/subx-name
13346 0/imm32/no-rm32
13347 0/imm32/no-r32
13348 0/imm32/no-imm32
13349 0/imm32/no-disp32
13350 0/imm32/no-output
13351 0x11/imm32/alloc-id:fake
13352 _Primitive-loop-if-addr</imm32/next
13353 _Primitive-loop-if-addr<:
13354 0x11/imm32/alloc-id:fake:payload
13355 0x11/imm32/alloc-id:fake
13356 _string-loop-if-addr</imm32/name
13357 0/imm32/no-inouts
13358 0/imm32/no-inouts
13359 0/imm32/no-outputs
13360 0/imm32/no-outputs
13361 0x11/imm32/alloc-id:fake
13362 _string_0f_82_jump_loop/imm32/subx-name
13363 0/imm32/no-rm32
13364 0/imm32/no-r32
13365 0/imm32/no-imm32
13366 0/imm32/no-disp32
13367 0/imm32/no-output
13368 0x11/imm32/alloc-id:fake
13369 _Primitive-loop-if-addr>=/imm32/next
13370 _Primitive-loop-if-addr>=:
13371 0x11/imm32/alloc-id:fake:payload
13372 0x11/imm32/alloc-id:fake
13373 _string-loop-if-addr>=/imm32/name
13374 0/imm32/no-inouts
13375 0/imm32/no-inouts
13376 0/imm32/no-outputs
13377 0/imm32/no-outputs
13378 0x11/imm32/alloc-id:fake
13379 _string_0f_83_jump_loop/imm32/subx-name
13380 0/imm32/no-rm32
13381 0/imm32/no-r32
13382 0/imm32/no-imm32
13383 0/imm32/no-disp32
13384 0/imm32/no-output
13385 0x11/imm32/alloc-id:fake
13386 _Primitive-loop-if-=/imm32/next
13387 _Primitive-loop-if-=:
13388 0x11/imm32/alloc-id:fake:payload
13389 0x11/imm32/alloc-id:fake
13390 _string-loop-if-=/imm32/name
13391 0/imm32/no-inouts
13392 0/imm32/no-inouts
13393 0/imm32/no-outputs
13394 0/imm32/no-outputs
13395 0x11/imm32/alloc-id:fake
13396 _string_0f_84_jump_loop/imm32/subx-name
13397 0/imm32/no-rm32
13398 0/imm32/no-r32
13399 0/imm32/no-imm32
13400 0/imm32/no-disp32
13401 0/imm32/no-output
13402 0x11/imm32/alloc-id:fake
13403 _Primitive-loop-if-!=/imm32/next
13404 _Primitive-loop-if-!=:
13405 0x11/imm32/alloc-id:fake:payload
13406 0x11/imm32/alloc-id:fake
13407 _string-loop-if-!=/imm32/name
13408 0/imm32/no-inouts
13409 0/imm32/no-inouts
13410 0/imm32/no-outputs
13411 0/imm32/no-outputs
13412 0x11/imm32/alloc-id:fake
13413 _string_0f_85_jump_loop/imm32/subx-name
13414 0/imm32/no-rm32
13415 0/imm32/no-r32
13416 0/imm32/no-imm32
13417 0/imm32/no-disp32
13418 0/imm32/no-output
13419 0x11/imm32/alloc-id:fake
13420 _Primitive-loop-if-addr<=/imm32/next
13421 _Primitive-loop-if-addr<=:
13422 0x11/imm32/alloc-id:fake:payload
13423 0x11/imm32/alloc-id:fake
13424 _string-loop-if-addr<=/imm32/name
13425 0/imm32/no-inouts
13426 0/imm32/no-inouts
13427 0/imm32/no-outputs
13428 0/imm32/no-outputs
13429 0x11/imm32/alloc-id:fake
13430 _string_0f_86_jump_loop/imm32/subx-name
13431 0/imm32/no-rm32
13432 0/imm32/no-r32
13433 0/imm32/no-imm32
13434 0/imm32/no-disp32
13435 0/imm32/no-output
13436 0x11/imm32/alloc-id:fake
13437 _Primitive-loop-if-addr>/imm32/next
13438 _Primitive-loop-if-addr>:
13439 0x11/imm32/alloc-id:fake:payload
13440 0x11/imm32/alloc-id:fake
13441 _string-loop-if-addr>/imm32/name
13442 0/imm32/no-inouts
13443 0/imm32/no-inouts
13444 0/imm32/no-outputs
13445 0/imm32/no-outputs
13446 0x11/imm32/alloc-id:fake
13447 _string_0f_87_jump_loop/imm32/subx-name
13448 0/imm32/no-rm32
13449 0/imm32/no-r32
13450 0/imm32/no-imm32
13451 0/imm32/no-disp32
13452 0/imm32/no-output
13453 0x11/imm32/alloc-id:fake
13454 _Primitive-loop-if-</imm32/next
13455 _Primitive-loop-if-<:
13456 0x11/imm32/alloc-id:fake:payload
13457 0x11/imm32/alloc-id:fake
13458 _string-loop-if-</imm32/name
13459 0/imm32/no-inouts
13460 0/imm32/no-inouts
13461 0/imm32/no-outputs
13462 0/imm32/no-outputs
13463 0x11/imm32/alloc-id:fake
13464 _string_0f_8c_jump_loop/imm32/subx-name
13465 0/imm32/no-rm32
13466 0/imm32/no-r32
13467 0/imm32/no-imm32
13468 0/imm32/no-disp32
13469 0/imm32/no-output
13470 0x11/imm32/alloc-id:fake
13471 _Primitive-loop-if->=/imm32/next
13472 _Primitive-loop-if->=:
13473 0x11/imm32/alloc-id:fake:payload
13474 0x11/imm32/alloc-id:fake
13475 _string-loop-if->=/imm32/name
13476 0/imm32/no-inouts
13477 0/imm32/no-inouts
13478 0/imm32/no-outputs
13479 0/imm32/no-outputs
13480 0x11/imm32/alloc-id:fake
13481 _string_0f_8d_jump_loop/imm32/subx-name
13482 0/imm32/no-rm32
13483 0/imm32/no-r32
13484 0/imm32/no-imm32
13485 0/imm32/no-disp32
13486 0/imm32/no-output
13487 0x11/imm32/alloc-id:fake
13488 _Primitive-loop-if-<=/imm32/next
13489 _Primitive-loop-if-<=:
13490 0x11/imm32/alloc-id:fake:payload
13491 0x11/imm32/alloc-id:fake
13492 _string-loop-if-<=/imm32/name
13493 0/imm32/no-inouts
13494 0/imm32/no-inouts
13495 0/imm32/no-outputs
13496 0/imm32/no-outputs
13497 0x11/imm32/alloc-id:fake
13498 _string_0f_8e_jump_loop/imm32/subx-name
13499 0/imm32/no-rm32
13500 0/imm32/no-r32
13501 0/imm32/no-imm32
13502 0/imm32/no-disp32
13503 0/imm32/no-output
13504 0x11/imm32/alloc-id:fake
13505 _Primitive-loop-if->/imm32/next
13506 _Primitive-loop-if->:
13507 0x11/imm32/alloc-id:fake:payload
13508 0x11/imm32/alloc-id:fake
13509 _string-loop-if->/imm32/name
13510 0/imm32/no-inouts
13511 0/imm32/no-inouts
13512 0/imm32/no-outputs
13513 0/imm32/no-outputs
13514 0x11/imm32/alloc-id:fake
13515 _string_0f_8f_jump_loop/imm32/subx-name
13516 0/imm32/no-rm32
13517 0/imm32/no-r32
13518 0/imm32/no-imm32
13519 0/imm32/no-disp32
13520 0/imm32/no-output
13521 0x11/imm32/alloc-id:fake
13522 _Primitive-loop/imm32/next
13523 _Primitive-loop:
13524 0x11/imm32/alloc-id:fake:payload
13525 0x11/imm32/alloc-id:fake
13526 _string-loop/imm32/name
13527 0/imm32/no-inouts
13528 0/imm32/no-inouts
13529 0/imm32/no-outputs
13530 0/imm32/no-outputs
13531 0x11/imm32/alloc-id:fake
13532 _string_e9_jump_loop/imm32/subx-name
13533 0/imm32/no-rm32
13534 0/imm32/no-r32
13535 0/imm32/no-imm32
13536 0/imm32/no-disp32
13537 0/imm32/no-output
13538 0x11/imm32/alloc-id:fake
13539 _Primitive-break-if-addr<-named/imm32/next
13540
13541 _Primitive-break-if-addr<-named:
13542 0x11/imm32/alloc-id:fake:payload
13543 0x11/imm32/alloc-id:fake
13544 _string-break-if-addr</imm32/name
13545 0x11/imm32/alloc-id:fake
13546 Single-lit-var/imm32/inouts
13547 0/imm32/no-outputs
13548 0/imm32/no-outputs
13549 0x11/imm32/alloc-id:fake
13550 _string_0f_82_jump_label/imm32/subx-name
13551 0/imm32/no-rm32
13552 0/imm32/no-r32
13553 0/imm32/no-imm32
13554 1/imm32/disp32-is-first-inout
13555 0/imm32/no-output
13556 0x11/imm32/alloc-id:fake
13557 _Primitive-break-if-addr>=-named/imm32/next
13558 _Primitive-break-if-addr>=-named:
13559 0x11/imm32/alloc-id:fake:payload
13560 0x11/imm32/alloc-id:fake
13561 _string-break-if-addr>=/imm32/name
13562 0x11/imm32/alloc-id:fake
13563 Single-lit-var/imm32/inouts
13564 0/imm32/no-outputs
13565 0/imm32/no-outputs
13566 0x11/imm32/alloc-id:fake
13567 _string_0f_83_jump_label/imm32/subx-name
13568 0/imm32/no-rm32
13569 0/imm32/no-r32
13570 0/imm32/no-imm32
13571 1/imm32/disp32-is-first-inout
13572 0/imm32/no-output
13573 0x11/imm32/alloc-id:fake
13574 _Primitive-break-if-=-named/imm32/next
13575 _Primitive-break-if-=-named:
13576 0x11/imm32/alloc-id:fake:payload
13577 0x11/imm32/alloc-id:fake
13578 _string-break-if-=/imm32/name
13579 0x11/imm32/alloc-id:fake
13580 Single-lit-var/imm32/inouts
13581 0/imm32/no-outputs
13582 0/imm32/no-outputs
13583 0x11/imm32/alloc-id:fake
13584 _string_0f_84_jump_label/imm32/subx-name
13585 0/imm32/no-rm32
13586 0/imm32/no-r32
13587 0/imm32/no-imm32
13588 1/imm32/disp32-is-first-inout
13589 0/imm32/no-output
13590 0x11/imm32/alloc-id:fake
13591 _Primitive-break-if-!=-named/imm32/next
13592 _Primitive-break-if-!=-named:
13593 0x11/imm32/alloc-id:fake:payload
13594 0x11/imm32/alloc-id:fake
13595 _string-break-if-!=/imm32/name
13596 0x11/imm32/alloc-id:fake
13597 Single-lit-var/imm32/inouts
13598 0/imm32/no-outputs
13599 0/imm32/no-outputs
13600 0x11/imm32/alloc-id:fake
13601 _string_0f_85_jump_label/imm32/subx-name
13602 0/imm32/no-rm32
13603 0/imm32/no-r32
13604 0/imm32/no-imm32
13605 1/imm32/disp32-is-first-inout
13606 0/imm32/no-output
13607 0x11/imm32/alloc-id:fake
13608 _Primitive-break-if-addr<=-named/imm32/next
13609 _Primitive-break-if-addr<=-named:
13610 0x11/imm32/alloc-id:fake:payload
13611 0x11/imm32/alloc-id:fake
13612 _string-break-if-addr<=/imm32/name
13613 0x11/imm32/alloc-id:fake
13614 Single-lit-var/imm32/inouts
13615 0/imm32/no-outputs
13616 0/imm32/no-outputs
13617 0x11/imm32/alloc-id:fake
13618 _string_0f_86_jump_label/imm32/subx-name
13619 0/imm32/no-rm32
13620 0/imm32/no-r32
13621 0/imm32/no-imm32
13622 1/imm32/disp32-is-first-inout
13623 0/imm32/no-output
13624 0x11/imm32/alloc-id:fake
13625 _Primitive-break-if-addr>-named/imm32/next
13626 _Primitive-break-if-addr>-named:
13627 0x11/imm32/alloc-id:fake:payload
13628 0x11/imm32/alloc-id:fake
13629 _string-break-if-addr>/imm32/name
13630 0x11/imm32/alloc-id:fake
13631 Single-lit-var/imm32/inouts
13632 0/imm32/no-outputs
13633 0/imm32/no-outputs
13634 0x11/imm32/alloc-id:fake
13635 _string_0f_87_jump_label/imm32/subx-name
13636 0/imm32/no-rm32
13637 0/imm32/no-r32
13638 0/imm32/no-imm32
13639 1/imm32/disp32-is-first-inout
13640 0/imm32/no-output
13641 0x11/imm32/alloc-id:fake
13642 _Primitive-break-if-<-named/imm32/next
13643 _Primitive-break-if-<-named:
13644 0x11/imm32/alloc-id:fake:payload
13645 0x11/imm32/alloc-id:fake
13646 _string-break-if-</imm32/name
13647 0x11/imm32/alloc-id:fake
13648 Single-lit-var/imm32/inouts
13649 0/imm32/no-outputs
13650 0/imm32/no-outputs
13651 0x11/imm32/alloc-id:fake
13652 _string_0f_8c_jump_label/imm32/subx-name
13653 0/imm32/no-rm32
13654 0/imm32/no-r32
13655 0/imm32/no-imm32
13656 1/imm32/disp32-is-first-inout
13657 0/imm32/no-output
13658 0x11/imm32/alloc-id:fake
13659 _Primitive-break-if->=-named/imm32/next
13660 _Primitive-break-if->=-named:
13661 0x11/imm32/alloc-id:fake:payload
13662 0x11/imm32/alloc-id:fake
13663 _string-break-if->=/imm32/name
13664 0x11/imm32/alloc-id:fake
13665 Single-lit-var/imm32/inouts
13666 0/imm32/no-outputs
13667 0/imm32/no-outputs
13668 0x11/imm32/alloc-id:fake
13669 _string_0f_8d_jump_label/imm32/subx-name
13670 0/imm32/no-rm32
13671 0/imm32/no-r32
13672 0/imm32/no-imm32
13673 1/imm32/disp32-is-first-inout
13674 0/imm32/no-output
13675 0x11/imm32/alloc-id:fake
13676 _Primitive-break-if-<=-named/imm32/next
13677 _Primitive-break-if-<=-named:
13678 0x11/imm32/alloc-id:fake:payload
13679 0x11/imm32/alloc-id:fake
13680 _string-break-if-<=/imm32/name
13681 0x11/imm32/alloc-id:fake
13682 Single-lit-var/imm32/inouts
13683 0/imm32/no-outputs
13684 0/imm32/no-outputs
13685 0x11/imm32/alloc-id:fake
13686 _string_0f_8e_jump_label/imm32/subx-name
13687 0/imm32/no-rm32
13688 0/imm32/no-r32
13689 0/imm32/no-imm32
13690 1/imm32/disp32-is-first-inout
13691 0/imm32/no-output
13692 0x11/imm32/alloc-id:fake
13693 _Primitive-break-if->-named/imm32/next
13694 _Primitive-break-if->-named:
13695 0x11/imm32/alloc-id:fake:payload
13696 0x11/imm32/alloc-id:fake
13697 _string-break-if->/imm32/name
13698 0x11/imm32/alloc-id:fake
13699 Single-lit-var/imm32/inouts
13700 0/imm32/no-outputs
13701 0/imm32/no-outputs
13702 0x11/imm32/alloc-id:fake
13703 _string_0f_8f_jump_label/imm32/subx-name
13704 0/imm32/no-rm32
13705 0/imm32/no-r32
13706 0/imm32/no-imm32
13707 1/imm32/disp32-is-first-inout
13708 0/imm32/no-output
13709 0x11/imm32/alloc-id:fake
13710 _Primitive-break-named/imm32/next
13711 _Primitive-break-named:
13712 0x11/imm32/alloc-id:fake:payload
13713 0x11/imm32/alloc-id:fake
13714 _string-break/imm32/name
13715 0x11/imm32/alloc-id:fake
13716 Single-lit-var/imm32/inouts
13717 0/imm32/no-outputs
13718 0/imm32/no-outputs
13719 0x11/imm32/alloc-id:fake
13720 _string_e9_jump_label/imm32/subx-name
13721 0/imm32/no-rm32
13722 0/imm32/no-r32
13723 0/imm32/no-imm32
13724 1/imm32/disp32-is-first-inout
13725 0/imm32/no-output
13726 0x11/imm32/alloc-id:fake
13727 _Primitive-loop-if-addr<-named/imm32/next
13728 _Primitive-loop-if-addr<-named:
13729 0x11/imm32/alloc-id:fake:payload
13730 0x11/imm32/alloc-id:fake
13731 _string-loop-if-addr</imm32/name
13732 0x11/imm32/alloc-id:fake
13733 Single-lit-var/imm32/inouts
13734 0/imm32/no-outputs
13735 0/imm32/no-outputs
13736 0x11/imm32/alloc-id:fake
13737 _string_0f_82_jump_label/imm32/subx-name
13738 0/imm32/no-rm32
13739 0/imm32/no-r32
13740 0/imm32/no-imm32
13741 1/imm32/disp32-is-first-inout
13742 0/imm32/no-output
13743 0x11/imm32/alloc-id:fake
13744 _Primitive-loop-if-addr>=-named/imm32/next
13745 _Primitive-loop-if-addr>=-named:
13746 0x11/imm32/alloc-id:fake:payload
13747 0x11/imm32/alloc-id:fake
13748 _string-loop-if-addr>=/imm32/name
13749 0x11/imm32/alloc-id:fake
13750 Single-lit-var/imm32/inouts
13751 0/imm32/no-outputs
13752 0/imm32/no-outputs
13753 0x11/imm32/alloc-id:fake
13754 _string_0f_83_jump_label/imm32/subx-name
13755 0/imm32/no-rm32
13756 0/imm32/no-r32
13757 0/imm32/no-imm32
13758 1/imm32/disp32-is-first-inout
13759 0/imm32/no-output
13760 0x11/imm32/alloc-id:fake
13761 _Primitive-loop-if-=-named/imm32/next
13762 _Primitive-loop-if-=-named:
13763 0x11/imm32/alloc-id:fake:payload
13764 0x11/imm32/alloc-id:fake
13765 _string-loop-if-=/imm32/name
13766 0x11/imm32/alloc-id:fake
13767 Single-lit-var/imm32/inouts
13768 0/imm32/no-outputs
13769 0/imm32/no-outputs
13770 0x11/imm32/alloc-id:fake
13771 _string_0f_84_jump_label/imm32/subx-name
13772 0/imm32/no-rm32
13773 0/imm32/no-r32
13774 0/imm32/no-imm32
13775 1/imm32/disp32-is-first-inout
13776 0/imm32/no-output
13777 0x11/imm32/alloc-id:fake
13778 _Primitive-loop-if-!=-named/imm32/next
13779 _Primitive-loop-if-!=-named:
13780 0x11/imm32/alloc-id:fake:payload
13781 0x11/imm32/alloc-id:fake
13782 _string-loop-if-!=/imm32/name
13783 0x11/imm32/alloc-id:fake
13784 Single-lit-var/imm32/inouts
13785 0/imm32/no-outputs
13786 0/imm32/no-outputs
13787 0x11/imm32/alloc-id:fake
13788 _string_0f_85_jump_label/imm32/subx-name
13789 0/imm32/no-rm32
13790 0/imm32/no-r32
13791 0/imm32/no-imm32
13792 1/imm32/disp32-is-first-inout
13793 0/imm32/no-output
13794 0x11/imm32/alloc-id:fake
13795 _Primitive-loop-if-addr<=-named/imm32/next
13796 _Primitive-loop-if-addr<=-named:
13797 0x11/imm32/alloc-id:fake:payload
13798 0x11/imm32/alloc-id:fake
13799 _string-loop-if-addr<=/imm32/name
13800 0x11/imm32/alloc-id:fake
13801 Single-lit-var/imm32/inouts
13802 0/imm32/no-outputs
13803 0/imm32/no-outputs
13804 0x11/imm32/alloc-id:fake
13805 _string_0f_86_jump_label/imm32/subx-name
13806 0/imm32/no-rm32
13807 0/imm32/no-r32
13808 0/imm32/no-imm32
13809 1/imm32/disp32-is-first-inout
13810 0/imm32/no-output
13811 0x11/imm32/alloc-id:fake
13812 _Primitive-loop-if-addr>-named/imm32/next
13813 _Primitive-loop-if-addr>-named:
13814 0x11/imm32/alloc-id:fake:payload
13815 0x11/imm32/alloc-id:fake
13816 _string-loop-if-addr>/imm32/name
13817 0x11/imm32/alloc-id:fake
13818 Single-lit-var/imm32/inouts
13819 0/imm32/no-outputs
13820 0/imm32/no-outputs
13821 0x11/imm32/alloc-id:fake
13822 _string_0f_87_jump_label/imm32/subx-name
13823 0/imm32/no-rm32
13824 0/imm32/no-r32
13825 0/imm32/no-imm32
13826 1/imm32/disp32-is-first-inout
13827 0/imm32/no-output
13828 0x11/imm32/alloc-id:fake
13829 _Primitive-loop-if-<-named/imm32/next
13830 _Primitive-loop-if-<-named:
13831 0x11/imm32/alloc-id:fake:payload
13832 0x11/imm32/alloc-id:fake
13833 _string-loop-if-</imm32/name
13834 0x11/imm32/alloc-id:fake
13835 Single-lit-var/imm32/inouts
13836 0/imm32/no-outputs
13837 0/imm32/no-outputs
13838 0x11/imm32/alloc-id:fake
13839 _string_0f_8c_jump_label/imm32/subx-name
13840 0/imm32/no-rm32
13841 0/imm32/no-r32
13842 0/imm32/no-imm32
13843 1/imm32/disp32-is-first-inout
13844 0/imm32/no-output
13845 0x11/imm32/alloc-id:fake
13846 _Primitive-loop-if->=-named/imm32/next
13847 _Primitive-loop-if->=-named:
13848 0x11/imm32/alloc-id:fake:payload
13849 0x11/imm32/alloc-id:fake
13850 _string-loop-if->=/imm32/name
13851 0x11/imm32/alloc-id:fake
13852 Single-lit-var/imm32/inouts
13853 0/imm32/no-outputs
13854 0/imm32/no-outputs
13855 0x11/imm32/alloc-id:fake
13856 _string_0f_8d_jump_label/imm32/subx-name
13857 0/imm32/no-rm32
13858 0/imm32/no-r32
13859 0/imm32/no-imm32
13860 1/imm32/disp32-is-first-inout
13861 0/imm32/no-output
13862 0x11/imm32/alloc-id:fake
13863 _Primitive-loop-if-<=-named/imm32/next
13864 _Primitive-loop-if-<=-named:
13865 0x11/imm32/alloc-id:fake:payload
13866 0x11/imm32/alloc-id:fake
13867 _string-loop-if-<=/imm32/name
13868 0x11/imm32/alloc-id:fake
13869 Single-lit-var/imm32/inouts
13870 0/imm32/no-outputs
13871 0/imm32/no-outputs
13872 0x11/imm32/alloc-id:fake
13873 _string_0f_8e_jump_label/imm32/subx-name
13874 0/imm32/no-rm32
13875 0/imm32/no-r32
13876 0/imm32/no-imm32
13877 1/imm32/disp32-is-first-inout
13878 0/imm32/no-output
13879 0x11/imm32/alloc-id:fake
13880 _Primitive-loop-if->-named/imm32/next
13881 _Primitive-loop-if->-named:
13882 0x11/imm32/alloc-id:fake:payload
13883 0x11/imm32/alloc-id:fake
13884 _string-loop-if->/imm32/name
13885 0x11/imm32/alloc-id:fake
13886 Single-lit-var/imm32/inouts
13887 0/imm32/no-outputs
13888 0/imm32/no-outputs
13889 0x11/imm32/alloc-id:fake
13890 _string_0f_8f_jump_label/imm32/subx-name
13891 0/imm32/no-rm32
13892 0/imm32/no-r32
13893 0/imm32/no-imm32
13894 1/imm32/disp32-is-first-inout
13895 0/imm32/no-output
13896 0x11/imm32/alloc-id:fake
13897 _Primitive-loop-named/imm32/next
13898 _Primitive-loop-named:
13899 0x11/imm32/alloc-id:fake:payload
13900 0x11/imm32/alloc-id:fake
13901 _string-loop/imm32/name
13902 0x11/imm32/alloc-id:fake
13903 Single-lit-var/imm32/inouts
13904 0/imm32/no-outputs
13905 0/imm32/no-outputs
13906 0x11/imm32/alloc-id:fake
13907 _string_e9_jump_label/imm32/subx-name
13908 0/imm32/no-rm32
13909 0/imm32/no-r32
13910 0/imm32/no-imm32
13911 1/imm32/disp32-is-first-inout
13912 0/imm32/no-output
13913 0/imm32/next
13914 0/imm32/next
13915
13916
13917 _string-add:
13918 0x11/imm32/alloc-id:fake:payload
13919
13920 0x3/imm32/size
13921 0x61/a 0x64/d 0x64/d
13922 _string-address:
13923 0x11/imm32/alloc-id:fake:payload
13924
13925 0x7/imm32/size
13926 0x61/a 0x64/d 0x64/d 0x72/r 0x65/e 0x73/s 0x73/s
13927 _string-add-to:
13928 0x11/imm32/alloc-id:fake:payload
13929
13930 0x6/imm32/size
13931 0x61/a 0x64/d 0x64/d 0x2d/dash 0x74/t 0x6f/o
13932 _string-and:
13933 0x11/imm32/alloc-id:fake:payload
13934
13935 0x3/imm32/size
13936 0x61/a 0x6e/n 0x64/d
13937 _string-and-with:
13938 0x11/imm32/alloc-id:fake:payload
13939
13940 0x8/imm32/size
13941 0x61/a 0x6e/n 0x64/d 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
13942 _string-break:
13943 0x11/imm32/alloc-id:fake:payload
13944
13945 0x5/imm32/size
13946 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k
13947 _string-break-if-<:
13948 0x11/imm32/alloc-id:fake:payload
13949
13950 0xa/imm32/size
13951 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/<
13952 _string-break-if-<=:
13953 0x11/imm32/alloc-id:fake:payload
13954
13955 0xb/imm32/size
13956 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/=
13957 _string-break-if-=:
13958 0x11/imm32/alloc-id:fake:payload
13959
13960 0xa/imm32/size
13961 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/=
13962 _string-break-if->:
13963 0x11/imm32/alloc-id:fake:payload
13964
13965 0xa/imm32/size
13966 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/>
13967 _string-break-if->=:
13968 0x11/imm32/alloc-id:fake:payload
13969
13970 0xb/imm32/size
13971 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/=
13972 _string-break-if-!=:
13973 0x11/imm32/alloc-id:fake:payload
13974
13975 0xb/imm32/size
13976 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/=
13977 _string-break-if-addr<:
13978 0x11/imm32/alloc-id:fake:payload
13979
13980 0xe/imm32/size
13981 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3c/<
13982 _string-break-if-addr<=:
13983 0x11/imm32/alloc-id:fake:payload
13984
13985 0xf/imm32/size
13986 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3c/< 0x3d/=
13987 _string-break-if-addr>:
13988 0x11/imm32/alloc-id:fake:payload
13989
13990 0xe/imm32/size
13991 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3e/>
13992 _string-break-if-addr>=:
13993 0x11/imm32/alloc-id:fake:payload
13994
13995 0xf/imm32/size
13996 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3e/> 0x3d/=
13997 _string-compare:
13998 0x11/imm32/alloc-id:fake:payload
13999
14000 0x7/imm32/size
14001 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e
14002 _string-copy:
14003 0x11/imm32/alloc-id:fake:payload
14004
14005 0x4/imm32/size
14006 0x63/c 0x6f/o 0x70/p 0x79/y
14007 _string-copy-to:
14008 0x11/imm32/alloc-id:fake:payload
14009
14010 0x7/imm32/size
14011 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x74/t 0x6f/o
14012 _string-copy-byte:
14013 0x11/imm32/alloc-id:fake:payload
14014
14015 0x9/imm32/size
14016 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/- 0x62/b 0x79/y 0x74/t 0x65/e
14017 _string-copy-byte-to:
14018 0x11/imm32/alloc-id:fake:payload
14019
14020 0xc/imm32/size
14021 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/- 0x62/b 0x79/y 0x74/t 0x65/e 0x2d/- 0x74/t 0x6f/o
14022 _string-decrement:
14023 0x11/imm32/alloc-id:fake:payload
14024
14025 0x9/imm32/size
14026 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t
14027 _string-increment:
14028 0x11/imm32/alloc-id:fake:payload
14029
14030 0x9/imm32/size
14031 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t
14032 _string-loop:
14033 0x11/imm32/alloc-id:fake:payload
14034
14035 0x4/imm32/size
14036 0x6c/l 0x6f/o 0x6f/o 0x70/p
14037 _string-loop-if-<:
14038 0x11/imm32/alloc-id:fake:payload
14039
14040 0x9/imm32/size
14041 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/<
14042 _string-loop-if-<=:
14043 0x11/imm32/alloc-id:fake:payload
14044
14045 0xa/imm32/size
14046 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/=
14047 _string-loop-if-=:
14048 0x11/imm32/alloc-id:fake:payload
14049
14050 0x9/imm32/size
14051 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/=
14052 _string-loop-if->:
14053 0x11/imm32/alloc-id:fake:payload
14054
14055 0x9/imm32/size
14056 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/>
14057 _string-loop-if->=:
14058 0x11/imm32/alloc-id:fake:payload
14059
14060 0xa/imm32/size
14061 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/=
14062 _string-loop-if-!=:
14063 0x11/imm32/alloc-id:fake:payload
14064
14065 0xa/imm32/size
14066 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/=
14067 _string-loop-if-addr<:
14068 0x11/imm32/alloc-id:fake:payload
14069
14070 0xd/imm32/size
14071 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3c/<
14072 _string-loop-if-addr<=:
14073 0x11/imm32/alloc-id:fake:payload
14074
14075 0xe/imm32/size
14076 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3c/< 0x3d/=
14077 _string-loop-if-addr>:
14078 0x11/imm32/alloc-id:fake:payload
14079
14080 0xd/imm32/size
14081 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3e/>
14082 _string-loop-if-addr>=:
14083 0x11/imm32/alloc-id:fake:payload
14084
14085 0xe/imm32/size
14086 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3e/> 0x3d/=
14087 _string-multiply:
14088 0x11/imm32/alloc-id:fake:payload
14089
14090 0x8/imm32/size
14091 0x6d/m 0x75/u 0x6c/l 0x74/t 0x69/i 0x70/p 0x6c/l 0x79/y
14092 _string-or:
14093 0x11/imm32/alloc-id:fake:payload
14094
14095 0x2/imm32/size
14096 0x6f/o 0x72/r
14097 _string-or-with:
14098 0x11/imm32/alloc-id:fake:payload
14099
14100 0x7/imm32/size
14101 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
14102 _string-subtract:
14103 0x11/imm32/alloc-id:fake:payload
14104
14105 0x8/imm32/size
14106 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t
14107 _string-subtract-from:
14108 0x11/imm32/alloc-id:fake:payload
14109
14110 0xd/imm32/size
14111 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t 0x2d/dash 0x66/f 0x72/r 0x6f/o 0x6d/m
14112 _string-xor:
14113 0x11/imm32/alloc-id:fake:payload
14114
14115 0x3/imm32/size
14116 0x78/x 0x6f/o 0x72/r
14117 _string-xor-with:
14118 0x11/imm32/alloc-id:fake:payload
14119
14120 0x8/imm32/size
14121 0x78/x 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
14122
14123
14124 _string_01_add_to:
14125 0x11/imm32/alloc-id:fake:payload
14126
14127 0x9/imm32/size
14128 0x30/0 0x31/1 0x2f/slash 0x61/a 0x64/d 0x64/d 0x2d/dash 0x74/t 0x6f/o
14129 _string_03_add:
14130 0x11/imm32/alloc-id:fake:payload
14131
14132 0x6/imm32/size
14133 0x30/0 0x33/3 0x2f/slash 0x61/a 0x64/d 0x64/d
14134 _string_05_add_to_eax:
14135 0x11/imm32/alloc-id:fake:payload
14136
14137 0xd/imm32/size
14138 0x30/0 0x35/5 0x2f/slash 0x61/a 0x64/d 0x64/d 0x2d/dash 0x74/t 0x6f/o 0x2d/dash 0x65/e 0x61/a 0x78/x
14139 _string_09_or_with:
14140 0x11/imm32/alloc-id:fake:payload
14141
14142 0xa/imm32/size
14143 0x30/0 0x39/9 0x2f/slash 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
14144 _string_0b_or:
14145 0x11/imm32/alloc-id:fake:payload
14146
14147 0x5/imm32/size
14148 0x30/0 0x62/b 0x2f/slash 0x6f/o 0x72/r
14149 _string_0d_or_with_eax:
14150 0x11/imm32/alloc-id:fake:payload
14151
14152 0xe/imm32/size
14153 0x30/0 0x64/d 0x2f/slash 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h 0x2d/dash 0x65/e 0x61/a 0x78/x
14154 _string_0f_82_jump_label:
14155 0x11/imm32/alloc-id:fake:payload
14156
14157 0x13/imm32/size
14158 0x30/0 0x66/f 0x20/space 0x38/8 0x32/2 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3c/<
14159 _string_0f_82_jump_break:
14160 0x11/imm32/alloc-id:fake:payload
14161
14162 0x20/imm32/size
14163 0x30/0 0x66/f 0x20/space 0x38/8 0x32/2 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3c/< 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14164 _string_0f_82_jump_loop:
14165 0x11/imm32/alloc-id:fake:payload
14166
14167 0x1f/imm32/size
14168 0x30/0 0x66/f 0x20/space 0x38/8 0x32/2 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3c/< 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14169 _string_0f_83_jump_label:
14170 0x11/imm32/alloc-id:fake:payload
14171
14172 0x14/imm32/size
14173 0x30/0 0x66/f 0x20/space 0x38/8 0x33/3 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3e/> 0x3d/=
14174 _string_0f_83_jump_break:
14175 0x11/imm32/alloc-id:fake:payload
14176
14177 0x21/imm32/size
14178 0x30/0 0x66/f 0x20/space 0x38/8 0x33/3 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3e/> 0x3d/= 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14179 _string_0f_83_jump_loop:
14180 0x11/imm32/alloc-id:fake:payload
14181
14182 0x20/imm32/size
14183 0x30/0 0x66/f 0x20/space 0x38/8 0x33/3 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3e/> 0x3d/= 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14184 _string_0f_84_jump_label:
14185 0x11/imm32/alloc-id:fake:payload
14186
14187 0xf/imm32/size
14188 0x30/0 0x66/f 0x20/space 0x38/8 0x34/4 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/=
14189 _string_0f_84_jump_break:
14190 0x11/imm32/alloc-id:fake:payload
14191
14192 0x1c/imm32/size
14193 0x30/0 0x66/f 0x20/space 0x38/8 0x34/4 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/= 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14194 _string_0f_84_jump_loop:
14195 0x11/imm32/alloc-id:fake:payload
14196
14197 0x1b/imm32/size
14198 0x30/0 0x66/f 0x20/space 0x38/8 0x34/4 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/= 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14199 _string_0f_85_jump_label:
14200 0x11/imm32/alloc-id:fake:payload
14201
14202 0x10/imm32/size
14203 0x30/0 0x66/f 0x20/space 0x38/8 0x35/5 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/=
14204 _string_0f_85_jump_break:
14205 0x11/imm32/alloc-id:fake:payload
14206
14207 0x1d/imm32/size
14208 0x30/0 0x66/f 0x20/space 0x38/8 0x35/5 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/= 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14209 _string_0f_85_jump_loop:
14210 0x11/imm32/alloc-id:fake:payload
14211
14212 0x1c/imm32/size
14213 0x30/0 0x66/f 0x20/space 0x38/8 0x35/5 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/= 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14214 _string_0f_86_jump_label:
14215 0x11/imm32/alloc-id:fake:payload
14216
14217 0x14/imm32/size
14218 0x30/0 0x66/f 0x20/space 0x38/8 0x36/6 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3c/< 0x3d/=
14219 _string_0f_86_jump_break:
14220 0x11/imm32/alloc-id:fake:payload
14221
14222 0x21/imm32/size
14223 0x30/0 0x66/f 0x20/space 0x38/8 0x36/6 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3c/< 0x3d/= 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14224 _string_0f_86_jump_loop:
14225 0x11/imm32/alloc-id:fake:payload
14226
14227 0x20/imm32/size
14228 0x30/0 0x66/f 0x20/space 0x38/8 0x36/6 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3c/< 0x3d/= 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14229 _string_0f_87_jump_label:
14230 0x11/imm32/alloc-id:fake:payload
14231
14232 0x13/imm32/size
14233 0x30/0 0x66/f 0x20/space 0x38/8 0x37/7 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3e/>
14234 _string_0f_87_jump_break:
14235 0x11/imm32/alloc-id:fake:payload
14236
14237 0x20/imm32/size
14238 0x30/0 0x66/f 0x20/space 0x38/8 0x37/7 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3e/> 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14239 _string_0f_87_jump_loop:
14240 0x11/imm32/alloc-id:fake:payload
14241
14242 0x1f/imm32/size
14243 0x30/0 0x66/f 0x20/space 0x38/8 0x37/7 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3e/> 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14244 _string_0f_8c_jump_label:
14245 0x11/imm32/alloc-id:fake:payload
14246
14247 0xf/imm32/size
14248 0x30/0 0x66/f 0x20/space 0x38/8 0x63/c 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/<
14249 _string_0f_8c_jump_break:
14250 0x11/imm32/alloc-id:fake:payload
14251
14252 0x1c/imm32/size
14253 0x30/0 0x66/f 0x20/space 0x38/8 0x63/c 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14254 _string_0f_8c_jump_loop:
14255 0x11/imm32/alloc-id:fake:payload
14256
14257 0x1b/imm32/size
14258 0x30/0 0x66/f 0x20/space 0x38/8 0x63/c 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14259 _string_0f_8d_jump_label:
14260 0x11/imm32/alloc-id:fake:payload
14261
14262 0x10/imm32/size
14263 0x30/0 0x66/f 0x20/space 0x38/8 0x64/d 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/=
14264 _string_0f_8d_jump_break:
14265 0x11/imm32/alloc-id:fake:payload
14266
14267 0x1d/imm32/size
14268 0x30/0 0x66/f 0x20/space 0x38/8 0x64/d 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/= 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14269 _string_0f_8d_jump_loop:
14270 0x11/imm32/alloc-id:fake:payload
14271
14272 0x1c/imm32/size
14273 0x30/0 0x66/f 0x20/space 0x38/8 0x64/d 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/= 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14274 _string_0f_8e_jump_label:
14275 0x11/imm32/alloc-id:fake:payload
14276
14277 0x10/imm32/size
14278 0x30/0 0x66/f 0x20/space 0x38/8 0x65/e 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/=
14279 _string_0f_8e_jump_break:
14280 0x11/imm32/alloc-id:fake:payload
14281
14282 0x1d/imm32/size
14283 0x30/0 0x66/f 0x20/space 0x38/8 0x65/e 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/= 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14284 _string_0f_8e_jump_loop:
14285 0x11/imm32/alloc-id:fake:payload
14286
14287 0x1c/imm32/size
14288 0x30/0 0x66/f 0x20/space 0x38/8 0x65/e 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/= 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14289 _string_0f_8f_jump_label:
14290 0x11/imm32/alloc-id:fake:payload
14291
14292 0xf/imm32/size
14293 0x30/0 0x66/f 0x20/space 0x38/8 0x66/f 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/>
14294 _string_0f_8f_jump_break:
14295 0x11/imm32/alloc-id:fake:payload
14296
14297 0x1c/imm32/size
14298 0x30/0 0x66/f 0x20/space 0x38/8 0x66/f 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14299 _string_0f_8f_jump_loop:
14300 0x11/imm32/alloc-id:fake:payload
14301
14302 0x1b/imm32/size
14303 0x30/0 0x66/f 0x20/space 0x38/8 0x66/f 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14304 _string_0f_af_multiply:
14305 0x11/imm32/alloc-id:fake:payload
14306
14307 0xe/imm32/size
14308 0x30/0 0x66/f 0x20/space 0x61/a 0x66/f 0x2f/slash 0x6d/m 0x75/u 0x6c/l 0x74/t 0x69/i 0x70/p 0x6c/l 0x79/y
14309 _string_21_and_with:
14310 0x11/imm32/alloc-id:fake:payload
14311
14312 0xb/imm32/size
14313 0x32/2 0x31/1 0x2f/slash 0x61/a 0x6e/n 0x64/d 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
14314 _string_23_and:
14315 0x11/imm32/alloc-id:fake:payload
14316
14317 0x6/imm32/size
14318 0x32/2 0x33/3 0x2f/slash 0x61/a 0x6e/n 0x64/d
14319 _string_25_and_with_eax:
14320 0x11/imm32/alloc-id:fake:payload
14321
14322 0xf/imm32/size
14323 0x32/2 0x35/5 0x2f/slash 0x61/a 0x6e/n 0x64/d 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h 0x2d/dash 0x65/e 0x61/a 0x78/x
14324 _string_29_subtract_from:
14325 0x11/imm32/alloc-id:fake:payload
14326
14327 0x10/imm32/size
14328 0x32/2 0x39/9 0x2f/slash 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t 0x2d/dash 0x66/f 0x72/r 0x6f/o 0x6d/m
14329 _string_2b_subtract:
14330 0x11/imm32/alloc-id:fake:payload
14331
14332 0xb/imm32/size
14333 0x32/2 0x62/b 0x2f/slash 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t
14334 _string_2d_subtract_from_eax:
14335 0x11/imm32/alloc-id:fake:payload
14336
14337 0x14/imm32/size
14338 0x32/2 0x64/d 0x2f/slash 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t 0x2d/dash 0x66/f 0x72/r 0x6f/o 0x6d/m 0x2d/dash 0x65/e 0x61/a 0x78/x
14339 _string_31_xor_with:
14340 0x11/imm32/alloc-id:fake:payload
14341
14342 0xb/imm32/size
14343 0x33/3 0x31/1 0x2f/slash 0x78/x 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
14344 _string_33_xor:
14345 0x11/imm32/alloc-id:fake:payload
14346
14347 0x6/imm32/size
14348 0x33/3 0x33/3 0x2f/slash 0x78/x 0x6f/o 0x72/r
14349 _string_35_xor_with_eax:
14350 0x11/imm32/alloc-id:fake:payload
14351
14352 0xf/imm32/size
14353 0x33/3 0x35/5 0x2f/slash 0x78/x 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h 0x2d/dash 0x65/e 0x61/a 0x78/x
14354 _string_39_compare->:
14355 0x11/imm32/alloc-id:fake:payload
14356
14357 0xc/imm32/size
14358 0x33/3 0x39/9 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e 0x2d/dash 0x3e/>
14359 _string_3b_compare<-:
14360 0x11/imm32/alloc-id:fake:payload
14361
14362 0xc/imm32/size
14363 0x33/3 0x62/b 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e 0x3c/< 0x2d/dash
14364 _string_3d_compare_eax_with:
14365 0x11/imm32/alloc-id:fake:payload
14366
14367 0x13/imm32/size
14368 0x33/3 0x64/d 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e 0x2d/dash 0x65/e 0x61/a 0x78/x 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
14369 _string_40_increment_eax:
14370 0x11/imm32/alloc-id:fake:payload
14371
14372 0x10/imm32/size
14373 0x34/4 0x30/0 0x2f/slash 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x61/a 0x78/x
14374 _string_41_increment_ecx:
14375 0x11/imm32/alloc-id:fake:payload
14376
14377 0x10/imm32/size
14378 0x34/4 0x31/1 0x2f/slash 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x63/c 0x78/x
14379 _string_42_increment_edx:
14380 0x11/imm32/alloc-id:fake:payload
14381
14382 0x10/imm32/size
14383 0x34/4 0x32/2 0x2f/slash 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x64/d 0x78/x
14384 _string_43_increment_ebx:
14385 0x11/imm32/alloc-id:fake:payload
14386
14387 0x10/imm32/size
14388 0x34/4 0x33/3 0x2f/slash 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x62/b 0x78/x
14389 _string_46_increment_esi:
14390 0x11/imm32/alloc-id:fake:payload
14391
14392 0x10/imm32/size
14393 0x34/4 0x36/6 0x2f/slash 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x73/s 0x69/i
14394 _string_47_increment_edi:
14395 0x11/imm32/alloc-id:fake:payload
14396
14397 0x10/imm32/size
14398 0x34/4 0x37/7 0x2f/slash 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x64/d 0x69/i
14399 _string_48_decrement_eax:
14400 0x11/imm32/alloc-id:fake:payload
14401
14402 0x10/imm32/size
14403 0x34/4 0x38/8 0x2f/slash 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x61/a 0x78/x
14404 _string_49_decrement_ecx:
14405 0x11/imm32/alloc-id:fake:payload
14406
14407 0x10/imm32/size
14408 0x34/4 0x39/9 0x2f/slash 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x63/c 0x78/x
14409 _string_4a_decrement_edx:
14410 0x11/imm32/alloc-id:fake:payload
14411
14412 0x10/imm32/size
14413 0x34/4 0x61/a 0x2f/slash 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x64/d 0x78/x
14414 _string_4b_decrement_ebx:
14415 0x11/imm32/alloc-id:fake:payload
14416
14417 0x10/imm32/size
14418 0x34/4 0x62/b 0x2f/slash 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x62/b 0x78/x
14419 _string_4e_decrement_esi:
14420 0x11/imm32/alloc-id:fake:payload
14421
14422 0x10/imm32/size
14423 0x34/4 0x65/e 0x2f/slash 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x73/s 0x69/i
14424 _string_4f_decrement_edi:
14425 0x11/imm32/alloc-id:fake:payload
14426
14427 0x10/imm32/size
14428 0x34/4 0x66/f 0x2f/slash 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x64/d 0x69/i
14429 _string_81_subop_add:
14430 0x11/imm32/alloc-id:fake:payload
14431
14432 0xe/imm32/size
14433 0x38/8 0x31/1 0x20/space 0x30/0 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x61/a 0x64/d 0x64/d
14434 _string_81_subop_or:
14435 0x11/imm32/alloc-id:fake:payload
14436
14437 0xd/imm32/size
14438 0x38/8 0x31/1 0x20/space 0x31/1 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x6f/o 0x72/r
14439 _string_81_subop_and:
14440 0x11/imm32/alloc-id:fake:payload
14441
14442 0xe/imm32/size
14443 0x38/8 0x31/1 0x20/space 0x34/4 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x61/a 0x6e/n 0x64/d
14444 _string_81_subop_subtract:
14445 0x11/imm32/alloc-id:fake:payload
14446
14447 0x13/imm32/size
14448 0x38/8 0x31/1 0x20/space 0x35/5 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t
14449 _string_81_subop_xor:
14450 0x11/imm32/alloc-id:fake:payload
14451
14452 0xe/imm32/size
14453 0x38/8 0x31/1 0x20/space 0x36/6 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x78/x 0x6f/o 0x72/r
14454 _string_81_subop_compare:
14455 0x11/imm32/alloc-id:fake:payload
14456
14457 0x12/imm32/size
14458 0x38/8 0x31/1 0x20/space 0x37/7 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e
14459 _string_89_<-:
14460 0x11/imm32/alloc-id:fake:payload
14461
14462 0x5/imm32/size
14463 0x38/8 0x39/9 0x2f/slash 0x3c/< 0x2d/dash
14464 _string_8b_->:
14465 0x11/imm32/alloc-id:fake:payload
14466
14467 0x5/imm32/size
14468 0x38/8 0x62/b 0x2f/slash 0x2d/dash 0x3e/>
14469 _string_8a_copy_byte:
14470 0x11/imm32/alloc-id:fake:payload
14471
14472 0x9/imm32/size
14473 0x38/8 0x61/a 0x2f// 0x62/b 0x79/y 0x74/t 0x65/e 0x2d/- 0x3e/>
14474 _string_88_copy_byte:
14475 0x11/imm32/alloc-id:fake:payload
14476
14477 0x9/imm32/size
14478 0x38/8 0x38/8 0x2f// 0x62/b 0x79/y 0x74/t 0x65/e 0x3c/< 0x2d/-
14479 _string_8d_copy_address:
14480 0x11/imm32/alloc-id:fake:payload
14481
14482 0xf/imm32/size
14483 0x38/8 0x64/d 0x2f/slash 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x65/e 0x73/s 0x73/s
14484 _string_b8_copy_to_eax:
14485 0x11/imm32/alloc-id:fake:payload
14486
14487 0xe/imm32/size
14488 0x62/b 0x38/8 0x2f/slash 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x74/t 0x6f/o 0x2d/dash 0x65/e 0x61/a 0x78/x
14489 _string_b9_copy_to_ecx:
14490 0x11/imm32/alloc-id:fake:payload
14491
14492 0xe/imm32/size
14493 0x62/b 0x39/9 0x2f/slash 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x74/t 0x6f/o 0x2d/dash 0x65/e 0x63/c 0x78/x
14494 _string_ba_copy_to_edx:
14495 0x11/imm32/alloc-id:fake:payload
14496
14497 0xe/imm32/size
14498 0x62/b 0x61/a 0x2f/slash 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x74/t 0x6f/o 0x2d/dash 0x65/e 0x64/d 0x78/x
14499 _string_bb_copy_to_ebx:
14500 0x11/imm32/alloc-id:fake:payload
14501
14502 0xe/imm32/size
14503 0x62/b 0x62/b 0x2f/slash 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x74/t 0x6f/o 0x2d/dash 0x65/e 0x62/b 0x78/x
14504 _string_be_copy_to_esi:
14505 0x11/imm32/alloc-id:fake:payload
14506
14507 0xe/imm32/size
14508 0x62/b 0x65/e 0x2f/slash 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x74/t 0x6f/o 0x2d/dash 0x65/e 0x73/s 0x69/i
14509 _string_bf_copy_to_edi:
14510 0x11/imm32/alloc-id:fake:payload
14511
14512 0xe/imm32/size
14513 0x62/b 0x66/f 0x2f/slash 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x74/t 0x6f/o 0x2d/dash 0x65/e 0x64/d 0x69/i
14514 _string_c7_subop_copy:
14515 0x11/imm32/alloc-id:fake:payload
14516
14517 0xf/imm32/size
14518 0x63/c 0x37/7 0x20/space 0x30/0 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x63/c 0x6f/o 0x70/p 0x79/y
14519 _string_e9_jump_label:
14520 0x11/imm32/alloc-id:fake:payload
14521
14522 0x7/imm32/size
14523 0x65/e 0x39/9 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p
14524 _string_e9_jump_break:
14525 0x11/imm32/alloc-id:fake:payload
14526
14527 0x14/imm32/size
14528 0x65/e 0x39/9 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14529 _string_e9_jump_loop:
14530 0x11/imm32/alloc-id:fake:payload
14531
14532 0x13/imm32/size
14533 0x65/e 0x39/9 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
14534 _string_ff_subop_increment:
14535 0x11/imm32/alloc-id:fake:payload
14536
14537 0x14/imm32/size
14538 0x66/f 0x66/f 0x20/space 0x30/0 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t
14539 _string_ff_subop_decrement:
14540 0x11/imm32/alloc-id:fake:payload
14541
14542 0x14/imm32/size
14543 0x66/f 0x66/f 0x31/1 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t
14544
14545 Single-int-var-in-mem:
14546 0x11/imm32/alloc-id:fake:payload
14547 0x11/imm32/alloc-id:fake
14548 Int-var-in-mem/imm32
14549 0/imm32/next
14550 0/imm32/next
14551
14552 Int-var-in-mem:
14553 0x11/imm32/alloc-id:fake:payload
14554 0/imm32/name
14555 0/imm32/name
14556 0x11/imm32/alloc-id:fake
14557 Type-int/imm32
14558 1/imm32/some-block-depth
14559 1/imm32/some-stack-offset
14560 0/imm32/no-register
14561 0/imm32/no-register
14562
14563
14564 Single-byte-var-in-mem:
14565 0x11/imm32/alloc-id:fake:payload
14566 0x11/imm32/alloc-id:fake
14567 Byte-var-in-mem/imm32
14568 0/imm32/next
14569 0/imm32/next
14570
14571
14572 Byte-var-in-mem:
14573 0x11/imm32/alloc-id:fake:payload
14574 0/imm32/name
14575 0/imm32/name
14576 0x11/imm32/alloc-id:fake
14577 Type-byte/imm32
14578 1/imm32/some-block-depth
14579 1/imm32/some-stack-offset
14580 0/imm32/no-register
14581 0/imm32/no-register
14582
14583 Two-args-int-stack-int-reg:
14584 0x11/imm32/alloc-id:fake:payload
14585 0x11/imm32/alloc-id:fake
14586 Int-var-in-mem/imm32
14587 0x11/imm32/alloc-id:fake
14588 Single-int-var-in-some-register/imm32/next
14589
14590 Two-int-args-in-regs:
14591 0x11/imm32/alloc-id:fake:payload
14592 0x11/imm32/alloc-id:fake
14593 Int-var-in-some-register/imm32
14594 0x11/imm32/alloc-id:fake
14595 Single-int-var-in-some-register/imm32/next
14596
14597
14598 Two-args-byte-stack-byte-reg:
14599 0x11/imm32/alloc-id:fake:payload
14600 0x11/imm32/alloc-id:fake
14601 Byte-var-in-mem/imm32
14602 0x11/imm32/alloc-id:fake
14603 Single-byte-var-in-some-register/imm32/next
14604
14605 Two-args-int-reg-int-stack:
14606 0x11/imm32/alloc-id:fake:payload
14607 0x11/imm32/alloc-id:fake
14608 Int-var-in-some-register/imm32
14609 0x11/imm32/alloc-id:fake
14610 Single-int-var-in-mem/imm32/next
14611
14612 Two-args-int-eax-int-literal:
14613 0x11/imm32/alloc-id:fake:payload
14614 0x11/imm32/alloc-id:fake
14615 Int-var-in-eax/imm32
14616 0x11/imm32/alloc-id:fake
14617 Single-lit-var/imm32/next
14618
14619 Int-var-and-literal:
14620 0x11/imm32/alloc-id:fake:payload
14621 0x11/imm32/alloc-id:fake
14622 Int-var-in-mem/imm32
14623 0x11/imm32/alloc-id:fake
14624 Single-lit-var/imm32/next
14625
14626 Int-var-in-register-and-literal:
14627 0x11/imm32/alloc-id:fake:payload
14628 0x11/imm32/alloc-id:fake
14629 Int-var-in-some-register/imm32
14630 0x11/imm32/alloc-id:fake
14631 Single-lit-var/imm32/next
14632
14633 Single-int-var-in-some-register:
14634 0x11/imm32/alloc-id:fake:payload
14635 0x11/imm32/alloc-id:fake
14636 Int-var-in-some-register/imm32
14637 0/imm32/next
14638 0/imm32/next
14639
14640 Single-addr-var-in-some-register:
14641 0x11/imm32/alloc-id:fake:payload
14642 0x11/imm32/alloc-id:fake
14643 Addr-var-in-some-register/imm32
14644 0/imm32/next
14645 0/imm32/next
14646
14647 Single-byte-var-in-some-register:
14648 0x11/imm32/alloc-id:fake:payload
14649 0x11/imm32/alloc-id:fake
14650 Byte-var-in-some-register/imm32
14651 0/imm32/next
14652 0/imm32/next
14653
14654 Int-var-in-some-register:
14655 0x11/imm32/alloc-id:fake:payload
14656 0/imm32/name
14657 0/imm32/name
14658 0x11/imm32/alloc-id:fake
14659 Type-int/imm32
14660 1/imm32/some-block-depth
14661 0/imm32/no-stack-offset
14662 0x11/imm32/alloc-id:fake
14663 Any-register/imm32
14664
14665 Any-register:
14666 0x11/imm32/alloc-id:fake:payload
14667 1/imm32/size
14668
14669 2a/asterisk
14670
14671 Addr-var-in-some-register:
14672 0x11/imm32/alloc-id:fake:payload
14673 0/imm32/name
14674 0/imm32/name
14675 0x11/imm32/alloc-id:fake
14676 Type-addr/imm32
14677 1/imm32/some-block-depth
14678 0/imm32/no-stack-offset
14679 0x11/imm32/alloc-id:fake
14680 Any-register/imm32
14681
14682 Byte-var-in-some-register:
14683 0x11/imm32/alloc-id:fake:payload
14684 0/imm32/name
14685 0/imm32/name
14686 0x11/imm32/alloc-id:fake
14687 Type-byte/imm32
14688 1/imm32/some-block-depth
14689 0/imm32/no-stack-offset
14690 0x11/imm32/alloc-id:fake
14691 Any-register/imm32
14692
14693 Single-int-var-in-eax:
14694 0x11/imm32/alloc-id:fake:payload
14695 0x11/imm32/alloc-id:fake
14696 Int-var-in-eax/imm32
14697 0/imm32/next
14698 0/imm32/next
14699
14700 Int-var-in-eax:
14701 0x11/imm32/alloc-id:fake:payload
14702 0/imm32/name
14703 0/imm32/name
14704 0x11/imm32/alloc-id:fake
14705 Type-int/imm32
14706 1/imm32/some-block-depth
14707 0/imm32/no-stack-offset
14708 0x11/imm32/alloc-id:fake
14709 $Register-eax/imm32
14710
14711 Single-int-var-in-ecx:
14712 0x11/imm32/alloc-id:fake:payload
14713 0x11/imm32/alloc-id:fake
14714 Int-var-in-ecx/imm32
14715 0/imm32/next
14716 0/imm32/next
14717
14718 Int-var-in-ecx:
14719 0x11/imm32/alloc-id:fake:payload
14720 0/imm32/name
14721 0/imm32/name
14722 0x11/imm32/alloc-id:fake
14723 Type-int/imm32
14724 1/imm32/some-block-depth
14725 0/imm32/no-stack-offset
14726 0x11/imm32/alloc-id:fake
14727 $Register-ecx/imm32/register
14728
14729 Single-int-var-in-edx:
14730 0x11/imm32/alloc-id:fake:payload
14731 0x11/imm32/alloc-id:fake
14732 Int-var-in-edx/imm32
14733 0/imm32/next
14734 0/imm32/next
14735
14736 Int-var-in-edx:
14737 0x11/imm32/alloc-id:fake:payload
14738 0/imm32/name
14739 0/imm32/name
14740 0x11/imm32/alloc-id:fake
14741 Type-int/imm32
14742 1/imm32/some-block-depth
14743 0/imm32/no-stack-offset
14744 0x11/imm32/alloc-id:fake
14745 $Register-edx/imm32/register
14746
14747 Single-int-var-in-ebx:
14748 0x11/imm32/alloc-id:fake:payload
14749 0x11/imm32/alloc-id:fake
14750 Int-var-in-ebx/imm32
14751 0/imm32/next
14752 0/imm32/next
14753
14754 Int-var-in-ebx:
14755 0x11/imm32/alloc-id:fake:payload
14756 0/imm32/name
14757 0/imm32/name
14758 0x11/imm32/alloc-id:fake
14759 Type-int/imm32
14760 1/imm32/some-block-depth
14761 0/imm32/no-stack-offset
14762 0x11/imm32/alloc-id:fake
14763 $Register-ebx/imm32/register
14764
14765 Single-int-var-in-esi:
14766 0x11/imm32/alloc-id:fake:payload
14767 0x11/imm32/alloc-id:fake
14768 Int-var-in-esi/imm32
14769 0/imm32/next
14770 0/imm32/next
14771
14772 Int-var-in-esi:
14773 0x11/imm32/alloc-id:fake:payload
14774 0/imm32/name
14775 0/imm32/name
14776 0x11/imm32/alloc-id:fake
14777 Type-int/imm32
14778 1/imm32/some-block-depth
14779 0/imm32/no-stack-offset
14780 0x11/imm32/alloc-id:fake
14781 $Register-esi/imm32/register
14782
14783 Single-int-var-in-edi:
14784 0x11/imm32/alloc-id:fake:payload
14785 0x11/imm32/alloc-id:fake
14786 Int-var-in-edi/imm32
14787 0/imm32/next
14788 0/imm32/next
14789
14790 Int-var-in-edi:
14791 0x11/imm32/alloc-id:fake:payload
14792 0/imm32/name
14793 0/imm32/name
14794 0x11/imm32/alloc-id:fake
14795 Type-int/imm32
14796 1/imm32/some-block-depth
14797 0/imm32/no-stack-offset
14798 0x11/imm32/alloc-id:fake
14799 $Register-edi/imm32/register
14800
14801 Single-lit-var:
14802 0x11/imm32/alloc-id:fake:payload
14803 0x11/imm32/alloc-id:fake
14804 Lit-var/imm32
14805 0/imm32/next
14806 0/imm32/next
14807
14808 Lit-var:
14809 0x11/imm32/alloc-id:fake:payload
14810 0/imm32/name
14811 0/imm32/name
14812 0x11/imm32/alloc-id:fake
14813 Type-literal/imm32
14814 1/imm32/some-block-depth
14815 0/imm32/no-stack-offset
14816 0/imm32/no-register
14817 0/imm32/no-register
14818
14819 Type-int:
14820 0x11/imm32/alloc-id:fake:payload
14821 1/imm32/left-is-atom
14822 1/imm32/value:int
14823 0/imm32/left:unused
14824 0/imm32/right:null
14825 0/imm32/right:null
14826
14827 Type-literal:
14828 0x11/imm32/alloc-id:fake:payload
14829 1/imm32/is-atom
14830 0/imm32/value:literal
14831 0/imm32/left:unused
14832 0/imm32/right:null
14833 0/imm32/right:null
14834
14835 Type-addr:
14836 0x11/imm32/alloc-id:fake:payload
14837 1/imm32/is-atom
14838 2/imm32/value:addr
14839 0/imm32/left:unused
14840 0/imm32/right:null
14841 0/imm32/right:null
14842
14843 Type-byte:
14844 0x11/imm32/alloc-id:fake:payload
14845 1/imm32/is-atom
14846 8/imm32/value:byte
14847 0/imm32/left:unused
14848 0/imm32/right:null
14849 0/imm32/right:null
14850
14851 == code
14852 emit-subx-primitive:
14853
14854 55/push-ebp
14855 89/<- %ebp 4/r32/esp
14856
14857 50/push-eax
14858 51/push-ecx
14859
14860 8b/-> *(ebp+0x10) 1/r32/ecx
14861
14862 (emit-indent *(ebp+8) *Curr-block-depth)
14863 (lookup *(ecx+0x18) *(ecx+0x1c))
14864 (write-buffered *(ebp+8) %eax)
14865
14866 (emit-subx-rm32 *(ebp+8) *(ecx+0x20) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
14867
14868 (emit-subx-r32 *(ebp+8) *(ecx+0x24) *(ebp+0xc))
14869
14870 (emit-subx-imm32 *(ebp+8) *(ecx+0x28) *(ebp+0xc))
14871
14872 (emit-subx-disp32 *(ebp+8) *(ecx+0x2c) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
14873 (write-buffered *(ebp+8) Newline)
14874 $emit-subx-primitive:end:
14875
14876 59/pop-to-ecx
14877 58/pop-to-eax
14878
14879 89/<- %esp 5/r32/ebp
14880 5d/pop-to-ebp
14881 c3/return
14882
14883 emit-subx-rm32:
14884
14885 55/push-ebp
14886 89/<- %ebp 4/r32/esp
14887
14888 50/push-eax
14889
14890 81 7/subop/compare *(ebp+0xc) 0/imm32
14891 74/jump-if-= $emit-subx-rm32:end/disp8
14892
14893 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
14894 (emit-subx-var-as-rm32 *(ebp+8) %eax)
14895 $emit-subx-rm32:end:
14896
14897 58/pop-to-eax
14898
14899 89/<- %esp 5/r32/ebp
14900 5d/pop-to-ebp
14901 c3/return
14902
14903 get-stmt-operand-from-arg-location:
14904
14905 55/push-ebp
14906 89/<- %ebp 4/r32/esp
14907
14908 51/push-ecx
14909
14910 8b/-> *(ebp+0xc) 0/r32/eax
14911
14912 8b/-> *(ebp+8) 1/r32/ecx
14913
14914 {
14915 3d/compare-eax-and 1/imm32
14916 75/jump-if-!= break/disp8
14917 $get-stmt-operand-from-arg-location:1:
14918 (lookup *(ecx+0xc) *(ecx+0x10))
14919 eb/jump $get-stmt-operand-from-arg-location:end/disp8
14920 }
14921
14922 {
14923 3d/compare-eax-and 2/imm32
14924 75/jump-if-!= break/disp8
14925 $get-stmt-operand-from-arg-location:2:
14926 (lookup *(ecx+0xc) *(ecx+0x10))
14927 (lookup *(eax+8) *(eax+0xc))
14928 eb/jump $get-stmt-operand-from-arg-location:end/disp8
14929 }
14930
14931 {
14932 3d/compare-eax-and 3/imm32
14933 75/jump-if-!= break/disp8
14934 $get-stmt-operand-from-arg-location:3:
14935 (lookup *(ecx+0x14) *(ecx+0x18))
14936 eb/jump $get-stmt-operand-from-arg-location:end/disp8
14937 }
14938
14939 e9/jump $get-stmt-operand-from-arg-location:abort/disp32
14940 $get-stmt-operand-from-arg-location:end:
14941
14942 59/pop-to-ecx
14943
14944 89/<- %esp 5/r32/ebp
14945 5d/pop-to-ebp
14946 c3/return
14947
14948 $get-stmt-operand-from-arg-location:abort:
14949
14950 (write-buffered *(ebp+0x10) "invalid arg-location ")
14951 (print-int32-buffered *(ebp+0x10) %eax)
14952 (write-buffered *(ebp+0x10) Newline)
14953 (flush *(ebp+0x10))
14954 (stop *(ebp+0x14) 1)
14955
14956
14957 emit-subx-r32:
14958
14959 55/push-ebp
14960 89/<- %ebp 4/r32/esp
14961
14962 50/push-eax
14963 51/push-ecx
14964
14965 81 7/subop/compare *(ebp+0xc) 0/imm32
14966 0f 84/jump-if-= $emit-subx-r32:end/disp32
14967
14968 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
14969 (lookup *eax *(eax+4))
14970 (lookup *(eax+0x18) *(eax+0x1c))
14971 (maybe-get Registers %eax 0xc)
14972 (write-buffered *(ebp+8) Space)
14973 (print-int32-buffered *(ebp+8) *eax)
14974 (write-buffered *(ebp+8) "/r32")
14975 $emit-subx-r32:end:
14976
14977 59/pop-to-ecx
14978 58/pop-to-eax
14979
14980 89/<- %esp 5/r32/ebp
14981 5d/pop-to-ebp
14982 c3/return
14983
14984 emit-subx-imm32:
14985
14986 55/push-ebp
14987 89/<- %ebp 4/r32/esp
14988
14989 50/push-eax
14990 51/push-ecx
14991
14992 81 7/subop/compare *(ebp+0xc) 0/imm32
14993 0f 84/jump-if-= $emit-subx-imm32:end/disp32
14994
14995 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
14996 (lookup *eax *(eax+4))
14997 (lookup *eax *(eax+4))
14998 (write-buffered *(ebp+8) Space)
14999 (write-buffered *(ebp+8) %eax)
15000 (write-buffered *(ebp+8) "/imm32")
15001 $emit-subx-imm32:end:
15002
15003 59/pop-to-ecx
15004 58/pop-to-eax
15005
15006 89/<- %esp 5/r32/ebp
15007 5d/pop-to-ebp
15008 c3/return
15009
15010 emit-subx-disp32:
15011
15012 55/push-ebp
15013 89/<- %ebp 4/r32/esp
15014
15015 50/push-eax
15016 51/push-ecx
15017
15018 81 7/subop/compare *(ebp+0xc) 0/imm32
15019 0f 84/jump-if-= $emit-subx-disp32:end/disp32
15020
15021 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
15022 (lookup *eax *(eax+4))
15023 (lookup *eax *(eax+4))
15024 (write-buffered *(ebp+8) Space)
15025 (write-buffered *(ebp+8) %eax)
15026
15027
15028 8b/-> *(ebp+0x10) 0/r32/eax
15029 (lookup *(eax+4) *(eax+8))
15030 89/<- %ecx 0/r32/eax
15031 {
15032 (string-starts-with? %ecx "break")
15033 3d/compare-eax-and 0/imm32/false
15034 74/jump-if-= break/disp8
15035 (write-buffered *(ebp+8) ":break")
15036 }
15037
15038 {
15039 (string-starts-with? %ecx "loop")
15040 3d/compare-eax-and 0/imm32/false
15041 74/jump-if-= break/disp8
15042 (write-buffered *(ebp+8) ":loop")
15043 }
15044 (write-buffered *(ebp+8) "/disp32")
15045 $emit-subx-disp32:end:
15046
15047 59/pop-to-ecx
15048 58/pop-to-eax
15049
15050 89/<- %esp 5/r32/ebp
15051 5d/pop-to-ebp
15052 c3/return
15053
15054 emit-call:
15055
15056 55/push-ebp
15057 89/<- %ebp 4/r32/esp
15058
15059 50/push-eax
15060 51/push-ecx
15061
15062 (emit-indent *(ebp+8) *Curr-block-depth)
15063 (write-buffered *(ebp+8) "(")
15064
15065 8b/-> *(ebp+0xc) 1/r32/ecx
15066
15067 (lookup *(ecx+4) *(ecx+8))
15068 (write-buffered *(ebp+8) %eax)
15069
15070
15071 (lookup *(ecx+0xc) *(ecx+0x10))
15072 {
15073
15074 3d/compare-eax-and 0/imm32
15075 74/jump-if-= break/disp8
15076
15077 (emit-subx-call-operand *(ebp+8) %eax)
15078
15079 (lookup *(eax+8) *(eax+0xc))
15080 eb/jump loop/disp8
15081 }
15082
15083 (write-buffered *(ebp+8) ")\n")
15084 $emit-call:end:
15085
15086 59/pop-to-ecx
15087 58/pop-to-eax
15088
15089 89/<- %esp 5/r32/ebp
15090 5d/pop-to-ebp
15091 c3/return
15092
15093 emit-subx-call-operand:
15094
15095
15096 55/push-ebp
15097 89/<- %ebp 4/r32/esp
15098
15099 50/push-eax
15100 51/push-ecx
15101 56/push-esi
15102
15103 8b/-> *(ebp+0xc) 1/r32/ecx
15104
15105 (lookup *ecx *(ecx+4))
15106 89/<- %esi 0/r32/eax
15107
15108 {
15109 $emit-subx-call-operand:check-for-register-direct:
15110 81 7/subop/compare *(esi+0x18) 0/imm32
15111 74/jump-if-= break/disp8
15112 81 7/subop/compare *(ecx+0x10) 0/imm32/false
15113 75/jump-if-!= break/disp8
15114 $emit-subx-call-operand:register-direct:
15115 (write-buffered *(ebp+8) " %")
15116 (lookup *(esi+0x18) *(esi+0x1c))
15117 (write-buffered *(ebp+8) %eax)
15118 e9/jump $emit-subx-call-operand:end/disp32
15119 }
15120
15121 {
15122 $emit-subx-call-operand:check-for-register-indirect:
15123 81 7/subop/compare *(esi+0x18) 0/imm32
15124 74/jump-if-= break/disp8
15125 81 7/subop/compare *(ecx+0x10) 0/imm32/false
15126 74/jump-if-= break/disp8
15127 $emit-subx-call-operand:register-indirect:
15128 (emit-subx-call-operand-register-indirect *(ebp+8) %esi)
15129 e9/jump $emit-subx-call-operand:end/disp32
15130 }
15131
15132 {
15133 81 7/subop/compare *(esi+0x14) 0/imm32
15134 74/jump-if-= break/disp8
15135 $emit-subx-call-operand:stack:
15136 (emit-subx-call-operand-stack *(ebp+8) %esi)
15137 e9/jump $emit-subx-call-operand:end/disp32
15138 }
15139
15140 {
15141 (lookup *(esi+8) *(esi+0xc))
15142 81 7/subop/compare *(eax+4) 0/imm32
15143 75/jump-if-!= break/disp8
15144 $emit-subx-call-operand:literal:
15145 (write-buffered *(ebp+8) Space)
15146 (lookup *esi *(esi+4))
15147 (write-buffered *(ebp+8) %eax)
15148 }
15149 $emit-subx-call-operand:end:
15150
15151 5e/pop-to-esi
15152 59/pop-to-ecx
15153 58/pop-to-eax
15154
15155 89/<- %esp 5/r32/ebp
15156 5d/pop-to-ebp
15157 c3/return
15158
15159 emit-subx-call-operand-register-indirect:
15160
15161 55/push-ebp
15162 89/<- %ebp 4/r32/esp
15163
15164 50/push-eax
15165 51/push-ecx
15166 56/push-esi
15167
15168 8b/-> *(ebp+0xc) 6/r32/esi
15169
15170 (size-of-deref %esi)
15171 89/<- %ecx 0/r32/eax
15172
15173 (lookup *(esi+0x18) *(esi+0x1c))
15174 89/<- %esi 0/r32/eax
15175
15176
15177 b8/copy-to-eax 0/imm32
15178 {
15179 $emit-subx-call-operand-register-indirect:loop:
15180
15181 39/compare %eax 1/r32/ecx
15182 7d/jump-if->= break/disp8
15183
15184 (write-buffered *(ebp+8) " *(")
15185 (write-buffered *(ebp+8) %esi)
15186 (write-buffered *(ebp+8) "+")
15187 (print-int32-buffered *(ebp+8) %eax)
15188 (write-buffered *(ebp+8) ")")
15189
15190 05/add-to-eax 4/imm32
15191
15192 eb/jump loop/disp8
15193 }
15194 $emit-subx-call-operand-register-indirect:end:
15195
15196 5e/pop-to-esi
15197 59/pop-to-ecx
15198 58/pop-to-eax
15199
15200 89/<- %esp 5/r32/ebp
15201 5d/pop-to-ebp
15202 c3/return
15203
15204 emit-subx-call-operand-stack:
15205
15206 55/push-ebp
15207 89/<- %ebp 4/r32/esp
15208
15209 50/push-eax
15210 51/push-ecx
15211 56/push-esi
15212
15213 8b/-> *(ebp+0xc) 6/r32/esi
15214
15215 8b/-> *(esi+0x14) 1/r32/ecx
15216
15217 (size-of %esi)
15218
15219 01/add-to %eax 1/r32/ecx
15220 {
15221 $emit-subx-call-operand-stack:loop:
15222
15223 39/compare %ecx 0/r32/eax
15224 7d/jump-if->= break/disp8
15225
15226 (write-buffered *(ebp+8) " *(ebp+")
15227 (print-int32-buffered *(ebp+8) %ecx)
15228 (write-buffered *(ebp+8) ")")
15229
15230 81 0/subop/add %ecx 4/imm32
15231
15232 eb/jump loop/disp8
15233 }
15234 $emit-subx-call-operand-stack:end:
15235
15236 5e/pop-to-esi
15237 59/pop-to-ecx
15238 58/pop-to-eax
15239
15240 89/<- %esp 5/r32/ebp
15241 5d/pop-to-ebp
15242 c3/return
15243
15244 emit-subx-var-as-rm32:
15245
15246 55/push-ebp
15247 89/<- %ebp 4/r32/esp
15248
15249 50/push-eax
15250 51/push-ecx
15251 56/push-esi
15252
15253 8b/-> *(ebp+0xc) 1/r32/ecx
15254
15255 (lookup *ecx *(ecx+4))
15256 89/<- %esi 0/r32/eax
15257
15258 {
15259 $emit-subx-var-as-rm32:check-for-register-indirect:
15260 81 7/subop/compare *(esi+0x18) 0/imm32
15261 74/jump-if-= break/disp8
15262 81 7/subop/compare *(ecx+0x10) 0/imm32/false
15263 74/jump-if-= break/disp8
15264 $emit-subx-var-as-rm32:register-indirect:
15265 (write-buffered *(ebp+8) " *")
15266 (lookup *(esi+0x18) *(esi+0x1c))
15267 (write-buffered *(ebp+8) %eax)
15268 e9/jump $emit-subx-var-as-rm32:end/disp32
15269 }
15270
15271 {
15272 $emit-subx-var-as-rm32:check-for-register-direct:
15273 81 7/subop/compare *(esi+0x18) 0/imm32
15274 74/jump-if-= break/disp8
15275 81 7/subop/compare *(ecx+0x10) 0/imm32/false
15276 75/jump-if-!= break/disp8
15277 $emit-subx-var-as-rm32:register-direct:
15278 (write-buffered *(ebp+8) " %")
15279 (lookup *(esi+0x18) *(esi+0x1c))
15280 (write-buffered *(ebp+8) %eax)
15281 e9/jump $emit-subx-var-as-rm32:end/disp32
15282 }
15283
15284 {
15285 81 7/subop/compare *(esi+0x14) 0/imm32
15286 74/jump-if-= break/disp8
15287 $emit-subx-var-as-rm32:stack:
15288 (write-buffered *(ebp+8) Space)
15289 (write-buffered *(ebp+8) "*(ebp+")
15290 (print-int32-buffered *(ebp+8) *(esi+0x14))
15291 (write-buffered *(ebp+8) ")")
15292 }
15293 $emit-subx-var-as-rm32:end:
15294
15295 5e/pop-to-esi
15296 59/pop-to-ecx
15297 58/pop-to-eax
15298
15299 89/<- %esp 5/r32/ebp
15300 5d/pop-to-ebp
15301 c3/return
15302
15303 find-matching-primitive:
15304
15305 55/push-ebp
15306 89/<- %ebp 4/r32/esp
15307
15308 51/push-ecx
15309
15310 8b/-> *(ebp+8) 1/r32/ecx
15311 {
15312 $find-matching-primitive:loop:
15313
15314 81 7/subop/compare %ecx 0/imm32
15315 74/jump-if-= break/disp8
15316
15317 {
15318 (mu-stmt-matches-primitive? *(ebp+0xc) %ecx)
15319 3d/compare-eax-and 0/imm32/false
15320 74/jump-if-= break/disp8
15321 89/<- %eax 1/r32/ecx
15322 eb/jump $find-matching-primitive:end/disp8
15323 }
15324 $find-matching-primitive:next-primitive:
15325
15326 (lookup *(ecx+0x34) *(ecx+0x38))
15327 89/<- %ecx 0/r32/eax
15328
15329 e9/jump loop/disp32
15330 }
15331
15332 b8/copy-to-eax 0/imm32
15333 $find-matching-primitive:end:
15334
15335 59/pop-to-ecx
15336
15337 89/<- %esp 5/r32/ebp
15338 5d/pop-to-ebp
15339 c3/return
15340
15341 mu-stmt-matches-primitive?:
15342
15343
15344
15345
15346
15347
15348 55/push-ebp
15349 89/<- %ebp 4/r32/esp
15350
15351 51/push-ecx
15352 52/push-edx
15353 53/push-ebx
15354 56/push-esi
15355 57/push-edi
15356
15357 8b/-> *(ebp+8) 1/r32/ecx
15358
15359 8b/-> *(ebp+0xc) 2/r32/edx
15360 {
15361 $mu-stmt-matches-primitive?:check-name:
15362
15363
15364 (lookup *(ecx+4) *(ecx+8))
15365 89/<- %esi 0/r32/eax
15366
15367 (lookup *edx *(edx+4))
15368 89/<- %edi 0/r32/eax
15369 (string-equal? %esi %edi)
15370 3d/compare-eax-and 0/imm32/false
15371 75/jump-if-!= break/disp8
15372 b8/copy-to-eax 0/imm32
15373 e9/jump $mu-stmt-matches-primitive?:end/disp32
15374 }
15375
15376 (lookup *(ecx+0xc) *(ecx+0x10))
15377 89/<- %esi 0/r32/eax
15378
15379 (lookup *(edx+8) *(edx+0xc))
15380 89/<- %edi 0/r32/eax
15381 {
15382 $mu-stmt-matches-primitive?:inouts-loop:
15383
15384 {
15385 $mu-stmt-matches-primitive?:check-both-inouts-null:
15386 81 7/subop/compare %esi 0/imm32
15387 75/jump-if-!= break/disp8
15388 $mu-stmt-matches-primitive?:stmt-inout-null:
15389 81 7/subop/compare %edi 0/imm32
15390 0f 84/jump-if-= $mu-stmt-matches-primitive?:check-outputs/disp32
15391 $mu-stmt-matches-primitive?:stmt-inout-null-and-prim-inout-not-null:
15392
15393 b8/copy-to-eax 0/imm32/false
15394 e9/jump $mu-stmt-matches-primitive?:end/disp32
15395 }
15396
15397 {
15398 $mu-stmt-matches-primitive?:check-prim-inout-null:
15399 81 7/subop/compare %edi 0/imm32
15400 75/jump-if-!= break/disp8
15401 $mu-stmt-matches-primitive?:prim-inout-null:
15402 b8/copy-to-eax 0/imm32/false
15403 e9/jump $mu-stmt-matches-primitive?:end/disp32
15404 }
15405
15406 {
15407 $mu-stmt-matches-primitive?:check-inouts-match:
15408 (lookup *edi *(edi+4))
15409 (operand-matches-primitive? %esi %eax)
15410 3d/compare-eax-and 0/imm32/false
15411 75/jump-if-!= break/disp8
15412 $mu-stmt-matches-primitive?:inouts-match:
15413 b8/copy-to-eax 0/imm32/false
15414 e9/jump $mu-stmt-matches-primitive?:end/disp32
15415 }
15416 $mu-stmt-matches-primitive?:next-inout:
15417
15418 (lookup *(esi+8) *(esi+0xc))
15419 89/<- %esi 0/r32/eax
15420
15421 (lookup *(edi+8) *(edi+0xc))
15422 89/<- %edi 0/r32/eax
15423
15424 e9/jump loop/disp32
15425 }
15426 $mu-stmt-matches-primitive?:check-outputs:
15427
15428 (lookup *(ecx+0x14) *(ecx+0x18))
15429 89/<- %esi 0/r32/eax
15430
15431 (lookup *(edx+0x10) *(edx+0x14))
15432 89/<- %edi 0/r32/eax
15433 {
15434 $mu-stmt-matches-primitive?:outputs-loop:
15435
15436 {
15437 $mu-stmt-matches-primitive?:check-both-outputs-null:
15438 81 7/subop/compare %esi 0/imm32
15439 75/jump-if-!= break/disp8
15440 {
15441 $mu-stmt-matches-primitive?:stmt-output-null:
15442 81 7/subop/compare %edi 0/imm32
15443 75/jump-if-!= break/disp8
15444 $mu-stmt-matches-primitive?:both-outputs-null:
15445
15446 b8/copy-to-eax 1/imm32
15447 e9/jump $mu-stmt-matches-primitive?:end/disp32
15448 }
15449 $mu-stmt-matches-primitive?:stmt-output-null-and-prim-output-not-null:
15450
15451 b8/copy-to-eax 0/imm32
15452 e9/jump $mu-stmt-matches-primitive?:end/disp32
15453 }
15454
15455 {
15456 $mu-stmt-matches-primitive?:check-prim-output-null:
15457 81 7/subop/compare %edi 0/imm32
15458 75/jump-if-!= break/disp8
15459 $mu-stmt-matches-primitive?:prim-output-is-null:
15460 b8/copy-to-eax 0/imm32
15461 e9/jump $mu-stmt-matches-primitive?:end/disp32
15462 }
15463
15464 {
15465 $mu-stmt-matches-primitive?:check-outputs-match:
15466 (lookup *edi *(edi+4))
15467 (operand-matches-primitive? %esi %eax)
15468 3d/compare-eax-and 0/imm32/false
15469 75/jump-if-!= break/disp8
15470 $mu-stmt-matches-primitive?:outputs-match:
15471 b8/copy-to-eax 0/imm32
15472 e9/jump $mu-stmt-matches-primitive?:end/disp32
15473 }
15474 $mu-stmt-matches-primitive?:next-output:
15475
15476 (lookup *(esi+8) *(esi+0xc))
15477 89/<- %esi 0/r32/eax
15478
15479 (lookup *(edi+8) *(edi+0xc))
15480 89/<- %edi 0/r32/eax
15481
15482 e9/jump loop/disp32
15483 }
15484 $mu-stmt-matches-primitive?:return-true:
15485 b8/copy-to-eax 1/imm32
15486 $mu-stmt-matches-primitive?:end:
15487
15488 5f/pop-to-edi
15489 5e/pop-to-esi
15490 5b/pop-to-ebx
15491 5a/pop-to-edx
15492 59/pop-to-ecx
15493
15494 89/<- %esp 5/r32/ebp
15495 5d/pop-to-ebp
15496 c3/return
15497
15498 operand-matches-primitive?:
15499
15500 55/push-ebp
15501 89/<- %ebp 4/r32/esp
15502
15503 51/push-ecx
15504 52/push-edx
15505 53/push-ebx
15506 56/push-esi
15507 57/push-edi
15508
15509 8b/-> *(ebp+8) 1/r32/ecx
15510
15511 (lookup *ecx *(ecx+4))
15512 89/<- %esi 0/r32/eax
15513
15514 8b/-> *(ebp+0xc) 7/r32/edi
15515 $operand-matches-primitive?:check-type:
15516
15517
15518 (lookup *(esi+8) *(esi+0xc))
15519 89/<- %ebx 0/r32/eax
15520
15521 (lookup *(edi+8) *(edi+0xc))
15522 (subx-type-equal? %ebx %eax)
15523 3d/compare-eax-and 0/imm32/false
15524 0f 84/jump-if-= $operand-matches-primitive?:return-false/disp32
15525 {
15526 $operand-matches-primitive?:check-register:
15527
15528 {
15529 81 7/subop/compare *(edi+0x18) 0/imm32
15530 0f 85/jump-if-!= break/disp32
15531 81 7/subop/compare *(esi+0x18) 0/imm32
15532 74/jump-if-= break/disp8
15533 81 7/subop/compare *(ecx+0x10) 0/imm32/false
15534 74/jump-if-= break/disp8
15535 $operand-matches-primitive?:var-deref-match:
15536 e9/jump $operand-matches-primitive?:return-true/disp32
15537 }
15538
15539 {
15540 81 7/subop/compare *(edi+0x18) 0/imm32
15541 0f 84/jump-if-= break/disp32
15542 81 7/subop/compare *(esi+0x18) 0/imm32
15543 0f 84/jump-if-= break/disp32
15544 81 7/subop/compare *(ecx+0x10) 0/imm32/false
15545 74/jump-if-= break/disp8
15546 $operand-matches-primitive?:var-deref-no-match:
15547 e9/jump $operand-matches-primitive?:return-false/disp32
15548 }
15549
15550 {
15551
15552
15553 (lookup *(esi+0x18) *(esi+0x1c))
15554 89/<- %ebx 0/r32/eax
15555
15556 (lookup *(edi+0x18) *(edi+0x1c))
15557 89/<- %ecx 0/r32/eax
15558
15559 39/compare %ecx 3/r32/ebx
15560 74/jump-if-= break/disp8
15561 $operand-matches-primitive?:var-register-no-match:
15562
15563 81 7/subop/compare %ebx 0/imm32
15564 74/jump-if-= $operand-matches-primitive?:return-false/disp8
15565 81 7/subop/compare %ecx 0/imm32
15566 74/jump-if-= $operand-matches-primitive?:return-false/disp8
15567
15568 (string-equal? %ecx "*")
15569 3d/compare-eax-and 0/imm32/false
15570 75/jump-if-!= break/disp8
15571 $operand-matches-primitive?:wildcard-no-match:
15572
15573 (string-equal? %ecx %ebx)
15574 3d/compare-eax-and 0/imm32/false
15575 74/jump-if-= $operand-matches-primitive?:return-false/disp8
15576 }
15577 }
15578 $operand-matches-primitive?:return-true:
15579 b8/copy-to-eax 1/imm32/true
15580 eb/jump $operand-matches-primitive?:end/disp8
15581 $operand-matches-primitive?:return-false:
15582 b8/copy-to-eax 0/imm32/false
15583 $operand-matches-primitive?:end:
15584
15585 5f/pop-to-edi
15586 5e/pop-to-esi
15587 5b/pop-to-ebx
15588 5a/pop-to-edx
15589 59/pop-to-ecx
15590
15591 89/<- %esp 5/r32/ebp
15592 5d/pop-to-ebp
15593 c3/return
15594
15595 find-matching-function:
15596
15597 55/push-ebp
15598 89/<- %ebp 4/r32/esp
15599
15600 51/push-ecx
15601
15602 8b/-> *(ebp+8) 1/r32/ecx
15603 {
15604
15605 81 7/subop/compare %ecx 0/imm32
15606 74/jump-if-= break/disp8
15607
15608
15609
15610 {
15611 (mu-stmt-matches-function? *(ebp+0xc) %ecx)
15612 3d/compare-eax-and 0/imm32/false
15613 74/jump-if-= break/disp8
15614 89/<- %eax 1/r32/ecx
15615 eb/jump $find-matching-function:end/disp8
15616 }
15617
15618 (lookup *(ecx+0x20) *(ecx+0x24))
15619 89/<- %ecx 0/r32/eax
15620
15621 eb/jump loop/disp8
15622 }
15623
15624 b8/copy-to-eax 0/imm32
15625 $find-matching-function:end:
15626
15627 59/pop-to-ecx
15628
15629 89/<- %esp 5/r32/ebp
15630 5d/pop-to-ebp
15631 c3/return
15632
15633
15634 mu-stmt-matches-function?:
15635
15636 55/push-ebp
15637 89/<- %ebp 4/r32/esp
15638
15639 51/push-ecx
15640
15641
15642 8b/-> *(ebp+8) 0/r32/eax
15643 (lookup *(eax+4) *(eax+8))
15644 89/<- %ecx 0/r32/eax
15645
15646 8b/-> *(ebp+0xc) 0/r32/eax
15647 (lookup *eax *(eax+4))
15648 (string-equal? %eax %ecx)
15649 $mu-stmt-matches-function?:end:
15650
15651 59/pop-to-ecx
15652
15653 89/<- %esp 5/r32/ebp
15654 5d/pop-to-ebp
15655 c3/return
15656
15657 subx-type-equal?:
15658
15659 55/push-ebp
15660 89/<- %ebp 4/r32/esp
15661
15662 51/push-ecx
15663
15664 (is-simple-mu-type? *(ebp+8) 0)
15665 89/<- %ecx 0/r32/eax
15666
15667 (is-simple-mu-type? *(ebp+0xc) 0)
15668
15669 39/compare %eax 1/r32/ecx
15670 0f 94/set-byte-if-= %al
15671 81 4/subop/and %eax 0xff/imm32
15672 $subx-type-equal?:end:
15673
15674 59/pop-to-ecx
15675
15676 89/<- %esp 5/r32/ebp
15677 5d/pop-to-ebp
15678 c3/return
15679
15680 is-simple-mu-type?:
15681
15682 55/push-ebp
15683 89/<- %ebp 4/r32/esp
15684
15685 51/push-ecx
15686
15687 8b/-> *(ebp+0xc) 1/r32/ecx
15688
15689 8b/-> *(ebp+8) 0/r32/eax
15690 39/compare *(eax+4) 1/r32/ecx
15691 0f 94/set-byte-if-= %al
15692 81 4/subop/and %eax 0xff/imm32
15693 $is-simple-mu-type?:end:
15694
15695 59/pop-to-ecx
15696
15697 89/<- %esp 5/r32/ebp
15698 5d/pop-to-ebp
15699 c3/return
15700
15701 test-emit-subx-stmt-primitive:
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718 55/push-ebp
15719 89/<- %ebp 4/r32/esp
15720
15721 (clear-stream _test-output-stream)
15722 (clear-stream $_test-output-buffered-file->buffer)
15723
15724 $test-emit-subx-stmt-primitive:initialize-type:
15725
15726 68/push 0/imm32/right:null
15727 68/push 0/imm32/right:null
15728 68/push 0/imm32/left:unused
15729 68/push 1/imm32/value:int
15730 68/push 1/imm32/is-atom?:true
15731 68/push 0x11/imm32/alloc-id:fake:payload
15732 89/<- %ecx 4/r32/esp
15733 $test-emit-subx-stmt-primitive:initialize-var:
15734
15735 68/push 0/imm32/no-register
15736 68/push 0/imm32/no-register
15737 68/push -8/imm32/stack-offset
15738 68/push 1/imm32/block-depth
15739 51/push-ecx/type
15740 68/push 0x11/imm32/alloc-id:fake
15741 68/push 0/imm32/name
15742 68/push 0/imm32/name
15743 68/push 0x11/imm32/alloc-id:fake:payload
15744 89/<- %ecx 4/r32/esp
15745 $test-emit-subx-stmt-primitive:initialize-var-name:
15746
15747 8d/copy-address *(ecx+4) 0/r32/eax
15748 (copy-array Heap "foo" %eax)
15749 $test-emit-subx-stmt-primitive:initialize-stmt-var:
15750
15751 68/push 0/imm32/is-deref:false
15752 68/push 0/imm32/next
15753 68/push 0/imm32/next
15754 51/push-ecx/var-foo
15755 68/push 0x11/imm32/alloc-id:fake
15756 68/push 0x11/imm32/alloc-id:fake:payload
15757 89/<- %ebx 4/r32/esp
15758 $test-emit-subx-stmt-primitive:initialize-stmt:
15759
15760 68/push 0/imm32/no-outputs
15761 68/push 0/imm32/no-outputs
15762 53/push-ebx/inouts
15763 68/push 0x11/imm32/alloc-id:fake
15764 68/push 0/imm32/operation
15765 68/push 0/imm32/operation
15766 68/push 1/imm32/tag
15767 89/<- %esi 4/r32/esp
15768 $test-emit-subx-stmt-primitive:initialize-stmt-operation:
15769
15770 8d/copy-address *(esi+4) 0/r32/eax
15771 (copy-array Heap "increment" %eax)
15772 $test-emit-subx-stmt-primitive:initialize-primitive:
15773
15774 68/push 0/imm32/next
15775 68/push 0/imm32/next
15776 68/push 0/imm32/output-is-write-only
15777 68/push 0/imm32/no-disp32
15778 68/push 0/imm32/no-imm32
15779 68/push 0/imm32/no-r32
15780 68/push 1/imm32/rm32-is-first-inout
15781 68/push 0/imm32/subx-name
15782 68/push 0/imm32/subx-name
15783 68/push 0/imm32/no-outputs
15784 68/push 0/imm32/no-outputs
15785 53/push-ebx/inouts
15786 68/push 0x11/imm32/alloc-id:fake
15787 68/push 0/imm32/name
15788 68/push 0/imm32/name
15789 89/<- %ebx 4/r32/esp
15790 $test-emit-subx-stmt-primitive:initialize-primitive-name:
15791
15792 (copy-array Heap "increment" %ebx)
15793 $test-emit-subx-stmt-primitive:initialize-primitive-subx-name:
15794
15795 8d/copy-address *(ebx+0x18) 0/r32/eax
15796 (copy-array Heap "ff 0/subop/increment" %eax)
15797
15798 c7 0/subop/copy *Curr-block-depth 0/imm32
15799 (emit-subx-stmt _test-output-buffered-file %esi %ebx Stderr 0)
15800 (flush _test-output-buffered-file)
15801 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
15807
15808 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment *(ebp+0xfffffff8)" "F - test-emit-subx-stmt-primitive")
15809
15810 89/<- %esp 5/r32/ebp
15811 5d/pop-to-ebp
15812 c3/return
15813
15814 test-emit-subx-stmt-primitive-register:
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831 55/push-ebp
15832 89/<- %ebp 4/r32/esp
15833
15834 (clear-stream _test-output-stream)
15835 (clear-stream $_test-output-buffered-file->buffer)
15836 $test-emit-subx-stmt-primitive-register:initialize-type:
15837
15838 68/push 0/imm32/right:null
15839 68/push 0/imm32/right:null
15840 68/push 0/imm32/left:unused
15841 68/push 1/imm32/value:int
15842 68/push 1/imm32/is-atom?:true
15843 68/push 0x11/imm32/alloc-id:fake:payload
15844 89/<- %ecx 4/r32/esp
15845 $test-emit-subx-stmt-primitive-register:initialize-var:
15846
15847 68/push 0/imm32/register
15848 68/push 0/imm32/register
15849 68/push 0/imm32/no-stack-offset
15850 68/push 1/imm32/block-depth
15851 51/push-ecx
15852 68/push 0x11/imm32/alloc-id:fake
15853 68/push 0/imm32/name
15854 68/push 0/imm32/name
15855 68/push 0x11/imm32/alloc-id:fake:payload
15856 89/<- %ecx 4/r32/esp
15857 $test-emit-subx-stmt-primitive-register:initialize-var-name:
15858
15859 8d/copy-address *(ecx+4) 0/r32/eax
15860 (copy-array Heap "foo" %eax)
15861 $test-emit-subx-stmt-primitive-register:initialize-var-register:
15862
15863 8d/copy-address *(ecx+0x1c) 0/r32/eax
15864 (copy-array Heap "eax" %eax)
15865 $test-emit-subx-stmt-primitive-register:initialize-stmt-var:
15866
15867 68/push 0/imm32/is-deref:false
15868 68/push 0/imm32/next
15869 68/push 0/imm32/next
15870 51/push-ecx/var-foo
15871 68/push 0x11/imm32/alloc-id:fake
15872 68/push 0x11/imm32/alloc-id:fake:payload
15873 89/<- %ebx 4/r32/esp
15874 $test-emit-subx-stmt-primitive-register:initialize-stmt:
15875
15876 53/push-ebx/outputs
15877 68/push 0x11/imm32/alloc-id:fake
15878 68/push 0/imm32/no-inouts
15879 68/push 0/imm32/no-inouts
15880 68/push 0/imm32/operation
15881 68/push 0/imm32/operation
15882 68/push 1/imm32
15883 89/<- %esi 4/r32/esp
15884 $test-emit-subx-stmt-primitive-register:initialize-stmt-operation:
15885
15886 8d/copy-address *(esi+4) 0/r32/eax
15887 (copy-array Heap "increment" %eax)
15888 $test-emit-subx-stmt-primitive-register:initialize-formal-var:
15889
15890 68/push 0/imm32/register
15891 68/push 0/imm32/register
15892 68/push 0/imm32/no-stack-offset
15893 68/push 1/imm32/block-depth
15894 ff 6/subop/push *(ecx+0x10)
15895 68/push 0x11/imm32/alloc-id:fake
15896 68/push 0/imm32/name
15897 68/push 0/imm32/name
15898 68/push 0x11/imm32/alloc-id:fake:payload
15899 89/<- %ebx 4/r32/esp
15900 $test-emit-subx-stmt-primitive-register:initialize-formal-var-name:
15901
15902 8d/copy-address *(ebx+4) 0/r32/eax
15903 (copy-array Heap "dummy" %eax)
15904 $test-emit-subx-stmt-primitive-register:initialize-formal-register:
15905
15906 8d/copy-address *(ebx+0x1c) 0/r32/eax
15907 (copy-array Heap "*" %eax)
15908 $test-emit-subx-stmt-primitive-register:initialize-var-list:
15909
15910 68/push 0/imm32/next
15911 68/push 0/imm32/next
15912 53/push-ebx/formal-var
15913 68/push 0x11/imm32/alloc-id:fake
15914 68/push 0x11/imm32/alloc-id:fake:payload
15915 89/<- %ebx 4/r32/esp
15916 $test-emit-subx-stmt-primitive-register:initialize-primitive:
15917
15918 68/push 0/imm32/next
15919 68/push 0/imm32/next
15920 68/push 0/imm32/output-is-write-only
15921 68/push 0/imm32/no-disp32
15922 68/push 0/imm32/no-imm32
15923 68/push 0/imm32/no-r32
15924 68/push 3/imm32/rm32-is-first-output
15925 68/push 0/imm32/subx-name
15926 68/push 0/imm32/subx-name
15927 53/push-ebx/outputs
15928 68/push 0x11/imm32/alloc-id:fake
15929 68/push 0/imm32/no-inouts
15930 68/push 0/imm32/no-inouts
15931 68/push 0/imm32/name
15932 68/push 0/imm32/name
15933 89/<- %ebx 4/r32/esp
15934 $test-emit-subx-stmt-primitive-register:initialize-primitive-name:
15935
15936 (copy-array Heap "increment" %ebx)
15937 $test-emit-subx-stmt-primitive-register:initialize-primitive-subx-name:
15938
15939 8d/copy-address *(ebx+0x18) 0/r32/eax
15940 (copy-array Heap "ff 0/subop/increment" %eax)
15941
15942 c7 0/subop/copy *Curr-block-depth 0/imm32
15943 (emit-subx-stmt _test-output-buffered-file %esi %ebx Stderr 0)
15944 (flush _test-output-buffered-file)
15945 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
15951
15952 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-primitive-register")
15953
15954 89/<- %esp 5/r32/ebp
15955 5d/pop-to-ebp
15956 c3/return
15957
15958 test-emit-subx-stmt-select-primitive:
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978 55/push-ebp
15979 89/<- %ebp 4/r32/esp
15980
15981 (clear-stream _test-output-stream)
15982 (clear-stream $_test-output-buffered-file->buffer)
15983 $test-emit-subx-stmt-select-primitive:initialize-type:
15984
15985 68/push 0/imm32/right:null
15986 68/push 0/imm32/right:null
15987 68/push 0/imm32/left:unused
15988 68/push 1/imm32/value:int
15989 68/push 1/imm32/is-atom?:true
15990 68/push 0x11/imm32/alloc-id:fake:payload
15991 89/<- %ecx 4/r32/esp
15992 $test-emit-subx-stmt-select-primitive:initialize-var:
15993
15994 68/push 0/imm32/register
15995 68/push 0/imm32/register
15996 68/push 0/imm32/no-stack-offset
15997 68/push 1/imm32/block-depth
15998 51/push-ecx
15999 68/push 0x11/imm32/alloc-id:fake
16000 68/push 0/imm32/name
16001 68/push 0/imm32/name
16002 68/push 0x11/imm32/alloc-id:fake:payload
16003 89/<- %ecx 4/r32/esp
16004 $test-emit-subx-stmt-select-primitive:initialize-var-name:
16005
16006 8d/copy-address *(ecx+4) 0/r32/eax
16007 (copy-array Heap "foo" %eax)
16008 $test-emit-subx-stmt-select-primitive:initialize-var-register:
16009
16010 8d/copy-address *(ecx+0x1c) 0/r32/eax
16011 (copy-array Heap "eax" %eax)
16012 $test-emit-subx-stmt-select-primitive:initialize-stmt-var:
16013
16014 68/push 0/imm32/is-deref:false
16015 68/push 0/imm32/next
16016 68/push 0/imm32/next
16017 51/push-ecx/var-foo
16018 68/push 0x11/imm32/alloc-id:fake
16019 68/push 0x11/imm32/alloc-id:fake:payload
16020 89/<- %ebx 4/r32/esp
16021 $test-emit-subx-stmt-select-primitive:initialize-stmt:
16022
16023 53/push-ebx/outputs
16024 68/push 0x11/imm32/alloc-id:fake
16025 68/push 0/imm32/no-inouts
16026 68/push 0/imm32/no-inouts
16027 68/push 0/imm32/operation
16028 68/push 0/imm32/operation
16029 68/push 1/imm32
16030 89/<- %esi 4/r32/esp
16031 $test-emit-subx-stmt-select-primitive:initialize-stmt-operation:
16032
16033 8d/copy-address *(esi+4) 0/r32/eax
16034 (copy-array Heap "increment" %eax)
16035 $test-emit-subx-stmt-select-primitive:initialize-formal-var:
16036
16037 68/push 0/imm32/register
16038 68/push 0/imm32/register
16039 68/push 0/imm32/no-stack-offset
16040 68/push 1/imm32/block-depth
16041 ff 6/subop/push *(ecx+0x10)
16042 68/push 0x11/imm32/alloc-id:fake
16043 68/push 0/imm32/name
16044 68/push 0/imm32/name
16045 68/push 0x11/imm32/alloc-id:fake:payload
16046 89/<- %ebx 4/r32/esp
16047 $test-emit-subx-stmt-select-primitive:initialize-formal-var-name:
16048
16049 8d/copy-address *(ebx+4) 0/r32/eax
16050 (copy-array Heap "dummy" %eax)
16051 $test-emit-subx-stmt-select-primitive:initialize-formal-register:
16052
16053 8d/copy-address *(ebx+0x1c) 0/r32/eax
16054 (copy-array Heap "*" %eax)
16055 $test-emit-subx-stmt-select-primitive:initialize-var-list:
16056
16057 68/push 0/imm32/next
16058 68/push 0/imm32/next
16059 53/push-ebx/formal-var
16060 68/push 0x11/imm32/alloc-id:fake
16061 68/push 0x11/imm32/alloc-id:fake:payload
16062 89/<- %ebx 4/r32/esp
16063 $test-emit-subx-stmt-select-primitive:initialize-primitive2:
16064
16065 68/push 0/imm32/next
16066 68/push 0/imm32/next
16067 68/push 0/imm32/output-is-write-only
16068 68/push 0/imm32/no-disp32
16069 68/push 0/imm32/no-imm32
16070 68/push 0/imm32/no-r32
16071 68/push 3/imm32/rm32-is-first-output
16072 68/push 0/imm32/subx-name
16073 68/push 0/imm32/subx-name
16074 53/push-ebx/outputs
16075 68/push 0x11/imm32/alloc-id:fake
16076 68/push 0/imm32/no-inouts
16077 68/push 0/imm32/no-inouts
16078 68/push 0/imm32/name
16079 68/push 0/imm32/name
16080 68/push 0x11/imm32/alloc-id:fake:payload
16081 89/<- %edi 4/r32/esp
16082 $test-emit-subx-stmt-select-primitive:initialize-primitive2-name:
16083
16084 8d/copy-address *(edi+4) 0/r32/eax
16085 (copy-array Heap "increment" %eax)
16086 $test-emit-subx-stmt-select-primitive:initialize-primitive2-subx-name:
16087
16088 8d/copy-address *(edi+0x1c) 0/r32/eax
16089 (copy-array Heap "ff 0/subop/increment" %eax)
16090 $test-emit-subx-stmt-select-primitive:initialize-primitive:
16091
16092 57/push-edi
16093 68/push 0x11/imm32/alloc-id:fake
16094 68/push 0/imm32/output-is-write-only
16095 68/push 0/imm32/no-disp32
16096 68/push 0/imm32/no-imm32
16097 68/push 0/imm32/no-r32
16098 68/push 1/imm32/rm32-is-first-inout
16099 68/push 0/imm32/subx-name
16100 68/push 0/imm32/subx-name
16101 68/push 0/imm32/no-outputs
16102 68/push 0/imm32/no-outputs
16103 53/push-ebx/inouts
16104 68/push 0x11/imm32/alloc-id:fake
16105 68/push 0/imm32/name
16106 68/push 0/imm32/name
16107 89/<- %ebx 4/r32/esp
16108 $test-emit-subx-stmt-select-primitive:initialize-primitive-name:
16109
16110 (copy-array Heap "increment" %ebx)
16111 $test-emit-subx-stmt-select-primitive:initialize-primitive-subx-name:
16112
16113 8d/copy-address *(ebx+0x18) 0/r32/eax
16114 (copy-array Heap "ff 0/subop/increment" %eax)
16115
16116 c7 0/subop/copy *Curr-block-depth 0/imm32
16117 (emit-subx-stmt _test-output-buffered-file %esi %ebx Stderr 0)
16118 (flush _test-output-buffered-file)
16119 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
16125
16126 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-select-primitive")
16127
16128 89/<- %esp 5/r32/ebp
16129 5d/pop-to-ebp
16130 c3/return
16131
16132 test-emit-subx-stmt-select-primitive-2:
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152 55/push-ebp
16153 89/<- %ebp 4/r32/esp
16154
16155 (clear-stream _test-output-stream)
16156 (clear-stream $_test-output-buffered-file->buffer)
16157 $test-emit-subx-stmt-select-primitive-2:initialize-type:
16158
16159 68/push 0/imm32/right:null
16160 68/push 0/imm32/right:null
16161 68/push 0/imm32/left:unused
16162 68/push 1/imm32/value:int
16163 68/push 1/imm32/is-atom?:true
16164 68/push 0x11/imm32/alloc-id:fake:payload
16165 89/<- %ecx 4/r32/esp
16166 $test-emit-subx-stmt-select-primitive-2:initialize-var:
16167
16168 68/push 0/imm32/register
16169 68/push 0/imm32/register
16170 68/push 0/imm32/no-stack-offset
16171 68/push 1/imm32/block-depth
16172 51/push-ecx
16173 68/push 0x11/imm32/alloc-id:fake
16174 68/push 0/imm32/name
16175 68/push 0/imm32/name
16176 68/push 0x11/imm32/alloc-id:fake:payload
16177 89/<- %ecx 4/r32/esp
16178 $test-emit-subx-stmt-select-primitive-2:initialize-var-name:
16179
16180 8d/copy-address *(ecx+4) 0/r32/eax
16181 (copy-array Heap "foo" %eax)
16182 $test-emit-subx-stmt-select-primitive-2:initialize-var-register:
16183
16184 8d/copy-address *(ecx+0x1c) 0/r32/eax
16185 (copy-array Heap "eax" %eax)
16186 $test-emit-subx-stmt-select-primitive-2:initialize-stmt-var:
16187
16188 68/push 0/imm32/is-deref:false
16189 68/push 0/imm32/next
16190 68/push 0/imm32/next
16191 51/push-ecx/var-foo
16192 68/push 0x11/imm32/alloc-id:fake
16193 68/push 0x11/imm32/alloc-id:fake:payload
16194 89/<- %ebx 4/r32/esp
16195 $test-emit-subx-stmt-select-primitive-2:initialize-stmt:
16196
16197 68/push 0/imm32/no-outputs
16198 68/push 0/imm32/no-outputs
16199 53/push-ebx/inouts
16200 68/push 0x11/imm32/alloc-id:fake
16201 68/push 0/imm32/operation
16202 68/push 0/imm32/operation
16203 68/push 1/imm32
16204 89/<- %esi 4/r32/esp
16205 $test-emit-subx-stmt-select-primitive-2:initialize-stmt-operation:
16206
16207 8d/copy-address *(esi+4) 0/r32/eax
16208 (copy-array Heap "increment" %eax)
16209 $test-emit-subx-stmt-select-primitive-2:initialize-formal-var:
16210
16211 68/push 0/imm32/register
16212 68/push 0/imm32/register
16213 68/push 0/imm32/no-stack-offset
16214 68/push 1/imm32/block-depth
16215 ff 6/subop/push *(ecx+0x10)
16216 68/push 0x11/imm32/alloc-id:fake
16217 68/push 0/imm32/name
16218 68/push 0/imm32/name
16219 68/push 0x11/imm32/alloc-id:fake:payload
16220 89/<- %ebx 4/r32/esp
16221 $test-emit-subx-stmt-select-primitive-2:initialize-formal-var-name:
16222
16223 8d/copy-address *(ebx+4) 0/r32/eax
16224 (copy-array Heap "dummy" %eax)
16225 $test-emit-subx-stmt-select-primitive-2:initialize-formal-register:
16226
16227 8d/copy-address *(ebx+0x1c) 0/r32/eax
16228 (copy-array Heap "*" %eax)
16229 $test-emit-subx-stmt-select-primitive-2:initialize-var-list:
16230
16231 68/push 0/imm32/next
16232 68/push 0/imm32/next
16233 53/push-ebx/formal-var
16234 68/push 0x11/imm32/alloc-id:fake
16235 68/push 0x11/imm32/alloc-id:fake:payload
16236 89/<- %ebx 4/r32/esp
16237 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2:
16238
16239 68/push 0/imm32/next
16240 68/push 0/imm32/next
16241 68/push 0/imm32/output-is-write-only
16242 68/push 0/imm32/no-disp32
16243 68/push 0/imm32/no-imm32
16244 68/push 0/imm32/no-r32
16245 68/push 3/imm32/rm32-is-first-output
16246 68/push 0/imm32/subx-name
16247 68/push 0/imm32/subx-name
16248 53/push-ebx/outputs
16249 68/push 0x11/imm32/alloc-id:fake
16250 68/push 0/imm32/no-inouts
16251 68/push 0/imm32/no-inouts
16252 68/push 0/imm32/name
16253 68/push 0/imm32/name
16254 68/push 0x11/imm32/alloc-id:fake:payload
16255 89/<- %edi 4/r32/esp
16256 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2-name:
16257
16258 8d/copy-address *(edi+4) 0/r32/eax
16259 (copy-array Heap "increment" %eax)
16260 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2-subx-name:
16261
16262 8d/copy-address *(edi+0x1c) 0/r32/eax
16263 (copy-array Heap "ff 0/subop/increment" %eax)
16264 $test-emit-subx-stmt-select-primitive-2:initialize-primitive:
16265
16266 57/push-edi
16267 68/push 0x11/imm32/alloc-id:fake
16268 68/push 0/imm32/output-is-write-only
16269 68/push 0/imm32/no-disp32
16270 68/push 0/imm32/no-imm32
16271 68/push 0/imm32/no-r32
16272 68/push 1/imm32/rm32-is-first-inout
16273 68/push 0/imm32/subx-name
16274 68/push 0/imm32/subx-name
16275 68/push 0/imm32/no-outputs
16276 68/push 0/imm32/no-outputs
16277 53/push-ebx/inouts
16278 68/push 0x11/imm32/alloc-id:fake
16279 68/push 0/imm32/name
16280 68/push 0/imm32/name
16281 89/<- %ebx 4/r32/esp
16282 $test-emit-subx-stmt-select-primitive-2:initialize-primitive-name:
16283
16284 (copy-array Heap "increment" %ebx)
16285 $test-emit-subx-stmt-select-primitive-2:initialize-primitive-subx-name:
16286
16287 8d/copy-address *(ebx+0x18) 0/r32/eax
16288 (copy-array Heap "ff 0/subop/increment" %eax)
16289
16290 c7 0/subop/copy *Curr-block-depth 0/imm32
16291 (emit-subx-stmt _test-output-buffered-file %esi %ebx Stderr 0)
16292 (flush _test-output-buffered-file)
16293 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
16299
16300 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-select-primitive-2")
16301
16302 89/<- %esp 5/r32/ebp
16303 5d/pop-to-ebp
16304 c3/return
16305
16306 test-increment-register:
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320 55/push-ebp
16321 89/<- %ebp 4/r32/esp
16322
16323 (clear-stream _test-output-stream)
16324 (clear-stream $_test-output-buffered-file->buffer)
16325 $test-increment-register:initialize-type:
16326
16327 68/push 0/imm32/right:null
16328 68/push 0/imm32/right:null
16329 68/push 0/imm32/left:unused
16330 68/push 1/imm32/value:int
16331 68/push 1/imm32/is-atom?:true
16332 68/push 0x11/imm32/alloc-id:fake:payload
16333 89/<- %ecx 4/r32/esp
16334 $test-increment-register:initialize-var:
16335
16336 68/push 0/imm32/register
16337 68/push 0/imm32/register
16338 68/push 0/imm32/no-stack-offset
16339 68/push 1/imm32/block-depth
16340 51/push-ecx
16341 68/push 0x11/imm32/alloc-id:fake
16342 68/push 0/imm32/name
16343 68/push 0/imm32/name
16344 68/push 0x11/imm32/alloc-id:fake:payload
16345 89/<- %ecx 4/r32/esp
16346 $test-increment-register:initialize-var-name:
16347
16348 8d/copy-address *(ecx+4) 0/r32/eax
16349 (copy-array Heap "foo" %eax)
16350 $test-increment-register:initialize-var-register:
16351
16352 8d/copy-address *(ecx+0x1c) 0/r32/eax
16353 (copy-array Heap "eax" %eax)
16354 $test-increment-register:initialize-stmt-var:
16355
16356 68/push 0/imm32/is-deref:false
16357 68/push 0/imm32/next
16358 68/push 0/imm32/next
16359 51/push-ecx/var-foo
16360 68/push 0x11/imm32/alloc-id:fake
16361 68/push 0x11/imm32/alloc-id:fake:payload
16362 89/<- %ebx 4/r32/esp
16363 $test-increment-register:initialize-stmt:
16364
16365 53/push-ebx/outputs
16366 68/push 0x11/imm32/alloc-id:fake
16367 68/push 0/imm32/no-inouts
16368 68/push 0/imm32/no-inouts
16369 68/push 0/imm32/operation
16370 68/push 0/imm32/operation
16371 68/push 1/imm32
16372 89/<- %esi 4/r32/esp
16373 $test-increment-register:initialize-stmt-operation:
16374
16375 8d/copy-address *(esi+4) 0/r32/eax
16376 (copy-array Heap "increment" %eax)
16377
16378 c7 0/subop/copy *Curr-block-depth 0/imm32
16379 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
16380 (flush _test-output-buffered-file)
16381 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
16387
16388 (check-next-stream-line-equal _test-output-stream "40/increment-eax" "F - test-increment-register")
16389
16390 89/<- %esp 5/r32/ebp
16391 5d/pop-to-ebp
16392 c3/return
16393
16394 test-add-reg-to-reg:
16395
16396
16397
16398
16399
16400 55/push-ebp
16401 89/<- %ebp 4/r32/esp
16402
16403 (clear-stream _test-output-stream)
16404 (clear-stream $_test-output-buffered-file->buffer)
16405 $test-add-reg-to-reg:initialize-type:
16406
16407 68/push 0/imm32/right:null
16408 68/push 0/imm32/right:null
16409 68/push 0/imm32/left:unused
16410 68/push 1/imm32/value:int
16411 68/push 1/imm32/is-atom?:true
16412 68/push 0x11/imm32/alloc-id:fake:payload
16413 89/<- %ecx 4/r32/esp
16414 $test-add-reg-to-reg:initialize-var1:
16415
16416 68/push 0/imm32/register
16417 68/push 0/imm32/register
16418 68/push 0/imm32/no-stack-offset
16419 68/push 1/imm32/block-depth
16420 51/push-ecx
16421 68/push 0x11/imm32/alloc-id:fake
16422 68/push 0/imm32/name
16423 68/push 0/imm32/name
16424 68/push 0x11/imm32/alloc-id:fake:payload
16425 89/<- %ecx 4/r32/esp
16426 $test-add-reg-to-reg:initialize-var1-name:
16427
16428 8d/copy-address *(ecx+4) 0/r32/eax
16429 (copy-array Heap "var1" %eax)
16430 $test-add-reg-to-reg:initialize-var1-register:
16431
16432 8d/copy-address *(ecx+0x1c) 0/r32/eax
16433 (copy-array Heap "eax" %eax)
16434 $test-add-reg-to-reg:initialize-var2:
16435
16436 68/push 0/imm32/register
16437 68/push 0/imm32/register
16438 68/push 0/imm32/no-stack-offset
16439 68/push 1/imm32/block-depth
16440 ff 6/subop/push *(ecx+0x10)
16441 68/push 0x11/imm32/alloc-id:fake
16442 68/push 0/imm32/name
16443 68/push 0/imm32/name
16444 68/push 0x11/imm32/alloc-id:fake:payload
16445 89/<- %edx 4/r32/esp
16446 $test-add-reg-to-reg:initialize-var2-name:
16447
16448 8d/copy-address *(edx+4) 0/r32/eax
16449 (copy-array Heap "var2" %eax)
16450 $test-add-reg-to-reg:initialize-var2-register:
16451
16452 8d/copy-address *(edx+0x1c) 0/r32/eax
16453 (copy-array Heap "ecx" %eax)
16454 $test-add-reg-to-reg:initialize-inouts:
16455
16456 68/push 0/imm32/is-deref:false
16457 68/push 0/imm32/next
16458 68/push 0/imm32/next
16459 52/push-edx/var2
16460 68/push 0x11/imm32/alloc-id:fake
16461 68/push 0x11/imm32/alloc-id:fake:payload
16462 89/<- %esi 4/r32/esp
16463 $test-add-reg-to-reg:initialize-outputs:
16464
16465 68/push 0/imm32/is-deref:false
16466 68/push 0/imm32/next
16467 68/push 0/imm32/next
16468 51/push-ecx/var1
16469 68/push 0x11/imm32/alloc-id:fake
16470 68/push 0x11/imm32/alloc-id:fake:payload
16471 89/<- %edi 4/r32/esp
16472 $test-add-reg-to-reg:initialize-stmt:
16473
16474 68/push 0/imm32/next
16475 68/push 0/imm32/next
16476 57/push-edi/outputs
16477 68/push 0x11/imm32/alloc-id:fake
16478 56/push-esi/inouts
16479 68/push 0x11/imm32/alloc-id:fake
16480 68/push 0/imm32/operation
16481 68/push 0/imm32/operation
16482 68/push 1/imm32/tag:stmt1
16483 89/<- %esi 4/r32/esp
16484 $test-add-reg-to-reg:initialize-stmt-operation:
16485
16486 8d/copy-address *(esi+4) 0/r32/eax
16487 (copy-array Heap "add" %eax)
16488
16489 c7 0/subop/copy *Curr-block-depth 0/imm32
16490 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
16491 (flush _test-output-buffered-file)
16492 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
16498
16499 (check-next-stream-line-equal _test-output-stream "01/add-to %eax 0x00000001/r32" "F - test-add-reg-to-reg")
16500
16501 89/<- %esp 5/r32/ebp
16502 5d/pop-to-ebp
16503 c3/return
16504
16505 test-add-reg-to-mem:
16506
16507
16508
16509
16510
16511 55/push-ebp
16512 89/<- %ebp 4/r32/esp
16513
16514 (clear-stream _test-output-stream)
16515 (clear-stream $_test-output-buffered-file->buffer)
16516 $test-add-reg-to-mem:initialize-type:
16517
16518 68/push 0/imm32/right:null
16519 68/push 0/imm32/right:null
16520 68/push 0/imm32/left:unused
16521 68/push 1/imm32/value:int
16522 68/push 1/imm32/is-atom?:true
16523 68/push 0x11/imm32/alloc-id:fake:payload
16524 89/<- %ecx 4/r32/esp
16525 $test-add-reg-to-mem:initialize-var1:
16526
16527 68/push 0/imm32/register
16528 68/push 0/imm32/register
16529 68/push 8/imm32/stack-offset
16530 68/push 1/imm32/block-depth
16531 51/push-ecx
16532 68/push 0x11/imm32/alloc-id:fake
16533 68/push 0/imm32/name
16534 68/push 0/imm32/name
16535 68/push 0x11/imm32/alloc-id:fake:payload
16536 89/<- %ecx 4/r32/esp
16537 $test-add-reg-to-mem:initialize-var1-name:
16538
16539 8d/copy-address *(ecx+4) 0/r32/eax
16540 (copy-array Heap "var1" %eax)
16541 $test-add-reg-to-mem:initialize-var2:
16542
16543 68/push 0/imm32/register
16544 68/push 0/imm32/register
16545 68/push 0/imm32/no-stack-offset
16546 68/push 1/imm32/block-depth
16547 ff 6/subop/push *(ecx+0x10)
16548 68/push 0x11/imm32/alloc-id:fake
16549 68/push 0/imm32/name
16550 68/push 0/imm32/name
16551 68/push 0x11/imm32/alloc-id:fake:payload
16552 89/<- %edx 4/r32/esp
16553 $test-add-reg-to-mem:initialize-var2-name:
16554
16555 8d/copy-address *(edx+4) 0/r32/eax
16556 (copy-array Heap "var2" %eax)
16557 $test-add-reg-to-mem:initialize-var2-register:
16558
16559 8d/copy-address *(edx+0x1c) 0/r32/eax
16560 (copy-array Heap "ecx" %eax)
16561 $test-add-reg-to-mem:initialize-inouts:
16562
16563 68/push 0/imm32/is-deref:false
16564 68/push 0/imm32/next
16565 68/push 0/imm32/next
16566 52/push-edx/var2
16567 68/push 0x11/imm32/alloc-id:fake
16568 68/push 0x11/imm32/alloc-id:fake:payload
16569 89/<- %esi 4/r32/esp
16570
16571 68/push 0/imm32/is-deref:false
16572 56/push-esi/next
16573 68/push 0x11/imm32/alloc-id:fake
16574 51/push-ecx/var1
16575 68/push 0x11/imm32/alloc-id:fake
16576 68/push 0x11/imm32/alloc-id:fake:payload
16577 89/<- %esi 4/r32/esp
16578 $test-add-reg-to-mem:initialize-stmt:
16579
16580 68/push 0/imm32/next
16581 68/push 0/imm32/next
16582 68/push 0/imm32/outputs
16583 68/push 0/imm32/outputs
16584 56/push-esi/inouts
16585 68/push 0x11/imm32/alloc-id:fake
16586 68/push 0/imm32/operation
16587 68/push 0/imm32/operation
16588 68/push 1/imm32/tag:stmt1
16589 89/<- %esi 4/r32/esp
16590 $test-add-reg-to-mem:initialize-stmt-operation:
16591
16592 8d/copy-address *(esi+4) 0/r32/eax
16593 (copy-array Heap "add-to" %eax)
16594
16595 c7 0/subop/copy *Curr-block-depth 0/imm32
16596 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
16597 (flush _test-output-buffered-file)
16598 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
16604
16605 (check-next-stream-line-equal _test-output-stream "01/add-to *(ebp+0x00000008) 0x00000001/r32" "F - test-add-reg-to-mem")
16606
16607 89/<- %esp 5/r32/ebp
16608 5d/pop-to-ebp
16609 c3/return
16610
16611 test-add-mem-to-reg:
16612
16613
16614
16615
16616
16617 55/push-ebp
16618 89/<- %ebp 4/r32/esp
16619
16620 (clear-stream _test-output-stream)
16621 (clear-stream $_test-output-buffered-file->buffer)
16622 $test-add-mem-to-reg:initialize-type:
16623
16624 68/push 0/imm32/right:null
16625 68/push 0/imm32/right:null
16626 68/push 0/imm32/left:unused
16627 68/push 1/imm32/value:int
16628 68/push 1/imm32/is-atom?:true
16629 68/push 0x11/imm32/alloc-id:fake:payload
16630 89/<- %ecx 4/r32/esp
16631 $test-add-mem-to-reg:initialize-var:
16632
16633 68/push 0/imm32/register
16634 68/push 0/imm32/register
16635 68/push 0/imm32/no-stack-offset
16636 68/push 1/imm32/block-depth
16637 51/push-ecx
16638 68/push 0x11/imm32/alloc-id:fake
16639 68/push 0/imm32/name
16640 68/push 0/imm32/name
16641 68/push 0x11/imm32/alloc-id:fake:payload
16642 89/<- %ecx 4/r32/esp
16643 $test-add-mem-to-reg:initialize-var-name:
16644
16645 8d/copy-address *(ecx+4) 0/r32/eax
16646 (copy-array Heap "var1" %eax)
16647 $test-add-mem-to-reg:initialize-var-register:
16648
16649 8d/copy-address *(ecx+0x1c) 0/r32/eax
16650 (copy-array Heap "eax" %eax)
16651 $test-add-mem-to-reg:initialize-var2:
16652
16653 68/push 0/imm32/register
16654 68/push 0/imm32/register
16655 68/push 8/imm32/stack-offset
16656 68/push 1/imm32/block-depth
16657 ff 6/subop/push *(ecx+0x10)
16658 68/push 0x11/imm32/alloc-id:fake
16659 68/push 0/imm32/name
16660 68/push 0/imm32/name
16661 68/push 0x11/imm32/alloc-id:fake:payload
16662 89/<- %edx 4/r32/esp
16663 $test-add-mem-to-reg:initialize-var2-name:
16664
16665 8d/copy-address *(edx+4) 0/r32/eax
16666 (copy-array Heap "var2" %eax)
16667 $test-add-mem-to-reg:initialize-inouts:
16668
16669 68/push 0/imm32/is-deref:false
16670 68/push 0/imm32/next
16671 68/push 0/imm32/next
16672 52/push-edx/var2
16673 68/push 0x11/imm32/alloc-id:fake
16674 68/push 0x11/imm32/alloc-id:fake:payload
16675 89/<- %esi 4/r32/esp
16676 $test-add-mem-to-reg:initialize-outputs:
16677
16678 68/push 0/imm32/is-deref:false
16679 68/push 0/imm32/next
16680 68/push 0/imm32/next
16681 51/push-ecx/var1
16682 68/push 0x11/imm32/alloc-id:fake
16683 68/push 0x11/imm32/alloc-id:fake:payload
16684 89/<- %edi 4/r32/esp
16685 $test-add-mem-to-reg:initialize-stmt:
16686
16687 68/push 0/imm32/next
16688 68/push 0/imm32/next
16689 57/push-edi/outputs
16690 68/push 0x11/imm32/alloc-id:fake
16691 56/push-esi/inouts
16692 68/push 0x11/imm32/alloc-id:fake
16693 68/push 0/imm32/operation
16694 68/push 0/imm32/operation
16695 68/push 1/imm32/tag:stmt1
16696 89/<- %esi 4/r32/esp
16697 $test-add-mem-to-reg:initialize-stmt-operation:
16698
16699 8d/copy-address *(esi+4) 0/r32/eax
16700 (copy-array Heap "add" %eax)
16701
16702 c7 0/subop/copy *Curr-block-depth 0/imm32
16703 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
16704 (flush _test-output-buffered-file)
16705 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
16711
16712 (check-next-stream-line-equal _test-output-stream "03/add *(ebp+0x00000008) 0x00000000/r32" "F - test-add-mem-to-reg")
16713
16714 89/<- %esp 5/r32/ebp
16715 5d/pop-to-ebp
16716 c3/return
16717
16718 test-add-literal-to-eax:
16719
16720
16721
16722
16723
16724 55/push-ebp
16725 89/<- %ebp 4/r32/esp
16726
16727 (clear-stream _test-output-stream)
16728 (clear-stream $_test-output-buffered-file->buffer)
16729 $test-add-literal-to-eax:initialize-var-type:
16730
16731 68/push 0/imm32/right:null
16732 68/push 0/imm32/right:null
16733 68/push 0/imm32/left:unused
16734 68/push 1/imm32/value:int
16735 68/push 1/imm32/is-atom?:true
16736 68/push 0x11/imm32/alloc-id:fake:payload
16737 89/<- %ecx 4/r32/esp
16738 $test-add-literal-to-eax:initialize-var:
16739
16740 68/push 0/imm32/register
16741 68/push 0/imm32/register
16742 68/push 0/imm32/no-stack-offset
16743 68/push 1/imm32/block-depth
16744 51/push-ecx
16745 68/push 0x11/imm32/alloc-id:fake
16746 68/push 0/imm32/name
16747 68/push 0/imm32/name
16748 68/push 0x11/imm32/alloc-id:fake:payload
16749 89/<- %ecx 4/r32/esp
16750 $test-add-literal-to-eax:initialize-var-name:
16751
16752 8d/copy-address *(ecx+4) 0/r32/eax
16753 (copy-array Heap "v" %eax)
16754 $test-add-literal-to-eax:initialize-var-register:
16755
16756 8d/copy-address *(ecx+0x1c) 0/r32/eax
16757 (copy-array Heap "eax" %eax)
16758 $test-add-literal-to-eax:initialize-literal-type:
16759
16760 68/push 0/imm32/right:null
16761 68/push 0/imm32/right:null
16762 68/push 0/imm32/left:unused
16763 68/push 0/imm32/value:literal
16764 68/push 1/imm32/is-atom?:true
16765 68/push 0x11/imm32/alloc-id:fake:payload
16766 89/<- %edx 4/r32/esp
16767 $test-add-literal-to-eax:initialize-literal:
16768
16769 68/push 0/imm32/register
16770 68/push 0/imm32/register
16771 68/push 0/imm32/no-stack-offset
16772 68/push 1/imm32/block-depth
16773 52/push-edx
16774 68/push 0x11/imm32/alloc-id:fake
16775 68/push 0/imm32/name
16776 68/push 0/imm32/name
16777 68/push 0x11/imm32/alloc-id:fake:payload
16778 89/<- %edx 4/r32/esp
16779 $test-add-literal-to-eax:initialize-literal-value:
16780
16781 8d/copy-address *(edx+4) 0/r32/eax
16782 (copy-array Heap "0x34" %eax)
16783 $test-add-literal-to-eax:initialize-inouts:
16784
16785 68/push 0/imm32/is-deref:false
16786 68/push 0/imm32/next
16787 68/push 0/imm32/next
16788 52/push-edx/l
16789 68/push 0x11/imm32/alloc-id:fake
16790 68/push 0x11/imm32/alloc-id:fake:payload
16791 89/<- %esi 4/r32/esp
16792 $test-add-literal-to-eax:initialize-outputs:
16793
16794 68/push 0/imm32/is-deref:false
16795 68/push 0/imm32/next
16796 68/push 0/imm32/next
16797 51/push-ecx/v
16798 68/push 0x11/imm32/alloc-id:fake
16799 68/push 0x11/imm32/alloc-id:fake:payload
16800 89/<- %edi 4/r32/esp
16801 $test-add-literal-to-eax:initialize-stmt:
16802
16803 68/push 0/imm32/next
16804 68/push 0/imm32/next
16805 57/push-edi/outputs
16806 68/push 0x11/imm32/alloc-id:fake
16807 56/push-esi/inouts
16808 68/push 0x11/imm32/alloc-id:fake
16809 68/push 0/imm32/operation
16810 68/push 0/imm32/operation
16811 68/push 1/imm32/tag:stmt1
16812 89/<- %esi 4/r32/esp
16813 $test-add-literal-to-eax:initialize-stmt-operation:
16814
16815 8d/copy-address *(esi+4) 0/r32/eax
16816 (copy-array Heap "add" %eax)
16817
16818 c7 0/subop/copy *Curr-block-depth 0/imm32
16819 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
16820 (flush _test-output-buffered-file)
16821 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
16827
16828 (check-next-stream-line-equal _test-output-stream "05/add-to-eax 0x34/imm32" "F - test-add-literal-to-eax")
16829
16830 89/<- %esp 5/r32/ebp
16831 5d/pop-to-ebp
16832 c3/return
16833
16834 test-add-literal-to-reg:
16835
16836
16837
16838
16839
16840 55/push-ebp
16841 89/<- %ebp 4/r32/esp
16842
16843 (clear-stream _test-output-stream)
16844 (clear-stream $_test-output-buffered-file->buffer)
16845 $test-add-literal-to-reg:initialize-var-type:
16846
16847 68/push 0/imm32/right:null
16848 68/push 0/imm32/right:null
16849 68/push 0/imm32/left:unused
16850 68/push 1/imm32/value:int
16851 68/push 1/imm32/is-atom?:true
16852 68/push 0x11/imm32/alloc-id:fake:payload
16853 89/<- %ecx 4/r32/esp
16854 $test-add-literal-to-reg:initialize-var:
16855
16856 68/push 0/imm32/register
16857 68/push 0/imm32/register
16858 68/push 0/imm32/no-stack-offset
16859 68/push 1/imm32/block-depth
16860 51/push-ecx
16861 68/push 0x11/imm32/alloc-id:fake
16862 68/push 0/imm32/name
16863 68/push 0/imm32/name
16864 68/push 0x11/imm32/alloc-id:fake:payload
16865 89/<- %ecx 4/r32/esp
16866 $test-add-literal-to-reg:initialize-var-name:
16867
16868 8d/copy-address *(ecx+4) 0/r32/eax
16869 (copy-array Heap "v" %eax)
16870 $test-add-literal-to-reg:initialize-var-register:
16871
16872 8d/copy-address *(ecx+0x1c) 0/r32/eax
16873 (copy-array Heap "ecx" %eax)
16874 $test-add-literal-to-reg:initialize-literal-type:
16875
16876 68/push 0/imm32/right:null
16877 68/push 0/imm32/right:null
16878 68/push 0/imm32/left:unused
16879 68/push 0/imm32/value:literal
16880 68/push 1/imm32/is-atom?:true
16881 68/push 0x11/imm32/alloc-id:fake:payload
16882 89/<- %edx 4/r32/esp
16883 $test-add-literal-to-reg:initialize-literal:
16884
16885 68/push 0/imm32/register
16886 68/push 0/imm32/register
16887 68/push 0/imm32/no-stack-offset
16888 68/push 1/imm32/block-depth
16889 52/push-edx
16890 68/push 0x11/imm32/alloc-id:fake
16891 68/push 0/imm32/name
16892 68/push 0/imm32/name
16893 68/push 0x11/imm32/alloc-id:fake:payload
16894 89/<- %edx 4/r32/esp
16895 $test-add-literal-to-reg:initialize-literal-value:
16896
16897 8d/copy-address *(edx+4) 0/r32/eax
16898 (copy-array Heap "0x34" %eax)
16899 $test-add-literal-to-reg:initialize-inouts:
16900
16901 68/push 0/imm32/is-deref:false
16902 68/push 0/imm32/next
16903 68/push 0/imm32/next
16904 52/push-edx/l
16905 68/push 0x11/imm32/alloc-id:fake
16906 68/push 0x11/imm32/alloc-id:fake:payload
16907 89/<- %esi 4/r32/esp
16908 $test-add-literal-to-reg:initialize-outputs:
16909
16910 68/push 0/imm32/is-deref:false
16911 68/push 0/imm32/next
16912 68/push 0/imm32/next
16913 51/push-ecx/v
16914 68/push 0x11/imm32/alloc-id:fake
16915 68/push 0x11/imm32/alloc-id:fake:payload
16916 89/<- %edi 4/r32/esp
16917 $test-add-literal-to-reg:initialize-stmt:
16918
16919 68/push 0/imm32/next
16920 68/push 0/imm32/next
16921 57/push-edi/outputs
16922 68/push 0x11/imm32/alloc-id:fake
16923 56/push-esi/inouts
16924 68/push 0x11/imm32/alloc-id:fake
16925 68/push 0/imm32/operation
16926 68/push 0/imm32/operation
16927 68/push 1/imm32/tag:stmt1
16928 89/<- %esi 4/r32/esp
16929 $test-add-literal-to-reg:initialize-stmt-operation:
16930
16931 8d/copy-address *(esi+4) 0/r32/eax
16932 (copy-array Heap "add" %eax)
16933
16934 c7 0/subop/copy *Curr-block-depth 0/imm32
16935 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
16936 (flush _test-output-buffered-file)
16937 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
16943
16944 (check-next-stream-line-equal _test-output-stream "81 0/subop/add %ecx 0x34/imm32" "F - test-add-literal-to-reg")
16945
16946 89/<- %esp 5/r32/ebp
16947 5d/pop-to-ebp
16948 c3/return
16949
16950 test-add-literal-to-mem:
16951
16952
16953
16954
16955
16956 55/push-ebp
16957 89/<- %ebp 4/r32/esp
16958
16959 (clear-stream _test-output-stream)
16960 (clear-stream $_test-output-buffered-file->buffer)
16961 $test-add-literal-to-mem:initialize-type:
16962
16963 68/push 0/imm32/right:null
16964 68/push 0/imm32/right:null
16965 68/push 0/imm32/left:unused
16966 68/push 1/imm32/value:int
16967 68/push 1/imm32/is-atom?:true
16968 68/push 0x11/imm32/alloc-id:fake:payload
16969 89/<- %ecx 4/r32/esp
16970 $test-add-literal-to-mem:initialize-var1:
16971
16972 68/push 0/imm32/register
16973 68/push 0/imm32/register
16974 68/push 8/imm32/stack-offset
16975 68/push 1/imm32/block-depth
16976 51/push-ecx
16977 68/push 0x11/imm32/alloc-id:fake
16978 68/push 0/imm32/name
16979 68/push 0/imm32/name
16980 68/push 0x11/imm32/alloc-id:fake:payload
16981 89/<- %ecx 4/r32/esp
16982 $test-add-literal-to-mem:initialize-var1-name:
16983
16984 8d/copy-address *(ecx+4) 0/r32/eax
16985 (copy-array Heap "var1" %eax)
16986 $test-add-literal-to-mem:initialize-literal-type:
16987
16988 68/push 0/imm32/right:null
16989 68/push 0/imm32/right:null
16990 68/push 0/imm32/left:unused
16991 68/push 0/imm32/value:literal
16992 68/push 1/imm32/is-atom?:true
16993 68/push 0x11/imm32/alloc-id:fake:payload
16994 89/<- %edx 4/r32/esp
16995 $test-add-literal-to-mem:initialize-literal:
16996
16997 68/push 0/imm32/register
16998 68/push 0/imm32/register
16999 68/push 0/imm32/no-stack-offset
17000 68/push 1/imm32/block-depth
17001 52/push-edx
17002 68/push 0x11/imm32/alloc-id:fake
17003 68/push 0/imm32/name
17004 68/push 0/imm32/name
17005 68/push 0x11/imm32/alloc-id:fake:payload
17006 89/<- %edx 4/r32/esp
17007 $test-add-literal-to-mem:initialize-literal-value:
17008
17009 8d/copy-address *(edx+4) 0/r32/eax
17010 (copy-array Heap "0x34" %eax)
17011 $test-add-literal-to-mem:initialize-inouts:
17012
17013 68/push 0/imm32/is-deref:false
17014 68/push 0/imm32/next
17015 68/push 0/imm32/next
17016 52/push-edx/l
17017 68/push 0x11/imm32/alloc-id:fake
17018 68/push 0x11/imm32/alloc-id:fake:payload
17019 89/<- %esi 4/r32/esp
17020
17021 68/push 0/imm32/is-deref:false
17022 56/push-esi/next
17023 68/push 0x11/imm32/alloc-id:fake
17024 51/push-ecx/var1
17025 68/push 0x11/imm32/alloc-id:fake
17026 68/push 0x11/imm32/alloc-id:fake:payload
17027 89/<- %esi 4/r32/esp
17028 $test-add-literal-to-mem:initialize-stmt:
17029
17030 68/push 0/imm32/next
17031 68/push 0/imm32/next
17032 68/push 0/imm32/outputs
17033 68/push 0/imm32/outputs
17034 56/push-esi/inouts
17035 68/push 0x11/imm32/alloc-id:fake
17036 68/push 0/imm32/operation
17037 68/push 0/imm32/operation
17038 68/push 1/imm32/tag:stmt1
17039 89/<- %esi 4/r32/esp
17040 $test-add-literal-to-mem:initialize-stmt-operation:
17041
17042 8d/copy-address *(esi+4) 0/r32/eax
17043 (copy-array Heap "add-to" %eax)
17044
17045 c7 0/subop/copy *Curr-block-depth 0/imm32
17046 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
17047 (flush _test-output-buffered-file)
17048 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
17054
17055 (check-next-stream-line-equal _test-output-stream "81 0/subop/add *(ebp+0x00000008) 0x34/imm32" "F - test-add-literal-to-mem")
17056
17057 89/<- %esp 5/r32/ebp
17058 5d/pop-to-ebp
17059 c3/return
17060
17061 test-compare-reg-with-reg:
17062
17063
17064
17065
17066
17067 55/push-ebp
17068 89/<- %ebp 4/r32/esp
17069
17070 (clear-stream _test-output-stream)
17071 (clear-stream $_test-output-buffered-file->buffer)
17072 $test-compare-reg-with-reg:initialize-type:
17073
17074 68/push 0/imm32/right:null
17075 68/push 0/imm32/right:null
17076 68/push 0/imm32/left:unused
17077 68/push 1/imm32/value:int
17078 68/push 1/imm32/is-atom?:true
17079 68/push 0x11/imm32/alloc-id:fake:payload
17080 89/<- %ecx 4/r32/esp
17081 $test-compare-reg-with-reg:initialize-var1:
17082
17083 68/push 0/imm32/register
17084 68/push 0/imm32/register
17085 68/push 0/imm32/no-stack-offset
17086 68/push 1/imm32/block-depth
17087 51/push-ecx
17088 68/push 0x11/imm32/alloc-id:fake
17089 68/push 0/imm32/name
17090 68/push 0/imm32/name
17091 68/push 0x11/imm32/alloc-id:fake:payload
17092 89/<- %ecx 4/r32/esp
17093 $test-compare-reg-with-reg:initialize-var1-name:
17094
17095 8d/copy-address *(ecx+4) 0/r32/eax
17096 (copy-array Heap "var1" %eax)
17097 $test-compare-reg-with-reg:initialize-var1-register:
17098
17099 8d/copy-address *(ecx+0x1c) 0/r32/eax
17100 (copy-array Heap "ecx" %eax)
17101 $test-compare-reg-with-reg:initialize-var2:
17102
17103 68/push 0/imm32/register
17104 68/push 0/imm32/register
17105 68/push 0/imm32/no-stack-offset
17106 68/push 1/imm32/block-depth
17107 ff 6/subop/push *(ecx+0x10)
17108 68/push 0x11/imm32/alloc-id:fake
17109 68/push 0/imm32/name
17110 68/push 0/imm32/name
17111 68/push 0x11/imm32/alloc-id:fake:payload
17112 89/<- %edx 4/r32/esp
17113 $test-compare-reg-with-reg:initialize-var2-name:
17114
17115 8d/copy-address *(edx+4) 0/r32/eax
17116 (copy-array Heap "var2" %eax)
17117 $test-compare-reg-with-reg:initialize-var2-register:
17118
17119 8d/copy-address *(edx+0x1c) 0/r32/eax
17120 (copy-array Heap "eax" %eax)
17121 $test-compare-reg-with-reg:initialize-inouts:
17122
17123 68/push 0/imm32/is-deref:false
17124 68/push 0/imm32/next
17125 68/push 0/imm32/next
17126 52/push-edx/var2
17127 68/push 0x11/imm32/alloc-id:fake
17128 68/push 0x11/imm32/alloc-id:fake:payload
17129 89/<- %esi 4/r32/esp
17130
17131 68/push 0/imm32/is-deref:false
17132 56/push-esi/next
17133 68/push 0x11/imm32/alloc-id:fake
17134 51/push-ecx/var1
17135 68/push 0x11/imm32/alloc-id:fake
17136 68/push 0x11/imm32/alloc-id:fake:payload
17137 89/<- %esi 4/r32/esp
17138 $test-compare-reg-with-reg:initialize-stmt:
17139
17140 68/push 0/imm32/next
17141 68/push 0/imm32/next
17142 68/push 0/imm32/outputs
17143 68/push 0/imm32/outputs
17144 56/push-esi/inouts
17145 68/push 0x11/imm32/alloc-id:fake
17146 68/push 0/imm32/operation
17147 68/push 0/imm32/operation
17148 68/push 1/imm32/tag:stmt1
17149 89/<- %esi 4/r32/esp
17150 $test-compare-reg-with-reg:initialize-stmt-operation:
17151
17152 8d/copy-address *(esi+4) 0/r32/eax
17153 (copy-array Heap "compare" %eax)
17154
17155 c7 0/subop/copy *Curr-block-depth 0/imm32
17156 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
17157 (flush _test-output-buffered-file)
17158 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
17164
17165 (check-next-stream-line-equal _test-output-stream "39/compare-> %ecx 0x00000000/r32" "F - test-compare-reg-with-reg")
17166
17167 89/<- %esp 5/r32/ebp
17168 5d/pop-to-ebp
17169 c3/return
17170
17171 test-compare-mem-with-reg:
17172
17173
17174
17175
17176
17177 55/push-ebp
17178 89/<- %ebp 4/r32/esp
17179
17180 (clear-stream _test-output-stream)
17181 (clear-stream $_test-output-buffered-file->buffer)
17182 $test-compare-mem-with-reg:initialize-type:
17183
17184 68/push 0/imm32/right:null
17185 68/push 0/imm32/right:null
17186 68/push 0/imm32/left:unused
17187 68/push 1/imm32/value:int
17188 68/push 1/imm32/is-atom?:true
17189 68/push 0x11/imm32/alloc-id:fake:payload
17190 89/<- %ecx 4/r32/esp
17191 $test-compare-mem-with-reg:initialize-var1:
17192
17193 68/push 0/imm32/register
17194 68/push 0/imm32/register
17195 68/push 8/imm32/stack-offset
17196 68/push 1/imm32/block-depth
17197 51/push-ecx
17198 68/push 0x11/imm32/alloc-id:fake
17199 68/push 0/imm32/name
17200 68/push 0/imm32/name
17201 68/push 0x11/imm32/alloc-id:fake:payload
17202 89/<- %ecx 4/r32/esp
17203 $test-compare-mem-with-reg:initialize-var1-name:
17204
17205 8d/copy-address *(ecx+4) 0/r32/eax
17206 (copy-array Heap "var1" %eax)
17207 $test-compare-mem-with-reg:initialize-var2:
17208
17209 68/push 0/imm32/register
17210 68/push 0/imm32/register
17211 68/push 0/imm32/no-stack-offset
17212 68/push 1/imm32/block-depth
17213 ff 6/subop/push *(ecx+0x10)
17214 68/push 0x11/imm32/alloc-id:fake
17215 68/push 0/imm32/name
17216 68/push 0/imm32/name
17217 68/push 0x11/imm32/alloc-id:fake:payload
17218 89/<- %edx 4/r32/esp
17219 $test-compare-mem-with-reg:initialize-var2-name:
17220
17221 8d/copy-address *(edx+4) 0/r32/eax
17222 (copy-array Heap "var2" %eax)
17223 $test-compare-mem-with-reg:initialize-var2-register:
17224
17225 8d/copy-address *(edx+0x1c) 0/r32/eax
17226 (copy-array Heap "eax" %eax)
17227 $test-compare-mem-with-reg:initialize-inouts:
17228
17229 68/push 0/imm32/is-deref:false
17230 68/push 0/imm32/next
17231 68/push 0/imm32/next
17232 52/push-edx/var2
17233 68/push 0x11/imm32/alloc-id:fake
17234 68/push 0x11/imm32/alloc-id:fake:payload
17235 89/<- %esi 4/r32/esp
17236
17237 68/push 0/imm32/is-deref:false
17238 56/push-esi/next
17239 68/push 0x11/imm32/alloc-id:fake
17240 51/push-ecx/var1
17241 68/push 0x11/imm32/alloc-id:fake
17242 68/push 0x11/imm32/alloc-id:fake:payload
17243 89/<- %esi 4/r32/esp
17244 $test-compare-mem-with-reg:initialize-stmt:
17245
17246 68/push 0/imm32/next
17247 68/push 0/imm32/next
17248 68/push 0/imm32/outputs
17249 68/push 0/imm32/outputs
17250 56/push-esi/inouts
17251 68/push 0x11/imm32/alloc-id:fake
17252 68/push 0/imm32/operation
17253 68/push 0/imm32/operation
17254 68/push 1/imm32/tag:stmt1
17255 89/<- %esi 4/r32/esp
17256 $test-compare-mem-with-reg:initialize-stmt-operation:
17257
17258 8d/copy-address *(esi+4) 0/r32/eax
17259 (copy-array Heap "compare" %eax)
17260
17261 c7 0/subop/copy *Curr-block-depth 0/imm32
17262 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
17263 (flush _test-output-buffered-file)
17264 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
17270
17271 (check-next-stream-line-equal _test-output-stream "39/compare-> *(ebp+0x00000008) 0x00000000/r32" "F - test-compare-mem-with-reg")
17272
17273 89/<- %esp 5/r32/ebp
17274 5d/pop-to-ebp
17275 c3/return
17276
17277 test-compare-reg-with-mem:
17278
17279
17280
17281
17282
17283 55/push-ebp
17284 89/<- %ebp 4/r32/esp
17285
17286 (clear-stream _test-output-stream)
17287 (clear-stream $_test-output-buffered-file->buffer)
17288 $test-compare-reg-with-mem:initialize-type:
17289
17290 68/push 0/imm32/right:null
17291 68/push 0/imm32/right:null
17292 68/push 0/imm32/left:unused
17293 68/push 1/imm32/value:int
17294 68/push 1/imm32/is-atom?:true
17295 68/push 0x11/imm32/alloc-id:fake:payload
17296 89/<- %ecx 4/r32/esp
17297 $test-compare-reg-with-mem:initialize-var1:
17298
17299 68/push 0/imm32/register
17300 68/push 0/imm32/register
17301 68/push 0/imm32/no-stack-offset
17302 68/push 1/imm32/block-depth
17303 51/push-ecx
17304 68/push 0x11/imm32/alloc-id:fake
17305 68/push 0/imm32/name
17306 68/push 0/imm32/name
17307 68/push 0x11/imm32/alloc-id:fake:payload
17308 89/<- %ecx 4/r32/esp
17309 $test-compare-reg-with-mem:initialize-var1-name:
17310
17311 8d/copy-address *(ecx+4) 0/r32/eax
17312 (copy-array Heap "var1" %eax)
17313 $test-compare-reg-with-mem:initialize-var1-register:
17314
17315 8d/copy-address *(ecx+0x1c) 0/r32/eax
17316 (copy-array Heap "eax" %eax)
17317 $test-compare-reg-with-mem:initialize-var2:
17318
17319 68/push 0/imm32/register
17320 68/push 0/imm32/register
17321 68/push 8/imm32/stack-offset
17322 68/push 1/imm32/block-depth
17323 ff 6/subop/push *(ecx+0x10)
17324 68/push 0x11/imm32/alloc-id:fake
17325 68/push 0/imm32/name
17326 68/push 0/imm32/name
17327 68/push 0x11/imm32/alloc-id:fake:payload
17328 89/<- %edx 4/r32/esp
17329 $test-compare-reg-with-mem:initialize-var2-name:
17330
17331 8d/copy-address *(edx+4) 0/r32/eax
17332 (copy-array Heap "var2" %eax)
17333 $test-compare-reg-with-mem:initialize-inouts:
17334
17335 68/push 0/imm32/is-deref:false
17336 68/push 0/imm32/next
17337 68/push 0/imm32/next
17338 52/push-edx/var2
17339 68/push 0x11/imm32/alloc-id:fake
17340 68/push 0x11/imm32/alloc-id:fake:payload
17341 89/<- %esi 4/r32/esp
17342
17343 68/push 0/imm32/is-deref:false
17344 56/push-esi/next
17345 68/push 0x11/imm32/alloc-id:fake
17346 51/push-ecx/var1
17347 68/push 0x11/imm32/alloc-id:fake
17348 68/push 0x11/imm32/alloc-id:fake:payload
17349 89/<- %esi 4/r32/esp
17350 $test-compare-reg-with-mem:initialize-stmt:
17351
17352 68/push 0/imm32/next
17353 68/push 0/imm32/next
17354 68/push 0/imm32/outputs
17355 68/push 0/imm32/outputs
17356 56/push-esi/inouts
17357 68/push 0x11/imm32/alloc-id:fake
17358 68/push 0/imm32/operation
17359 68/push 0/imm32/operation
17360 68/push 1/imm32/tag:stmt1
17361 89/<- %esi 4/r32/esp
17362 $test-compare-reg-with-mem:initialize-stmt-operation:
17363
17364 8d/copy-address *(esi+4) 0/r32/eax
17365 (copy-array Heap "compare" %eax)
17366
17367 c7 0/subop/copy *Curr-block-depth 0/imm32
17368 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
17369 (flush _test-output-buffered-file)
17370 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
17376
17377 (check-next-stream-line-equal _test-output-stream "3b/compare<- *(ebp+0x00000008) 0x00000000/r32" "F - test-compare-reg-with-mem")
17378
17379 89/<- %esp 5/r32/ebp
17380 5d/pop-to-ebp
17381 c3/return
17382
17383 test-compare-mem-with-literal:
17384
17385
17386
17387
17388
17389 55/push-ebp
17390 89/<- %ebp 4/r32/esp
17391
17392 (clear-stream _test-output-stream)
17393 (clear-stream $_test-output-buffered-file->buffer)
17394 $test-compare-mem-with-literal:initialize-type:
17395
17396 68/push 0/imm32/right:null
17397 68/push 0/imm32/right:null
17398 68/push 0/imm32/left:unused
17399 68/push 1/imm32/value:int
17400 68/push 1/imm32/is-atom?:true
17401 68/push 0x11/imm32/alloc-id:fake:payload
17402 89/<- %ecx 4/r32/esp
17403 $test-compare-mem-with-literal:initialize-var1:
17404
17405 68/push 0/imm32/register
17406 68/push 0/imm32/register
17407 68/push 8/imm32/stack-offset
17408 68/push 1/imm32/block-depth
17409 51/push-ecx
17410 68/push 0x11/imm32/alloc-id:fake
17411 68/push 0/imm32/name
17412 68/push 0/imm32/name
17413 68/push 0x11/imm32/alloc-id:fake:payload
17414 89/<- %ecx 4/r32/esp
17415 $test-compare-mem-with-literal:initialize-var1-name:
17416
17417 8d/copy-address *(ecx+4) 0/r32/eax
17418 (copy-array Heap "var1" %eax)
17419 $test-compare-mem-with-literal:initialize-literal-type:
17420
17421 68/push 0/imm32/right:null
17422 68/push 0/imm32/right:null
17423 68/push 0/imm32/left:unused
17424 68/push 0/imm32/value:literal
17425 68/push 1/imm32/is-atom?:true
17426 68/push 0x11/imm32/alloc-id:fake:payload
17427 89/<- %edx 4/r32/esp
17428 $test-compare-mem-with-literal:initialize-literal:
17429
17430 68/push 0/imm32/register
17431 68/push 0/imm32/register
17432 68/push 0/imm32/no-stack-offset
17433 68/push 1/imm32/block-depth
17434 52/push-edx
17435 68/push 0x11/imm32/alloc-id:fake
17436 68/push 0/imm32/name
17437 68/push 0/imm32/name
17438 68/push 0x11/imm32/alloc-id:fake:payload
17439 89/<- %edx 4/r32/esp
17440 $test-compare-mem-with-literal:initialize-literal-value:
17441
17442 8d/copy-address *(edx+4) 0/r32/eax
17443 (copy-array Heap "0x34" %eax)
17444 $test-compare-mem-with-literal:initialize-inouts:
17445
17446 68/push 0/imm32/is-deref:false
17447 68/push 0/imm32/next
17448 68/push 0/imm32/next
17449 52/push-edx/l
17450 68/push 0x11/imm32/alloc-id:fake
17451 68/push 0x11/imm32/alloc-id:fake:payload
17452 89/<- %esi 4/r32/esp
17453
17454 68/push 0/imm32/is-deref:false
17455 56/push-esi/next
17456 68/push 0x11/imm32/alloc-id:fake
17457 51/push-ecx/var1
17458 68/push 0x11/imm32/alloc-id:fake
17459 68/push 0x11/imm32/alloc-id:fake:payload
17460 89/<- %esi 4/r32/esp
17461 $test-compare-mem-with-literal:initialize-stmt:
17462
17463 68/push 0/imm32/next
17464 68/push 0/imm32/next
17465 68/push 0/imm32/outputs
17466 68/push 0/imm32/outputs
17467 56/push-esi/inouts
17468 68/push 0x11/imm32/alloc-id:fake
17469 68/push 0/imm32/operation
17470 68/push 0/imm32/operation
17471 68/push 1/imm32/tag:stmt1
17472 89/<- %esi 4/r32/esp
17473 $test-compare-mem-with-literal:initialize-stmt-operation:
17474
17475 8d/copy-address *(esi+4) 0/r32/eax
17476 (copy-array Heap "compare" %eax)
17477
17478 c7 0/subop/copy *Curr-block-depth 0/imm32
17479 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
17480 (flush _test-output-buffered-file)
17481 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
17487
17488 (check-next-stream-line-equal _test-output-stream "81 7/subop/compare *(ebp+0x00000008) 0x34/imm32" "F - test-compare-mem-with-literal")
17489
17490 89/<- %esp 5/r32/ebp
17491 5d/pop-to-ebp
17492 c3/return
17493
17494 test-compare-eax-with-literal:
17495
17496
17497
17498
17499
17500 55/push-ebp
17501 89/<- %ebp 4/r32/esp
17502
17503 (clear-stream _test-output-stream)
17504 (clear-stream $_test-output-buffered-file->buffer)
17505 $test-compare-eax-with-literal:initialize-type:
17506
17507 68/push 0/imm32/right:null
17508 68/push 0/imm32/right:null
17509 68/push 0/imm32/left:unused
17510 68/push 1/imm32/value:int
17511 68/push 1/imm32/is-atom?:true
17512 68/push 0x11/imm32/alloc-id:fake:payload
17513 89/<- %ecx 4/r32/esp
17514 $test-compare-eax-with-literal:initialize-var1:
17515
17516 68/push 0/imm32/register
17517 68/push 0/imm32/register
17518 68/push 0/imm32/no-stack-offset
17519 68/push 1/imm32/block-depth
17520 51/push-ecx
17521 68/push 0x11/imm32/alloc-id:fake
17522 68/push 0/imm32/name
17523 68/push 0/imm32/name
17524 68/push 0x11/imm32/alloc-id:fake:payload
17525 89/<- %ecx 4/r32/esp
17526 $test-compare-eax-with-literal:initialize-var1-name:
17527
17528 8d/copy-address *(ecx+4) 0/r32/eax
17529 (copy-array Heap "var1" %eax)
17530 $test-compare-eax-with-literal:initialize-var1-register:
17531
17532 8d/copy-address *(ecx+0x1c) 0/r32/eax
17533 (copy-array Heap "eax" %eax)
17534 $test-compare-eax-with-literal:initialize-literal-type:
17535
17536 68/push 0/imm32/right:null
17537 68/push 0/imm32/right:null
17538 68/push 0/imm32/left:unused
17539 68/push 0/imm32/value:literal
17540 68/push 1/imm32/is-atom?:true
17541 68/push 0x11/imm32/alloc-id:fake:payload
17542 89/<- %edx 4/r32/esp
17543 $test-compare-eax-with-literal:initialize-literal:
17544
17545 68/push 0/imm32/register
17546 68/push 0/imm32/register
17547 68/push 0/imm32/no-stack-offset
17548 68/push 1/imm32/block-depth
17549 52/push-edx
17550 68/push 0x11/imm32/alloc-id:fake
17551 68/push 0/imm32/name
17552 68/push 0/imm32/name
17553 68/push 0x11/imm32/alloc-id:fake:payload
17554 89/<- %edx 4/r32/esp
17555 $test-compare-eax-with-literal:initialize-literal-value:
17556
17557 8d/copy-address *(edx+4) 0/r32/eax
17558 (copy-array Heap "0x34" %eax)
17559 $test-compare-eax-with-literal:initialize-inouts:
17560
17561 68/push 0/imm32/is-deref:false
17562 68/push 0/imm32/next
17563 68/push 0/imm32/next
17564 52/push-edx/l
17565 68/push 0x11/imm32/alloc-id:fake
17566 68/push 0x11/imm32/alloc-id:fake:payload
17567 89/<- %esi 4/r32/esp
17568
17569 68/push 0/imm32/is-deref:false
17570 56/push-esi/next
17571 68/push 0x11/imm32/alloc-id:fake
17572 51/push-ecx/var1
17573 68/push 0x11/imm32/alloc-id:fake
17574 68/push 0x11/imm32/alloc-id:fake:payload
17575 89/<- %esi 4/r32/esp
17576 $test-compare-eax-with-literal:initialize-stmt:
17577
17578 68/push 0/imm32/next
17579 68/push 0/imm32/next
17580 68/push 0/imm32/outputs
17581 68/push 0/imm32/outputs
17582 56/push-esi/inouts
17583 68/push 0x11/imm32/alloc-id:fake
17584 68/push 0/imm32/operation
17585 68/push 0/imm32/operation
17586 68/push 1/imm32/tag:stmt1
17587 89/<- %esi 4/r32/esp
17588 $test-compare-eax-with-literal:initialize-stmt-operation:
17589
17590 8d/copy-address *(esi+4) 0/r32/eax
17591 (copy-array Heap "compare" %eax)
17592
17593 c7 0/subop/copy *Curr-block-depth 0/imm32
17594 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
17595 (flush _test-output-buffered-file)
17596 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
17602
17603 (check-next-stream-line-equal _test-output-stream "3d/compare-eax-with 0x34/imm32" "F - test-compare-eax-with-literal")
17604
17605 89/<- %esp 5/r32/ebp
17606 5d/pop-to-ebp
17607 c3/return
17608
17609 test-compare-reg-with-literal:
17610
17611
17612
17613
17614
17615 55/push-ebp
17616 89/<- %ebp 4/r32/esp
17617
17618 (clear-stream _test-output-stream)
17619 (clear-stream $_test-output-buffered-file->buffer)
17620 $test-compare-reg-with-literal:initialize-type:
17621
17622 68/push 0/imm32/right:null
17623 68/push 0/imm32/right:null
17624 68/push 0/imm32/left:unused
17625 68/push 1/imm32/value:int
17626 68/push 1/imm32/is-atom?:true
17627 68/push 0x11/imm32/alloc-id:fake:payload
17628 89/<- %ecx 4/r32/esp
17629 $test-compare-reg-with-literal:initialize-var1:
17630
17631 68/push 0/imm32/register
17632 68/push 0/imm32/register
17633 68/push 0/imm32/no-stack-offset
17634 68/push 1/imm32/block-depth
17635 51/push-ecx
17636 68/push 0x11/imm32/alloc-id:fake
17637 68/push 0/imm32/name
17638 68/push 0/imm32/name
17639 68/push 0x11/imm32/alloc-id:fake:payload
17640 89/<- %ecx 4/r32/esp
17641 $test-compare-reg-with-literal:initialize-var1-name:
17642
17643 8d/copy-address *(ecx+4) 0/r32/eax
17644 (copy-array Heap "var1" %eax)
17645 $test-compare-reg-with-literal:initialize-var1-register:
17646
17647 8d/copy-address *(ecx+0x1c) 0/r32/eax
17648 (copy-array Heap "ecx" %eax)
17649 $test-compare-reg-with-literal:initialize-literal-type:
17650
17651 68/push 0/imm32/right:null
17652 68/push 0/imm32/right:null
17653 68/push 0/imm32/left:unused
17654 68/push 0/imm32/value:literal
17655 68/push 1/imm32/is-atom?:true
17656 68/push 0x11/imm32/alloc-id:fake:payload
17657 89/<- %edx 4/r32/esp
17658 $test-compare-reg-with-literal:initialize-literal:
17659
17660 68/push 0/imm32/register
17661 68/push 0/imm32/register
17662 68/push 0/imm32/no-stack-offset
17663 68/push 1/imm32/block-depth
17664 52/push-edx
17665 68/push 0x11/imm32/alloc-id:fake
17666 68/push 0/imm32/name
17667 68/push 0/imm32/name
17668 68/push 0x11/imm32/alloc-id:fake:payload
17669 89/<- %edx 4/r32/esp
17670 $test-compare-reg-with-literal:initialize-literal-value:
17671
17672 8d/copy-address *(edx+4) 0/r32/eax
17673 (copy-array Heap "0x34" %eax)
17674 $test-compare-reg-with-literal:initialize-inouts:
17675
17676 68/push 0/imm32/is-deref:false
17677 68/push 0/imm32/next
17678 68/push 0/imm32/next
17679 52/push-edx/l
17680 68/push 0x11/imm32/alloc-id:fake
17681 68/push 0x11/imm32/alloc-id:fake:payload
17682 89/<- %esi 4/r32/esp
17683
17684 68/push 0/imm32/is-deref:false
17685 56/push-esi/next
17686 68/push 0x11/imm32/alloc-id:fake
17687 51/push-ecx/var1
17688 68/push 0x11/imm32/alloc-id:fake
17689 68/push 0x11/imm32/alloc-id:fake:payload
17690 89/<- %esi 4/r32/esp
17691 $test-compare-reg-with-literal:initialize-stmt:
17692
17693 68/push 0/imm32/next
17694 68/push 0/imm32/next
17695 68/push 0/imm32/outputs
17696 68/push 0/imm32/outputs
17697 56/push-esi/inouts
17698 68/push 0x11/imm32/alloc-id:fake
17699 68/push 0/imm32/operation
17700 68/push 0/imm32/operation
17701 68/push 1/imm32/tag:stmt1
17702 89/<- %esi 4/r32/esp
17703 $test-compare-reg-with-literal:initialize-stmt-operation:
17704
17705 8d/copy-address *(esi+4) 0/r32/eax
17706 (copy-array Heap "compare" %eax)
17707
17708 c7 0/subop/copy *Curr-block-depth 0/imm32
17709 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
17710 (flush _test-output-buffered-file)
17711 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
17717
17718 (check-next-stream-line-equal _test-output-stream "81 7/subop/compare %ecx 0x34/imm32" "F - test-compare-reg-with-literal")
17719
17720 89/<- %esp 5/r32/ebp
17721 5d/pop-to-ebp
17722 c3/return
17723
17724 test-emit-subx-stmt-function-call:
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742 55/push-ebp
17743 89/<- %ebp 4/r32/esp
17744
17745 (clear-stream _test-output-stream)
17746 (clear-stream $_test-output-buffered-file->buffer)
17747 $test-emit-subx-function-call:initialize-type:
17748
17749 68/push 0/imm32/right:null
17750 68/push 0/imm32/right:null
17751 68/push 0/imm32/left:unused
17752 68/push 1/imm32/value:int
17753 68/push 1/imm32/is-atom?:true
17754 68/push 0x11/imm32/alloc-id:fake:payload
17755 89/<- %ecx 4/r32/esp
17756 $test-emit-subx-function-call:initialize-var:
17757
17758 68/push 0/imm32/no-register
17759 68/push 0/imm32/no-register
17760 68/push -8/imm32/stack-offset
17761 68/push 1/imm32/block-depth
17762 51/push-ecx/type
17763 68/push 0x11/imm32/alloc-id:fake
17764 68/push 0/imm32/name
17765 68/push 0/imm32/name
17766 68/push 0x11/imm32/alloc-id:fake:payload
17767 89/<- %ecx 4/r32/esp
17768 $test-emit-subx-function-call:initialize-var-name:
17769
17770 8d/copy-address *(ecx+4) 0/r32/eax
17771 (copy-array Heap "foo" %eax)
17772 $test-emit-subx-function-call:initialize-stmt-var:
17773
17774 68/push 0/imm32/is-deref:false
17775 68/push 0/imm32/next
17776 68/push 0/imm32/next
17777 51/push-ecx/var-foo
17778 68/push 0x11/imm32/alloc-id:fake
17779 68/push 0x11/imm32/alloc-id:fake:payload
17780 89/<- %ebx 4/r32/esp
17781 $test-emit-subx-function-call:initialize-stmt:
17782
17783 68/push 0/imm32/no-outputs
17784 68/push 0/imm32/no-outputs
17785 53/push-ebx/inouts
17786 68/push 0x11/imm32/alloc-id:fake
17787 68/push 0/imm32/operation
17788 68/push 0/imm32/operation
17789 68/push 1/imm32/tag
17790 89/<- %esi 4/r32/esp
17791 $test-emit-subx-function-call:initialize-stmt-operation:
17792
17793 8d/copy-address *(esi+4) 0/r32/eax
17794 (copy-array Heap "f" %eax)
17795
17796 c7 0/subop/copy *Curr-block-depth 0/imm32
17797 (emit-subx-stmt _test-output-buffered-file %esi 0 Stderr 0)
17798 (flush _test-output-buffered-file)
17799 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
17805
17806 (check-next-stream-line-equal _test-output-stream "(f *(ebp+0xfffffff8))" "F - test-emit-subx-stmt-function-call")
17807
17808 89/<- %esp 5/r32/ebp
17809 5d/pop-to-ebp
17810 c3/return
17811
17812 test-emit-subx-stmt-function-call-with-literal-arg:
17813
17814
17815
17816
17817
17818
17819 55/push-ebp
17820 89/<- %ebp 4/r32/esp
17821
17822 (clear-stream _test-output-stream)
17823 (clear-stream $_test-output-buffered-file->buffer)
17824 $test-emit-subx-function-call-with-literal-arg:initialize-type:
17825
17826 68/push 0/imm32/right:null
17827 68/push 0/imm32/right:null
17828 68/push 0/imm32/left:unused
17829 68/push 0/imm32/value:literal
17830 68/push 1/imm32/is-atom?:true
17831 68/push 0x11/imm32/alloc-id:fake:payload
17832 89/<- %ecx 4/r32/esp
17833 $test-emit-subx-function-call-with-literal-arg:initialize-var:
17834
17835 68/push 0/imm32/no-register
17836 68/push 0/imm32/no-register
17837 68/push 0/imm32/no-stack-offset
17838 68/push 1/imm32/block-depth
17839 51/push-ecx/type
17840 68/push 0x11/imm32/alloc-id:fake
17841 68/push 0/imm32/name
17842 68/push 0/imm32/name
17843 68/push 0x11/imm32/alloc-id:fake:payload
17844 89/<- %ecx 4/r32/esp
17845 $test-emit-subx-function-call-with-literal-arg:initialize-var-name:
17846
17847 8d/copy-address *(ecx+4) 0/r32/eax
17848 (copy-array Heap "0x34" %eax)
17849 $test-emit-subx-function-call-with-literal-arg:initialize-stmt-var:
17850
17851 68/push 0/imm32/is-deref:false
17852 68/push 0/imm32/next
17853 68/push 0/imm32/next
17854 51/push-ecx/var-foo
17855 68/push 0x11/imm32/alloc-id:fake
17856 68/push 0x11/imm32/alloc-id:fake:payload
17857 89/<- %ebx 4/r32/esp
17858 $test-emit-subx-function-call-with-literal-arg:initialize-stmt:
17859
17860 68/push 0/imm32/no-outputs
17861 68/push 0/imm32/no-outputs
17862 53/push-ebx/inouts
17863 68/push 0x11/imm32/alloc-id:fake
17864 68/push 0/imm32/operation
17865 68/push 0/imm32/operation
17866 68/push 1/imm32/tag
17867 89/<- %esi 4/r32/esp
17868 $test-emit-subx-function-call-with-literal-arg:initialize-stmt-operation:
17869
17870 8d/copy-address *(esi+4) 0/r32/eax
17871 (copy-array Heap "f" %eax)
17872
17873 c7 0/subop/copy *Curr-block-depth 0/imm32
17874 (emit-subx-stmt _test-output-buffered-file %esi 0 %ebx Stderr 0)
17875 (flush _test-output-buffered-file)
17876 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
17882
17883 (check-next-stream-line-equal _test-output-stream "(f 0x34)" "F - test-emit-subx-stmt-function-call-with-literal-arg")
17884
17885 89/<- %esp 5/r32/ebp
17886 5d/pop-to-ebp
17887 c3/return
17888
17889 emit-indent:
17890
17891 55/push-ebp
17892 89/<- %ebp 4/r32/esp
17893
17894 50/push-eax
17895
17896 8b/-> *(ebp+0xc) 0/r32/eax
17897 {
17898
17899 3d/compare-eax-with 0/imm32
17900 7e/jump-if-<= break/disp8
17901 (write-buffered *(ebp+8) " ")
17902 48/decrement-eax
17903 eb/jump loop/disp8
17904 }
17905 $emit-indent:end:
17906
17907 58/pop-to-eax
17908
17909 89/<- %esp 5/r32/ebp
17910 5d/pop-to-ebp
17911 c3/return
17912
17913 emit-subx-prologue:
17914
17915 55/push-ebp
17916 89/<- %ebp 4/r32/esp
17917
17918 (write-buffered *(ebp+8) " # . prologue\n")
17919 (write-buffered *(ebp+8) " 55/push-ebp\n")
17920 (write-buffered *(ebp+8) " 89/<- %ebp 4/r32/esp\n")
17921 $emit-subx-prologue:end:
17922
17923 89/<- %esp 5/r32/ebp
17924 5d/pop-to-ebp
17925 c3/return
17926
17927 emit-subx-epilogue:
17928
17929 55/push-ebp
17930 89/<- %ebp 4/r32/esp
17931
17932 (write-buffered *(ebp+8) " # . epilogue\n")
17933 (write-buffered *(ebp+8) " 89/<- %esp 5/r32/ebp\n")
17934 (write-buffered *(ebp+8) " 5d/pop-to-ebp\n")
17935 (write-buffered *(ebp+8) " c3/return\n")
17936 $emit-subx-epilogue:end:
17937
17938 89/<- %esp 5/r32/ebp
17939 5d/pop-to-ebp
17940 c3/return