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
370
371
372 Tree-is-atom:
373 0/imm32
374
375 Tree-value:
376 4/imm32
377
378 Tree-left:
379 4/imm32
380 Tree-right:
381 0xc/imm32
382
383 Tree-size:
384 0x14/imm32
385
386
387
388
389 Type-id:
390 0x1c/imm32/write
391 0/imm32/read
392 0x100/imm32/size
393
394 "literal"/imm32
395 "int"/imm32
396 "addr"/imm32
397 "array"/imm32
398 "handle"/imm32
399 "boolean"/imm32
400 "constant"/imm32
401 "offset"/imm32
402 0/imm32
403
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 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
409 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
410 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
411
412
413
414
415 Typeinfo-id:
416 0/imm32
417 Typeinfo-fields:
418 4/imm32
419
420
421
422
423
424 Typeinfo-total-size-in-bytes:
425 0xc/imm32
426 Typeinfo-next:
427 0x10/imm32
428 Typeinfo-size:
429 0x18/imm32
430
431
432
433 Typeinfo-fields-row-size:
434 0x10/imm32
435
436
437
438
439
440
441
442
443 Typeinfo-entry-input-var:
444 0/imm32
445 Typeinfo-entry-index:
446 8/imm32
447 Typeinfo-entry-output-var:
448 0xc/imm32
449 Typeinfo-entry-size:
450 0x14/imm32
451
452 == code
453
454 Entry:
455
456 89/<- %ebp 4/r32/esp
457 (new-segment *Heap-size Heap)
458
459 {
460
461 81 7/subop/compare *ebp 1/imm32
462 7e/jump-if-<= break/disp8
463
464 (kernel-string-equal? *(ebp+8) "test")
465 3d/compare-eax-and 0/imm32/false
466 74/jump-if-= break/disp8
467
468 (run-tests)
469
470 8b/-> *Num-test-failures 3/r32/ebx
471 eb/jump $mu-main:end/disp8
472 }
473
474 (convert-mu Stdin Stdout)
475 (flush Stdout)
476
477 bb/copy-to-ebx 0/imm32
478 $mu-main:end:
479 b8/copy-to-eax 1/imm32/exit
480 cd/syscall 0x80/imm8
481
482 convert-mu:
483
484 55/push-ebp
485 89/<- %ebp 4/r32/esp
486
487 c7 0/subop/copy *Next-block-index 1/imm32
488 c7 0/subop/copy *Type-id 0x1c/imm32
489 c7 0/subop/copy *_Program-functions 0/imm32
490 c7 0/subop/copy *_Program-functions->payload 0/imm32
491 c7 0/subop/copy *_Program-types 0/imm32
492 c7 0/subop/copy *_Program-types->payload 0/imm32
493
494 (parse-mu *(ebp+8))
495 (populate-mu-type-sizes)
496
497 (check-mu-types)
498 (emit-subx *(ebp+0xc))
499 $convert-mu:end:
500
501 89/<- %esp 5/r32/ebp
502 5d/pop-to-ebp
503 c3/return
504
505 test-convert-empty-input:
506
507
508 55/push-ebp
509 89/<- %ebp 4/r32/esp
510
511 (clear-stream _test-input-stream)
512 (clear-stream $_test-input-buffered-file->buffer)
513 (clear-stream _test-output-stream)
514 (clear-stream $_test-output-buffered-file->buffer)
515
516 (convert-mu _test-input-buffered-file _test-output-buffered-file)
517 (flush _test-output-buffered-file)
518 (check-stream-equal _test-output-stream "" "F - test-convert-empty-input")
519
520 89/<- %esp 5/r32/ebp
521 5d/pop-to-ebp
522 c3/return
523
524 test-convert-function-skeleton:
525
526 55/push-ebp
527 89/<- %ebp 4/r32/esp
528
529 (clear-stream _test-input-stream)
530 (clear-stream $_test-input-buffered-file->buffer)
531 (clear-stream _test-output-stream)
532 (clear-stream $_test-output-buffered-file->buffer)
533
534 (write _test-input-stream "fn foo {\n")
535 (write _test-input-stream "}\n")
536
537 (convert-mu _test-input-buffered-file _test-output-buffered-file)
538 (flush _test-output-buffered-file)
539 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
545
546 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-skeleton/0")
547 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-skeleton/1")
548 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-skeleton/2")
549 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-skeleton/3")
550 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-skeleton/4")
551 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-skeleton/5")
552 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-skeleton/6")
553 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-skeleton/7")
554
555 89/<- %esp 5/r32/ebp
556 5d/pop-to-ebp
557 c3/return
558
559 test-convert-multiple-function-skeletons:
560
561 55/push-ebp
562 89/<- %ebp 4/r32/esp
563
564 (clear-stream _test-input-stream)
565 (clear-stream $_test-input-buffered-file->buffer)
566 (clear-stream _test-output-stream)
567 (clear-stream $_test-output-buffered-file->buffer)
568
569 (write _test-input-stream "fn foo {\n")
570 (write _test-input-stream "}\n")
571 (write _test-input-stream "fn bar {\n")
572 (write _test-input-stream "}\n")
573
574 (convert-mu _test-input-buffered-file _test-output-buffered-file)
575 (flush _test-output-buffered-file)
576 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
582
583 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-multiple-function-skeletons/0")
584 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-multiple-function-skeletons/1")
585 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-multiple-function-skeletons/2")
586 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-multiple-function-skeletons/3")
587 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-multiple-function-skeletons/4")
588 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-multiple-function-skeletons/5")
589 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-multiple-function-skeletons/6")
590 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-multiple-function-skeletons/7")
591
592 (check-next-stream-line-equal _test-output-stream "bar:" "F - test-convert-multiple-function-skeletons/10")
593 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-multiple-function-skeletons/11")
594 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-multiple-function-skeletons/12")
595 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-multiple-function-skeletons/13")
596 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-multiple-function-skeletons/14")
597 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-multiple-function-skeletons/15")
598 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-multiple-function-skeletons/16")
599 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-multiple-function-skeletons/17")
600
601 89/<- %esp 5/r32/ebp
602 5d/pop-to-ebp
603 c3/return
604
605 test-convert-function-with-arg:
606
607 55/push-ebp
608 89/<- %ebp 4/r32/esp
609
610 (clear-stream _test-input-stream)
611 (clear-stream $_test-input-buffered-file->buffer)
612 (clear-stream _test-output-stream)
613 (clear-stream $_test-output-buffered-file->buffer)
614
615 (write _test-input-stream "fn foo n: int {\n")
616 (write _test-input-stream "}\n")
617
618 (convert-mu _test-input-buffered-file _test-output-buffered-file)
619 (flush _test-output-buffered-file)
620 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
626
627 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-arg/0")
628 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-arg/1")
629 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-arg/2")
630 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-arg/3")
631 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-arg/4")
632 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-arg/5")
633 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-arg/6")
634 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-arg/7")
635
636 89/<- %esp 5/r32/ebp
637 5d/pop-to-ebp
638 c3/return
639
640 test-convert-function-with-arg-and-body:
641
642 55/push-ebp
643 89/<- %ebp 4/r32/esp
644
645 (clear-stream _test-input-stream)
646 (clear-stream $_test-input-buffered-file->buffer)
647 (clear-stream _test-output-stream)
648 (clear-stream $_test-output-buffered-file->buffer)
649
650 (write _test-input-stream "fn foo n: int {\n")
651 (write _test-input-stream " increment n\n")
652 (write _test-input-stream "}\n")
653
654 (convert-mu _test-input-buffered-file _test-output-buffered-file)
655 (flush _test-output-buffered-file)
656 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
662
663 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-arg-and-body/0")
664 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-arg-and-body/1")
665 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-arg-and-body/2")
666 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-arg-and-body/3")
667 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-arg-and-body/4")
668 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-arg-and-body/5")
669 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-arg-and-body/6")
670 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-arg-and-body/7")
671 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-arg-and-body/8")
672 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-arg-and-body/9")
673 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-arg-and-body/10")
674 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-arg-and-body/11")
675 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-arg-and-body/12")
676
677 89/<- %esp 5/r32/ebp
678 5d/pop-to-ebp
679 c3/return
680
681 test-convert-function-distinguishes-args:
682
683 55/push-ebp
684 89/<- %ebp 4/r32/esp
685
686 (clear-stream _test-input-stream)
687 (clear-stream $_test-input-buffered-file->buffer)
688 (clear-stream _test-output-stream)
689 (clear-stream $_test-output-buffered-file->buffer)
690
691 (write _test-input-stream "fn foo a: int, b: int {\n")
692 (write _test-input-stream " increment b\n")
693 (write _test-input-stream "}\n")
694
695 (convert-mu _test-input-buffered-file _test-output-buffered-file)
696 (flush _test-output-buffered-file)
697 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
703
704 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-distinguishes-args/0")
705 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-distinguishes-args/1")
706 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-distinguishes-args/2")
707 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-distinguishes-args/3")
708 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-distinguishes-args/4")
709 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-distinguishes-args/5")
710 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x0000000c)" "F - test-convert-function-distinguishes-args/6")
711 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-distinguishes-args/7")
712 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-distinguishes-args/8")
713 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-distinguishes-args/9")
714 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-distinguishes-args/10")
715 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-distinguishes-args/11")
716 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-distinguishes-args/12")
717
718 89/<- %esp 5/r32/ebp
719 5d/pop-to-ebp
720 c3/return
721
722 test-convert-function-returns-result:
723
724 55/push-ebp
725 89/<- %ebp 4/r32/esp
726
727 (clear-stream _test-input-stream)
728 (clear-stream $_test-input-buffered-file->buffer)
729 (clear-stream _test-output-stream)
730 (clear-stream $_test-output-buffered-file->buffer)
731
732 (write _test-input-stream "fn foo a: int, b: int -> result/eax: int {\n")
733 (write _test-input-stream " result <- copy a\n")
734 (write _test-input-stream " result <- increment\n")
735 (write _test-input-stream "}\n")
736
737 (convert-mu _test-input-buffered-file _test-output-buffered-file)
738 (flush _test-output-buffered-file)
739 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
745
746 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-returns-result/0")
747 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-returns-result/1")
748 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-returns-result/2")
749 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-returns-result/3")
750 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-returns-result/4")
751 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-returns-result/5")
752 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-returns-result/6")
753 (check-next-stream-line-equal _test-output-stream " 40/increment-eax" "F - test-convert-function-returns-result/7")
754 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-returns-result/8")
755 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-returns-result/9")
756 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-returns-result/10")
757 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-returns-result/11")
758 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-returns-result/12")
759 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-returns-result/13")
760
761 89/<- %esp 5/r32/ebp
762 5d/pop-to-ebp
763 c3/return
764
765 test-convert-function-with-literal-arg:
766
767 55/push-ebp
768 89/<- %ebp 4/r32/esp
769
770 (clear-stream _test-input-stream)
771 (clear-stream $_test-input-buffered-file->buffer)
772 (clear-stream _test-output-stream)
773 (clear-stream $_test-output-buffered-file->buffer)
774
775 (write _test-input-stream "fn foo a: int, b: int -> result/eax: int {\n")
776 (write _test-input-stream " result <- copy a\n")
777 (write _test-input-stream " result <- add 1\n")
778 (write _test-input-stream "}\n")
779
780 (convert-mu _test-input-buffered-file _test-output-buffered-file)
781 (flush _test-output-buffered-file)
782 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
788
789 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-literal-arg/0")
790 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-literal-arg/1")
791 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-literal-arg/2")
792 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-literal-arg/3")
793 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-literal-arg/4")
794 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-literal-arg/5")
795 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-with-literal-arg/6")
796 (check-next-stream-line-equal _test-output-stream " 05/add-to-eax 1/imm32" "F - test-convert-function-with-literal-arg/7")
797 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-literal-arg/8")
798 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-literal-arg/9")
799 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-literal-arg/10")
800 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-literal-arg/11")
801 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-literal-arg/12")
802 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-literal-arg/13")
803
804 89/<- %esp 5/r32/ebp
805 5d/pop-to-ebp
806 c3/return
807
808 test-convert-function-with-literal-arg-2:
809
810 55/push-ebp
811 89/<- %ebp 4/r32/esp
812
813 (clear-stream _test-input-stream)
814 (clear-stream $_test-input-buffered-file->buffer)
815 (clear-stream _test-output-stream)
816 (clear-stream $_test-output-buffered-file->buffer)
817
818 (write _test-input-stream "fn foo a: int, b: int -> result/ebx: int {\n")
819 (write _test-input-stream " result <- copy a\n")
820 (write _test-input-stream " result <- add 1\n")
821 (write _test-input-stream "}\n")
822
823 (convert-mu _test-input-buffered-file _test-output-buffered-file)
824 (flush _test-output-buffered-file)
825 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
831
832 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-literal-arg-2/0")
833 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-literal-arg-2/1")
834 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-literal-arg-2/2")
835 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-literal-arg-2/3")
836 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-literal-arg-2/4")
837 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-literal-arg-2/5")
838 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000003/r32" "F - test-convert-function-with-literal-arg-2/6")
839 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %ebx 1/imm32" "F - test-convert-function-with-literal-arg-2/7")
840 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-literal-arg-2/8")
841 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-literal-arg-2/9")
842 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-literal-arg-2/10")
843 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-literal-arg-2/11")
844 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-literal-arg-2/12")
845 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-literal-arg-2/13")
846
847 89/<- %esp 5/r32/ebp
848 5d/pop-to-ebp
849 c3/return
850
851 test-convert-function-call-with-literal-arg:
852
853 55/push-ebp
854 89/<- %ebp 4/r32/esp
855
856 (clear-stream _test-input-stream)
857 (clear-stream $_test-input-buffered-file->buffer)
858 (clear-stream _test-output-stream)
859 (clear-stream $_test-output-buffered-file->buffer)
860
861 (write _test-input-stream "fn main -> result/ebx: int {\n")
862 (write _test-input-stream " result <- do-add 3 4\n")
863 (write _test-input-stream "}\n")
864 (write _test-input-stream "fn do-add a: int, b: int -> result/ebx: int {\n")
865 (write _test-input-stream " result <- copy a\n")
866 (write _test-input-stream " result <- add b\n")
867 (write _test-input-stream "}\n")
868
869 (convert-mu _test-input-buffered-file _test-output-buffered-file)
870 (flush _test-output-buffered-file)
871 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
877
878 (check-next-stream-line-equal _test-output-stream "main:" "F - test-convert-function-call-with-literal-arg/0")
879 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-literal-arg/1")
880 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-literal-arg/2")
881 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-literal-arg/3")
882 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-literal-arg/4")
883 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:loop:" "F - test-convert-function-call-with-literal-arg/5")
884 (check-next-stream-line-equal _test-output-stream " (do-add 3 4)" "F - test-convert-function-call-with-literal-arg/6")
885 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-literal-arg/7")
886 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:break:" "F - test-convert-function-call-with-literal-arg/8")
887 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-literal-arg/9")
888 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-literal-arg/10")
889 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-literal-arg/11")
890 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-literal-arg/12")
891 (check-next-stream-line-equal _test-output-stream "do-add:" "F - test-convert-function-call-with-literal-arg/13")
892 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-literal-arg/14")
893 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-literal-arg/15")
894 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-literal-arg/16")
895 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-literal-arg/17")
896 (check-next-stream-line-equal _test-output-stream "$do-add:0x00000002:loop:" "F - test-convert-function-call-with-literal-arg/18")
897 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/19")
898 (check-next-stream-line-equal _test-output-stream " 03/add *(ebp+0x0000000c) 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/20")
899 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-literal-arg/21")
900 (check-next-stream-line-equal _test-output-stream "$do-add:0x00000002:break:" "F - test-convert-function-call-with-literal-arg/22")
901 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-literal-arg/23")
902 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-literal-arg/24")
903 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-literal-arg/25")
904 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-literal-arg/26")
905
906 89/<- %esp 5/r32/ebp
907 5d/pop-to-ebp
908 c3/return
909
910 test-convert-function-with-local-var-in-mem:
911
912 55/push-ebp
913 89/<- %ebp 4/r32/esp
914
915 (clear-stream _test-input-stream)
916 (clear-stream $_test-input-buffered-file->buffer)
917 (clear-stream _test-output-stream)
918 (clear-stream $_test-output-buffered-file->buffer)
919
920 (write _test-input-stream "fn foo {\n")
921 (write _test-input-stream " var x: int\n")
922 (write _test-input-stream " increment x\n")
923 (write _test-input-stream "}\n")
924
925 (convert-mu _test-input-buffered-file _test-output-buffered-file)
926 (flush _test-output-buffered-file)
927 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
933
934 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-mem/0")
935 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-mem/1")
936 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-mem/2")
937 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-mem/3")
938 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-mem/4")
939 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-mem/5")
940 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-mem/6")
941 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-local-var-in-mem/7")
942 (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")
943 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-mem/9")
944 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-mem/10")
945 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-mem/11")
946 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-mem/12")
947 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-mem/13")
948 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-mem/14")
949
950 89/<- %esp 5/r32/ebp
951 5d/pop-to-ebp
952 c3/return
953
954 test-convert-function-with-local-var-with-compound-type-in-mem:
955
956 55/push-ebp
957 89/<- %ebp 4/r32/esp
958
959 (clear-stream _test-input-stream)
960 (clear-stream $_test-input-buffered-file->buffer)
961 (clear-stream _test-output-stream)
962 (clear-stream $_test-output-buffered-file->buffer)
963
964 (write _test-input-stream "fn foo {\n")
965 (write _test-input-stream " var x: (addr int)\n")
966 (write _test-input-stream " copy-to x, 0\n")
967 (write _test-input-stream "}\n")
968
969 (convert-mu _test-input-buffered-file _test-output-buffered-file)
970 (flush _test-output-buffered-file)
971 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
977
978 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/0")
979 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-with-compound-type-in-mem/1")
980 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-with-compound-type-in-mem/2")
981 (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")
982 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-with-compound-type-in-mem/4")
983 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/5")
984 (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")
985 (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")
986 (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")
987 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-with-compound-type-in-mem/9")
988 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/10")
989 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-with-compound-type-in-mem/11")
990 (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")
991 (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")
992 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-with-compound-type-in-mem/14")
993
994 89/<- %esp 5/r32/ebp
995 5d/pop-to-ebp
996 c3/return
997
998 test-convert-function-with-local-var-in-reg:
999
1000 55/push-ebp
1001 89/<- %ebp 4/r32/esp
1002
1003 (clear-stream _test-input-stream)
1004 (clear-stream $_test-input-buffered-file->buffer)
1005 (clear-stream _test-output-stream)
1006 (clear-stream $_test-output-buffered-file->buffer)
1007
1008 (write _test-input-stream "fn foo {\n")
1009 (write _test-input-stream " var x/ecx: int <- copy 3\n")
1010 (write _test-input-stream " x <- increment\n")
1011 (write _test-input-stream "}\n")
1012
1013 (convert-mu _test-input-buffered-file _test-output-buffered-file)
1014 (flush _test-output-buffered-file)
1015 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
1021
1022 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-reg/0")
1023 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-reg/1")
1024 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-reg/2")
1025 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-reg/3")
1026 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-reg/4")
1027 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-reg/5")
1028 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-local-var-in-reg/6")
1029 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-function-with-local-var-in-reg/7")
1030 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-convert-function-with-local-var-in-reg/8")
1031 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-local-var-in-reg/9")
1032 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-reg/10")
1033 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-reg/11")
1034 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-reg/12")
1035 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-reg/13")
1036 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-reg/14")
1037 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-reg/15")
1038
1039 89/<- %esp 5/r32/ebp
1040 5d/pop-to-ebp
1041 c3/return
1042
1043 test-convert-function-with-second-local-var-in-same-reg:
1044
1045 55/push-ebp
1046 89/<- %ebp 4/r32/esp
1047
1048 (clear-stream _test-input-stream)
1049 (clear-stream $_test-input-buffered-file->buffer)
1050 (clear-stream _test-output-stream)
1051 (clear-stream $_test-output-buffered-file->buffer)
1052
1053 (write _test-input-stream "fn foo {\n")
1054 (write _test-input-stream " var x/ecx: int <- copy 3\n")
1055 (write _test-input-stream " var y/ecx: int <- copy 4\n")
1056 (write _test-input-stream " y <- increment\n")
1057 (write _test-input-stream "}\n")
1058
1059 (convert-mu _test-input-buffered-file _test-output-buffered-file)
1060 (flush _test-output-buffered-file)
1061 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
1067
1068 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-second-local-var-in-same-reg/0")
1069 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-second-local-var-in-same-reg/1")
1070 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-second-local-var-in-same-reg/2")
1071 (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")
1072 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-second-local-var-in-same-reg/4")
1073 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-second-local-var-in-same-reg/5")
1074 (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")
1075 (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")
1076 (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")
1077 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-convert-function-with-second-local-var-in-same-reg/9")
1078 (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")
1079 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-second-local-var-in-same-reg/11")
1080 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-second-local-var-in-same-reg/12")
1081 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-second-local-var-in-same-reg/13")
1082 (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")
1083 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-second-local-var-in-same-reg/15")
1084 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-second-local-var-in-same-reg/16")
1085
1086 89/<- %esp 5/r32/ebp
1087 5d/pop-to-ebp
1088 c3/return
1089
1090 test-convert-function-with-local-var-dereferenced:
1091
1092 55/push-ebp
1093 89/<- %ebp 4/r32/esp
1094
1095 (clear-stream _test-input-stream)
1096 (clear-stream $_test-input-buffered-file->buffer)
1097 (clear-stream _test-output-stream)
1098 (clear-stream $_test-output-buffered-file->buffer)
1099
1100 (write _test-input-stream "fn foo {\n")
1101 (write _test-input-stream " var x/ecx: (addr int) <- copy 0\n")
1102 (write _test-input-stream " increment *x\n")
1103 (write _test-input-stream "}\n")
1104
1105 (convert-mu _test-input-buffered-file _test-output-buffered-file)
1106 (flush _test-output-buffered-file)
1107 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
1113
1114 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-dereferenced/0")
1115 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-dereferenced/1")
1116 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-dereferenced/2")
1117 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-dereferenced/3")
1118 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-dereferenced/4")
1119 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-dereferenced/5")
1120 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-local-var-dereferenced/6")
1121 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-local-var-dereferenced/7")
1122 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *ecx" "F - test-convert-function-with-local-var-dereferenced/8")
1123 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-local-var-dereferenced/9")
1124 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-dereferenced/10")
1125 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-dereferenced/11")
1126 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-dereferenced/12")
1127 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-dereferenced/13")
1128 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-dereferenced/14")
1129 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-dereferenced/15")
1130
1131 89/<- %esp 5/r32/ebp
1132 5d/pop-to-ebp
1133 c3/return
1134
1135 test-convert-compare-register-with-literal:
1136
1137 55/push-ebp
1138 89/<- %ebp 4/r32/esp
1139
1140 (clear-stream _test-input-stream)
1141 (clear-stream $_test-input-buffered-file->buffer)
1142 (clear-stream _test-output-stream)
1143 (clear-stream $_test-output-buffered-file->buffer)
1144
1145 (write _test-input-stream "fn foo {\n")
1146 (write _test-input-stream " var x/ecx: int <- copy 0\n")
1147 (write _test-input-stream " compare x, 0\n")
1148 (write _test-input-stream "}\n")
1149
1150 (convert-mu _test-input-buffered-file _test-output-buffered-file)
1151 (flush _test-output-buffered-file)
1152 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
1158
1159 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-compare-register-with-literal/0")
1160 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-compare-register-with-literal/1")
1161 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-compare-register-with-literal/2")
1162 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-compare-register-with-literal/3")
1163 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-compare-register-with-literal/4")
1164 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-compare-register-with-literal/5")
1165 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-compare-register-with-literal/6")
1166 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-compare-register-with-literal/7")
1167 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %ecx 0/imm32" "F - test-convert-compare-register-with-literal/8")
1168 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-compare-register-with-literal/9")
1169 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-compare-register-with-literal/10")
1170 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-compare-register-with-literal/11")
1171 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-compare-register-with-literal/12")
1172 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-compare-register-with-literal/13")
1173 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-compare-register-with-literal/14")
1174 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-compare-register-with-literal/15")
1175
1176 89/<- %esp 5/r32/ebp
1177 5d/pop-to-ebp
1178 c3/return
1179
1180 test-convert-function-with-local-var-in-block:
1181
1182 55/push-ebp
1183 89/<- %ebp 4/r32/esp
1184
1185 (clear-stream _test-input-stream)
1186 (clear-stream $_test-input-buffered-file->buffer)
1187 (clear-stream _test-output-stream)
1188 (clear-stream $_test-output-buffered-file->buffer)
1189
1190 (write _test-input-stream "fn foo {\n")
1191 (write _test-input-stream " {\n")
1192 (write _test-input-stream " var x: int\n")
1193 (write _test-input-stream " increment x\n")
1194 (write _test-input-stream " }\n")
1195 (write _test-input-stream "}\n")
1196
1197 (convert-mu _test-input-buffered-file _test-output-buffered-file)
1198 (flush _test-output-buffered-file)
1199 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
1205
1206 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-block/0")
1207 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-block/1")
1208 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-block/2")
1209 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-block/3")
1210 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-block/4")
1211 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-block/5")
1212 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-block/6")
1213 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-local-var-in-block/7")
1214 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-block/8")
1215 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-local-var-in-block/9")
1216 (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")
1217 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-block/11")
1218 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-local-var-in-block/12")
1219 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-block/13")
1220 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-block/14")
1221 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-block/15")
1222 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-block/16")
1223 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-block/17")
1224 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-block/18")
1225
1226 89/<- %esp 5/r32/ebp
1227 5d/pop-to-ebp
1228 c3/return
1229
1230 test-convert-function-with-local-var-in-named-block:
1231
1232 55/push-ebp
1233 89/<- %ebp 4/r32/esp
1234
1235 (clear-stream _test-input-stream)
1236 (clear-stream $_test-input-buffered-file->buffer)
1237 (clear-stream _test-output-stream)
1238 (clear-stream $_test-output-buffered-file->buffer)
1239
1240 (write _test-input-stream "fn foo {\n")
1241 (write _test-input-stream " $bar: {\n")
1242 (write _test-input-stream " var x: int\n")
1243 (write _test-input-stream " increment x\n")
1244 (write _test-input-stream " }\n")
1245 (write _test-input-stream "}\n")
1246
1247 (convert-mu _test-input-buffered-file _test-output-buffered-file)
1248 (flush _test-output-buffered-file)
1249 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
1255
1256 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-named-block/0")
1257 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-named-block/1")
1258 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-named-block/2")
1259 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-named-block/3")
1260 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-named-block/4")
1261 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-named-block/5")
1262 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-named-block/6")
1263 (check-next-stream-line-equal _test-output-stream "$bar:loop:" "F - test-convert-function-with-local-var-in-named-block/7")
1264 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-named-block/8")
1265 (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")
1266 (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")
1267 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-named-block/11")
1268 (check-next-stream-line-equal _test-output-stream "$bar:break:" "F - test-convert-function-with-local-var-in-named-block/12")
1269 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-named-block/13")
1270 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-named-block/14")
1271 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-named-block/15")
1272 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-named-block/16")
1273 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-named-block/17")
1274 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-named-block/18")
1275
1276 89/<- %esp 5/r32/ebp
1277 5d/pop-to-ebp
1278 c3/return
1279
1280 test-always-shadow-outermost-reg-vars-in-function:
1281
1282 55/push-ebp
1283 89/<- %ebp 4/r32/esp
1284
1285 (clear-stream _test-input-stream)
1286 (clear-stream $_test-input-buffered-file->buffer)
1287 (clear-stream _test-output-stream)
1288 (clear-stream $_test-output-buffered-file->buffer)
1289
1290 (write _test-input-stream "fn foo {\n")
1291 (write _test-input-stream " var x/ecx: int <- copy 3\n")
1292 (write _test-input-stream "}\n")
1293
1294 (convert-mu _test-input-buffered-file _test-output-buffered-file)
1295 (flush _test-output-buffered-file)
1296 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
1302
1303 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-always-shadow-outermost-reg-vars-in-function/0")
1304 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-always-shadow-outermost-reg-vars-in-function/1")
1305 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-always-shadow-outermost-reg-vars-in-function/2")
1306 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-always-shadow-outermost-reg-vars-in-function/3")
1307 (check-next-stream-line-equal _test-output-stream " {" "F - test-always-shadow-outermost-reg-vars-in-function/4")
1308 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-always-shadow-outermost-reg-vars-in-function/5")
1309 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-compare-register-with-literal/6")
1310 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-always-shadow-outermost-reg-vars-in-function/8")
1311 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-compare-register-with-literal/9")
1312 (check-next-stream-line-equal _test-output-stream " }" "F - test-always-shadow-outermost-reg-vars-in-function/12")
1313 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-always-shadow-outermost-reg-vars-in-function/13")
1314 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-always-shadow-outermost-reg-vars-in-function/14")
1315 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-always-shadow-outermost-reg-vars-in-function/15")
1316 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-always-shadow-outermost-reg-vars-in-function/16")
1317 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-always-shadow-outermost-reg-vars-in-function/17")
1318
1319 89/<- %esp 5/r32/ebp
1320 5d/pop-to-ebp
1321 c3/return
1322
1323 _pending-test-clobber-dead-local:
1324
1325 55/push-ebp
1326 89/<- %ebp 4/r32/esp
1327
1328 (clear-stream _test-input-stream)
1329 (clear-stream $_test-input-buffered-file->buffer)
1330 (clear-stream _test-output-stream)
1331 (clear-stream $_test-output-buffered-file->buffer)
1332
1333 (write _test-input-stream "fn foo {\n")
1334 (write _test-input-stream " var x/ecx: int <- copy 3\n")
1335 (write _test-input-stream " {\n")
1336 (write _test-input-stream " var y/ecx: int <- copy 4\n")
1337 (write _test-input-stream " }\n")
1338 (write _test-input-stream "}\n")
1339
1340 (convert-mu _test-input-buffered-file _test-output-buffered-file)
1341 (flush _test-output-buffered-file)
1342 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
1348
1349 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-clobber-dead-local/0")
1350 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-clobber-dead-local/1")
1351 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-clobber-dead-local/2")
1352 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-clobber-dead-local/3")
1353 (check-next-stream-line-equal _test-output-stream " {" "F - test-clobber-dead-local/4")
1354 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-clobber-dead-local/5")
1355 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-clobber-dead-local/6")
1356 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-clobber-dead-local/7")
1357 (check-next-stream-line-equal _test-output-stream " {" "F - test-clobber-dead-local/8")
1358 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-clobber-dead-local/9")
1359 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-clobber-dead-local/10")
1360 (check-next-stream-line-equal _test-output-stream " }" "F - test-clobber-dead-local/11")
1361 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-clobber-dead-local/12")
1362 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-clobber-dead-local/13")
1363 (check-next-stream-line-equal _test-output-stream " }" "F - test-clobber-dead-local/14")
1364 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-clobber-dead-local/15")
1365 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-clobber-dead-local/16")
1366 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-clobber-dead-local/17")
1367 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-clobber-dead-local/18")
1368 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-clobber-dead-local/19")
1369
1370 89/<- %esp 5/r32/ebp
1371 5d/pop-to-ebp
1372 c3/return
1373
1374 test-shadow-live-local:
1375
1376 55/push-ebp
1377 89/<- %ebp 4/r32/esp
1378
1379 (clear-stream _test-input-stream)
1380 (clear-stream $_test-input-buffered-file->buffer)
1381 (clear-stream _test-output-stream)
1382 (clear-stream $_test-output-buffered-file->buffer)
1383
1384 (write _test-input-stream "fn foo {\n")
1385 (write _test-input-stream " var x/ecx: int <- copy 3\n")
1386 (write _test-input-stream " {\n")
1387 (write _test-input-stream " var y/ecx: int <- copy 4\n")
1388 (write _test-input-stream " }\n")
1389 (write _test-input-stream " x <- increment\n")
1390 (write _test-input-stream "}\n")
1391
1392 (convert-mu _test-input-buffered-file _test-output-buffered-file)
1393 (flush _test-output-buffered-file)
1394 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
1400
1401 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-live-local/0")
1402 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-live-local/1")
1403 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-live-local/2")
1404 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-live-local/3")
1405 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-live-local/4")
1406 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-live-local/5")
1407 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-live-local/6")
1408 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-live-local/7")
1409 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-live-local/8")
1410 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-live-local/9")
1411 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-live-local/10")
1412 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-shadow-live-local/11")
1413 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-live-local/12")
1414 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-live-local/13")
1415 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-live-local/14")
1416 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-live-local/15")
1417 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-live-local/16")
1418 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-live-local/17")
1419 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-live-local/18")
1420 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-live-local/19")
1421 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-live-local/20")
1422 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-live-local/21")
1423 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-live-local/21")
1424
1425 89/<- %esp 5/r32/ebp
1426 5d/pop-to-ebp
1427 c3/return
1428
1429 test-do-not-spill-same-register-in-block:
1430
1431 55/push-ebp
1432 89/<- %ebp 4/r32/esp
1433
1434 (clear-stream _test-input-stream)
1435 (clear-stream $_test-input-buffered-file->buffer)
1436 (clear-stream _test-output-stream)
1437 (clear-stream $_test-output-buffered-file->buffer)
1438
1439 (write _test-input-stream "fn foo {\n")
1440 (write _test-input-stream " var x/ecx: int <- copy 3\n")
1441 (write _test-input-stream " var y/ecx: int <- copy 4\n")
1442 (write _test-input-stream " y <- increment\n")
1443 (write _test-input-stream "}\n")
1444
1445 (convert-mu _test-input-buffered-file _test-output-buffered-file)
1446 (flush _test-output-buffered-file)
1447 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
1453
1454 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-do-not-spill-same-register-in-block/0")
1455 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-do-not-spill-same-register-in-block/1")
1456 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-do-not-spill-same-register-in-block/2")
1457 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-do-not-spill-same-register-in-block/3")
1458 (check-next-stream-line-equal _test-output-stream " {" "F - test-do-not-spill-same-register-in-block/4")
1459 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-do-not-spill-same-register-in-block/5")
1460 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-do-not-spill-same-register-in-block/6")
1461 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-do-not-spill-same-register-in-block/7")
1462 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-do-not-spill-same-register-in-block/8")
1463 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-do-not-spill-same-register-in-block/9")
1464 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-do-not-spill-same-register-in-block/10")
1465 (check-next-stream-line-equal _test-output-stream " }" "F - test-do-not-spill-same-register-in-block/11")
1466 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-do-not-spill-same-register-in-block/12")
1467 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-do-not-spill-same-register-in-block/13")
1468 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-do-not-spill-same-register-in-block/14")
1469 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-do-not-spill-same-register-in-block/15")
1470 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-do-not-spill-same-register-in-block/16")
1471
1472 89/<- %esp 5/r32/ebp
1473 5d/pop-to-ebp
1474 c3/return
1475
1476 test-spill-different-register-in-block:
1477
1478 55/push-ebp
1479 89/<- %ebp 4/r32/esp
1480
1481 (clear-stream _test-input-stream)
1482 (clear-stream $_test-input-buffered-file->buffer)
1483 (clear-stream _test-output-stream)
1484 (clear-stream $_test-output-buffered-file->buffer)
1485
1486 (write _test-input-stream "fn foo {\n")
1487 (write _test-input-stream " var x/eax: int <- copy 3\n")
1488 (write _test-input-stream " var y/ecx: int <- copy 4\n")
1489 (write _test-input-stream " y <- increment\n")
1490 (write _test-input-stream "}\n")
1491
1492 (convert-mu _test-input-buffered-file _test-output-buffered-file)
1493 (flush _test-output-buffered-file)
1494 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
1500
1501 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-spill-different-register-in-block/0")
1502 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-spill-different-register-in-block/1")
1503 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-spill-different-register-in-block/2")
1504 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-spill-different-register-in-block/3")
1505 (check-next-stream-line-equal _test-output-stream " {" "F - test-spill-different-register-in-block/4")
1506 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-spill-different-register-in-block/5")
1507 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-spill-different-register-in-block/6")
1508 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-spill-different-register-in-block/7")
1509 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-spill-different-register-in-block/8")
1510 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-spill-different-register-in-block/9")
1511 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-spill-different-register-in-block/10")
1512 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-spill-different-register-in-block/11")
1513 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-spill-different-register-in-block/12")
1514 (check-next-stream-line-equal _test-output-stream " }" "F - test-spill-different-register-in-block/13")
1515 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-spill-different-register-in-block/14")
1516 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-spill-different-register-in-block/15")
1517 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-spill-different-register-in-block/16")
1518 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-spill-different-register-in-block/17")
1519 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-spill-different-register-in-block/18")
1520
1521 89/<- %esp 5/r32/ebp
1522 5d/pop-to-ebp
1523 c3/return
1524
1525 test-shadow-live-output:
1526
1527 55/push-ebp
1528 89/<- %ebp 4/r32/esp
1529
1530 (clear-stream _test-input-stream)
1531 (clear-stream $_test-input-buffered-file->buffer)
1532 (clear-stream _test-output-stream)
1533 (clear-stream $_test-output-buffered-file->buffer)
1534
1535 (write _test-input-stream "fn foo -> x/ecx: int {\n")
1536 (write _test-input-stream " x <- copy 3\n")
1537 (write _test-input-stream " {\n")
1538 (write _test-input-stream " var y/ecx: int <- copy 4\n")
1539 (write _test-input-stream " }\n")
1540 (write _test-input-stream " x <- increment\n")
1541 (write _test-input-stream "}\n")
1542
1543 (convert-mu _test-input-buffered-file _test-output-buffered-file)
1544 (flush _test-output-buffered-file)
1545 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
1551
1552 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-live-output/0")
1553 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-live-output/1")
1554 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-live-output/2")
1555 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-live-output/3")
1556 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-live-output/4")
1557 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-live-output/5")
1558 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-live-output/7")
1559 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-live-output/8")
1560 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-live-output/9")
1561 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-live-output/10")
1562 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-shadow-live-output/11")
1563 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-live-output/12")
1564 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-live-output/13")
1565 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-live-output/14")
1566 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-live-output/15")
1567 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-live-output/17")
1568 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-live-output/18")
1569 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-live-output/19")
1570 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-live-output/20")
1571 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-live-output/21")
1572 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-live-output/21")
1573
1574 89/<- %esp 5/r32/ebp
1575 5d/pop-to-ebp
1576 c3/return
1577
1578 test-local-clobbered-by-output:
1579
1580
1581 55/push-ebp
1582 89/<- %ebp 4/r32/esp
1583
1584 (clear-stream _test-input-stream)
1585 (clear-stream $_test-input-buffered-file->buffer)
1586 (clear-stream _test-output-stream)
1587 (clear-stream $_test-output-buffered-file->buffer)
1588
1589 (write _test-input-stream "fn foo -> x/ecx: int {\n")
1590 (write _test-input-stream " var y/ecx: int <- copy 4\n")
1591 (write _test-input-stream " x <- copy y\n")
1592 (write _test-input-stream "}\n")
1593
1594 (convert-mu _test-input-buffered-file _test-output-buffered-file)
1595 (flush _test-output-buffered-file)
1596 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
1602
1603 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-local-clobbered-by-output/0")
1604 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-local-clobbered-by-output/1")
1605 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-local-clobbered-by-output/2")
1606 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-local-clobbered-by-output/3")
1607 (check-next-stream-line-equal _test-output-stream " {" "F - test-local-clobbered-by-output/4")
1608 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-local-clobbered-by-output/5")
1609 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-local-clobbered-by-output/6")
1610 (check-next-stream-line-equal _test-output-stream " 89/<- %ecx 0x00000001/r32" "F - test-local-clobbered-by-output/7")
1611 (check-next-stream-line-equal _test-output-stream " }" "F - test-local-clobbered-by-output/8")
1612 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-local-clobbered-by-output/9")
1613 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-local-clobbered-by-output/10")
1614 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-local-clobbered-by-output/11")
1615 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-local-clobbered-by-output/12")
1616 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-local-clobbered-by-output/13")
1617
1618 89/<- %esp 5/r32/ebp
1619 5d/pop-to-ebp
1620 c3/return
1621
1622 test-read-output:
1623
1624
1625 55/push-ebp
1626 89/<- %ebp 4/r32/esp
1627
1628 (clear-stream _test-input-stream)
1629 (clear-stream $_test-input-buffered-file->buffer)
1630 (clear-stream _test-output-stream)
1631 (clear-stream $_test-output-buffered-file->buffer)
1632
1633 (write _test-input-stream "fn foo -> x/ecx: int {\n")
1634 (write _test-input-stream " x <- copy 0x34\n")
1635 (write _test-input-stream " compare x, 0x35\n")
1636 (write _test-input-stream "}\n")
1637
1638 (convert-mu _test-input-buffered-file _test-output-buffered-file)
1639 (flush _test-output-buffered-file)
1640 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
1646
1647 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-read-output/0")
1648 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-read-output/1")
1649 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-read-output/2")
1650 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-read-output/3")
1651 (check-next-stream-line-equal _test-output-stream " {" "F - test-read-output/4")
1652 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-read-output/5")
1653 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0x34/imm32" "F - test-read-output/6")
1654 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %ecx 0x35/imm32" "F - test-read-output/7")
1655 (check-next-stream-line-equal _test-output-stream " }" "F - test-read-output/8")
1656 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-read-output/9")
1657 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-read-output/10")
1658 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-read-output/11")
1659 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-read-output/12")
1660 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-read-output/13")
1661
1662 89/<- %esp 5/r32/ebp
1663 5d/pop-to-ebp
1664 c3/return
1665
1666 test-convert-function-with-branches-in-block:
1667
1668 55/push-ebp
1669 89/<- %ebp 4/r32/esp
1670
1671 (clear-stream _test-input-stream)
1672 (clear-stream $_test-input-buffered-file->buffer)
1673 (clear-stream _test-output-stream)
1674 (clear-stream $_test-output-buffered-file->buffer)
1675
1676 (write _test-input-stream "fn foo x: int {\n")
1677 (write _test-input-stream " {\n")
1678 (write _test-input-stream " break-if->=\n")
1679 (write _test-input-stream " loop-if-addr<\n")
1680 (write _test-input-stream " increment x\n")
1681 (write _test-input-stream " loop\n")
1682 (write _test-input-stream " }\n")
1683 (write _test-input-stream "}\n")
1684
1685 (convert-mu _test-input-buffered-file _test-output-buffered-file)
1686 (flush _test-output-buffered-file)
1687 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
1693
1694 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-in-block/0")
1695 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-in-block/1")
1696 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-in-block/2")
1697 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-in-block/3")
1698 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/4")
1699 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-in-block/5")
1700 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/6")
1701 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-in-block/7")
1702 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/8")
1703 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-in-block/9")
1704 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-in-block/10")
1705 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/11")
1706 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/12")
1707 (check-next-stream-line-equal _test-output-stream " 0f 83/jump-if-addr>= break/disp32" "F - test-convert-function-with-branches-in-block/13")
1708 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:loop/disp32" "F - test-convert-function-with-branches-in-block/14")
1709 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/15")
1710 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-branches-in-block/16")
1711 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-in-block/17")
1712 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/18")
1713 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-in-block/19")
1714 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/20")
1715 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-in-block/21")
1716 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-in-block/22")
1717 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-in-block/23")
1718 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-in-block/24")
1719 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-in-block/25")
1720
1721 89/<- %esp 5/r32/ebp
1722 5d/pop-to-ebp
1723 c3/return
1724
1725 test-convert-function-with-branches-in-named-block:
1726
1727 55/push-ebp
1728 89/<- %ebp 4/r32/esp
1729
1730 (clear-stream _test-input-stream)
1731 (clear-stream $_test-input-buffered-file->buffer)
1732 (clear-stream _test-output-stream)
1733 (clear-stream $_test-output-buffered-file->buffer)
1734
1735 (write _test-input-stream "fn foo x: int {\n")
1736 (write _test-input-stream " $bar: {\n")
1737 (write _test-input-stream " break-if->= $bar\n")
1738 (write _test-input-stream " loop-if-addr< $bar\n")
1739 (write _test-input-stream " increment x\n")
1740 (write _test-input-stream " loop\n")
1741 (write _test-input-stream " }\n")
1742 (write _test-input-stream "}\n")
1743
1744 (convert-mu _test-input-buffered-file _test-output-buffered-file)
1745 (flush _test-output-buffered-file)
1746 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
1752
1753 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-in-named-block/0")
1754 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-in-named-block/1")
1755 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-in-named-block/2")
1756 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-in-named-block/3")
1757 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/4")
1758 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-in-named-block/5")
1759 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/6")
1760 (check-next-stream-line-equal _test-output-stream "$bar:loop:" "F - test-convert-function-with-branches-in-named-block/7")
1761 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/8")
1762 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-in-named-block/9")
1763 (check-next-stream-line-equal _test-output-stream " e9/jump $bar:break/disp32" "F - test-convert-function-with-branches-in-named-block/10")
1764 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/11")
1765 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/12")
1766 (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")
1767 (check-next-stream-line-equal _test-output-stream " e9/jump $bar:loop/disp32" "F - test-convert-function-with-branches-in-named-block/14")
1768 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/15")
1769 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-branches-in-named-block/16")
1770 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-in-named-block/17")
1771 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/18")
1772 (check-next-stream-line-equal _test-output-stream "$bar:break:" "F - test-convert-function-with-branches-in-named-block/19")
1773 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/20")
1774 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-in-named-block/21")
1775 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-in-named-block/22")
1776 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-in-named-block/23")
1777 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-in-named-block/24")
1778 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-in-named-block/25")
1779
1780 89/<- %esp 5/r32/ebp
1781 5d/pop-to-ebp
1782 c3/return
1783
1784 test-convert-function-with-var-in-nested-block:
1785
1786 55/push-ebp
1787 89/<- %ebp 4/r32/esp
1788
1789 (clear-stream _test-input-stream)
1790 (clear-stream $_test-input-buffered-file->buffer)
1791 (clear-stream _test-output-stream)
1792 (clear-stream $_test-output-buffered-file->buffer)
1793
1794 (write _test-input-stream "fn foo x: int {\n")
1795 (write _test-input-stream " {\n")
1796 (write _test-input-stream " {\n")
1797 (write _test-input-stream " var x: int\n")
1798 (write _test-input-stream " increment x\n")
1799 (write _test-input-stream " }\n")
1800 (write _test-input-stream " }\n")
1801 (write _test-input-stream "}\n")
1802
1803 (convert-mu _test-input-buffered-file _test-output-buffered-file)
1804 (flush _test-output-buffered-file)
1805 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
1811
1812 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-var-in-nested-block/0")
1813 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-var-in-nested-block/1")
1814 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-var-in-nested-block/2")
1815 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-var-in-nested-block/3")
1816 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/4")
1817 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-var-in-nested-block/5")
1818 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/6")
1819 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-var-in-nested-block/7")
1820 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/8")
1821 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-var-in-nested-block/9")
1822 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-var-in-nested-block/10")
1823 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-var-in-nested-block/11")
1824 (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")
1825 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/13")
1826 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-var-in-nested-block/14")
1827 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/15")
1828 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-var-in-nested-block/16")
1829 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/17")
1830 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-var-in-nested-block/18")
1831 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-var-in-nested-block/19")
1832 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-var-in-nested-block/20")
1833 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-var-in-nested-block/21")
1834 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-var-in-nested-block/22")
1835
1836 89/<- %esp 5/r32/ebp
1837 5d/pop-to-ebp
1838 c3/return
1839
1840 test-convert-function-with-multiple-vars-in-nested-blocks:
1841
1842 55/push-ebp
1843 89/<- %ebp 4/r32/esp
1844
1845 (clear-stream _test-input-stream)
1846 (clear-stream $_test-input-buffered-file->buffer)
1847 (clear-stream _test-output-stream)
1848 (clear-stream $_test-output-buffered-file->buffer)
1849
1850 (write _test-input-stream "fn foo x: int {\n")
1851 (write _test-input-stream " {\n")
1852 (write _test-input-stream " var x/eax: int <- copy 0\n")
1853 (write _test-input-stream " {\n")
1854 (write _test-input-stream " var y: int\n")
1855 (write _test-input-stream " x <- add y\n")
1856 (write _test-input-stream " }\n")
1857 (write _test-input-stream " }\n")
1858 (write _test-input-stream "}\n")
1859
1860 (convert-mu _test-input-buffered-file _test-output-buffered-file)
1861 (flush _test-output-buffered-file)
1862 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
1868
1869 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/0")
1870 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-multiple-vars-in-nested-blocks/1")
1871 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/2")
1872 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/3")
1873 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/4")
1874 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/5")
1875 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/6")
1876 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/7")
1877 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-multiple-vars-in-nested-blocks/8")
1878 (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")
1879 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/10")
1880 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/11")
1881 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-multiple-vars-in-nested-blocks/12")
1882 (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")
1883 (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")
1884 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/15")
1885 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/16")
1886 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-multiple-vars-in-nested-blocks/17")
1887 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/18")
1888 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/19")
1889 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/20")
1890 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/21")
1891 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-multiple-vars-in-nested-blocks/22")
1892 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/23")
1893 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/24")
1894 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-multiple-vars-in-nested-blocks/25")
1895
1896 89/<- %esp 5/r32/ebp
1897 5d/pop-to-ebp
1898 c3/return
1899
1900 test-convert-function-with-branches-and-local-vars:
1901
1902
1903
1904
1905 55/push-ebp
1906 89/<- %ebp 4/r32/esp
1907
1908 (clear-stream _test-input-stream)
1909 (clear-stream $_test-input-buffered-file->buffer)
1910 (clear-stream _test-output-stream)
1911 (clear-stream $_test-output-buffered-file->buffer)
1912
1913 (write _test-input-stream "fn foo {\n")
1914 (write _test-input-stream " {\n")
1915 (write _test-input-stream " var x: int\n")
1916 (write _test-input-stream " break-if->=\n")
1917 (write _test-input-stream " increment x\n")
1918 (write _test-input-stream " }\n")
1919 (write _test-input-stream "}\n")
1920
1921 (convert-mu _test-input-buffered-file _test-output-buffered-file)
1922 (flush _test-output-buffered-file)
1923 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
1929
1930 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-and-local-vars/0")
1931 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-and-local-vars/1")
1932 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-and-local-vars/2")
1933 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-and-local-vars/3")
1934 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/4")
1935 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-and-local-vars/5")
1936 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/6")
1937 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-and-local-vars/7")
1938 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-branches-and-local-vars/8")
1939 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/9")
1940 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-and-local-vars/10")
1941 (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")
1942 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-and-local-vars/12")
1943 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/13")
1944 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-branches-and-local-vars/14")
1945 (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")
1946 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/16")
1947 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-and-local-vars/17")
1948 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/18")
1949 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-and-local-vars/19")
1950 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-and-local-vars/20")
1951 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-and-local-vars/21")
1952 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-and-local-vars/22")
1953 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-and-local-vars/23")
1954
1955 89/<- %esp 5/r32/ebp
1956 5d/pop-to-ebp
1957 c3/return
1958
1959 test-convert-function-with-conditional-loops-and-local-vars:
1960
1961
1962
1963
1964 55/push-ebp
1965 89/<- %ebp 4/r32/esp
1966
1967 (clear-stream _test-input-stream)
1968 (clear-stream $_test-input-buffered-file->buffer)
1969 (clear-stream _test-output-stream)
1970 (clear-stream $_test-output-buffered-file->buffer)
1971
1972 (write _test-input-stream "fn foo {\n")
1973 (write _test-input-stream " {\n")
1974 (write _test-input-stream " var x: int\n")
1975 (write _test-input-stream " loop-if->=\n")
1976 (write _test-input-stream " increment x\n")
1977 (write _test-input-stream " }\n")
1978 (write _test-input-stream "}\n")
1979
1980 (convert-mu _test-input-buffered-file _test-output-buffered-file)
1981 (flush _test-output-buffered-file)
1982 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
1988
1989 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-conditional-loops-and-local-vars/0")
1990 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-conditional-loops-and-local-vars/1")
1991 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/2")
1992 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-conditional-loops-and-local-vars/3")
1993 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/4")
1994 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-conditional-loops-and-local-vars/5")
1995 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/6")
1996 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-conditional-loops-and-local-vars/7")
1997 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-conditional-loops-and-local-vars/8")
1998 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/9")
1999 (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")
2000 (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")
2001 (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")
2002 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/13")
2003 (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")
2004 (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")
2005 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/16")
2006 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-conditional-loops-and-local-vars/17")
2007 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/18")
2008 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-conditional-loops-and-local-vars/19")
2009 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-conditional-loops-and-local-vars/20")
2010 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/21")
2011 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/22")
2012 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-conditional-loops-and-local-vars/23")
2013
2014 89/<- %esp 5/r32/ebp
2015 5d/pop-to-ebp
2016 c3/return
2017
2018 test-convert-function-with-unconditional-loops-and-local-vars:
2019
2020
2021
2022
2023 55/push-ebp
2024 89/<- %ebp 4/r32/esp
2025
2026 (clear-stream _test-input-stream)
2027 (clear-stream $_test-input-buffered-file->buffer)
2028 (clear-stream _test-output-stream)
2029 (clear-stream $_test-output-buffered-file->buffer)
2030
2031 (write _test-input-stream "fn foo {\n")
2032 (write _test-input-stream " {\n")
2033 (write _test-input-stream " var x: int\n")
2034 (write _test-input-stream " loop\n")
2035 (write _test-input-stream " increment x\n")
2036 (write _test-input-stream " }\n")
2037 (write _test-input-stream "}\n")
2038
2039 (convert-mu _test-input-buffered-file _test-output-buffered-file)
2040 (flush _test-output-buffered-file)
2041 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
2047
2048 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-unconditional-loops-and-local-vars/0")
2049 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-unconditional-loops-and-local-vars/1")
2050 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/2")
2051 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-unconditional-loops-and-local-vars/3")
2052 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-loops-and-local-vars/4")
2053 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-unconditional-loops-and-local-vars/5")
2054 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-loops-and-local-vars/6")
2055 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-unconditional-loops-and-local-vars/7")
2056 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-loops-and-local-vars/8")
2057 (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")
2058 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-unconditional-loops-and-local-vars/10")
2059
2060 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-loops-and-local-vars/11")
2061 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-unconditional-loops-and-local-vars/12")
2062 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-loops-and-local-vars/13")
2063 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-unconditional-loops-and-local-vars/14")
2064 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-unconditional-loops-and-local-vars/15")
2065 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/16")
2066 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/17")
2067 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-unconditional-loops-and-local-vars/18")
2068
2069 89/<- %esp 5/r32/ebp
2070 5d/pop-to-ebp
2071 c3/return
2072
2073 test-convert-function-with-branches-and-loops-and-local-vars:
2074
2075 55/push-ebp
2076 89/<- %ebp 4/r32/esp
2077
2078 (clear-stream _test-input-stream)
2079 (clear-stream $_test-input-buffered-file->buffer)
2080 (clear-stream _test-output-stream)
2081 (clear-stream $_test-output-buffered-file->buffer)
2082
2083 (write _test-input-stream "fn foo {\n")
2084 (write _test-input-stream " {\n")
2085 (write _test-input-stream " var x: int\n")
2086 (write _test-input-stream " break-if->=\n")
2087 (write _test-input-stream " increment x\n")
2088 (write _test-input-stream " loop\n")
2089 (write _test-input-stream " }\n")
2090 (write _test-input-stream "}\n")
2091
2092 (convert-mu _test-input-buffered-file _test-output-buffered-file)
2093 (flush _test-output-buffered-file)
2094 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
2100
2101 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-and-loops-and-local-vars/0")
2102 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-and-loops-and-local-vars/1")
2103 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-and-loops-and-local-vars/2")
2104 (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")
2105 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/4")
2106 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-and-loops-and-local-vars/5")
2107 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/6")
2108 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-and-loops-and-local-vars/7")
2109 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-branches-and-loops-and-local-vars/8")
2110 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/9")
2111 (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")
2112 (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")
2113 (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")
2114 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/13")
2115 (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")
2116 (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")
2117 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-and-loops-and-local-vars/16")
2118 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/17")
2119 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-and-loops-and-local-vars/18")
2120 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/19")
2121 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-and-loops-and-local-vars/20")
2122 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-and-loops-and-local-vars/21")
2123 (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")
2124 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-and-loops-and-local-vars/23")
2125 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-and-loops-and-local-vars/24")
2126
2127 89/<- %esp 5/r32/ebp
2128 5d/pop-to-ebp
2129 c3/return
2130
2131 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars:
2132
2133 55/push-ebp
2134 89/<- %ebp 4/r32/esp
2135
2136 (clear-stream _test-input-stream)
2137 (clear-stream $_test-input-buffered-file->buffer)
2138 (clear-stream _test-output-stream)
2139 (clear-stream $_test-output-buffered-file->buffer)
2140
2141 (write _test-input-stream "fn foo {\n")
2142 (write _test-input-stream " a: {\n")
2143 (write _test-input-stream " var x: int\n")
2144 (write _test-input-stream " {\n")
2145 (write _test-input-stream " var y: int\n")
2146 (write _test-input-stream " break-if->= a\n")
2147 (write _test-input-stream " increment x\n")
2148 (write _test-input-stream " loop\n")
2149 (write _test-input-stream " }\n")
2150 (write _test-input-stream " }\n")
2151 (write _test-input-stream "}\n")
2152
2153 (convert-mu _test-input-buffered-file _test-output-buffered-file)
2154 (flush _test-output-buffered-file)
2155 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
2161
2162 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/0")
2163 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/1")
2164 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/2")
2165 (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")
2166 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/4")
2167 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/5")
2168 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/6")
2169 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/7")
2170 (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")
2171 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/9")
2172 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/10")
2173 (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")
2174 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/12")
2175 (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")
2176 (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")
2177 (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")
2178 (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")
2179 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/17")
2180 (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")
2181 (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")
2182 (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")
2183 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/21")
2184 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/22")
2185 (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")
2186 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/24")
2187 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/25")
2188 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/26")
2189 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/27")
2190 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/28")
2191 (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")
2192 (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")
2193 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/31")
2194
2195 89/<- %esp 5/r32/ebp
2196 5d/pop-to-ebp
2197 c3/return
2198
2199 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2:
2200
2201 55/push-ebp
2202 89/<- %ebp 4/r32/esp
2203
2204 (clear-stream _test-input-stream)
2205 (clear-stream $_test-input-buffered-file->buffer)
2206 (clear-stream _test-output-stream)
2207 (clear-stream $_test-output-buffered-file->buffer)
2208
2209
2210 (write _test-input-stream "fn foo {\n")
2211 (write _test-input-stream " a: {\n")
2212 (write _test-input-stream " var x: int\n")
2213 (write _test-input-stream " {\n")
2214 (write _test-input-stream " break-if->= a\n")
2215 (write _test-input-stream " }\n")
2216 (write _test-input-stream " }\n")
2217 (write _test-input-stream "}\n")
2218
2219 (convert-mu _test-input-buffered-file _test-output-buffered-file)
2220 (flush _test-output-buffered-file)
2221 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
2227
2228 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/0")
2229 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/1")
2230 (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")
2231 (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")
2232 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/4")
2233 (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")
2234 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/6")
2235 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/7")
2236 (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")
2237 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/9")
2238 (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")
2239 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/11")
2240 (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")
2241 (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")
2242 (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")
2243 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/15")
2244 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/16")
2245 (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")
2246 (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")
2247 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/19")
2248 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/20")
2249 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/21")
2250 (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")
2251 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/23")
2252 (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")
2253 (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")
2254 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/26")
2255
2256 89/<- %esp 5/r32/ebp
2257 5d/pop-to-ebp
2258 c3/return
2259
2260 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3:
2261
2262 55/push-ebp
2263 89/<- %ebp 4/r32/esp
2264
2265 (clear-stream _test-input-stream)
2266 (clear-stream $_test-input-buffered-file->buffer)
2267 (clear-stream _test-output-stream)
2268 (clear-stream $_test-output-buffered-file->buffer)
2269
2270
2271 (write _test-input-stream "fn foo {\n")
2272 (write _test-input-stream " a: {\n")
2273 (write _test-input-stream " var x: int\n")
2274 (write _test-input-stream " {\n")
2275 (write _test-input-stream " break a\n")
2276 (write _test-input-stream " }\n")
2277 (write _test-input-stream " }\n")
2278 (write _test-input-stream "}\n")
2279
2280 (convert-mu _test-input-buffered-file _test-output-buffered-file)
2281 (flush _test-output-buffered-file)
2282 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
2288
2289 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/0")
2290 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/1")
2291 (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")
2292 (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")
2293 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/4")
2294 (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")
2295 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/6")
2296 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/7")
2297 (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")
2298 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/9")
2299 (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")
2300 (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")
2301 (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")
2302 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/14")
2303 (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")
2304 (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")
2305 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/17")
2306 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/18")
2307 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/19")
2308 (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")
2309 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/21")
2310 (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")
2311 (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")
2312 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/24")
2313
2314 89/<- %esp 5/r32/ebp
2315 5d/pop-to-ebp
2316 c3/return
2317
2318 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4:
2319
2320 55/push-ebp
2321 89/<- %ebp 4/r32/esp
2322
2323 (clear-stream _test-input-stream)
2324 (clear-stream $_test-input-buffered-file->buffer)
2325 (clear-stream _test-output-stream)
2326 (clear-stream $_test-output-buffered-file->buffer)
2327
2328 (write _test-input-stream "fn foo {\n")
2329 (write _test-input-stream " a: {\n")
2330 (write _test-input-stream " var x/esi: int <- copy 0\n")
2331 (write _test-input-stream " {\n")
2332 (write _test-input-stream " break a\n")
2333 (write _test-input-stream " }\n")
2334 (write _test-input-stream " }\n")
2335 (write _test-input-stream "}\n")
2336
2337 (convert-mu _test-input-buffered-file _test-output-buffered-file)
2338 (flush _test-output-buffered-file)
2339 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
2345
2346 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/0")
2347 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/1")
2348 (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")
2349 (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")
2350 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/4")
2351 (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")
2352 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/6")
2353 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/7")
2354 (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")
2355 (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")
2356 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/10")
2357 (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")
2358 (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")
2359 (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")
2360 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/14")
2361 (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")
2362 (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")
2363 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/17")
2364 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/18")
2365 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/19")
2366 (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")
2367 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/21")
2368 (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")
2369 (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")
2370 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/24")
2371
2372 89/<- %esp 5/r32/ebp
2373 5d/pop-to-ebp
2374 c3/return
2375
2376 test-convert-function-with-nonlocal-unconditional-break-and-local-vars:
2377
2378 55/push-ebp
2379 89/<- %ebp 4/r32/esp
2380
2381 (clear-stream _test-input-stream)
2382 (clear-stream $_test-input-buffered-file->buffer)
2383 (clear-stream _test-output-stream)
2384 (clear-stream $_test-output-buffered-file->buffer)
2385
2386 (write _test-input-stream "fn foo {\n")
2387 (write _test-input-stream " a: {\n")
2388 (write _test-input-stream " var x: int\n")
2389 (write _test-input-stream " {\n")
2390 (write _test-input-stream " var y: int\n")
2391 (write _test-input-stream " break a\n")
2392 (write _test-input-stream " increment x\n")
2393 (write _test-input-stream " }\n")
2394 (write _test-input-stream " }\n")
2395 (write _test-input-stream "}\n")
2396
2397 (convert-mu _test-input-buffered-file _test-output-buffered-file)
2398 (flush _test-output-buffered-file)
2399 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
2405
2406 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/0")
2407 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/1")
2408 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/2")
2409 (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")
2410 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/4")
2411 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/5")
2412 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/6")
2413 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/7")
2414 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/8")
2415 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/9")
2416 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/10")
2417 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/11")
2418 (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")
2419 (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")
2420 (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")
2421 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/15")
2422 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/16")
2423 (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")
2424 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/18")
2425 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/19")
2426 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/20")
2427 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/21")
2428 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/22")
2429 (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")
2430 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/24")
2431 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/25")
2432
2433 89/<- %esp 5/r32/ebp
2434 5d/pop-to-ebp
2435 c3/return
2436
2437 test-convert-function-with-unconditional-break-and-local-vars:
2438
2439 55/push-ebp
2440 89/<- %ebp 4/r32/esp
2441
2442 (clear-stream _test-input-stream)
2443 (clear-stream $_test-input-buffered-file->buffer)
2444 (clear-stream _test-output-stream)
2445 (clear-stream $_test-output-buffered-file->buffer)
2446
2447 (write _test-input-stream "fn foo {\n")
2448 (write _test-input-stream " {\n")
2449 (write _test-input-stream " var x: int\n")
2450 (write _test-input-stream " {\n")
2451 (write _test-input-stream " var y: int\n")
2452 (write _test-input-stream " break\n")
2453 (write _test-input-stream " increment x\n")
2454 (write _test-input-stream " }\n")
2455 (write _test-input-stream " }\n")
2456 (write _test-input-stream "}\n")
2457
2458 (convert-mu _test-input-buffered-file _test-output-buffered-file)
2459 (flush _test-output-buffered-file)
2460 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
2466
2467 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-unconditional-break-and-local-vars/0")
2468 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-unconditional-break-and-local-vars/1")
2469 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/2")
2470 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-unconditional-break-and-local-vars/3")
2471 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/4")
2472 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/5")
2473 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/6")
2474 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/7")
2475 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-break-and-local-vars/8")
2476 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/9")
2477 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/10")
2478 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-break-and-local-vars/11")
2479 (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")
2480 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/13")
2481 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/14")
2482 (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")
2483 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/16")
2484 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/17")
2485 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/18")
2486 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/19")
2487 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-unconditional-break-and-local-vars/20")
2488 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/21")
2489 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/22")
2490 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-unconditional-break-and-local-vars/23")
2491
2492 89/<- %esp 5/r32/ebp
2493 5d/pop-to-ebp
2494 c3/return
2495
2496 test-convert-function-with-nonlocal-unconditional-loop-and-local-vars:
2497
2498 55/push-ebp
2499 89/<- %ebp 4/r32/esp
2500
2501 (clear-stream _test-input-stream)
2502 (clear-stream $_test-input-buffered-file->buffer)
2503 (clear-stream _test-output-stream)
2504 (clear-stream $_test-output-buffered-file->buffer)
2505
2506 (write _test-input-stream "fn foo {\n")
2507 (write _test-input-stream " a: {\n")
2508 (write _test-input-stream " var x: int\n")
2509 (write _test-input-stream " {\n")
2510 (write _test-input-stream " var y: int\n")
2511 (write _test-input-stream " loop a\n")
2512 (write _test-input-stream " increment x\n")
2513 (write _test-input-stream " }\n")
2514 (write _test-input-stream " }\n")
2515 (write _test-input-stream "}\n")
2516
2517 (convert-mu _test-input-buffered-file _test-output-buffered-file)
2518 (flush _test-output-buffered-file)
2519 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
2525
2526 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/0")
2527 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/1")
2528 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/2")
2529 (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")
2530 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/4")
2531 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/5")
2532 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/6")
2533 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/7")
2534 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/8")
2535 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/9")
2536 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/10")
2537 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/11")
2538 (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")
2539 (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")
2540 (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")
2541 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/15")
2542 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/16")
2543 (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")
2544 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/18")
2545 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/19")
2546 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/20")
2547 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/21")
2548 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/22")
2549 (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")
2550 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/24")
2551 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/25")
2552
2553 89/<- %esp 5/r32/ebp
2554 5d/pop-to-ebp
2555 c3/return
2556
2557 test-convert-function-with-local-array-var-in-mem:
2558
2559 55/push-ebp
2560 89/<- %ebp 4/r32/esp
2561
2562 (clear-stream _test-input-stream)
2563 (clear-stream $_test-input-buffered-file->buffer)
2564 (clear-stream _test-output-stream)
2565 (clear-stream $_test-output-buffered-file->buffer)
2566
2567 (write _test-input-stream "fn foo {\n")
2568 (write _test-input-stream " var x: (array int 3)\n")
2569 (write _test-input-stream "}\n")
2570
2571 (convert-mu _test-input-buffered-file _test-output-buffered-file)
2572 (flush _test-output-buffered-file)
2573 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
2579
2580 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-array-var-in-mem/0")
2581 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-array-var-in-mem/1")
2582 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-array-var-in-mem/2")
2583 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-array-var-in-mem/3")
2584 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-array-var-in-mem/4")
2585 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-array-var-in-mem/5")
2586
2587 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-function-with-local-array-var-in-mem/7")
2588 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-function-with-local-array-var-in-mem/8")
2589
2590 (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")
2591
2592 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-array-var-in-mem/10")
2593 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-array-var-in-mem/11")
2594 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-array-var-in-mem/12")
2595 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-array-var-in-mem/13")
2596 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-array-var-in-mem/14")
2597 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-array-var-in-mem/15")
2598
2599 89/<- %esp 5/r32/ebp
2600 5d/pop-to-ebp
2601 c3/return
2602
2603 test-convert-address:
2604
2605 55/push-ebp
2606 89/<- %ebp 4/r32/esp
2607
2608 (clear-stream _test-input-stream)
2609 (clear-stream $_test-input-buffered-file->buffer)
2610 (clear-stream _test-output-stream)
2611 (clear-stream $_test-output-buffered-file->buffer)
2612
2613 (write _test-input-stream "fn foo {\n")
2614 (write _test-input-stream " var a: int\n")
2615 (write _test-input-stream " var b/eax: (addr int) <- address a\n")
2616 (write _test-input-stream "}\n")
2617
2618 (convert-mu _test-input-buffered-file _test-output-buffered-file)
2619 (flush _test-output-buffered-file)
2620 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
2626
2627 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-address/0")
2628 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-address/1")
2629 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-address/2")
2630 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-address/3")
2631 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-address/4")
2632 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-address/5")
2633 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-address/6")
2634 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-address/7")
2635 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0xfffffffc) 0x00000000/r32" "F - test-convert-address/8")
2636 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-address/9")
2637 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-address/10")
2638 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-address/11")
2639 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-address/12")
2640 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-address/13")
2641 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-address/14")
2642 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-address/15")
2643 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-address/16")
2644
2645 89/<- %esp 5/r32/ebp
2646 5d/pop-to-ebp
2647 c3/return
2648
2649 test-convert-length-of-array:
2650
2651 55/push-ebp
2652 89/<- %ebp 4/r32/esp
2653
2654 (clear-stream _test-input-stream)
2655 (clear-stream $_test-input-buffered-file->buffer)
2656 (clear-stream _test-output-stream)
2657 (clear-stream $_test-output-buffered-file->buffer)
2658
2659 (write _test-input-stream "fn foo a: (addr array int) {\n")
2660 (write _test-input-stream " var b/eax: (addr array int) <- copy a\n")
2661 (write _test-input-stream " var c/eax: int <- length b\n")
2662 (write _test-input-stream "}\n")
2663
2664 (convert-mu _test-input-buffered-file _test-output-buffered-file)
2665 (flush _test-output-buffered-file)
2666 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
2672
2673 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array/0")
2674 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array/1")
2675 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array/2")
2676 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array/3")
2677 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array/4")
2678 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array/5")
2679 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array/6")
2680 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-length-of-array/7")
2681 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array/8")
2682 (check-next-stream-line-equal _test-output-stream " c1/shift 5/subop/>> %eax 0x00000002/imm8" "F - test-convert-length-of-array/9")
2683 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array/10")
2684 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array/11")
2685 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array/12")
2686 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array/13")
2687 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array/14")
2688 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array/15")
2689 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array/16")
2690
2691 89/<- %esp 5/r32/ebp
2692 5d/pop-to-ebp
2693 c3/return
2694
2695 test-convert-length-of-array-on-stack:
2696
2697 55/push-ebp
2698 89/<- %ebp 4/r32/esp
2699
2700 (clear-stream _test-input-stream)
2701 (clear-stream $_test-input-buffered-file->buffer)
2702 (clear-stream _test-output-stream)
2703 (clear-stream $_test-output-buffered-file->buffer)
2704
2705 (write _test-input-stream "fn foo {\n")
2706 (write _test-input-stream " var a: (array int 3)\n")
2707 (write _test-input-stream " var b/eax: int <- length a\n")
2708 (write _test-input-stream "}\n")
2709
2710 (convert-mu _test-input-buffered-file _test-output-buffered-file)
2711 (flush _test-output-buffered-file)
2712 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
2718
2719 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-on-stack/0")
2720 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-on-stack/1")
2721 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-on-stack/2")
2722 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-on-stack/3")
2723 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-on-stack/4")
2724 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-on-stack/5")
2725
2726 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-length-of-array-on-stack/6")
2727 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-length-of-array-on-stack/7")
2728 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-on-stack/8")
2729 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0xfffffff0) 0x00000000/r32" "F - test-convert-length-of-array-on-stack/9")
2730 (check-next-stream-line-equal _test-output-stream " c1/shift 5/subop/>> %eax 0x00000002/imm8" "F - test-convert-length-of-array-on-stack/10")
2731 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-on-stack/11")
2732 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000010/imm32" "F - test-convert-length-of-array-on-stack/12")
2733 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-on-stack/13")
2734 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-on-stack/14")
2735 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-on-stack/15")
2736 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-on-stack/16")
2737 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-on-stack/17")
2738 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-on-stack/18")
2739
2740 89/<- %esp 5/r32/ebp
2741 5d/pop-to-ebp
2742 c3/return
2743
2744 test-convert-index-into-array:
2745
2746 55/push-ebp
2747 89/<- %ebp 4/r32/esp
2748
2749 (clear-stream _test-input-stream)
2750 (clear-stream $_test-input-buffered-file->buffer)
2751 (clear-stream _test-output-stream)
2752 (clear-stream $_test-output-buffered-file->buffer)
2753
2754 (write _test-input-stream "fn foo {\n")
2755 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
2756 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
2757 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
2758 (write _test-input-stream "}\n")
2759
2760 (convert-mu _test-input-buffered-file _test-output-buffered-file)
2761 (flush _test-output-buffered-file)
2762 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
2768
2769 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array/0")
2770 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array/1")
2771 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array/2")
2772 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array/3")
2773 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array/4")
2774 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array/5")
2775 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array/6")
2776 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array/7")
2777 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array/8")
2778 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array/9")
2779 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx<<0x00000002 + 4) 0x00000000/r32" "F - test-convert-index-into-array/11")
2780 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array/13")
2781 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array/14")
2782 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array/15")
2783 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array/16")
2784 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array/17")
2785 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array/18")
2786 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array/19")
2787 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array/20")
2788
2789 89/<- %esp 5/r32/ebp
2790 5d/pop-to-ebp
2791 c3/return
2792
2793 test-convert-index-into-array-with-literal:
2794
2795 55/push-ebp
2796 89/<- %ebp 4/r32/esp
2797
2798 (clear-stream _test-input-stream)
2799 (clear-stream $_test-input-buffered-file->buffer)
2800 (clear-stream _test-output-stream)
2801 (clear-stream $_test-output-buffered-file->buffer)
2802
2803 (write _test-input-stream "fn foo {\n")
2804 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
2805 (write _test-input-stream " var x/eax: (addr int) <- index arr, 2\n")
2806 (write _test-input-stream "}\n")
2807
2808 (convert-mu _test-input-buffered-file _test-output-buffered-file)
2809 (flush _test-output-buffered-file)
2810 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
2816
2817 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-with-literal/0")
2818 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-with-literal/1")
2819 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-with-literal/2")
2820 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-with-literal/3")
2821 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-with-literal/4")
2822 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-with-literal/5")
2823 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-with-literal/6")
2824 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-with-literal/7")
2825
2826 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x0000000c) 0x00000000/r32" "F - test-convert-index-into-array-with-literal/8")
2827 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-with-literal/9")
2828 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-with-literal/10")
2829 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-with-literal/11")
2830 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-with-literal/12")
2831 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-with-literal/13")
2832 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-with-literal/14")
2833 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-with-literal/15")
2834
2835 89/<- %esp 5/r32/ebp
2836 5d/pop-to-ebp
2837 c3/return
2838
2839 test-convert-index-into-array-on-stack:
2840
2841 55/push-ebp
2842 89/<- %ebp 4/r32/esp
2843
2844 (clear-stream _test-input-stream)
2845 (clear-stream $_test-input-buffered-file->buffer)
2846 (clear-stream _test-output-stream)
2847 (clear-stream $_test-output-buffered-file->buffer)
2848
2849 (write _test-input-stream "fn foo {\n")
2850 (write _test-input-stream " var arr: (array int 3)\n")
2851 (write _test-input-stream " var idx/eax: int <- copy 2\n")
2852 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
2853 (write _test-input-stream "}\n")
2854
2855 (convert-mu _test-input-buffered-file _test-output-buffered-file)
2856 (flush _test-output-buffered-file)
2857 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
2863
2864 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-on-stack/0")
2865 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-on-stack/1")
2866 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-on-stack/2")
2867 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-on-stack/3")
2868 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-on-stack/4")
2869 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-on-stack/5")
2870
2871 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-index-into-array-on-stack/6")
2872 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-index-into-array-on-stack/7")
2873
2874 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-on-stack/8")
2875 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 2/imm32" "F - test-convert-index-into-array-on-stack/9")
2876
2877 (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")
2878
2879 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-on-stack/11")
2880
2881 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000010/imm32" "F - test-convert-index-into-array-on-stack/12")
2882
2883 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-on-stack/13")
2884 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-on-stack/14")
2885 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-on-stack/15")
2886 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-on-stack/16")
2887 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-on-stack/17")
2888 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-on-stack/18")
2889
2890 89/<- %esp 5/r32/ebp
2891 5d/pop-to-ebp
2892 c3/return
2893
2894 test-convert-index-into-array-on-stack-with-literal:
2895
2896 55/push-ebp
2897 89/<- %ebp 4/r32/esp
2898
2899 (clear-stream _test-input-stream)
2900 (clear-stream $_test-input-buffered-file->buffer)
2901 (clear-stream _test-output-stream)
2902 (clear-stream $_test-output-buffered-file->buffer)
2903
2904 (write _test-input-stream "fn foo {\n")
2905 (write _test-input-stream " var arr: (array int 3)\n")
2906 (write _test-input-stream " var x/eax: (addr int) <- index arr, 2\n")
2907 (write _test-input-stream "}\n")
2908
2909 (convert-mu _test-input-buffered-file _test-output-buffered-file)
2910 (flush _test-output-buffered-file)
2911 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
2917
2918 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-on-stack-with-literal/0")
2919 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-on-stack-with-literal/1")
2920 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-on-stack-with-literal/2")
2921 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-on-stack-with-literal/3")
2922 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-on-stack-with-literal/4")
2923 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-on-stack-with-literal/5")
2924
2925 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-index-into-array-on-stack-with-literal/6")
2926 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-index-into-array-on-stack-with-literal/7")
2927
2928 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-on-stack-with-literal/8")
2929
2930 (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")
2931
2932 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-on-stack-with-literal/10")
2933
2934 (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")
2935
2936 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-on-stack-with-literal/12")
2937 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-on-stack-with-literal/13")
2938 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-on-stack-with-literal/14")
2939 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-on-stack-with-literal/15")
2940 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-on-stack-with-literal/16")
2941 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-on-stack-with-literal/17")
2942
2943 89/<- %esp 5/r32/ebp
2944 5d/pop-to-ebp
2945 c3/return
2946
2947 test-convert-index-into-array-using-offset:
2948
2949 55/push-ebp
2950 89/<- %ebp 4/r32/esp
2951
2952 (clear-stream _test-input-stream)
2953 (clear-stream $_test-input-buffered-file->buffer)
2954 (clear-stream _test-output-stream)
2955 (clear-stream $_test-output-buffered-file->buffer)
2956
2957 (write _test-input-stream "fn foo {\n")
2958 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
2959 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
2960 (write _test-input-stream " var off/ecx: (offset int) <- compute-offset arr, idx\n")
2961 (write _test-input-stream " var x/eax: (addr int) <- index arr, off\n")
2962 (write _test-input-stream "}\n")
2963
2964 (convert-mu _test-input-buffered-file _test-output-buffered-file)
2965 (flush _test-output-buffered-file)
2966 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
2972
2973 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-using-offset/0")
2974 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-using-offset/1")
2975 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-using-offset/2")
2976 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-using-offset/3")
2977 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-using-offset/4")
2978 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-using-offset/5")
2979 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-using-offset/6")
2980 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-using-offset/7")
2981 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-using-offset/8")
2982 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array-using-offset/9")
2983 (check-next-stream-line-equal _test-output-stream " 69/multiply %ecx 0x00000004/imm32 0x00000001/r32" "F - test-convert-index-into-array-using-offset/10")
2984 (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")
2985 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-using-offset/12")
2986 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-using-offset/13")
2987 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-using-offset/14")
2988 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-using-offset/15")
2989 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-using-offset/16")
2990 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-using-offset/17")
2991 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-using-offset/18")
2992 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-using-offset/19")
2993
2994 89/<- %esp 5/r32/ebp
2995 5d/pop-to-ebp
2996 c3/return
2997
2998 test-convert-index-into-array-using-offset-on-stack:
2999
3000 55/push-ebp
3001 89/<- %ebp 4/r32/esp
3002
3003 (clear-stream _test-input-stream)
3004 (clear-stream $_test-input-buffered-file->buffer)
3005 (clear-stream _test-output-stream)
3006 (clear-stream $_test-output-buffered-file->buffer)
3007
3008 (write _test-input-stream "fn foo {\n")
3009 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
3010 (write _test-input-stream " var idx: int\n")
3011 (write _test-input-stream " var off/ecx: (offset int) <- compute-offset arr, idx\n")
3012 (write _test-input-stream " var x/eax: (addr int) <- index arr, off\n")
3013 (write _test-input-stream "}\n")
3014
3015 (convert-mu _test-input-buffered-file _test-output-buffered-file)
3016 (flush _test-output-buffered-file)
3017 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
3023
3024 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-using-offset-on-stack/0")
3025 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-using-offset-on-stack/1")
3026 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-using-offset-on-stack/2")
3027 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-using-offset-on-stack/3")
3028 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-using-offset-on-stack/4")
3029 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-using-offset-on-stack/5")
3030 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-using-offset-on-stack/6")
3031 (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")
3032 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-index-into-array-using-offset-on-stack/8")
3033 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-using-offset-on-stack/9")
3034 (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")
3035 (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")
3036 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-using-offset-on-stack/12")
3037 (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")
3038 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-using-offset-on-stack/14")
3039 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-using-offset-on-stack/15")
3040 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-using-offset-on-stack/16")
3041 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-using-offset-on-stack/17")
3042 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-using-offset-on-stack/18")
3043 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-using-offset-on-stack/19")
3044 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-using-offset-on-stack/20")
3045
3046 89/<- %esp 5/r32/ebp
3047 5d/pop-to-ebp
3048 c3/return
3049
3050 test-convert-function-and-type-definition:
3051
3052 55/push-ebp
3053 89/<- %ebp 4/r32/esp
3054
3055 (clear-stream _test-input-stream)
3056 (clear-stream $_test-input-buffered-file->buffer)
3057 (clear-stream _test-output-stream)
3058 (clear-stream $_test-output-buffered-file->buffer)
3059
3060 (write _test-input-stream "fn foo a: (addr t) {\n")
3061 (write _test-input-stream " var _a/eax: (addr t) <- copy a\n")
3062 (write _test-input-stream " var b/ecx: (addr int) <- get _a, x\n")
3063 (write _test-input-stream " var c/ecx: (addr int) <- get _a, y\n")
3064 (write _test-input-stream "}\n")
3065 (write _test-input-stream "type t {\n")
3066 (write _test-input-stream " x: int\n")
3067 (write _test-input-stream " y: int\n")
3068 (write _test-input-stream "}\n")
3069
3070 (convert-mu _test-input-buffered-file _test-output-buffered-file)
3071 (flush _test-output-buffered-file)
3072 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
3078
3079 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-and-type-definition/0")
3080 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-and-type-definition/1")
3081 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-and-type-definition/2")
3082 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-and-type-definition/3")
3083 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-and-type-definition/4")
3084 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-and-type-definition/5")
3085 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-and-type-definition/6")
3086 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-and-type-definition/7")
3087 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-and-type-definition/8")
3088 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x00000000) 0x00000001/r32" "F - test-convert-function-and-type-definition/9")
3089 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x00000004) 0x00000001/r32" "F - test-convert-function-and-type-definition/11")
3090 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-and-type-definition/13")
3091 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-and-type-definition/14")
3092 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-and-type-definition/15")
3093 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-and-type-definition/16")
3094 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-and-type-definition/17")
3095 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-and-type-definition/18")
3096 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-and-type-definition/19")
3097 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-and-type-definition/20")
3098
3099 89/<- %esp 5/r32/ebp
3100 5d/pop-to-ebp
3101 c3/return
3102
3103 test-convert-function-with-local-var-with-user-defined-type:
3104
3105 55/push-ebp
3106 89/<- %ebp 4/r32/esp
3107
3108 (clear-stream _test-input-stream)
3109 (clear-stream $_test-input-buffered-file->buffer)
3110 (clear-stream _test-output-stream)
3111 (clear-stream $_test-output-buffered-file->buffer)
3112
3113 (write _test-input-stream "fn foo {\n")
3114 (write _test-input-stream " var a: t\n")
3115 (write _test-input-stream "}\n")
3116 (write _test-input-stream "type t {\n")
3117 (write _test-input-stream " x: int\n")
3118 (write _test-input-stream " y: int\n")
3119 (write _test-input-stream "}\n")
3120
3121 (convert-mu _test-input-buffered-file _test-output-buffered-file)
3122 (flush _test-output-buffered-file)
3123 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
3129
3130 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-with-user-defined-type/0")
3131 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-with-user-defined-type/1")
3132 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-with-user-defined-type/2")
3133 (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")
3134 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-with-user-defined-type/4")
3135 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-with-user-defined-type/5")
3136 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-with-user-defined-type/6")
3137 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-with-user-defined-type/7")
3138 (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")
3139 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-with-user-defined-type/9")
3140 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-with-user-defined-type/10")
3141 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-with-user-defined-type/11")
3142 (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")
3143 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-with-user-defined-type/13")
3144 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-with-user-defined-type/14")
3145
3146 89/<- %esp 5/r32/ebp
3147 5d/pop-to-ebp
3148 c3/return
3149
3150 test-convert-function-call-with-arg-of-user-defined-type:
3151
3152 55/push-ebp
3153 89/<- %ebp 4/r32/esp
3154
3155 (clear-stream _test-input-stream)
3156 (clear-stream $_test-input-buffered-file->buffer)
3157 (clear-stream _test-output-stream)
3158 (clear-stream $_test-output-buffered-file->buffer)
3159
3160 (write _test-input-stream "fn f {\n")
3161 (write _test-input-stream " var a: t\n")
3162 (write _test-input-stream " foo a\n")
3163 (write _test-input-stream "}\n")
3164 (write _test-input-stream "fn foo x: t {\n")
3165 (write _test-input-stream "}\n")
3166 (write _test-input-stream "type t {\n")
3167 (write _test-input-stream " x: int\n")
3168 (write _test-input-stream " y: int\n")
3169 (write _test-input-stream "}\n")
3170
3171 (convert-mu _test-input-buffered-file _test-output-buffered-file)
3172 (flush _test-output-buffered-file)
3173 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
3179
3180 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type/0")
3181 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/1")
3182 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/2")
3183 (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")
3184 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type/4")
3185 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-arg-of-user-defined-type/5")
3186
3187 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type/6")
3188 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type/7")
3189
3190 (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")
3191
3192 (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")
3193 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type/10")
3194 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-arg-of-user-defined-type/11")
3195 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/12")
3196 (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")
3197 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/14")
3198 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/15")
3199 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type/16")
3200 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/17")
3201 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/18")
3202 (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")
3203 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/20")
3204 (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")
3205 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/22")
3206 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/23")
3207
3208 89/<- %esp 5/r32/ebp
3209 5d/pop-to-ebp
3210 c3/return
3211
3212 test-convert-function-call-with-arg-of-user-defined-type-register-indirect:
3213
3214 55/push-ebp
3215 89/<- %ebp 4/r32/esp
3216
3217 (clear-stream _test-input-stream)
3218 (clear-stream $_test-input-buffered-file->buffer)
3219 (clear-stream _test-output-stream)
3220 (clear-stream $_test-output-buffered-file->buffer)
3221
3222 (write _test-input-stream "fn f {\n")
3223 (write _test-input-stream " var a/eax: (addr t) <- copy 0\n")
3224 (write _test-input-stream " foo *a\n")
3225 (write _test-input-stream "}\n")
3226 (write _test-input-stream "fn foo x: t {\n")
3227 (write _test-input-stream "}\n")
3228 (write _test-input-stream "type t {\n")
3229 (write _test-input-stream " x: int\n")
3230 (write _test-input-stream " y: int\n")
3231 (write _test-input-stream "}\n")
3232
3233 (convert-mu _test-input-buffered-file _test-output-buffered-file)
3234 (flush _test-output-buffered-file)
3235 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
3241
3242 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type/0")
3243 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/1")
3244 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/2")
3245 (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")
3246 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type/4")
3247 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-arg-of-user-defined-type/5")
3248
3249 (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")
3250 (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")
3251
3252 (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")
3253
3254 (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")
3255 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type/10")
3256 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-arg-of-user-defined-type/11")
3257 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/12")
3258 (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")
3259 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/14")
3260 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/15")
3261 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type/16")
3262 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/17")
3263 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/18")
3264 (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")
3265 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/20")
3266 (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")
3267 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/22")
3268 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/23")
3269
3270 89/<- %esp 5/r32/ebp
3271 5d/pop-to-ebp
3272 c3/return
3273
3274
3275
3276 test-convert-function-call-with-arg-of-user-defined-type-by-reference:
3277
3278 55/push-ebp
3279 89/<- %ebp 4/r32/esp
3280
3281 (clear-stream _test-input-stream)
3282 (clear-stream $_test-input-buffered-file->buffer)
3283 (clear-stream _test-output-stream)
3284 (clear-stream $_test-output-buffered-file->buffer)
3285
3286 (write _test-input-stream "fn f {\n")
3287 (write _test-input-stream " var a: t\n")
3288 (write _test-input-stream " var b/eax: (addr t) <- address a\n")
3289 (write _test-input-stream " foo b\n")
3290 (write _test-input-stream "}\n")
3291 (write _test-input-stream "fn foo x: (addr t) {\n")
3292 (write _test-input-stream " var x/ecx: (addr int) <- copy x\n")
3293 (write _test-input-stream " increment *x\n")
3294 (write _test-input-stream "}\n")
3295 (write _test-input-stream "type t {\n")
3296 (write _test-input-stream " x: int\n")
3297 (write _test-input-stream " y: int\n")
3298 (write _test-input-stream "}\n")
3299
3300 (convert-mu _test-input-buffered-file _test-output-buffered-file)
3301 (flush _test-output-buffered-file)
3302 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
3308
3309 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/0")
3310 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/1")
3311 (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")
3312 (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")
3313 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/4")
3314 (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")
3315
3316 (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")
3317 (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")
3318
3319 (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")
3320 (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")
3321
3322 (check-next-stream-line-equal _test-output-stream " (foo %eax)" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/10")
3323
3324 (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")
3325 (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")
3326 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/13")
3327 (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")
3328 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/15")
3329 (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")
3330 (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")
3331 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/18")
3332 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/19")
3333 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/20")
3334 (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")
3335 (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")
3336 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/23")
3337 (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")
3338 (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")
3339 (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")
3340 (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")
3341 (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")
3342 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/29")
3343 (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")
3344 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/31")
3345 (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")
3346 (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")
3347 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/34")
3348
3349 89/<- %esp 5/r32/ebp
3350 5d/pop-to-ebp
3351 c3/return
3352
3353 test-convert-get-on-local-variable:
3354
3355 55/push-ebp
3356 89/<- %ebp 4/r32/esp
3357
3358 (clear-stream _test-input-stream)
3359 (clear-stream $_test-input-buffered-file->buffer)
3360 (clear-stream _test-output-stream)
3361 (clear-stream $_test-output-buffered-file->buffer)
3362
3363 (write _test-input-stream "fn foo {\n")
3364 (write _test-input-stream " var a: t\n")
3365 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
3366 (write _test-input-stream "}\n")
3367 (write _test-input-stream "type t {\n")
3368 (write _test-input-stream " x: int\n")
3369 (write _test-input-stream " y: int\n")
3370 (write _test-input-stream "}\n")
3371
3372 (convert-mu _test-input-buffered-file _test-output-buffered-file)
3373 (flush _test-output-buffered-file)
3374 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
3380
3381 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-local-variable/0")
3382 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-local-variable/1")
3383 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-local-variable/2")
3384 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-local-variable/3")
3385 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-local-variable/4")
3386 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-local-variable/5")
3387
3388 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-get-on-local-variable/6")
3389 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-get-on-local-variable/7")
3390
3391 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-local-variable/8")
3392
3393 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0xfffffffc) 0x00000001/r32" "F - test-convert-get-on-local-variable/9")
3394
3395 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-local-variable/10")
3396
3397 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000008/imm32" "F - test-convert-get-on-local-variable/11")
3398 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-local-variable/12")
3399 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-local-variable/13")
3400 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-local-variable/14")
3401 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-local-variable/15")
3402 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-local-variable/16")
3403 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-local-variable/17")
3404
3405 89/<- %esp 5/r32/ebp
3406 5d/pop-to-ebp
3407 c3/return
3408
3409 test-convert-get-on-function-argument:
3410
3411 55/push-ebp
3412 89/<- %ebp 4/r32/esp
3413
3414 (clear-stream _test-input-stream)
3415 (clear-stream $_test-input-buffered-file->buffer)
3416 (clear-stream _test-output-stream)
3417 (clear-stream $_test-output-buffered-file->buffer)
3418
3419 (write _test-input-stream "fn foo a: t {\n")
3420 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
3421 (write _test-input-stream "}\n")
3422 (write _test-input-stream "type t {\n")
3423 (write _test-input-stream " x: int\n")
3424 (write _test-input-stream " y: int\n")
3425 (write _test-input-stream "}\n")
3426
3427 (convert-mu _test-input-buffered-file _test-output-buffered-file)
3428 (flush _test-output-buffered-file)
3429 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
3435
3436 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-function-argument/0")
3437 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-function-argument/1")
3438 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-function-argument/2")
3439 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-function-argument/3")
3440 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-function-argument/4")
3441 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-function-argument/5")
3442
3443 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-function-argument/6")
3444
3445 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0x0000000c) 0x00000001/r32" "F - test-convert-get-on-function-argument/7")
3446
3447 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-function-argument/8")
3448 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-function-argument/9")
3449 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-function-argument/10")
3450 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-function-argument/11")
3451 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-function-argument/12")
3452 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-function-argument/13")
3453 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-function-argument/14")
3454
3455 89/<- %esp 5/r32/ebp
3456 5d/pop-to-ebp
3457 c3/return
3458
3459 test-convert-get-on-function-argument-with-known-type:
3460
3461 55/push-ebp
3462 89/<- %ebp 4/r32/esp
3463
3464 (clear-stream _test-input-stream)
3465 (clear-stream $_test-input-buffered-file->buffer)
3466 (clear-stream _test-output-stream)
3467 (clear-stream $_test-output-buffered-file->buffer)
3468
3469 (write _test-input-stream "type t {\n")
3470 (write _test-input-stream " x: int\n")
3471 (write _test-input-stream " y: int\n")
3472 (write _test-input-stream "}\n")
3473 (write _test-input-stream "fn foo a: t {\n")
3474 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
3475 (write _test-input-stream "}\n")
3476
3477 (convert-mu _test-input-buffered-file _test-output-buffered-file)
3478 (flush _test-output-buffered-file)
3479 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
3485
3486 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-function-argument-with-known-type/0")
3487 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-function-argument-with-known-type/1")
3488 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-function-argument-with-known-type/2")
3489 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-function-argument-with-known-type/3")
3490 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-function-argument-with-known-type/4")
3491 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-function-argument-with-known-type/5")
3492
3493 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-function-argument-with-known-type/6")
3494
3495 (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")
3496
3497 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-function-argument-with-known-type/8")
3498 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-function-argument-with-known-type/9")
3499 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-function-argument-with-known-type/10")
3500 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-function-argument-with-known-type/11")
3501 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-function-argument-with-known-type/12")
3502 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-function-argument-with-known-type/13")
3503 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-function-argument-with-known-type/14")
3504
3505 89/<- %esp 5/r32/ebp
3506 5d/pop-to-ebp
3507 c3/return
3508
3509 test-convert-array-of-user-defined-types:
3510
3511 55/push-ebp
3512 89/<- %ebp 4/r32/esp
3513
3514 (clear-stream _test-input-stream)
3515 (clear-stream $_test-input-buffered-file->buffer)
3516 (clear-stream _test-output-stream)
3517 (clear-stream $_test-output-buffered-file->buffer)
3518
3519 (write _test-input-stream "type t {\n")
3520 (write _test-input-stream " x: int\n")
3521 (write _test-input-stream " y: int\n")
3522 (write _test-input-stream "}\n")
3523 (write _test-input-stream "fn foo {\n")
3524 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
3525 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
3526 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
3527 (write _test-input-stream "}\n")
3528
3529 (convert-mu _test-input-buffered-file _test-output-buffered-file)
3530 (flush _test-output-buffered-file)
3531 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
3537
3538 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-array-of-user-defined-types/0")
3539 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-array-of-user-defined-types/1")
3540 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-array-of-user-defined-types/2")
3541 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-array-of-user-defined-types/3")
3542 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-array-of-user-defined-types/4")
3543 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-array-of-user-defined-types/5")
3544 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-array-of-user-defined-types/6")
3545 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-array-of-user-defined-types/7")
3546 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-array-of-user-defined-types/8")
3547 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-array-of-user-defined-types/9")
3548 (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")
3549 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-array-of-user-defined-types/13")
3550 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-array-of-user-defined-types/14")
3551 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-array-of-user-defined-types/15")
3552 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-array-of-user-defined-types/16")
3553 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-array-of-user-defined-types/17")
3554 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-array-of-user-defined-types/18")
3555 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-array-of-user-defined-types/19")
3556 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-array-of-user-defined-types/20")
3557
3558 89/<- %esp 5/r32/ebp
3559 5d/pop-to-ebp
3560 c3/return
3561
3562 test-convert-length-of-array-of-user-defined-types-to-eax:
3563
3564 55/push-ebp
3565 89/<- %ebp 4/r32/esp
3566
3567 (clear-stream _test-input-stream)
3568 (clear-stream $_test-input-buffered-file->buffer)
3569 (clear-stream _test-output-stream)
3570 (clear-stream $_test-output-buffered-file->buffer)
3571
3572 (write _test-input-stream "type t {\n")
3573 (write _test-input-stream " x: int\n")
3574 (write _test-input-stream " y: int\n")
3575 (write _test-input-stream " z: int\n")
3576 (write _test-input-stream "}\n")
3577 (write _test-input-stream "fn foo {\n")
3578 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
3579 (write _test-input-stream " var x/eax: (addr t) <- length arr\n")
3580 (write _test-input-stream "}\n")
3581
3582 (convert-mu _test-input-buffered-file _test-output-buffered-file)
3583 (flush _test-output-buffered-file)
3584 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
3590
3591 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/0")
3592 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-eax/1")
3593 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-eax/2")
3594 (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")
3595 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-eax/4")
3596 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/5")
3597
3598 (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")
3599 (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")
3600
3601 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/8")
3602 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/9")
3603 (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")
3604 (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")
3605 (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")
3606 (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")
3607 (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")
3608 (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")
3609
3610 (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")
3611
3612 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-eax/17")
3613 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/18")
3614 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-eax/19")
3615 (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")
3616 (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")
3617 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-eax/22")
3618
3619 89/<- %esp 5/r32/ebp
3620 5d/pop-to-ebp
3621 c3/return
3622
3623 test-convert-length-of-array-of-user-defined-types-to-ecx:
3624
3625 55/push-ebp
3626 89/<- %ebp 4/r32/esp
3627
3628 (clear-stream _test-input-stream)
3629 (clear-stream $_test-input-buffered-file->buffer)
3630 (clear-stream _test-output-stream)
3631 (clear-stream $_test-output-buffered-file->buffer)
3632
3633 (write _test-input-stream "type t {\n")
3634 (write _test-input-stream " x: int\n")
3635 (write _test-input-stream " y: int\n")
3636 (write _test-input-stream " z: int\n")
3637 (write _test-input-stream "}\n")
3638 (write _test-input-stream "fn foo {\n")
3639 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
3640 (write _test-input-stream " var x/ecx: (addr t) <- length arr\n")
3641 (write _test-input-stream "}\n")
3642
3643 (convert-mu _test-input-buffered-file _test-output-buffered-file)
3644 (flush _test-output-buffered-file)
3645 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
3651
3652 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/0")
3653 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/1")
3654 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/2")
3655 (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")
3656 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/4")
3657 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/5")
3658
3659 (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")
3660 (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")
3661
3662 (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")
3663
3664 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/9")
3665 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/10")
3666 (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")
3667 (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")
3668 (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")
3669 (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")
3670 (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")
3671 (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")
3672 (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")
3673
3674 (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")
3675
3676 (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")
3677
3678 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/20")
3679 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/21")
3680 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/22")
3681 (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")
3682 (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")
3683 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/25")
3684
3685 89/<- %esp 5/r32/ebp
3686 5d/pop-to-ebp
3687 c3/return
3688
3689 test-convert-length-of-array-of-user-defined-types-to-edx:
3690
3691 55/push-ebp
3692 89/<- %ebp 4/r32/esp
3693
3694 (clear-stream _test-input-stream)
3695 (clear-stream $_test-input-buffered-file->buffer)
3696 (clear-stream _test-output-stream)
3697 (clear-stream $_test-output-buffered-file->buffer)
3698
3699 (write _test-input-stream "type t {\n")
3700 (write _test-input-stream " x: int\n")
3701 (write _test-input-stream " y: int\n")
3702 (write _test-input-stream " z: int\n")
3703 (write _test-input-stream "}\n")
3704 (write _test-input-stream "fn foo {\n")
3705 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
3706 (write _test-input-stream " var x/edx: (addr t) <- length arr\n")
3707 (write _test-input-stream "}\n")
3708
3709 (convert-mu _test-input-buffered-file _test-output-buffered-file)
3710 (flush _test-output-buffered-file)
3711 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
3717
3718 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/0")
3719 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-edx/1")
3720 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-edx/2")
3721 (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")
3722 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-edx/4")
3723 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/5")
3724
3725 (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")
3726 (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")
3727
3728 (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")
3729
3730 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types-to-edx/9")
3731 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types-to-edx/10")
3732 (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")
3733 (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")
3734 (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")
3735 (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")
3736 (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")
3737 (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")
3738 (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")
3739
3740 (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")
3741
3742 (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")
3743
3744 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-edx/20")
3745 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/21")
3746 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-edx/22")
3747 (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")
3748 (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")
3749 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-edx/25")
3750
3751 89/<- %esp 5/r32/ebp
3752 5d/pop-to-ebp
3753 c3/return
3754
3755 test-convert-length-of-array-of-user-defined-types:
3756
3757 55/push-ebp
3758 89/<- %ebp 4/r32/esp
3759
3760 (clear-stream _test-input-stream)
3761 (clear-stream $_test-input-buffered-file->buffer)
3762 (clear-stream _test-output-stream)
3763 (clear-stream $_test-output-buffered-file->buffer)
3764
3765 (write _test-input-stream "type t {\n")
3766 (write _test-input-stream " x: int\n")
3767 (write _test-input-stream " y: int\n")
3768 (write _test-input-stream " z: int\n")
3769 (write _test-input-stream "}\n")
3770 (write _test-input-stream "fn foo {\n")
3771 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
3772 (write _test-input-stream " var x/ebx: (addr t) <- length arr\n")
3773 (write _test-input-stream "}\n")
3774
3775 (convert-mu _test-input-buffered-file _test-output-buffered-file)
3776 (flush _test-output-buffered-file)
3777 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
3783
3784 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types/0")
3785 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types/1")
3786 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types/2")
3787 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-of-user-defined-types/3")
3788 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types/4")
3789 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types/5")
3790 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-of-user-defined-types/6")
3791 (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")
3792 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-length-of-array-of-user-defined-types/8")
3793 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types/9")
3794 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types/10")
3795 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types/11")
3796 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array-of-user-defined-types/12")
3797 (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")
3798 (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")
3799 (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")
3800 (check-next-stream-line-equal _test-output-stream " 89/<- %ebx 0/r32/eax" "F - test-convert-length-of-array-of-user-defined-types/16")
3801 (check-next-stream-line-equal _test-output-stream " 5a/pop-to-edx" "F - test-convert-length-of-array-of-user-defined-types/17")
3802 (check-next-stream-line-equal _test-output-stream " 59/pop-to-ecx" "F - test-convert-length-of-array-of-user-defined-types/18")
3803 (check-next-stream-line-equal _test-output-stream " 58/pop-to-eax" "F - test-convert-length-of-array-of-user-defined-types/19")
3804 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ebx" "F - test-convert-length-of-array-of-user-defined-types/20")
3805 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-of-user-defined-types/21")
3806 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types/22")
3807 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types/23")
3808 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types/24")
3809 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-of-user-defined-types/25")
3810 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-of-user-defined-types/26")
3811 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types/27")
3812
3813 89/<- %esp 5/r32/ebp
3814 5d/pop-to-ebp
3815 c3/return
3816
3817
3818
3819
3820
3821 parse-mu:
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854 55/push-ebp
3855 89/<- %ebp 4/r32/esp
3856
3857 50/push-eax
3858 51/push-ecx
3859 52/push-edx
3860 53/push-ebx
3861 56/push-esi
3862 57/push-edi
3863
3864 81 5/subop/subtract %esp 0x200/imm32
3865 68/push 0x200/imm32/size
3866 68/push 0/imm32/read
3867 68/push 0/imm32/write
3868 89/<- %ecx 4/r32/esp
3869
3870 68/push 0/imm32/end
3871 68/push 0/imm32/start
3872 89/<- %edx 4/r32/esp
3873
3874 bf/copy-to-edi _Program-functions/imm32
3875
3876 81 5/subop/subtract %esp 0xc00/imm32
3877 68/push 0xc00/imm32/size
3878 68/push 0/imm32/top
3879 89/<- %ebx 4/r32/esp
3880 {
3881 $parse-mu:line-loop:
3882 (clear-stream %ecx)
3883 (read-line-buffered *(ebp+8) %ecx)
3884
3885 81 7/subop/compare *ecx 0/imm32
3886 0f 84/jump-if-= break/disp32
3887 +-- 6 lines: #? # dump line -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3893 (next-mu-token %ecx %edx)
3894
3895 (slice-empty? %edx)
3896 3d/compare-eax-and 0/imm32/false
3897 0f 85/jump-if-!= loop/disp32
3898
3899
3900 8b/-> *edx 0/r32/eax
3901 8a/copy-byte *eax 0/r32/AL
3902 81 4/subop/and %eax 0xff/imm32
3903
3904 3d/compare-eax-and 0x23/imm32/hash
3905 0f 84/jump-if-= loop/disp32
3906
3907 {
3908 $parse-mu:fn:
3909 (slice-equal? %edx "fn")
3910 3d/compare-eax-and 0/imm32/false
3911 0f 84/jump-if-= break/disp32
3912
3913 68/push 0/imm32
3914 68/push 0/imm32
3915 89/<- %esi 4/r32/esp
3916
3917 (allocate Heap *Function-size %esi)
3918
3919 (lookup *esi *(esi+4))
3920 (clear-stack %ebx)
3921 (populate-mu-function-header %ecx %eax %ebx)
3922 (populate-mu-function-body *(ebp+8) %eax %ebx)
3923
3924 8b/-> *esi 0/r32/eax
3925 89/<- *edi 0/r32/eax
3926 8b/-> *(esi+4) 0/r32/eax
3927 89/<- *(edi+4) 0/r32/eax
3928
3929
3930 (lookup *esi *(esi+4))
3931
3932 8d/copy-address *(eax+0x20) 7/r32/edi
3933
3934 81 0/subop/add %esp 8/imm32
3935
3936 e9/jump $parse-mu:line-loop/disp32
3937 }
3938
3939 {
3940 $parse-mu:type:
3941 (slice-equal? %edx "type")
3942 3d/compare-eax-and 0/imm32
3943 0f 84/jump-if-= break/disp32
3944 (next-mu-token %ecx %edx)
3945
3946 (pos-or-insert-slice Type-id %edx)
3947
3948 51/push-ecx
3949
3950 68/push 0/imm32
3951 68/push 0/imm32
3952 89/<- %ecx 4/r32/esp
3953 (find-or-create-typeinfo %eax %ecx)
3954
3955 (lookup *ecx *(ecx+4))
3956
3957
3958 (populate-mu-type *(ebp+8) %eax)
3959
3960
3961 81 0/subop/add %esp 8/imm32
3962
3963 59/pop-to-ecx
3964 e9/jump $parse-mu:line-loop/disp32
3965 }
3966
3967 e9/jump $parse-mu:error1/disp32
3968 }
3969 $parse-mu:end:
3970
3971 81 0/subop/add %esp 0xe1c/imm32
3972
3973 5f/pop-to-edi
3974 5e/pop-to-esi
3975 5b/pop-to-ebx
3976 5a/pop-to-edx
3977 59/pop-to-ecx
3978 58/pop-to-eax
3979
3980 89/<- %esp 5/r32/ebp
3981 5d/pop-to-ebp
3982 c3/return
3983
3984 $parse-mu:error1:
3985
3986 (write-buffered Stderr "unexpected top-level command: ")
3987 (write-slice-buffered Stderr %edx)
3988 (write-buffered Stderr "\n")
3989 (flush Stderr)
3990
3991 bb/copy-to-ebx 1/imm32
3992 b8/copy-to-eax 1/imm32/exit
3993 cd/syscall 0x80/imm8
3994
3995
3996 $parse-mu:error2:
3997
3998 (print-int32-buffered Stderr *ebx)
3999 (write-buffered Stderr " vars not reclaimed after fn '")
4000 (write-slice-buffered Stderr *eax)
4001 (write-buffered Stderr "'\n")
4002 (flush Stderr)
4003
4004 bb/copy-to-ebx 1/imm32
4005 b8/copy-to-eax 1/imm32/exit
4006 cd/syscall 0x80/imm8
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020 populate-mu-function-header:
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049 55/push-ebp
4050 89/<- %ebp 4/r32/esp
4051
4052 50/push-eax
4053 51/push-ecx
4054 52/push-edx
4055 53/push-ebx
4056 57/push-edi
4057
4058 8b/-> *(ebp+0xc) 7/r32/edi
4059
4060 68/push 0/imm32/end
4061 68/push 0/imm32/start
4062 89/<- %ecx 4/r32/esp
4063
4064 68/push 0/imm32
4065 68/push 0/imm32
4066 89/<- %ebx 4/r32/esp
4067
4068 (next-mu-token *(ebp+8) %ecx)
4069
4070
4071
4072 (slice-equal? %ecx "{")
4073 3d/compare-eax-and 0/imm32/false
4074 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
4075
4076 (slice-equal? %ecx "->")
4077 3d/compare-eax-and 0/imm32/false
4078 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
4079
4080 (slice-equal? %ecx "}")
4081 3d/compare-eax-and 0/imm32/false
4082 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
4083
4084 (slice-to-string Heap %ecx %edi)
4085
4086 {
4087 $populate-mu-function-header:check-for-inout:
4088 (next-mu-token *(ebp+8) %ecx)
4089
4090 (slice-equal? %ecx "{")
4091 3d/compare-eax-and 0/imm32/false
4092 0f 85/jump-if-!= $populate-mu-function-header:done/disp32
4093
4094 (slice-equal? %ecx "->")
4095 3d/compare-eax-and 0/imm32/false
4096 0f 85/jump-if-!= break/disp32
4097
4098 (slice-equal? %ecx "}")
4099 3d/compare-eax-and 0/imm32/false
4100 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
4101
4102 (parse-var-with-type %ecx *(ebp+8) %ebx)
4103
4104
4105 (lookup *ebx *(ebx+4))
4106 81 7/subop/compare *(eax+0x18) 0/imm32
4107 0f 85/jump-if-!= $populate-mu-function-header:error2/disp32
4108
4109
4110
4111 8d/copy-address *(edi+8) 0/r32/eax
4112 (append-list Heap *ebx *(ebx+4) *(edi+8) *(edi+0xc) %eax)
4113
4114 (push *(ebp+0x10) *ebx)
4115 (push *(ebp+0x10) *(ebx+4))
4116 (push *(ebp+0x10) 0)
4117
4118 e9/jump loop/disp32
4119 }
4120
4121 {
4122 $populate-mu-function-header:check-for-out:
4123 (next-mu-token *(ebp+8) %ecx)
4124
4125 (slice-equal? %ecx "{")
4126 3d/compare-eax-and 0/imm32/false
4127 0f 85/jump-if-!= break/disp32
4128
4129 (slice-equal? %ecx "->")
4130 3d/compare-eax-and 0/imm32/false
4131 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
4132
4133 (slice-equal? %ecx "}")
4134 3d/compare-eax-and 0/imm32/false
4135 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
4136
4137 (parse-var-with-type %ecx *(ebp+8) %ebx)
4138
4139
4140 (lookup *ebx *(ebx+4))
4141 81 7/subop/compare *(eax+0x18) 0/imm32
4142 0f 84/jump-if-= $populate-mu-function-header:error3/disp32
4143
4144 8d/copy-address *(edi+0x10) 0/r32/eax
4145 (append-list Heap *ebx *(ebx+4) *(edi+0x10) *(edi+0x14) %eax)
4146
4147 e9/jump loop/disp32
4148 }
4149 $populate-mu-function-header:done:
4150 (check-no-tokens-left *(ebp+8))
4151 $populate-mu-function-header:end:
4152
4153 81 0/subop/add %esp 0x10/imm32
4154
4155 5f/pop-to-edi
4156 5b/pop-to-ebx
4157 5a/pop-to-edx
4158 59/pop-to-ecx
4159 58/pop-to-eax
4160
4161 89/<- %esp 5/r32/ebp
4162 5d/pop-to-ebp
4163 c3/return
4164
4165 $populate-mu-function-header:error1:
4166
4167 (write-buffered Stderr "function header not in form 'fn <name> [inouts] [-> outputs] {' -- '")
4168 (flush Stderr)
4169 (rewind-stream *(ebp+8))
4170 (write-stream 2 *(ebp+8))
4171 (write-buffered Stderr "'\n")
4172 (flush Stderr)
4173
4174 bb/copy-to-ebx 1/imm32
4175 b8/copy-to-eax 1/imm32/exit
4176 cd/syscall 0x80/imm8
4177
4178
4179 $populate-mu-function-header:error2:
4180
4181 (write-buffered Stderr "function input '")
4182 (write-buffered Stderr *ebx)
4183 (write-buffered Stderr "' cannot be in a register")
4184 (flush Stderr)
4185
4186 bb/copy-to-ebx 1/imm32
4187 b8/copy-to-eax 1/imm32/exit
4188 cd/syscall 0x80/imm8
4189
4190
4191 $populate-mu-function-header:error3:
4192
4193 (write-buffered Stderr "function input '")
4194 (lookup *ebx *(ebx+4))
4195 (lookup *eax *(eax+4))
4196 (write-buffered Stderr %eax)
4197 (write-buffered Stderr "' must be in a register, in instruction '")
4198 (flush Stderr)
4199 (rewind-stream *(ebp+8))
4200 (write-stream 2 *(ebp+8))
4201 (write-buffered Stderr "'\n")
4202 (flush Stderr)
4203
4204 bb/copy-to-ebx 1/imm32
4205 b8/copy-to-eax 1/imm32/exit
4206 cd/syscall 0x80/imm8
4207
4208
4209 test-function-header-with-arg:
4210
4211 55/push-ebp
4212 89/<- %ebp 4/r32/esp
4213
4214 (clear-stream _test-input-stream)
4215 (write _test-input-stream "foo n: int {\n")
4216
4217 2b/subtract *Function-size 4/r32/esp
4218 89/<- %ecx 4/r32/esp
4219 (zero-out %ecx *Function-size)
4220
4221 81 5/subop/subtract %esp 0xc0/imm32
4222 68/push 0xc0/imm32/size
4223 68/push 0/imm32/top
4224 89/<- %ebx 4/r32/esp
4225
4226 (populate-mu-function-header _test-input-stream %ecx %ebx)
4227
4228 (lookup *ecx *(ecx+4))
4229 (check-strings-equal %eax "foo" "F - test-function-header-with-arg/name")
4230
4231 (lookup *(ecx+8) *(ecx+0xc))
4232 (lookup *eax *(eax+4))
4233 89/<- %edx 0/r32/eax
4234
4235 (lookup *edx *(edx+4))
4236 (check-strings-equal %eax "n" "F - test-function-header-with-arg/inout:0")
4237
4238 (lookup *(edx+8) *(edx+0xc))
4239 (check-ints-equal *eax 1 "F - test-function-header-with-arg/inout:0/type:0")
4240 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-arg/inout:0/type:1")
4241 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-arg/inout:0/type:2")
4242
4243 89/<- %esp 5/r32/ebp
4244 5d/pop-to-ebp
4245 c3/return
4246
4247 test-function-header-with-multiple-args:
4248
4249 55/push-ebp
4250 89/<- %ebp 4/r32/esp
4251
4252 (clear-stream _test-input-stream)
4253 (write _test-input-stream "foo a: int, b: int c: int {\n")
4254
4255 2b/subtract *Function-size 4/r32/esp
4256 89/<- %ecx 4/r32/esp
4257 (zero-out %ecx *Function-size)
4258
4259 81 5/subop/subtract %esp 0xc0/imm32
4260 68/push 0xc0/imm32/size
4261 68/push 0/imm32/top
4262 89/<- %ebx 4/r32/esp
4263
4264 (populate-mu-function-header _test-input-stream %ecx %ebx)
4265
4266 (lookup *ecx *(ecx+4))
4267 (check-strings-equal %eax "foo" "F - test-function-header-with-multiple-args/name")
4268
4269 (lookup *(ecx+8) *(ecx+0xc))
4270 89/<- %edx 0/r32/eax
4271 $test-function-header-with-multiple-args:inout0:
4272
4273 (lookup *edx *(edx+4))
4274 89/<- %ebx 0/r32/eax
4275
4276 (lookup *ebx *(ebx+4))
4277 (check-strings-equal %eax "a" "F - test-function-header-with-multiple-args/inout:0")
4278
4279 (lookup *(ebx+8) *(ebx+0xc))
4280 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:0/type:0")
4281 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:0/type:1")
4282 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:0/type:2")
4283 $test-function-header-with-multiple-args:inout1:
4284
4285 (lookup *(edx+8) *(edx+0xc))
4286 89/<- %edx 0/r32/eax
4287
4288 (lookup *edx *(edx+4))
4289 89/<- %ebx 0/r32/eax
4290
4291 (lookup *ebx *(ebx+4))
4292 (check-strings-equal %eax "b" "F - test-function-header-with-multiple-args/inout:1")
4293
4294 (lookup *(ebx+8) *(ebx+0xc))
4295 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:1/type:0")
4296 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:1/type:1")
4297 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:1/type:2")
4298 $test-function-header-with-multiple-args:inout2:
4299
4300 (lookup *(edx+8) *(edx+0xc))
4301 89/<- %edx 0/r32/eax
4302
4303 (lookup *edx *(edx+4))
4304 89/<- %ebx 0/r32/eax
4305
4306 (lookup *ebx *(ebx+4))
4307 (check-strings-equal %eax "c" "F - test-function-header-with-multiple-args/inout:2")
4308
4309 (lookup *(ebx+8) *(ebx+0xc))
4310 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:2/type:0")
4311 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:2/type:1")
4312 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:2/type:2")
4313
4314 89/<- %esp 5/r32/ebp
4315 5d/pop-to-ebp
4316 c3/return
4317
4318 test-function-header-with-multiple-args-and-outputs:
4319
4320 55/push-ebp
4321 89/<- %ebp 4/r32/esp
4322
4323 (clear-stream _test-input-stream)
4324 (write _test-input-stream "foo a: int, b: int, c: int -> x/ecx: int y/edx: int {\n")
4325
4326 2b/subtract *Function-size 4/r32/esp
4327 89/<- %ecx 4/r32/esp
4328 (zero-out %ecx *Function-size)
4329
4330 81 5/subop/subtract %esp 0xc0/imm32
4331 68/push 0xc0/imm32/size
4332 68/push 0/imm32/top
4333 89/<- %ebx 4/r32/esp
4334
4335 (populate-mu-function-header _test-input-stream %ecx %ebx)
4336
4337 (lookup *ecx *(ecx+4))
4338 (check-strings-equal %eax "foo" "F - test-function-header-with-multiple-args-and-outputs/name")
4339
4340 (lookup *(ecx+8) *(ecx+0xc))
4341 89/<- %edx 0/r32/eax
4342 $test-function-header-with-multiple-args-and-outputs:inout0:
4343
4344 (lookup *edx *(edx+4))
4345 89/<- %ebx 0/r32/eax
4346
4347 (lookup *ebx *(ebx+4))
4348 (check-strings-equal %eax "a" "F - test-function-header-with-multiple-args-and-outputs/inout:0")
4349
4350 (lookup *(ebx+8) *(ebx+0xc))
4351 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:0")
4352 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:1")
4353 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:2")
4354 $test-function-header-with-multiple-args-and-outputs:inout1:
4355
4356 (lookup *(edx+8) *(edx+0xc))
4357 89/<- %edx 0/r32/eax
4358
4359 (lookup *edx *(edx+4))
4360 89/<- %ebx 0/r32/eax
4361
4362 (lookup *ebx *(ebx+4))
4363 (check-strings-equal %eax "b" "F - test-function-header-with-multiple-args-and-outputs/inout:1")
4364
4365 (lookup *(ebx+8) *(ebx+0xc))
4366 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:0")
4367 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:1")
4368 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:2")
4369 $test-function-header-with-multiple-args-and-outputs:inout2:
4370
4371 (lookup *(edx+8) *(edx+0xc))
4372 89/<- %edx 0/r32/eax
4373
4374 (lookup *edx *(edx+4))
4375 89/<- %ebx 0/r32/eax
4376
4377 (lookup *ebx *(ebx+4))
4378 (check-strings-equal %eax "c" "F - test-function-header-with-multiple-args-and-outputs/inout:2")
4379
4380 (lookup *(ebx+8) *(ebx+0xc))
4381 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:0")
4382 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:1")
4383 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:2")
4384 $test-function-header-with-multiple-args-and-outputs:out0:
4385
4386 (lookup *(ecx+0x10) *(ecx+0x14))
4387 89/<- %edx 0/r32/eax
4388
4389 (lookup *edx *(edx+4))
4390 89/<- %ebx 0/r32/eax
4391
4392 (lookup *ebx *(ebx+4))
4393 (check-strings-equal %eax "x" "F - test-function-header-with-multiple-args-and-outputs/output:0")
4394
4395 (lookup *(ebx+0x18) *(ebx+0x1c))
4396 (check-strings-equal %eax "ecx" "F - test-function-header-with-multiple-args-and-outputs/output:0/register")
4397
4398 (lookup *(ebx+8) *(ebx+0xc))
4399 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:0")
4400 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:1")
4401 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:2")
4402 $test-function-header-with-multiple-args-and-outputs:out1:
4403
4404 (lookup *(edx+8) *(edx+0xc))
4405 89/<- %edx 0/r32/eax
4406
4407 (lookup *edx *(edx+4))
4408 89/<- %ebx 0/r32/eax
4409
4410 (lookup *ebx *(ebx+4))
4411 (check-strings-equal %eax "y" "F - test-function-header-with-multiple-args-and-outputs/output:1")
4412
4413 (lookup *(ebx+0x18) *(ebx+0x1c))
4414 (check-strings-equal %eax "edx" "F - test-function-header-with-multiple-args-and-outputs/output:1/register")
4415
4416 (lookup *(ebx+8) *(ebx+0xc))
4417 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:0")
4418 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:1")
4419 (check-ints-equal *(eax+0c) 0 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:2")
4420
4421 89/<- %esp 5/r32/ebp
4422 5d/pop-to-ebp
4423 c3/return
4424
4425
4426
4427
4428
4429
4430
4431
4432 parse-var-with-type:
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449 55/push-ebp
4450 89/<- %ebp 4/r32/esp
4451
4452 50/push-eax
4453 51/push-ecx
4454 52/push-edx
4455 53/push-ebx
4456 56/push-esi
4457 57/push-edi
4458
4459 8b/-> *(ebp+8) 6/r32/esi
4460
4461 8b/-> *(esi+4) 1/r32/ecx
4462 49/decrement-ecx
4463 8a/copy-byte *ecx 1/r32/CL
4464 81 4/subop/and %ecx 0xff/imm32
4465 81 7/subop/compare %ecx 0x3a/imm32/colon
4466 0f 85/jump-if-!= $parse-var-with-type:abort/disp32
4467
4468 ff 1/subop/decrement *(esi+4)
4469
4470 68/push 0/imm32/end
4471 68/push 0/imm32/start
4472 89/<- %ecx 4/r32/esp
4473 $parse-var-with-type:parse-name:
4474 (next-token-from-slice *esi *(esi+4) 0x2f %ecx)
4475 $parse-var-with-type:create-var:
4476
4477 (new-var-from-slice Heap %ecx *(ebp+0x10))
4478
4479 $parse-var-with-type:save-register:
4480
4481 8b/-> *(ebp+0x10) 7/r32/edi
4482 (lookup *edi *(edi+4))
4483 89/<- %edi 0/r32/eax
4484
4485 (next-token-from-slice *(ecx+4) *(esi+4) 0x2f %ecx)
4486
4487 {
4488 $parse-var-with-type:write-register:
4489 (slice-empty? %ecx)
4490 3d/compare-eax-and 0/imm32/false
4491 75/jump-if-!= break/disp8
4492
4493 8d/copy-address *(edi+0x18) 0/r32/eax
4494 (slice-to-string Heap %ecx %eax)
4495 }
4496 $parse-var-with-type:save-type:
4497 8d/copy-address *(edi+8) 0/r32/eax
4498 (parse-type Heap *(ebp+0xc) %eax)
4499 $parse-var-with-type:end:
4500
4501 81 0/subop/add %esp 8/imm32
4502
4503 5f/pop-to-edi
4504 5e/pop-to-esi
4505 5b/pop-to-ebx
4506 5a/pop-to-edx
4507 59/pop-to-ecx
4508 58/pop-to-eax
4509
4510 89/<- %esp 5/r32/ebp
4511 5d/pop-to-ebp
4512 c3/return
4513
4514 $parse-var-with-type:abort:
4515
4516 (write-buffered Stderr "var should have form 'name: type' in '")
4517 (flush Stderr)
4518 (rewind-stream *(ebp+0xc))
4519 (write-stream 2 *(ebp+0xc))
4520 (write-buffered Stderr "'\n")
4521 (flush Stderr)
4522
4523 bb/copy-to-ebx 1/imm32
4524 b8/copy-to-eax 1/imm32/exit
4525 cd/syscall 0x80/imm8
4526
4527
4528 parse-type:
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547 55/push-ebp
4548 89/<- %ebp 4/r32/esp
4549
4550 50/push-eax
4551 51/push-ecx
4552 52/push-edx
4553
4554 (zero-out *(ebp+0x10) *Handle-size)
4555
4556 68/push 0/imm32
4557 68/push 0/imm32
4558 89/<- %ecx 4/r32/esp
4559
4560 (next-mu-token *(ebp+0xc) %ecx)
4561
4562
4563
4564
4565
4566 (slice-equal? %ecx "")
4567 3d/compare-eax-and 0/imm32/false
4568 0f 85/jump-if-!= $parse-type:abort/disp32
4569
4570 (slice-equal? %ecx "{")
4571 3d/compare-eax-and 0/imm32/false
4572 0f 85/jump-if-!= $parse-type:abort/disp32
4573
4574 (slice-equal? %ecx "}")
4575 3d/compare-eax-and 0/imm32/false
4576 0f 85/jump-if-!= $parse-type:abort/disp32
4577
4578 (slice-equal? %ecx "->")
4579 3d/compare-eax-and 0/imm32/false
4580 0f 85/jump-if-!= $parse-type:abort/disp32
4581
4582 (slice-equal? %ecx ")")
4583 3d/compare-eax-and 0/imm32/false
4584 0f 85/jump-if-!= $parse-type:end/disp32
4585
4586 (allocate *(ebp+8) *Tree-size *(ebp+0x10))
4587
4588 8b/-> *(ebp+0x10) 2/r32/edx
4589 (lookup *edx *(edx+4))
4590 89/<- %edx 0/r32/eax
4591 {
4592
4593 (slice-equal? %ecx "(")
4594 3d/compare-eax-and 0/imm32/false
4595 75/jump-if-!= break/disp8
4596
4597 {
4598 $parse-type:check-for-int:
4599 (is-hex-int? %ecx)
4600 3d/compare-eax-and 0/imm32/false
4601 74/jump-if-= break/disp8
4602 $parse-type:int:
4603 (parse-hex-int-from-slice %ecx)
4604 89/<- *(edx+4) 0/r32/eax
4605 e9/jump $parse-type:end/disp32
4606 }
4607 $parse-type:atom:
4608
4609 c7 0/subop/copy *edx 1/imm32/true
4610
4611 (pos-or-insert-slice Type-id %ecx)
4612 89/<- *(edx+4) 0/r32/eax
4613 e9/jump $parse-type:end/disp32
4614 }
4615 $parse-type:non-atom:
4616
4617
4618 8d/copy-address *(edx+4) 0/r32/eax
4619 (parse-type *(ebp+8) *(ebp+0xc) %eax)
4620
4621 8d/copy-address *(edx+0xc) 0/r32/eax
4622 (parse-type-tree *(ebp+8) *(ebp+0xc) %eax)
4623 $parse-type:end:
4624
4625 81 0/subop/add %esp 8/imm32
4626
4627 5a/pop-to-edx
4628 59/pop-to-ecx
4629 58/pop-to-eax
4630
4631 89/<- %esp 5/r32/ebp
4632 5d/pop-to-ebp
4633 c3/return
4634
4635 $parse-type:abort:
4636
4637 (write-buffered Stderr "unexpected token when parsing type: '")
4638 (write-slice-buffered Stderr %ecx)
4639 (write-buffered Stderr "'\n")
4640 (flush Stderr)
4641
4642 bb/copy-to-ebx 1/imm32
4643 b8/copy-to-eax 1/imm32/exit
4644 cd/syscall 0x80/imm8
4645
4646
4647 parse-type-tree:
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657 55/push-ebp
4658 89/<- %ebp 4/r32/esp
4659
4660 50/push-eax
4661 51/push-ecx
4662 52/push-edx
4663
4664 (zero-out *(ebp+0x10) *Handle-size)
4665
4666 68/push 0/imm32
4667 68/push 0/imm32
4668 89/<- %ecx 4/r32/esp
4669
4670 (parse-type *(ebp+8) *(ebp+0xc) %ecx)
4671
4672 81 7/subop/compare *ecx 0/imm32
4673 74/jump-if-= $parse-type-tree:end/disp8
4674
4675 (allocate *(ebp+8) *Tree-size *(ebp+0x10))
4676
4677 8b/-> *(ebp+0x10) 2/r32/edx
4678 (lookup *edx *(edx+4))
4679 89/<- %edx 0/r32/eax
4680
4681 8b/-> *ecx 0/r32/eax
4682 89/<- *(edx+4) 0/r32/eax
4683 8b/-> *(ecx+4) 0/r32/eax
4684 89/<- *(edx+8) 0/r32/eax
4685
4686 8d/copy-address *(edx+0xc) 0/r32/eax
4687 (parse-type-tree *(ebp+8) *(ebp+0xc) %eax)
4688 $parse-type-tree:end:
4689
4690 81 0/subop/add %esp 8/imm32
4691
4692 5a/pop-to-edx
4693 59/pop-to-ecx
4694 58/pop-to-eax
4695
4696 89/<- %esp 5/r32/ebp
4697 5d/pop-to-ebp
4698 c3/return
4699
4700 next-mu-token:
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745 55/push-ebp
4746 89/<- %ebp 4/r32/esp
4747
4748 50/push-eax
4749 51/push-ecx
4750 56/push-esi
4751 57/push-edi
4752
4753 8b/-> *(ebp+8) 6/r32/esi
4754
4755 8b/-> *(ebp+0xc) 7/r32/edi
4756 $next-mu-token:start:
4757 (skip-chars-matching-whitespace %esi)
4758 $next-mu-token:check0:
4759
4760
4761 8b/-> *(esi+4) 1/r32/ecx
4762
4763 3b/compare<- *esi 1/r32/ecx
4764 c7 0/subop/copy *edi 0/imm32
4765 c7 0/subop/copy *(edi+4) 0/imm32
4766 0f 8d/jump-if->= $next-mu-token:end/disp32
4767
4768 8d/copy-address *(esi+ecx+0xc) 0/r32/eax
4769 89/<- *edi 0/r32/eax
4770
4771 31/xor-with %eax 0/r32/eax
4772 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
4773 {
4774 $next-mu-token:check-for-comma:
4775
4776 3d/compare-eax-and 0x2c/imm32/comma
4777 75/jump-if-!= break/disp8
4778
4779 ff 0/subop/increment *(esi+4)
4780
4781 e9/jump $next-mu-token:start/disp32
4782 }
4783 {
4784 $next-mu-token:check-for-comment:
4785
4786 3d/compare-eax-and 0x23/imm32/pound
4787 75/jump-if-!= break/disp8
4788
4789 e9/jump $next-mu-token:done/disp32
4790 }
4791 {
4792 $next-mu-token:check-for-string-literal:
4793
4794 3d/compare-eax-and 0x22/imm32/dquote
4795 75/jump-if-!= break/disp8
4796 (skip-string %esi)
4797
4798 e9/jump $next-mu-token:done/disp32
4799 }
4800 {
4801 $next-mu-token:check-for-open-paren:
4802
4803 3d/compare-eax-and 0x28/imm32/open-paren
4804 75/jump-if-!= break/disp8
4805
4806 ff 0/subop/increment *(esi+4)
4807
4808 e9/jump $next-mu-token:done/disp32
4809 }
4810 {
4811 $next-mu-token:check-for-close-paren:
4812
4813 3d/compare-eax-and 0x29/imm32/close-paren
4814 75/jump-if-!= break/disp8
4815
4816 ff 0/subop/increment *(esi+4)
4817
4818 e9/jump $next-mu-token:done/disp32
4819 }
4820 {
4821 $next-mu-token:regular-word-without-metadata:
4822
4823
4824 8b/-> *(esi+4) 1/r32/ecx
4825
4826 3b/compare<- *esi 1/r32/ecx
4827 7d/jump-if->= break/disp8
4828
4829 31/xor-with %eax 0/r32/eax
4830 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
4831
4832 3d/compare-eax-and 0x20/imm32/space
4833 74/jump-if-= break/disp8
4834
4835 3d/compare-eax-and 0xd/imm32/carriage-return
4836 74/jump-if-= break/disp8
4837
4838 3d/compare-eax-and 0xa/imm32/newline
4839 74/jump-if-= break/disp8
4840
4841 3d/compare-eax-and 0x28/imm32/open-paren
4842 0f 84/jump-if-= break/disp32
4843
4844 3d/compare-eax-and 0x29/imm32/close-paren
4845 0f 84/jump-if-= break/disp32
4846
4847 3d/compare-eax-and 0x2c/imm32/comma
4848 0f 84/jump-if-= break/disp32
4849
4850 ff 0/subop/increment *(esi+4)
4851
4852 e9/jump loop/disp32
4853 }
4854 $next-mu-token:done:
4855
4856 8b/-> *(esi+4) 1/r32/ecx
4857 8d/copy-address *(esi+ecx+0xc) 0/r32/eax
4858 89/<- *(edi+4) 0/r32/eax
4859 $next-mu-token:end:
4860
4861 5f/pop-to-edi
4862 5e/pop-to-esi
4863 59/pop-to-ecx
4864 58/pop-to-eax
4865
4866 89/<- %esp 5/r32/ebp
4867 5d/pop-to-ebp
4868 c3/return
4869
4870 pos-or-insert-slice:
4871
4872 55/push-ebp
4873 89/<- %ebp 4/r32/esp
4874
4875 (pos-slice *(ebp+8) *(ebp+0xc))
4876 3d/compare-eax-and -1/imm32
4877 75/jump-if-!= $pos-or-insert-slice:end/disp8
4878 $pos-or-insert-slice:insert:
4879
4880 68/push 0/imm32
4881 68/push 0/imm32
4882 89/<- %eax 4/r32/esp
4883 (slice-to-string Heap *(ebp+0xc) %eax)
4884
4885 (lookup *eax *(eax+4))
4886 (write-int *(ebp+8) %eax)
4887 (pos-slice *(ebp+8) *(ebp+0xc))
4888 $pos-or-insert-slice:end:
4889
4890 81 0/subop/add %esp 8/imm32
4891
4892 89/<- %esp 5/r32/ebp
4893 5d/pop-to-ebp
4894 c3/return
4895
4896
4897
4898 pos-slice:
4899
4900 55/push-ebp
4901 89/<- %ebp 4/r32/esp
4902
4903 51/push-ecx
4904 52/push-edx
4905 53/push-ebx
4906 56/push-esi
4907
4908
4909
4910
4911
4912 8b/-> *(ebp+8) 6/r32/esi
4913
4914 b9/copy-to-ecx 0/imm32
4915
4916 8d/copy-address *(esi+0xc) 2/r32/edx
4917
4918 8b/-> *esi 3/r32/ebx
4919 8d/copy-address *(esi+ebx+0xc) 3/r32/ebx
4920 {
4921
4922
4923
4924
4925
4926 39/compare %edx 3/r32/ebx
4927 b8/copy-to-eax -1/imm32
4928 73/jump-if-addr>= $pos-slice:end/disp8
4929
4930 (slice-equal? *(ebp+0xc) *edx)
4931 3d/compare-eax-and 0/imm32/false
4932 75/jump-if-!= break/disp8
4933
4934 41/increment-ecx
4935
4936 81 0/subop/add %edx 4/imm32
4937
4938 eb/jump loop/disp8
4939 }
4940
4941 89/<- %eax 1/r32/ecx
4942 $pos-slice:end:
4943
4944
4945
4946
4947 5e/pop-to-esi
4948 5b/pop-to-ebx
4949 5a/pop-to-edx
4950 59/pop-to-ecx
4951
4952 89/<- %esp 5/r32/ebp
4953 5d/pop-to-ebp
4954 c3/return
4955
4956 test-parse-var-with-type:
4957
4958 55/push-ebp
4959 89/<- %ebp 4/r32/esp
4960
4961 b8/copy-to-eax "x:"/imm32
4962 8b/-> *eax 1/r32/ecx
4963 8d/copy-address *(eax+ecx+4) 1/r32/ecx
4964 05/add-to-eax 4/imm32
4965
4966 51/push-ecx
4967 50/push-eax
4968 89/<- %ecx 4/r32/esp
4969
4970 (clear-stream _test-input-stream)
4971 (write _test-input-stream "int")
4972
4973 68/push 0/imm32
4974 68/push 0/imm32
4975 89/<- %edx 4/r32/esp
4976
4977 (parse-var-with-type %ecx _test-input-stream %edx)
4978
4979 (lookup *edx *(edx+4))
4980 89/<- %edx 0/r32/eax
4981
4982 (lookup *edx *(edx+4))
4983 (check-strings-equal %eax "x" "F - test-parse-var-with-type/name")
4984
4985 (lookup *(edx+8) *(edx+0xc))
4986 (check-ints-equal *eax 1 "F - test-parse-var-with-type/type:0")
4987 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-type/type:1")
4988 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-type/type:2")
4989
4990 89/<- %esp 5/r32/ebp
4991 5d/pop-to-ebp
4992 c3/return
4993
4994 test-parse-var-with-type-and-register:
4995
4996 55/push-ebp
4997 89/<- %ebp 4/r32/esp
4998
4999 b8/copy-to-eax "x/eax:"/imm32
5000 8b/-> *eax 1/r32/ecx
5001 8d/copy-address *(eax+ecx+4) 1/r32/ecx
5002 05/add-to-eax 4/imm32
5003
5004 51/push-ecx
5005 50/push-eax
5006 89/<- %ecx 4/r32/esp
5007
5008 (clear-stream _test-input-stream)
5009 (write _test-input-stream "int")
5010
5011 68/push 0/imm32
5012 68/push 0/imm32
5013 89/<- %edx 4/r32/esp
5014
5015 (parse-var-with-type %ecx _test-input-stream %edx)
5016
5017 (lookup *edx *(edx+4))
5018 89/<- %edx 0/r32/eax
5019
5020 (lookup *edx *(edx+4))
5021 (check-strings-equal %eax "x" "F - test-parse-var-with-type-and-register/name")
5022
5023 (lookup *(edx+0x18) *(edx+0x1c))
5024 (check-strings-equal %eax "eax" "F - test-parse-var-with-type-and-register/register")
5025
5026 (lookup *(edx+8) *(edx+0xc))
5027 (check-ints-equal *eax 1 "F - test-parse-var-with-type-and-register/type:0")
5028 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-type-and-register/type:1")
5029 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-type-and-register/type:2")
5030
5031 89/<- %esp 5/r32/ebp
5032 5d/pop-to-ebp
5033 c3/return
5034
5035 test-parse-var-with-trailing-characters:
5036
5037 55/push-ebp
5038 89/<- %ebp 4/r32/esp
5039
5040 b8/copy-to-eax "x:"/imm32
5041 8b/-> *eax 1/r32/ecx
5042 8d/copy-address *(eax+ecx+4) 1/r32/ecx
5043 05/add-to-eax 4/imm32
5044
5045 51/push-ecx
5046 50/push-eax
5047 89/<- %ecx 4/r32/esp
5048
5049 (clear-stream _test-input-stream)
5050 (write _test-input-stream "int,")
5051
5052 68/push 0/imm32
5053 68/push 0/imm32
5054 89/<- %edx 4/r32/esp
5055
5056 (parse-var-with-type %ecx _test-input-stream %edx)
5057
5058 (lookup *edx *(edx+4))
5059 89/<- %edx 0/r32/eax
5060
5061 (lookup *edx *(edx+4))
5062 (check-strings-equal %eax "x" "F - test-parse-var-with-trailing-characters/name")
5063
5064 (check-ints-equal *(edx+0x18) 0 "F - test-parse-var-with-trailing-characters/register")
5065
5066 (lookup *(edx+8) *(edx+0xc))
5067 (check-ints-equal *eax 1 "F - test-parse-var-with-trailing-characters/type:0")
5068 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-trailing-characters/type:1")
5069 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-trailing-characters/type:1")
5070
5071 89/<- %esp 5/r32/ebp
5072 5d/pop-to-ebp
5073 c3/return
5074
5075 test-parse-var-with-register-and-trailing-characters:
5076
5077 55/push-ebp
5078 89/<- %ebp 4/r32/esp
5079
5080 b8/copy-to-eax "x/eax:"/imm32
5081 8b/-> *eax 1/r32/ecx
5082 8d/copy-address *(eax+ecx+4) 1/r32/ecx
5083 05/add-to-eax 4/imm32
5084
5085 51/push-ecx
5086 50/push-eax
5087 89/<- %ecx 4/r32/esp
5088
5089 (clear-stream _test-input-stream)
5090 (write _test-input-stream "int,")
5091
5092 68/push 0/imm32
5093 68/push 0/imm32
5094 89/<- %edx 4/r32/esp
5095
5096 (parse-var-with-type %ecx _test-input-stream %edx)
5097
5098 (lookup *edx *(edx+4))
5099 89/<- %edx 0/r32/eax
5100
5101 (lookup *edx *(edx+4))
5102 (check-strings-equal %eax "x" "F - test-parse-var-with-register-and-trailing-characters/name")
5103
5104 (lookup *(edx+0x18) *(edx+0x1c))
5105 (check-strings-equal %eax "eax" "F - test-parse-var-with-register-and-trailing-characters/register")
5106
5107 (lookup *(edx+8) *(edx+0xc))
5108 (check-ints-equal *eax 1 "F - test-parse-var-with-register-and-trailing-characters/type:0")
5109 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-register-and-trailing-characters/type:1")
5110 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-register-and-trailing-characters/type:2")
5111
5112 89/<- %esp 5/r32/ebp
5113 5d/pop-to-ebp
5114 c3/return
5115
5116 test-parse-var-with-compound-type:
5117
5118 55/push-ebp
5119 89/<- %ebp 4/r32/esp
5120
5121 b8/copy-to-eax "x:"/imm32
5122 8b/-> *eax 1/r32/ecx
5123 8d/copy-address *(eax+ecx+4) 1/r32/ecx
5124 05/add-to-eax 4/imm32
5125
5126 51/push-ecx
5127 50/push-eax
5128 89/<- %ecx 4/r32/esp
5129
5130 (clear-stream _test-input-stream)
5131 (write _test-input-stream "(addr int)")
5132
5133 68/push 0/imm32
5134 68/push 0/imm32
5135 89/<- %edx 4/r32/esp
5136
5137 (parse-var-with-type %ecx _test-input-stream %edx)
5138
5139 (lookup *edx *(edx+4))
5140 89/<- %edx 0/r32/eax
5141
5142 (lookup *edx *(edx+4))
5143 (check-strings-equal %eax "x" "F - test-parse-var-with-compound-type/name")
5144
5145 (check-ints-equal *(edx+0x18) 0 "F - test-parse-var-with-compound-type/register")
5146
5147
5148 (lookup *(edx+8) *(edx+0xc))
5149 89/<- %edx 0/r32/eax
5150
5151 (check-ints-equal *edx 0 "F - test-parse-var-with-compound-type/type:0")
5152
5153 (lookup *(edx+4) *(edx+8))
5154 (check-ints-equal *eax 1 "F - test-parse-var-with-compound-type/type:1")
5155 (check-ints-equal *(eax+4) 2 "F - test-parse-var-with-compound-type/type:2")
5156
5157 (lookup *(edx+0xc) *(edx+0x10))
5158 (lookup *(eax+4) *(eax+8))
5159 (check-ints-equal *eax 1 "F - test-parse-var-with-compound-type/type:3")
5160 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-compound-type/type:4")
5161
5162 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-compound-type/type:5")
5163
5164 89/<- %esp 5/r32/ebp
5165 5d/pop-to-ebp
5166 c3/return
5167
5168
5169
5170
5171 is-identifier?:
5172
5173 55/push-ebp
5174 89/<- %ebp 4/r32/esp
5175
5176 (slice-empty? *(ebp+8))
5177 3d/compare-eax-and 0/imm32/false
5178 75/jump-if-!= $is-identifier?:false/disp8
5179
5180 8b/-> *(ebp+8) 0/r32/eax
5181 8b/-> *eax 0/r32/eax
5182 8a/copy-byte *eax 0/r32/AL
5183 81 4/subop/and %eax 0xff/imm32
5184
5185 3d/compare-eax-and 0x24/imm32/$
5186 74/jump-if-= $is-identifier?:true/disp8
5187
5188 3d/compare-eax-and 0x5f/imm32/_
5189 74/jump-if-= $is-identifier?:true/disp8
5190
5191 25/and-eax-with 0x5f/imm32
5192
5193 3d/compare-eax-and 0x41/imm32/A
5194 7c/jump-if-< $is-identifier?:false/disp8
5195
5196 3d/compare-eax-and 0x5a/imm32/Z
5197 7f/jump-if-> $is-identifier?:false/disp8
5198
5199 $is-identifier?:true:
5200 b8/copy-to-eax 1/imm32/true
5201 eb/jump $is-identifier?:end/disp8
5202 $is-identifier?:false:
5203 b8/copy-to-eax 0/imm32/false
5204 $is-identifier?:end:
5205
5206 89/<- %esp 5/r32/ebp
5207 5d/pop-to-ebp
5208 c3/return
5209
5210 test-is-identifier-dollar:
5211
5212 55/push-ebp
5213 89/<- %ebp 4/r32/esp
5214
5215 b8/copy-to-eax "$a"/imm32
5216 8b/-> *eax 1/r32/ecx
5217 8d/copy-address *(eax+ecx+4) 1/r32/ecx
5218 05/add-to-eax 4/imm32
5219
5220 51/push-ecx
5221 50/push-eax
5222 89/<- %ecx 4/r32/esp
5223
5224 (is-identifier? %ecx)
5225 (check-ints-equal %eax 1 "F - test-is-identifier-dollar")
5226
5227 89/<- %esp 5/r32/ebp
5228 5d/pop-to-ebp
5229 c3/return
5230
5231 test-is-identifier-underscore:
5232
5233 55/push-ebp
5234 89/<- %ebp 4/r32/esp
5235
5236 b8/copy-to-eax "_a"/imm32
5237 8b/-> *eax 1/r32/ecx
5238 8d/copy-address *(eax+ecx+4) 1/r32/ecx
5239 05/add-to-eax 4/imm32
5240
5241 51/push-ecx
5242 50/push-eax
5243 89/<- %ecx 4/r32/esp
5244
5245 (is-identifier? %ecx)
5246 (check-ints-equal %eax 1 "F - test-is-identifier-underscore")
5247
5248 89/<- %esp 5/r32/ebp
5249 5d/pop-to-ebp
5250 c3/return
5251
5252 test-is-identifier-a:
5253
5254 55/push-ebp
5255 89/<- %ebp 4/r32/esp
5256
5257 b8/copy-to-eax "a$"/imm32
5258 8b/-> *eax 1/r32/ecx
5259 8d/copy-address *(eax+ecx+4) 1/r32/ecx
5260 05/add-to-eax 4/imm32
5261
5262 51/push-ecx
5263 50/push-eax
5264 89/<- %ecx 4/r32/esp
5265
5266 (is-identifier? %ecx)
5267 (check-ints-equal %eax 1 "F - test-is-identifier-a")
5268
5269 89/<- %esp 5/r32/ebp
5270 5d/pop-to-ebp
5271 c3/return
5272
5273 test-is-identifier-z:
5274
5275 55/push-ebp
5276 89/<- %ebp 4/r32/esp
5277
5278 b8/copy-to-eax "z$"/imm32
5279 8b/-> *eax 1/r32/ecx
5280 8d/copy-address *(eax+ecx+4) 1/r32/ecx
5281 05/add-to-eax 4/imm32
5282
5283 51/push-ecx
5284 50/push-eax
5285 89/<- %ecx 4/r32/esp
5286
5287 (is-identifier? %ecx)
5288 (check-ints-equal %eax 1 "F - test-is-identifier-z")
5289
5290 89/<- %esp 5/r32/ebp
5291 5d/pop-to-ebp
5292 c3/return
5293
5294 test-is-identifier-A:
5295
5296 55/push-ebp
5297 89/<- %ebp 4/r32/esp
5298
5299 b8/copy-to-eax "A$"/imm32
5300 8b/-> *eax 1/r32/ecx
5301 8d/copy-address *(eax+ecx+4) 1/r32/ecx
5302 05/add-to-eax 4/imm32
5303
5304 51/push-ecx
5305 50/push-eax
5306 89/<- %ecx 4/r32/esp
5307
5308 (is-identifier? %ecx)
5309 (check-ints-equal %eax 1 "F - test-is-identifier-A")
5310
5311 89/<- %esp 5/r32/ebp
5312 5d/pop-to-ebp
5313 c3/return
5314
5315 test-is-identifier-Z:
5316
5317 55/push-ebp
5318 89/<- %ebp 4/r32/esp
5319
5320 b8/copy-to-eax "Z$"/imm32
5321 8b/-> *eax 1/r32/ecx
5322 8d/copy-address *(eax+ecx+4) 1/r32/ecx
5323 05/add-to-eax 4/imm32
5324
5325 51/push-ecx
5326 50/push-eax
5327 89/<- %ecx 4/r32/esp
5328
5329 (is-identifier? %ecx)
5330 (check-ints-equal %eax 1 "F - test-is-identifier-Z")
5331
5332 89/<- %esp 5/r32/ebp
5333 5d/pop-to-ebp
5334 c3/return
5335
5336 test-is-identifier-at:
5337
5338
5339 55/push-ebp
5340 89/<- %ebp 4/r32/esp
5341
5342 b8/copy-to-eax "@a"/imm32
5343 8b/-> *eax 1/r32/ecx
5344 8d/copy-address *(eax+ecx+4) 1/r32/ecx
5345 05/add-to-eax 4/imm32
5346
5347 51/push-ecx
5348 50/push-eax
5349 89/<- %ecx 4/r32/esp
5350
5351 (is-identifier? %ecx)
5352 (check-ints-equal %eax 0 "F - test-is-identifier-@")
5353
5354 89/<- %esp 5/r32/ebp
5355 5d/pop-to-ebp
5356 c3/return
5357
5358 test-is-identifier-square-bracket:
5359
5360
5361 55/push-ebp
5362 89/<- %ebp 4/r32/esp
5363
5364 b8/copy-to-eax "[a"/imm32
5365 8b/-> *eax 1/r32/ecx
5366 8d/copy-address *(eax+ecx+4) 1/r32/ecx
5367 05/add-to-eax 4/imm32
5368
5369 51/push-ecx
5370 50/push-eax
5371 89/<- %ecx 4/r32/esp
5372
5373 (is-identifier? %ecx)
5374 (check-ints-equal %eax 0 "F - test-is-identifier-@")
5375
5376 89/<- %esp 5/r32/ebp
5377 5d/pop-to-ebp
5378 c3/return
5379
5380 test-is-identifier-backtick:
5381
5382
5383 55/push-ebp
5384 89/<- %ebp 4/r32/esp
5385
5386 b8/copy-to-eax "`a"/imm32
5387 8b/-> *eax 1/r32/ecx
5388 8d/copy-address *(eax+ecx+4) 1/r32/ecx
5389 05/add-to-eax 4/imm32
5390
5391 51/push-ecx
5392 50/push-eax
5393 89/<- %ecx 4/r32/esp
5394
5395 (is-identifier? %ecx)
5396 (check-ints-equal %eax 0 "F - test-is-identifier-backtick")
5397
5398 89/<- %esp 5/r32/ebp
5399 5d/pop-to-ebp
5400 c3/return
5401
5402 test-is-identifier-curly-brace-open:
5403
5404
5405 55/push-ebp
5406 89/<- %ebp 4/r32/esp
5407
5408 b8/copy-to-eax "{a"/imm32
5409 8b/-> *eax 1/r32/ecx
5410 8d/copy-address *(eax+ecx+4) 1/r32/ecx
5411 05/add-to-eax 4/imm32
5412
5413 51/push-ecx
5414 50/push-eax
5415 89/<- %ecx 4/r32/esp
5416
5417 (is-identifier? %ecx)
5418 (check-ints-equal %eax 0 "F - test-is-identifier-curly-brace-open")
5419
5420 89/<- %esp 5/r32/ebp
5421 5d/pop-to-ebp
5422 c3/return
5423
5424 test-is-identifier-curly-brace-close:
5425
5426 55/push-ebp
5427 89/<- %ebp 4/r32/esp
5428
5429 b8/copy-to-eax "}a"/imm32
5430 8b/-> *eax 1/r32/ecx
5431 8d/copy-address *(eax+ecx+4) 1/r32/ecx
5432 05/add-to-eax 4/imm32
5433
5434 51/push-ecx
5435 50/push-eax
5436 89/<- %ecx 4/r32/esp
5437
5438 (is-identifier? %ecx)
5439 (check-ints-equal %eax 0 "F - test-is-identifier-curly-brace-close")
5440
5441 89/<- %esp 5/r32/ebp
5442 5d/pop-to-ebp
5443 c3/return
5444
5445 test-is-identifier-hyphen:
5446
5447
5448 55/push-ebp
5449 89/<- %ebp 4/r32/esp
5450
5451 b8/copy-to-eax "-a"/imm32
5452 8b/-> *eax 1/r32/ecx
5453 8d/copy-address *(eax+ecx+4) 1/r32/ecx
5454 05/add-to-eax 4/imm32
5455
5456 51/push-ecx
5457 50/push-eax
5458 89/<- %ecx 4/r32/esp
5459
5460 (is-identifier? %ecx)
5461 (check-ints-equal %eax 0 "F - test-is-identifier-hyphen")
5462
5463 89/<- %esp 5/r32/ebp
5464 5d/pop-to-ebp
5465 c3/return
5466
5467 populate-mu-function-body:
5468
5469 55/push-ebp
5470 89/<- %ebp 4/r32/esp
5471
5472 50/push-eax
5473 56/push-esi
5474 57/push-edi
5475
5476 8b/-> *(ebp+8) 6/r32/esi
5477
5478 8b/-> *(ebp+0xc) 7/r32/edi
5479
5480 8d/copy-address *(edi+0x18) 0/r32/eax
5481 (parse-mu-block %esi *(ebp+0x10) %edi %eax)
5482 $populate-mu-function-body:end:
5483
5484 5f/pop-to-edi
5485 5e/pop-to-esi
5486 58/pop-to-eax
5487
5488 89/<- %esp 5/r32/ebp
5489 5d/pop-to-ebp
5490 c3/return
5491
5492
5493 parse-mu-block:
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531 55/push-ebp
5532 89/<- %ebp 4/r32/esp
5533
5534 50/push-eax
5535 51/push-ecx
5536 52/push-edx
5537 53/push-ebx
5538 57/push-edi
5539
5540 81 5/subop/subtract %esp 0x200/imm32
5541 68/push 0x200/imm32/size
5542 68/push 0/imm32/read
5543 68/push 0/imm32/write
5544 89/<- %ecx 4/r32/esp
5545
5546 68/push 0/imm32/end
5547 68/push 0/imm32/start
5548 89/<- %edx 4/r32/esp
5549
5550 (allocate Heap *Stmt-size *(ebp+0x14))
5551
5552 8b/-> *(ebp+0x14) 7/r32/edi
5553 (lookup *edi *(edi+4))
5554 89/<- %edi 0/r32/eax
5555
5556
5557 8d/copy-address *(edi+0xc) 0/r32/eax
5558 (new-block-name *(ebp+0x10) %eax)
5559
5560 (push *(ebp+0xc) *(edi+0xc))
5561 (push *(ebp+0xc) *(edi+0x10))
5562 (push *(ebp+0xc) 0)
5563 {
5564 $parse-mu-block:line-loop:
5565
5566 (clear-stream %ecx)
5567 (read-line-buffered *(ebp+8) %ecx)
5568
5569
5570
5571
5572
5573 81 7/subop/compare *ecx 0/imm32
5574 0f 84/jump-if-= break/disp32
5575
5576 (next-mu-token %ecx %edx)
5577
5578
5579
5580
5581
5582 (slice-empty? %edx)
5583 3d/compare-eax-and 0/imm32/false
5584 0f 85/jump-if-!= loop/disp32
5585
5586
5587 8b/-> *edx 0/r32/eax
5588 8a/copy-byte *eax 0/r32/AL
5589 81 4/subop/and %eax 0xff/imm32
5590
5591 3d/compare-eax-and 0x23/imm32/hash
5592 0f 84/jump-if-= loop/disp32
5593
5594 {
5595 $parse-mu-block:check-for-block:
5596 (slice-equal? %edx "{")
5597 3d/compare-eax-and 0/imm32/false
5598 74/jump-if-= break/disp8
5599 (check-no-tokens-left %ecx)
5600
5601
5602 68/push 0/imm32
5603 68/push 0/imm32
5604 89/<- %eax 4/r32/esp
5605
5606 (parse-mu-block *(ebp+8) *(ebp+0xc) *(ebp+0x10) %eax)
5607 (append-to-block Heap %edi *eax *(eax+4))
5608
5609 81 0/subop/add %esp 8/imm32
5610
5611 e9/jump $parse-mu-block:line-loop/disp32
5612 }
5613
5614 $parse-mu-block:check-for-end:
5615 (slice-equal? %edx "}")
5616 3d/compare-eax-and 0/imm32/false
5617 0f 85/jump-if-!= break/disp32
5618
5619 {
5620 $parse-mu-block:check-for-named-block:
5621
5622 8b/-> *(edx+4) 0/r32/eax
5623 48/decrement-eax
5624 8a/copy-byte *eax 0/r32/AL
5625 81 4/subop/and %eax 0xff/imm32
5626
5627 3d/compare-eax-and 0x3a/imm32/colon
5628 0f 85/jump-if-!= break/disp32
5629
5630
5631
5632 ff 1/subop/decrement *(edx+4)
5633
5634 68/push 0/imm32
5635 68/push 0/imm32
5636 89/<- %eax 4/r32/esp
5637
5638 (parse-mu-named-block %edx *(ebp+8) *(ebp+0xc) *(ebp+0x10) %eax)
5639 (append-to-block Heap %edi *eax *(eax+4))
5640
5641 81 0/subop/add %esp 8/imm32
5642
5643 e9/jump $parse-mu-block:line-loop/disp32
5644 }
5645
5646 {
5647 $parse-mu-block:check-for-var:
5648 (slice-equal? %edx "var")
5649 3d/compare-eax-and 0/imm32/false
5650 74/jump-if-= break/disp8
5651
5652 68/push 0/imm32
5653 68/push 0/imm32
5654 89/<- %eax 4/r32/esp
5655
5656 (parse-mu-var-def %ecx *(ebp+0xc) %eax)
5657 (append-to-block Heap %edi *eax *(eax+4))
5658
5659 81 0/subop/add %esp 8/imm32
5660
5661 e9/jump $parse-mu-block:line-loop/disp32
5662 }
5663 $parse-mu-block:regular-stmt:
5664
5665
5666 68/push 0/imm32
5667 68/push 0/imm32
5668 89/<- %eax 4/r32/esp
5669
5670 (parse-mu-stmt %ecx *(ebp+0xc) *(ebp+0x10) %eax)
5671 (append-to-block Heap %edi *eax *(eax+4))
5672
5673 81 0/subop/add %esp 8/imm32
5674
5675 e9/jump loop/disp32
5676 }
5677
5678 (pop *(ebp+0xc))
5679 (pop *(ebp+0xc))
5680 (pop *(ebp+0xc))
5681 $parse-mu-block:end:
5682
5683 81 0/subop/add %esp 0x214/imm32
5684
5685 5f/pop-to-edi
5686 5b/pop-to-ebx
5687 5a/pop-to-edx
5688 59/pop-to-ecx
5689 58/pop-to-eax
5690
5691 89/<- %esp 5/r32/ebp
5692 5d/pop-to-ebp
5693 c3/return
5694
5695 $parse-mu-block:abort:
5696
5697 (write-buffered Stderr "'{' or '}' should be on its own line, but got '")
5698 (rewind-stream %ecx)
5699 (write-stream 2 %ecx)
5700 (write-buffered Stderr "'\n")
5701 (flush Stderr)
5702
5703 bb/copy-to-ebx 1/imm32
5704 b8/copy-to-eax 1/imm32/exit
5705 cd/syscall 0x80/imm8
5706
5707
5708 new-block-name:
5709
5710 55/push-ebp
5711 89/<- %ebp 4/r32/esp
5712
5713 50/push-eax
5714 51/push-ecx
5715 52/push-edx
5716
5717 8b/-> *(ebp+8) 0/r32/eax
5718 (lookup *eax *(eax+4))
5719 8b/-> *eax 0/r32/eax
5720 05/add-to-eax 0xd/imm32
5721 89/<- %ecx 0/r32/eax
5722
5723 29/subtract-from %esp 1/r32/ecx
5724 ff 6/subop/push %ecx
5725 68/push 0/imm32/read
5726 68/push 0/imm32/write
5727 89/<- %edx 4/r32/esp
5728 (clear-stream %edx)
5729
5730 8b/-> *(ebp+8) 0/r32/eax
5731 (lookup *eax *(eax+4))
5732
5733 (write %edx "$")
5734 (write %edx %eax)
5735 (write %edx ":")
5736 (print-int32 %edx *Next-block-index)
5737 ff 0/subop/increment *Next-block-index
5738
5739
5740 8b/-> *edx 0/r32/eax
5741
5742 8d/copy-address *(edx+0xc) 2/r32/edx
5743
5744 01/add-to %eax 2/r32/edx
5745
5746 ff 6/subop/push %eax
5747 ff 6/subop/push %edx
5748 89/<- %eax 4/r32/esp
5749
5750 (new-literal Heap %eax *(ebp+0xc))
5751
5752
5753
5754
5755
5756
5757
5758 $new-block-name:end:
5759
5760 81 0/subop/add %ecx 0xc/imm32
5761 81 0/subop/add %ecx 8/imm32
5762 01/add-to %esp 1/r32/ecx
5763
5764 5a/pop-to-edx
5765 59/pop-to-ecx
5766 58/pop-to-eax
5767
5768 89/<- %esp 5/r32/ebp
5769 5d/pop-to-ebp
5770 c3/return
5771
5772 == data
5773
5774
5775 Next-block-index:
5776 1/imm32
5777
5778 == code
5779
5780 check-no-tokens-left:
5781
5782 55/push-ebp
5783 89/<- %ebp 4/r32/esp
5784
5785 50/push-eax
5786 51/push-ecx
5787
5788 68/push 0/imm32/end
5789 68/push 0/imm32/start
5790 89/<- %ecx 4/r32/esp
5791
5792 (next-mu-token *(ebp+8) %ecx)
5793
5794 (slice-empty? %ecx)
5795 3d/compare-eax-and 0/imm32/false
5796 75/jump-if-!= $check-no-tokens-left:end/disp8
5797
5798
5799 8b/-> *edx 0/r32/eax
5800 8a/copy-byte *eax 0/r32/AL
5801 81 4/subop/and %eax 0xff/imm32
5802
5803 3d/compare-eax-and 0x23/imm32/hash
5804 74/jump-if-= $check-no-tokens-left:end/disp8
5805
5806 (write-buffered Stderr "'{' or '}' should be on its own line, but got '")
5807 (rewind-stream %ecx)
5808 (write-stream 2 %ecx)
5809 (write-buffered Stderr "'\n")
5810 (flush Stderr)
5811
5812 bb/copy-to-ebx 1/imm32
5813 b8/copy-to-eax 1/imm32/exit
5814 cd/syscall 0x80/imm8
5815
5816 $check-no-tokens-left:end:
5817
5818 81 0/subop/add %esp 8/imm32
5819
5820 59/pop-to-ecx
5821 58/pop-to-eax
5822
5823 89/<- %esp 5/r32/ebp
5824 5d/pop-to-ebp
5825 c3/return
5826
5827 parse-mu-named-block:
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838 55/push-ebp
5839 89/<- %ebp 4/r32/esp
5840
5841 50/push-eax
5842 51/push-ecx
5843 57/push-edi
5844
5845 68/push 0/imm32
5846 68/push 0/imm32
5847 89/<- %ecx 4/r32/esp
5848
5849 (new-literal Heap *(ebp+8) %ecx)
5850
5851 (push *(ebp+0x10) *ecx)
5852 (push *(ebp+0x10) *(ecx+4))
5853 (push *(ebp+0x10) 0)
5854
5855 (parse-mu-block *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18))
5856
5857 (pop *(ebp+0x10))
5858 (pop *(ebp+0x10))
5859 (pop *(ebp+0x10))
5860
5861 8b/-> *(ebp+0x18) 7/r32/edi
5862 (lookup *edi *(edi+4))
5863 89/<- %edi 0/r32/eax
5864
5865 c7 0/subop/copy *edi 0/imm32/block
5866
5867 8b/-> *ecx 0/r32/eax
5868 89/<- *(edi+0xc) 0/r32/eax
5869 8b/-> *(ecx+4) 0/r32/eax
5870 89/<- *(edi+0x10) 0/r32/eax
5871 $parse-mu-named-block:end:
5872
5873 81 0/subop/add %esp 8/imm32
5874
5875 5f/pop-to-edi
5876 59/pop-to-ecx
5877 58/pop-to-eax
5878
5879 89/<- %esp 5/r32/ebp
5880 5d/pop-to-ebp
5881 c3/return
5882
5883 parse-mu-var-def:
5884
5885 55/push-ebp
5886 89/<- %ebp 4/r32/esp
5887
5888 50/push-eax
5889 51/push-ecx
5890 52/push-edx
5891 57/push-edi
5892
5893 8b/-> *(ebp+0x10) 7/r32/edi
5894
5895 68/push 0/imm32/end
5896 68/push 0/imm32/start
5897 89/<- %ecx 4/r32/esp
5898
5899 68/push 0/imm32
5900 68/push 0/imm32
5901 89/<- %edx 4/r32/esp
5902
5903 (next-mu-token *(ebp+8) %ecx)
5904 (parse-var-with-type %ecx *(ebp+8) %edx)
5905
5906 (push *(ebp+0xc) *edx)
5907 (push *(ebp+0xc) *(edx+4))
5908 (push *(ebp+0xc) 0)
5909
5910 (lookup *edx *(edx+4))
5911 8b/-> *(eax+0x18) 0/r32/eax
5912 3d/compare-eax-and 0/imm32
5913 {
5914 75/jump-if-!= break/disp8
5915
5916 (new-var-def Heap *edx *(edx+4) %edi)
5917 eb/jump $parse-mu-var-def:end/disp8
5918 }
5919
5920 {
5921 74/jump-if-= break/disp8
5922
5923 (next-mu-token *(ebp+8) %ecx)
5924 (slice-equal? %ecx "<-")
5925 3d/compare-eax-and 0/imm32/false
5926 74/jump-if-= $parse-mu-var-def:abort/disp8
5927
5928 (new-reg-var-def Heap *edx *(edx+4) %edi)
5929 (lookup *edi *(edi+4))
5930 (add-operation-and-inputs-to-stmt %eax *(ebp+8) *(ebp+0xc))
5931 }
5932 $parse-mu-var-def:end:
5933
5934 81 0/subop/add %esp 0x10/imm32
5935
5936 5f/pop-to-edi
5937 5a/pop-to-edx
5938 59/pop-to-ecx
5939 58/pop-to-eax
5940
5941 89/<- %esp 5/r32/ebp
5942 5d/pop-to-ebp
5943 c3/return
5944
5945 $parse-mu-var-def:abort:
5946 (rewind-stream *(ebp+8))
5947
5948 (write-buffered Stderr "register variable requires a valid instruction to initialize but got '")
5949 (flush Stderr)
5950 (write-stream 2 *(ebp+8))
5951 (write-buffered Stderr "'\n")
5952 (flush Stderr)
5953
5954 bb/copy-to-ebx 1/imm32
5955 b8/copy-to-eax 1/imm32/exit
5956 cd/syscall 0x80/imm8
5957
5958
5959 test-parse-mu-var-def:
5960
5961
5962 55/push-ebp
5963 89/<- %ebp 4/r32/esp
5964
5965 (clear-stream _test-input-stream)
5966 (write _test-input-stream "n: int\n")
5967
5968 68/push 0/imm32
5969 68/push 0/imm32
5970 89/<- %esi 4/r32/esp
5971
5972 81 5/subop/subtract %esp 0xc0/imm32
5973 68/push 0xc0/imm32/size
5974 68/push 0/imm32/top
5975 89/<- %ecx 4/r32/esp
5976 (clear-stack %ecx)
5977
5978 (parse-mu-var-def _test-input-stream %ecx %esi)
5979
5980 (lookup *esi *(esi+4))
5981 89/<- %esi 0/r32/eax
5982
5983 (check-ints-equal *esi 2 "F - test-parse-mu-var-def/tag")
5984
5985 (lookup *(esi+4) *(esi+8))
5986 89/<- %ecx 0/r32/eax
5987
5988 (lookup *ecx *(ecx+4))
5989 (check-strings-equal %eax "n" "F - test-parse-mu-var-def/var-name")
5990
5991 (check-ints-equal *(ecx+0x18) 0 "F - test-parse-mu-var-def/var-register")
5992
5993 (lookup *(ecx+8) *(ecx+0xc))
5994 (check-ints-equal *eax 1 "F - test-parse-mu-var-def/var-type:0")
5995 (check-ints-equal *(eax+4) 1 "F - test-parse-mu-var-def/var-type:1")
5996 (check-ints-equal *(eax+0xc) 0 "F - test-parse-mu-var-def/var-type:2")
5997
5998 89/<- %esp 5/r32/ebp
5999 5d/pop-to-ebp
6000 c3/return
6001
6002 test-parse-mu-reg-var-def:
6003
6004
6005 55/push-ebp
6006 89/<- %ebp 4/r32/esp
6007
6008 (clear-stream _test-input-stream)
6009 (write _test-input-stream "n/eax: int <- copy 0\n")
6010
6011 68/push 0/imm32
6012 68/push 0/imm32
6013 89/<- %esi 4/r32/esp
6014
6015 81 5/subop/subtract %esp 0xc0/imm32
6016 68/push 0xc0/imm32/size
6017 68/push 0/imm32/top
6018 89/<- %ecx 4/r32/esp
6019 (clear-stack %ecx)
6020
6021 (parse-mu-var-def _test-input-stream %ecx %esi)
6022
6023 (lookup *esi *(esi+4))
6024 89/<- %esi 0/r32/eax
6025
6026 (check-ints-equal *esi 3 "F - test-parse-mu-reg-var-def/tag")
6027
6028
6029 (lookup *(esi+0x14) *(esi+0x18))
6030
6031 (check-ints-equal *(eax+8) 0 "F - test-parse-mu-reg-var-def/single-output")
6032
6033 (lookup *eax *(eax+4))
6034
6035 89/<- %ecx 0/r32/eax
6036
6037 (lookup *ecx *(ecx+4))
6038 (check-strings-equal %eax "n" "F - test-parse-mu-reg-var-def/output-name")
6039
6040 (lookup *(ecx+0x18) *(ecx+0x1c))
6041 (check-strings-equal %eax "eax" "F - test-parse-mu-reg-var-def/output-register")
6042
6043 (lookup *(ecx+8) *(ecx+0xc))
6044 (check-ints-equal *eax 1 "F - test-parse-mu-reg-var-def/output-type:0")
6045 (check-ints-equal *(eax+4) 1 "F - test-parse-mu-reg-var-def/output-type:1")
6046 (check-ints-equal *(eax+0xc) 0 "F - test-parse-mu-reg-var-def/output-type:2")
6047
6048 89/<- %esp 5/r32/ebp
6049 5d/pop-to-ebp
6050 c3/return
6051
6052 parse-mu-stmt:
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068 55/push-ebp
6069 89/<- %ebp 4/r32/esp
6070
6071 50/push-eax
6072 51/push-ecx
6073 52/push-edx
6074 53/push-ebx
6075 57/push-edi
6076
6077 68/push 0/imm32/end
6078 68/push 0/imm32/start
6079 89/<- %ecx 4/r32/esp
6080
6081 ba/copy-to-edx 0/imm32/false
6082
6083 68/push 0/imm32
6084 68/push 0/imm32
6085 89/<- %ebx 4/r32/esp
6086
6087 (allocate Heap *Stmt-size *(ebp+0x14))
6088
6089 8b/-> *(ebp+0x14) 7/r32/edi
6090 (lookup *edi *(edi+4))
6091 89/<- %edi 0/r32/eax
6092
6093 c7 0/subop/copy *edi 1/imm32/stmt1
6094 {
6095 (stmt-has-outputs? *(ebp+8))
6096 3d/compare-eax-and 0/imm32/false
6097 0f 84/jump-if-= break/disp32
6098 {
6099 $parse-mu-stmt:read-outputs:
6100
6101 (next-mu-token *(ebp+8) %ecx)
6102
6103 (slice-empty? %ecx)
6104 3d/compare-eax-and 0/imm32/false
6105 0f 85/jump-if-!= break/disp32
6106
6107 (slice-equal? %ecx "<-")
6108 3d/compare-eax-and 0/imm32/false
6109 0f 85/jump-if-!= break/disp32
6110
6111 ba/copy-to-edx 0/imm32/false
6112
6113 8b/-> *ecx 0/r32/eax
6114 8a/copy-byte *eax 0/r32/AL
6115 81 4/subop/and %eax 0xff/imm32
6116 3d/compare-eax-and 0x2a/imm32/asterisk
6117 {
6118 75/jump-if-!= break/disp8
6119 ff 0/subop/increment *ecx
6120 ba/copy-to-edx 1/imm32/true
6121 }
6122
6123 (is-identifier? %ecx)
6124 3d/compare-eax-and 0/imm32/false
6125 0f 84/jump-if-= $parse-mu-stmt:abort/disp32
6126
6127 (lookup-or-define-var %ecx *(ebp+0xc) *(ebp+0x10) %ebx)
6128 8d/copy-address *(edi+0x14) 0/r32/eax
6129 (append-stmt-var Heap *ebx *(ebx+4) *(edi+0x14) *(edi+0x18) %edx %eax)
6130
6131 e9/jump loop/disp32
6132 }
6133 }
6134 (add-operation-and-inputs-to-stmt %edi *(ebp+8) *(ebp+0xc))
6135 $parse-mu-stmt:end:
6136
6137 81 0/subop/add %esp 0x10/imm32
6138
6139 5f/pop-to-edi
6140 5b/pop-to-ebx
6141 5a/pop-to-edx
6142 59/pop-to-ecx
6143 58/pop-to-eax
6144
6145 89/<- %esp 5/r32/ebp
6146 5d/pop-to-ebp
6147 c3/return
6148
6149 $parse-mu-stmt:abort:
6150
6151 (write-buffered Stderr "invalid identifier '")
6152 (write-slice-buffered Stderr %ecx)
6153 (write-buffered Stderr "'\n")
6154 (flush Stderr)
6155
6156 bb/copy-to-ebx 1/imm32
6157 b8/copy-to-eax 1/imm32/exit
6158 cd/syscall 0x80/imm8
6159
6160
6161 add-operation-and-inputs-to-stmt:
6162
6163
6164
6165
6166
6167
6168
6169
6170 55/push-ebp
6171 89/<- %ebp 4/r32/esp
6172
6173 50/push-eax
6174 51/push-ecx
6175 52/push-edx
6176 53/push-ebx
6177 56/push-esi
6178 57/push-edi
6179
6180 8b/-> *(ebp+8) 7/r32/edi
6181
6182 68/push 0/imm32/end
6183 68/push 0/imm32/start
6184 89/<- %ecx 4/r32/esp
6185
6186 ba/copy-to-edx 0/imm32/false
6187
6188 68/push 0/imm32
6189 68/push 0/imm32
6190 89/<- %esi 4/r32/esp
6191 $add-operation-and-inputs-to-stmt:read-operation:
6192 (next-mu-token *(ebp+0xc) %ecx)
6193 8d/copy-address *(edi+4) 0/r32/eax
6194 (slice-to-string Heap %ecx %eax)
6195
6196 (slice-equal? %ecx "get")
6197 89/<- %ebx 0/r32/eax
6198 {
6199 $add-operation-and-inputs-to-stmt:read-inouts:
6200
6201 (next-mu-token *(ebp+0xc) %ecx)
6202
6203 (slice-empty? %ecx)
6204 3d/compare-eax-and 0/imm32/false
6205 0f 85/jump-if-!= break/disp32
6206
6207 (slice-equal? %ecx "<-")
6208 3d/compare-eax-and 0/imm32/false
6209 0f 85/jump-if-!= $add-operation-and-inputs-to-stmt:abort/disp32
6210
6211 {
6212 81 7/subop/compare %ebx 0/imm32/false
6213 74/jump-if-= break/disp8
6214 (lookup *(edi+0xc) *(edi+0x10))
6215 3d/compare-eax-and 0/imm32
6216 74/jump-if-= break/disp8
6217 (lookup-or-create-constant %eax %ecx %esi)
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228 e9/jump $add-operation-and-inputs-to-stmt:save-var/disp32
6229 }
6230
6231 ba/copy-to-edx 0/imm32/false
6232
6233 8b/-> *ecx 0/r32/eax
6234 8a/copy-byte *eax 0/r32/AL
6235 81 4/subop/and %eax 0xff/imm32
6236 3d/compare-eax-and 0x2a/imm32/asterisk
6237 {
6238 75/jump-if-!= break/disp8
6239 $add-operation-and-inputs-to-stmt:inout-is-deref:
6240 ff 0/subop/increment *ecx
6241 ba/copy-to-edx 1/imm32/true
6242 }
6243 (lookup-var-or-literal %ecx *(ebp+0x10) %esi)
6244 $add-operation-and-inputs-to-stmt:save-var:
6245 8d/copy-address *(edi+0xc) 0/r32/eax
6246 (append-stmt-var Heap *esi *(esi+4) *(edi+0xc) *(edi+0x10) %edx %eax)
6247
6248 e9/jump loop/disp32
6249 }
6250 $add-operation-and-inputs-to-stmt:end:
6251
6252 81 0/subop/add %esp 0x10/imm32
6253
6254 5f/pop-to-edi
6255 5e/pop-to-esi
6256 5b/pop-to-ebx
6257 5a/pop-to-edx
6258 59/pop-to-ecx
6259 58/pop-to-eax
6260
6261 89/<- %esp 5/r32/ebp
6262 5d/pop-to-ebp
6263 c3/return
6264
6265 $add-operation-and-inputs-to-stmt:abort:
6266
6267 (rewind-stream *(ebp+8))
6268 (write-buffered Stderr "invalid identifier '")
6269 (flush Stderr)
6270 (write-stream 2 *(ebp+8))
6271 (write-buffered Stderr "'\n")
6272 (flush Stderr)
6273
6274 bb/copy-to-ebx 1/imm32
6275 b8/copy-to-eax 1/imm32/exit
6276 cd/syscall 0x80/imm8
6277
6278
6279 stmt-has-outputs?:
6280
6281 55/push-ebp
6282 89/<- %ebp 4/r32/esp
6283
6284 51/push-ecx
6285
6286 68/push 0/imm32/end
6287 68/push 0/imm32/start
6288 89/<- %ecx 4/r32/esp
6289
6290 b8/copy-to-eax 0/imm32/false
6291 (rewind-stream *(ebp+8))
6292 {
6293 (next-mu-token *(ebp+8) %ecx)
6294
6295 (slice-empty? %ecx)
6296 3d/compare-eax-and 0/imm32/false
6297 b8/copy-to-eax 0/imm32/false/result
6298 0f 85/jump-if-!= break/disp32
6299
6300
6301 8b/-> *ecx 0/r32/eax
6302 8a/copy-byte *eax 0/r32/AL
6303 81 4/subop/and %eax 0xff/imm32
6304
6305 3d/compare-eax-and 0x23/imm32/hash
6306 b8/copy-to-eax 0/imm32/false/result
6307 0f 84/jump-if-= break/disp32
6308
6309 (slice-equal? %ecx "<-")
6310 3d/compare-eax-and 0/imm32/false
6311 74/jump-if-= loop/disp8
6312 b8/copy-to-eax 1/imm32/true
6313 }
6314 $stmt-has-outputs:end:
6315 (rewind-stream *(ebp+8))
6316
6317 81 0/subop/add %esp 8/imm32
6318
6319 59/pop-to-ecx
6320
6321 89/<- %esp 5/r32/ebp
6322 5d/pop-to-ebp
6323 c3/return
6324
6325
6326
6327 lookup-var-or-literal:
6328
6329 55/push-ebp
6330 89/<- %ebp 4/r32/esp
6331
6332 50/push-eax
6333 51/push-ecx
6334 56/push-esi
6335
6336 8b/-> *(ebp+8) 6/r32/esi
6337
6338 (slice-empty? %esi)
6339 3d/compare-eax-and 0/imm32/false
6340 0f 85/jump-if-!= $lookup-var-or-literal:abort/disp32
6341
6342 8b/-> *esi 1/r32/ecx
6343 8a/copy-byte *ecx 1/r32/CL
6344 81 4/subop/and %ecx 0xff/imm32
6345
6346 {
6347 (is-decimal-digit? %ecx)
6348 3d/compare-eax-and 0/imm32/false
6349 74/jump-if-= break/disp8
6350 (new-literal-integer Heap %esi *(ebp+0x10))
6351 eb/jump $lookup-var-or-literal:end/disp8
6352 }
6353
6354 {
6355 81 7/subop/compare %ecx 0x22/imm32/dquote
6356 75/jump-if-!= break/disp8
6357 (new-literal Heap %esi *(ebp+0x10))
6358 eb/jump $lookup-var-or-literal:end/disp8
6359 }
6360
6361 {
6362 (lookup-var %esi *(ebp+0xc))
6363 }
6364 $lookup-var-or-literal:end:
6365
6366 5e/pop-to-esi
6367 59/pop-to-ecx
6368 58/pop-to-eax
6369
6370 89/<- %esp 5/r32/ebp
6371 5d/pop-to-ebp
6372 c3/return
6373
6374 $lookup-var-or-literal:abort:
6375 (write-buffered Stderr "empty variable!")
6376 (flush Stderr)
6377
6378 bb/copy-to-ebx 1/imm32
6379 b8/copy-to-eax 1/imm32/exit
6380 cd/syscall 0x80/imm8
6381
6382
6383
6384 lookup-var:
6385
6386 55/push-ebp
6387 89/<- %ebp 4/r32/esp
6388
6389 50/push-eax
6390
6391 (lookup-var-helper *(ebp+8) *(ebp+0xc) *(ebp+0x10))
6392
6393 8b/-> *(ebp+0x10) 0/r32/eax
6394 81 7/subop/compare *eax 0/imm32
6395 74/jump-if-= $lookup-var:abort/disp8
6396 $lookup-var:end:
6397
6398 58/pop-to-eax
6399
6400 89/<- %esp 5/r32/ebp
6401 5d/pop-to-ebp
6402 c3/return
6403
6404 $lookup-var:abort:
6405 (write-buffered Stderr "unknown variable '")
6406 (write-slice-buffered Stderr *(ebp+8))
6407 (write-buffered Stderr "'\n")
6408 (flush Stderr)
6409
6410 bb/copy-to-ebx 1/imm32
6411 b8/copy-to-eax 1/imm32/exit
6412 cd/syscall 0x80/imm8
6413
6414
6415
6416 lookup-var-helper:
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427 55/push-ebp
6428 89/<- %ebp 4/r32/esp
6429
6430 50/push-eax
6431 51/push-ecx
6432 52/push-edx
6433 53/push-ebx
6434 56/push-esi
6435
6436 (zero-out *(ebp+0x10) *Handle-size)
6437
6438 8b/-> *(ebp+0xc) 6/r32/esi
6439
6440 8b/-> *esi 3/r32/ebx
6441
6442 3b/compare<- *(esi+4) 0/r32/eax
6443 0f 8f/jump-if-> $lookup-var-helper:error1/disp32
6444
6445 8d/copy-address *(esi+8) 2/r32/edx
6446
6447 8d/copy-address *(esi+ebx-4) 3/r32/ebx
6448 {
6449
6450 39/compare %ebx 2/r32/edx
6451 0f 82/jump-if-addr< break/disp32
6452
6453 (lookup *ebx *(ebx+4))
6454 89/<- %ecx 0/r32/eax
6455
6456 (lookup *ecx *(ecx+4))
6457
6458 (slice-equal? *(ebp+8) %eax)
6459 3d/compare-eax-and 0/imm32/false
6460 {
6461 74/jump-if-= break/disp8
6462
6463 8b/-> *(ebp+0x10) 6/r32/esi
6464
6465 8b/-> *ebx 0/r32/eax
6466 89/<- *esi 0/r32/eax
6467 8b/-> *(ebx+4) 0/r32/eax
6468 89/<- *(esi+4) 0/r32/eax
6469
6470 eb/jump $lookup-var-helper:end/disp8
6471 }
6472
6473 81 5/subop/subtract %ebx 0xc/imm32
6474 e9/jump loop/disp32
6475 }
6476 $lookup-var-helper:end:
6477
6478 5e/pop-to-esi
6479 5b/pop-to-ebx
6480 5a/pop-to-edx
6481 59/pop-to-ecx
6482 58/pop-to-eax
6483
6484 89/<- %esp 5/r32/ebp
6485 5d/pop-to-ebp
6486 c3/return
6487
6488 $lookup-var-helper:error1:
6489 (write-buffered Stderr "malformed stack when looking up '")
6490 (write-slice-buffered Stderr *(ebp+8))
6491 (write-buffered Stderr "'\n")
6492 (flush Stderr)
6493
6494 bb/copy-to-ebx 1/imm32
6495 b8/copy-to-eax 1/imm32/exit
6496 cd/syscall 0x80/imm8
6497
6498
6499
6500 lookup-or-define-var:
6501
6502 55/push-ebp
6503 89/<- %ebp 4/r32/esp
6504
6505 50/push-eax
6506
6507 (lookup-var-helper *(ebp+8) *(ebp+0xc) *(ebp+0x14))
6508 {
6509
6510 8b/-> *(ebp+0x14) 0/r32/eax
6511 81 7/subop/compare *eax 0/imm32
6512 75/jump-if-!= break/disp8
6513
6514 {
6515 (find-in-function-outputs *(ebp+0x10) *(ebp+8) *(ebp+0x14))
6516 8b/-> *(ebp+0x14) 0/r32/eax
6517 81 7/subop/compare *eax 0/imm32
6518
6519 0f 84/jump-if-= $lookup-var:abort/disp32
6520
6521 (push *(ebp+0xc) *eax)
6522 (push *(ebp+0xc) *(eax+4))
6523 (push *(ebp+0xc) 0)
6524 }
6525 }
6526 $lookup-or-define-var:end:
6527
6528 58/pop-to-eax
6529
6530 89/<- %esp 5/r32/ebp
6531 5d/pop-to-ebp
6532 c3/return
6533
6534 find-in-function-outputs:
6535
6536 55/push-ebp
6537 89/<- %ebp 4/r32/esp
6538
6539 50/push-eax
6540 51/push-ecx
6541
6542 8b/-> *(ebp+8) 1/r32/ecx
6543 (lookup *(ecx+0x10) *(ecx+0x14))
6544 89/<- %ecx 0/r32/eax
6545
6546 {
6547 81 7/subop/compare %ecx 0/imm32
6548 74/jump-if-= break/disp8
6549
6550 (lookup *ecx *(ecx+4))
6551
6552 (lookup *eax *(eax+4))
6553
6554 (slice-equal? *(ebp+0xc) %eax)
6555 3d/compare-eax-and 0/imm32/false
6556 {
6557 74/jump-if-= break/disp8
6558
6559 57/push-edi
6560 8b/-> *(ebp+0x10) 7/r32/edi
6561
6562 8b/-> *ecx 0/r32/eax
6563 89/<- *edi 0/r32/eax
6564 8b/-> *(ecx+4) 0/r32/eax
6565 89/<- *(edi+4) 0/r32/eax
6566
6567 5f/pop-to-edi
6568 eb/jump $find-in-function-outputs:end/disp8
6569 }
6570
6571 (lookup *(ecx+8) *(ecx+0xc))
6572 89/<- %ecx 0/r32/eax
6573
6574 eb/jump loop/disp8
6575 }
6576 b8/copy-to-eax 0/imm32
6577 $find-in-function-outputs:end:
6578
6579 59/pop-to-ecx
6580 58/pop-to-eax
6581
6582 89/<- %esp 5/r32/ebp
6583 5d/pop-to-ebp
6584 c3/return
6585
6586 test-parse-mu-stmt:
6587
6588 55/push-ebp
6589 89/<- %ebp 4/r32/esp
6590
6591 (clear-stream _test-input-stream)
6592 (write _test-input-stream "increment n\n")
6593
6594 81 5/subop/subtract %esp 0xc0/imm32
6595 68/push 0xc0/imm32/size
6596 68/push 0/imm32/top
6597 89/<- %ecx 4/r32/esp
6598 (clear-stack %ecx)
6599
6600 68/push 0/imm32
6601 68/push 0/imm32
6602 89/<- %edx 4/r32/esp
6603
6604 68/push 0/imm32
6605 68/push 0/imm32
6606 89/<- %eax 4/r32/esp
6607
6608 (copy-array Heap "n" %eax)
6609 (new-var Heap *eax *(eax+4) %edx)
6610
6611 (push %ecx *edx)
6612 (push %ecx *(edx+4))
6613 (push %ecx 0)
6614
6615 68/push 0/imm32
6616 68/push 0/imm32
6617 89/<- %eax 4/r32/esp
6618
6619 (parse-mu-stmt _test-input-stream %ecx 0 %eax)
6620
6621 (lookup *eax *(eax+4))
6622 89/<- %edx 0/r32/eax
6623
6624 (check-ints-equal *edx 1 "F - test-parse-mu-stmt/tag")
6625
6626 (lookup *(edx+4) *(edx+8))
6627 (check-strings-equal %eax "increment" "F - test-parse-mu-stmt/name")
6628
6629
6630 (lookup *(edx+0xc) *(edx+0x10))
6631
6632 (lookup *eax *(eax+4))
6633
6634 (lookup *eax *(eax+4))
6635
6636 (check-strings-equal %eax "n" "F - test-parse-mu-stmt/inout:0")
6637
6638 89/<- %esp 5/r32/ebp
6639 5d/pop-to-ebp
6640 c3/return
6641
6642 test-parse-mu-stmt-with-comma:
6643
6644 55/push-ebp
6645 89/<- %ebp 4/r32/esp
6646
6647 (clear-stream _test-input-stream)
6648 (write _test-input-stream "copy-to n, 3\n")
6649
6650 81 5/subop/subtract %esp 0xc0/imm32
6651 68/push 0xc0/imm32/size
6652 68/push 0/imm32/top
6653 89/<- %ecx 4/r32/esp
6654 (clear-stack %ecx)
6655
6656 68/push 0/imm32
6657 68/push 0/imm32
6658 89/<- %edx 4/r32/esp
6659
6660 68/push 0/imm32
6661 68/push 0/imm32
6662 89/<- %eax 4/r32/esp
6663
6664 (copy-array Heap "n" %eax)
6665 (new-var Heap *eax *(eax+4) %edx)
6666
6667 (push %ecx *edx)
6668 (push %ecx *(edx+4))
6669 (push %ecx 0)
6670
6671 68/push 0/imm32
6672 68/push 0/imm32
6673 89/<- %eax 4/r32/esp
6674
6675 (parse-mu-stmt _test-input-stream %ecx 0 %eax)
6676
6677 (lookup *eax *(eax+4))
6678 89/<- %edx 0/r32/eax
6679
6680 (check-ints-equal *edx 1 "F - test-parse-mu-stmt-with-comma/tag")
6681
6682 (lookup *(edx+4) *(edx+8))
6683 (check-strings-equal %eax "copy-to" "F - test-parse-mu-stmt-with-comma/name")
6684
6685
6686 (lookup *(edx+0xc) *(edx+0x10))
6687
6688 (lookup *eax *(eax+4))
6689
6690 (lookup *eax *(eax+4))
6691
6692 (check-strings-equal %eax "n" "F - test-parse-mu-stmt-with-comma/inout:0")
6693
6694 89/<- %esp 5/r32/ebp
6695 5d/pop-to-ebp
6696 c3/return
6697
6698 new-var:
6699
6700 55/push-ebp
6701 89/<- %ebp 4/r32/esp
6702
6703 50/push-eax
6704 51/push-ecx
6705
6706 8b/-> *(ebp+0x14) 1/r32/ecx
6707
6708 (allocate *(ebp+8) *Var-size %ecx)
6709
6710 (lookup *ecx *(ecx+4))
6711
6712 8b/-> *(ebp+0xc) 1/r32/ecx
6713 89/<- *eax 1/r32/ecx
6714 8b/-> *(ebp+0x10) 1/r32/ecx
6715 89/<- *(eax+4) 1/r32/ecx
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725 $new-var:end:
6726
6727 59/pop-to-ecx
6728 58/pop-to-eax
6729
6730 89/<- %esp 5/r32/ebp
6731 5d/pop-to-ebp
6732 c3/return
6733
6734 new-literal-integer:
6735
6736 55/push-ebp
6737 89/<- %ebp 4/r32/esp
6738
6739 50/push-eax
6740 51/push-ecx
6741
6742 (is-hex-int? *(ebp+0xc))
6743 3d/compare-eax-and 0/imm32/false
6744 0f 84/jump-if-= $new-literal-integer:abort/disp32
6745
6746 (new-var-from-slice *(ebp+8) *(ebp+0xc) *(ebp+0x10))
6747
6748 8b/-> *(ebp+0x10) 0/r32/eax
6749 (lookup *eax *(eax+4))
6750 89/<- %ecx 0/r32/eax
6751
6752 8d/copy-address *(ecx+8) 0/r32/eax
6753 (allocate *(ebp+8) *Tree-size %eax)
6754 (lookup *(ecx+8) *(ecx+0xc))
6755 c7 0/subop/copy *eax 1/imm32/true
6756
6757 $new-literal-integer:end:
6758
6759 81 0/subop/add %esp 8/imm32
6760
6761 59/pop-to-ecx
6762 58/pop-to-eax
6763
6764 89/<- %esp 5/r32/ebp
6765 5d/pop-to-ebp
6766 c3/return
6767
6768 $new-literal-integer:abort:
6769 (write-buffered Stderr "variable cannot begin with a digit '")
6770 (write-slice-buffered Stderr *(ebp+0xc))
6771 (write-buffered Stderr "'\n")
6772 (flush Stderr)
6773
6774 bb/copy-to-ebx 1/imm32
6775 b8/copy-to-eax 1/imm32/exit
6776 cd/syscall 0x80/imm8
6777
6778
6779 new-literal:
6780
6781 55/push-ebp
6782 89/<- %ebp 4/r32/esp
6783
6784 50/push-eax
6785 51/push-ecx
6786
6787 68/push 0/imm32
6788 68/push 0/imm32
6789 89/<- %ecx 4/r32/esp
6790
6791 (slice-to-string Heap *(ebp+0xc) %ecx)
6792
6793 (new-var *(ebp+8) *ecx *(ecx+4) *(ebp+0x10))
6794
6795 8b/-> *(ebp+0x10) 1/r32/ecx
6796 (lookup *ecx *(ecx+4))
6797 89/<- %ecx 0/r32/eax
6798
6799 8d/copy-address *(ecx+8) 0/r32/eax
6800 (allocate *(ebp+8) *Tree-size %eax)
6801 (lookup *(ecx+8) *(ecx+0xc))
6802
6803 c7 0/subop/copy *eax 1/imm32/true
6804 $new-literal:end:
6805
6806 81 0/subop/add %esp 8/imm32
6807
6808 59/pop-to-ecx
6809 58/pop-to-eax
6810
6811 89/<- %esp 5/r32/ebp
6812 5d/pop-to-ebp
6813 c3/return
6814
6815 new-var-from-slice:
6816
6817 55/push-ebp
6818 89/<- %ebp 4/r32/esp
6819
6820 51/push-ecx
6821
6822 68/push 0/imm32
6823 68/push 0/imm32
6824 89/<- %ecx 4/r32/esp
6825
6826 (slice-to-string Heap *(ebp+0xc) %ecx)
6827
6828 (new-var *(ebp+8) *ecx *(ecx+4) *(ebp+0x10))
6829 $new-var-from-slice:end:
6830
6831 81 0/subop/add %esp 8/imm32
6832
6833 59/pop-to-ecx
6834
6835 89/<- %esp 5/r32/ebp
6836 5d/pop-to-ebp
6837 c3/return
6838
6839 new-var-def:
6840
6841 55/push-ebp
6842 89/<- %ebp 4/r32/esp
6843
6844 50/push-eax
6845 51/push-ecx
6846
6847 (allocate *(ebp+8) *Stmt-size *(ebp+0x14))
6848
6849 8b/-> *(ebp+0x14) 0/r32/eax
6850 (lookup *eax *(eax+4))
6851
6852 c7 0/subop/copy *eax 2/imm32/tag/var-on-stack
6853
6854 8b/-> *(ebp+0xc) 1/r32/ecx
6855 89/<- *(eax+4) 1/r32/ecx
6856 8b/-> *(ebp+0x10) 1/r32/ecx
6857 89/<- *(eax+8) 1/r32/ecx
6858 $new-var-def:end:
6859
6860 59/pop-to-ecx
6861 58/pop-to-eax
6862
6863 89/<- %esp 5/r32/ebp
6864 5d/pop-to-ebp
6865 c3/return
6866
6867 new-reg-var-def:
6868
6869 55/push-ebp
6870 89/<- %ebp 4/r32/esp
6871
6872 50/push-eax
6873
6874 8b/-> *(ebp+0x14) 0/r32/eax
6875
6876 (allocate *(ebp+8) *Stmt-size %eax)
6877
6878 (lookup *eax *(eax+4))
6879
6880 c7 0/subop/copy *eax 3/imm32/tag/var-in-register
6881
6882 8d/copy-address *(eax+0x14) 0/r32/eax
6883 (append-stmt-var Heap *(ebp+0xc) *(ebp+0x10) 0 0 0 %eax)
6884 $new-reg-var-def:end:
6885
6886 58/pop-to-eax
6887
6888 89/<- %esp 5/r32/ebp
6889 5d/pop-to-ebp
6890 c3/return
6891
6892 append-list:
6893
6894 55/push-ebp
6895 89/<- %ebp 4/r32/esp
6896
6897 50/push-eax
6898 51/push-ecx
6899 57/push-edi
6900
6901 8b/-> *(ebp+0x1c) 7/r32/edi
6902
6903 (allocate *(ebp+8) *List-size %edi)
6904
6905 (lookup *edi *(edi+4))
6906 89/<- %edi 0/r32/eax
6907
6908 8b/-> *(ebp+0xc) 0/r32/eax
6909 89/<- *edi 0/r32/eax
6910 8b/-> *(ebp+0x10) 0/r32/eax
6911 89/<- *(edi+4) 0/r32/eax
6912
6913 81 7/subop/compare *(ebp+0x14) 0/imm32
6914 74/jump-if-= $append-list:end/disp8
6915
6916 $append-list:non-empty-list:
6917
6918 (lookup *(ebp+0x14) *(ebp+0x18))
6919
6920 {
6921 81 7/subop/compare *(eax+8) 0/imm32
6922 74/jump-if-= break/disp8
6923
6924 (lookup *(eax+8) *(eax+0xc))
6925
6926 eb/jump loop/disp8
6927 }
6928
6929 8b/-> *(ebp+0x1c) 7/r32/edi
6930
6931 8b/-> *edi 1/r32/ecx
6932 89/<- *(eax+8) 1/r32/ecx
6933 8b/-> *(edi+4) 1/r32/ecx
6934 89/<- *(eax+0xc) 1/r32/ecx
6935
6936 8b/-> *(ebp+0x14) 1/r32/ecx
6937 89/<- *edi 1/r32/ecx
6938 8b/-> *(ebp+0x18) 1/r32/ecx
6939 89/<- *(edi+4) 1/r32/ecx
6940 $append-list:end:
6941
6942 5f/pop-to-edi
6943 59/pop-to-ecx
6944 58/pop-to-eax
6945
6946 89/<- %esp 5/r32/ebp
6947 5d/pop-to-ebp
6948 c3/return
6949
6950 append-stmt-var:
6951
6952 55/push-ebp
6953 89/<- %ebp 4/r32/esp
6954
6955 50/push-eax
6956 51/push-ecx
6957 57/push-edi
6958
6959 8b/-> *(ebp+0x20) 7/r32/edi
6960
6961 (allocate *(ebp+8) *Stmt-var-size %edi)
6962
6963 (lookup *edi *(edi+4))
6964 89/<- %ecx 0/r32/eax
6965
6966 8b/-> *(ebp+0xc) 0/r32/eax
6967 89/<- *ecx 0/r32/eax
6968 8b/-> *(ebp+0x10) 0/r32/eax
6969 89/<- *(ecx+4) 0/r32/eax
6970
6971 8b/-> *(ebp+0x1c) 0/r32/eax
6972 89/<- *(ecx+0x10) 0/r32/eax
6973
6974 81 7/subop/compare *(ebp+0x14) 0/imm32/null
6975 74/jump-if-= $append-stmt-var:end/disp8
6976
6977
6978 (lookup *(ebp+0x14) *(ebp+0x18))
6979
6980 {
6981 81 7/subop/compare *(eax+8) 0/imm32
6982 74/jump-if-= break/disp8
6983
6984 (lookup *(eax+8) *(eax+0xc))
6985
6986 eb/jump loop/disp8
6987 }
6988
6989 8b/-> *edi 1/r32/ecx
6990 89/<- *(eax+8) 1/r32/ecx
6991 8b/-> *(edi+4) 1/r32/ecx
6992 89/<- *(eax+0xc) 1/r32/ecx
6993
6994 8b/-> *(ebp+0x14) 1/r32/ecx
6995 89/<- *edi 1/r32/ecx
6996 8b/-> *(ebp+0x18) 1/r32/ecx
6997 89/<- *(edi+4) 1/r32/ecx
6998 $append-stmt-var:end:
6999
7000 5f/pop-to-edi
7001 59/pop-to-ecx
7002 58/pop-to-eax
7003
7004 89/<- %esp 5/r32/ebp
7005 5d/pop-to-ebp
7006 c3/return
7007
7008 append-to-block:
7009
7010 55/push-ebp
7011 89/<- %ebp 4/r32/esp
7012
7013 50/push-eax
7014 56/push-esi
7015
7016 8b/-> *(ebp+0xc) 6/r32/esi
7017
7018 8d/copy-address *(esi+4) 0/r32/eax
7019 (append-list *(ebp+8) *(ebp+0x10) *(ebp+0x14) *(esi+4) *(esi+8) %eax)
7020 $append-to-block:end:
7021
7022 5e/pop-to-esi
7023 58/pop-to-eax
7024
7025 89/<- %esp 5/r32/ebp
7026 5d/pop-to-ebp
7027 c3/return
7028
7029
7030
7031
7032
7033
7034
7035 lookup-or-create-constant:
7036
7037 55/push-ebp
7038 89/<- %ebp 4/r32/esp
7039
7040 50/push-eax
7041 56/push-esi
7042
7043 (container-type *(ebp+8))
7044 89/<- %esi 0/r32/eax
7045
7046 68/push 0/imm32
7047 68/push 0/imm32
7048 89/<- %eax 4/r32/esp
7049 (find-or-create-typeinfo %esi %eax)
7050
7051 (lookup *eax *(eax+4))
7052
7053
7054
7055
7056
7057 (find-or-create-typeinfo-output-var %eax *(ebp+0xc) *(ebp+0x10))
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071 $lookup-or-create-constant:end:
7072
7073 81 0/subop/add %esp 8/imm32
7074
7075 5e/pop-to-esi
7076 58/pop-to-eax
7077
7078 89/<- %esp 5/r32/ebp
7079 5d/pop-to-ebp
7080 c3/return
7081
7082
7083
7084
7085
7086 container-type:
7087
7088 55/push-ebp
7089 89/<- %ebp 4/r32/esp
7090
7091 8b/-> *(ebp+8) 0/r32/eax
7092 (lookup *eax *(eax+4))
7093 (lookup *(eax+8) *(eax+0xc))
7094 {
7095 81 7/subop/compare *(eax+8) 0/imm32
7096 74/jump-if-= break/disp8
7097 (lookup *(eax+0xc) *(eax+0x10))
7098 (lookup *(eax+4) *(eax+8))
7099 }
7100 8b/-> *(eax+4) 0/r32/eax
7101 $container-type:end:
7102
7103 89/<- %esp 5/r32/ebp
7104 5d/pop-to-ebp
7105 c3/return
7106
7107 find-or-create-typeinfo:
7108
7109 55/push-ebp
7110 89/<- %ebp 4/r32/esp
7111
7112 50/push-eax
7113 51/push-ecx
7114 52/push-edx
7115 57/push-edi
7116
7117 8b/-> *(ebp+0xc) 7/r32/edi
7118
7119 68/push 0/imm32
7120 68/push 0/imm32
7121 89/<- %ecx 4/r32/esp
7122
7123 (find-typeinfo *(ebp+8) %edi)
7124 {
7125
7126 81 7/subop/compare *edi 0/imm32
7127 0f 85/jump-if-!= break/disp32
7128 $find-or-create-typeinfo:create:
7129
7130 (allocate Heap *Typeinfo-size %edi)
7131
7132 (lookup *edi *(edi+4))
7133
7134
7135
7136
7137
7138
7139
7140 8b/-> *(ebp+8) 2/r32/edx
7141 89/<- *eax 2/r32/edx
7142
7143
7144 (new-stream Heap 0x40 *Typeinfo-fields-row-size %ecx)
7145
7146 8b/-> *ecx 2/r32/edx
7147 89/<- *(eax+4) 2/r32/edx
7148 8b/-> *(ecx+4) 2/r32/edx
7149 89/<- *(eax+8) 2/r32/edx
7150
7151 8b/-> *_Program-types 1/r32/ecx
7152 89/<- *(eax+0x10) 1/r32/ecx
7153 8b/-> *_Program-types->payload 1/r32/ecx
7154 89/<- *(eax+0x14) 1/r32/ecx
7155
7156 8b/-> *edi 1/r32/ecx
7157 89/<- *_Program-types 1/r32/ecx
7158 8b/-> *(edi+4) 1/r32/ecx
7159 89/<- *_Program-types->payload 1/r32/ecx
7160 }
7161 $find-or-create-typeinfo:end:
7162
7163 81 0/subop/add %esp 8/imm32
7164
7165 5f/pop-to-edi
7166 5a/pop-to-edx
7167 59/pop-to-ecx
7168 58/pop-to-eax
7169
7170 89/<- %esp 5/r32/ebp
7171 5d/pop-to-ebp
7172 c3/return
7173
7174 find-typeinfo:
7175
7176 55/push-ebp
7177 89/<- %ebp 4/r32/esp
7178
7179 50/push-eax
7180 51/push-ecx
7181 52/push-edx
7182 57/push-edi
7183
7184 8b/-> *(ebp+8) 1/r32/ecx
7185
7186 8b/-> *(ebp+0xc) 7/r32/edi
7187
7188 8b/-> *_Program-types 0/r32/eax
7189 89/<- *edi 0/r32/eax
7190 8b/-> *_Program-types->payload 0/r32/eax
7191 89/<- *(edi+4) 0/r32/eax
7192 {
7193
7194 81 7/subop/compare *edi 0/imm32
7195 74/jump-if-= break/disp8
7196
7197 (lookup *edi *(edi+4))
7198
7199 39/compare *eax 1/r32/ecx
7200 74/jump-if-= break/disp8
7201
7202 8b/-> *(eax+0x10) 2/r32/edx
7203 89/<- *edi 2/r32/edx
7204 8b/-> *(eax+0x14) 2/r32/edx
7205 89/<- *(edi+4) 2/r32/edx
7206
7207 eb/jump loop/disp8
7208 }
7209 $find-typeinfo:end:
7210
7211 5f/pop-to-edi
7212 5a/pop-to-edx
7213 59/pop-to-ecx
7214 58/pop-to-eax
7215
7216 89/<- %esp 5/r32/ebp
7217 5d/pop-to-ebp
7218 c3/return
7219
7220 find-or-create-typeinfo-output-var:
7221
7222 55/push-ebp
7223 89/<- %ebp 4/r32/esp
7224
7225 50/push-eax
7226 52/push-edx
7227 57/push-edi
7228
7229 68/push 0/imm32
7230 68/push 0/imm32
7231 89/<- %edi 4/r32/esp
7232
7233 (find-or-create-typeinfo-fields *(ebp+8) *(ebp+0xc) %edi)
7234
7235 (lookup *edi *(edi+4))
7236 89/<- %edi 0/r32/eax
7237
7238 {
7239 81 7/subop/compare *(edi+0xc) 0/imm32
7240 0f 85/jump-if-!= break/disp32
7241
7242
7243 68/push 0/imm32
7244 68/push 0/imm32
7245 89/<- %eax 4/r32/esp
7246 (copy-array Heap "field" %eax)
7247
7248 8d/copy-address *(edi+0xc) 2/r32/edx
7249 (new-var Heap *eax *(eax+4) %edx)
7250
7251 81 0/subop/add %esp 8/imm32
7252
7253 (lookup *(edi+0xc) *(edi+0x10))
7254 89/<- %edx 0/r32/eax
7255
7256 8d/copy-address *(edx+8) 0/r32/eax
7257 (allocate Heap *Tree-size %eax)
7258 (lookup *(edx+8) *(edx+0xc))
7259 c7 0/subop/copy *eax 1/imm32/true
7260 c7 0/subop/copy *(eax+4) 6/imm32/constant
7261 c7 0/subop/copy *(eax+8) 0/imm32
7262 c7 0/subop/copy *(eax+0xc) 0/imm32
7263 c7 0/subop/copy *(eax+0x10) 0/imm32
7264
7265 c7 0/subop/copy *(edx+0x14) -1/imm32/uninitialized
7266 }
7267
7268 8b/-> *(ebp+0x10) 2/r32/edx
7269 8b/-> *(edi+0xc) 0/r32/eax
7270 89/<- *edx 0/r32/eax
7271 8b/-> *(edi+0x10) 0/r32/eax
7272 89/<- *(edx+4) 0/r32/eax
7273 $find-or-create-typeinfo-output-var:end:
7274
7275 81 0/subop/add %esp 8/imm32
7276
7277 5f/pop-to-edi
7278 5a/pop-to-edx
7279 58/pop-to-eax
7280
7281 89/<- %esp 5/r32/ebp
7282 5d/pop-to-ebp
7283 c3/return
7284
7285 find-or-create-typeinfo-fields:
7286
7287 55/push-ebp
7288 89/<- %ebp 4/r32/esp
7289
7290 50/push-eax
7291 56/push-esi
7292 57/push-edi
7293
7294 8b/-> *(ebp+8) 0/r32/eax
7295 (lookup *(eax+4) *(eax+8))
7296
7297 8b/-> *(ebp+0x10) 7/r32/edi
7298
7299 (get-or-insert-slice %eax *(ebp+0xc) *Typeinfo-fields-row-size Heap)
7300 89/<- %esi 0/r32/eax
7301
7302 {
7303 81 7/subop/compare *esi 0/imm32
7304 75/jump-if-!= break/disp8
7305 (allocate Heap *Typeinfo-entry-size %esi)
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321 }
7322
7323
7324 8b/-> *esi 0/r32/eax
7325 89/<- *edi 0/r32/eax
7326 8b/-> *(esi+4) 0/r32/eax
7327 89/<- *(edi+4) 0/r32/eax
7328 $find-or-create-typeinfo-fields:end:
7329
7330 5f/pop-to-edi
7331 5e/pop-to-esi
7332 58/pop-to-eax
7333
7334 89/<- %esp 5/r32/ebp
7335 5d/pop-to-ebp
7336 c3/return
7337
7338 populate-mu-type:
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364 55/push-ebp
7365 89/<- %ebp 4/r32/esp
7366
7367 68/push 0/imm32
7368
7369 50/push-eax
7370 51/push-ecx
7371 52/push-edx
7372 53/push-ebx
7373 56/push-esi
7374 57/push-edi
7375
7376 8b/-> *(ebp+0xc) 7/r32/edi
7377
7378 81 5/subop/subtract %esp 0x200/imm32
7379 68/push 0x200/imm32/size
7380 68/push 0/imm32/read
7381 68/push 0/imm32/write
7382 89/<- %ecx 4/r32/esp
7383
7384 68/push 0/imm32/end
7385 68/push 0/imm32/start
7386 89/<- %edx 4/r32/esp
7387
7388 68/push 0/imm32
7389 68/push 0/imm32
7390 89/<- %esi 4/r32/esp
7391
7392 68/push 0/imm32
7393 68/push 0/imm32
7394 89/<- %ebx 4/r32/esp
7395 {
7396 $populate-mu-type:line-loop:
7397 (clear-stream %ecx)
7398 (read-line-buffered *(ebp+8) %ecx)
7399
7400 81 7/subop/compare *ecx 0/imm32
7401 0f 84/jump-if-= $populate-mu-type:abort/disp32
7402 +-- 6 lines: #? # dump line -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
7408 (next-mu-token %ecx %edx)
7409
7410 (slice-empty? %edx)
7411 3d/compare-eax-and 0/imm32
7412 0f 85/jump-if-!= loop/disp32
7413
7414 (slice-equal? %edx "}")
7415 3d/compare-eax-and 0/imm32
7416 0f 85/jump-if-!= break/disp32
7417 $populate-mu-type:parse-element:
7418
7419
7420
7421
7422 (parse-var-with-type %edx %ecx %esi)
7423
7424 51/push-ecx
7425 $populate-mu-type:create-typeinfo-fields:
7426
7427 (find-or-create-typeinfo-fields %edi %edx %ebx)
7428
7429 (lookup *ebx *(ebx+4))
7430 8b/-> *(ebp-4) 1/r32/ecx
7431
7432
7433
7434
7435
7436
7437 89/<- *(eax+8) 1/r32/ecx
7438
7439 ff 0/subop/increment *(ebp-4)
7440 $populate-mu-type:set-input-type:
7441
7442 8b/-> *esi 1/r32/ecx
7443 89/<- *eax 1/r32/ecx
7444 8b/-> *(esi+4) 1/r32/ecx
7445 89/<- *(eax+4) 1/r32/ecx
7446 59/pop-to-ecx
7447 {
7448 $populate-mu-type:create-output-type:
7449
7450 81 7/subop/compare *(eax+0xc) 0/imm32
7451 75/jump-if-!= break/disp8
7452 8d/copy-address *(eax+0xc) 0/r32/eax
7453 (new-literal Heap %edx %eax)
7454 }
7455 e9/jump loop/disp32
7456 }
7457 $populate-mu-type:invalidate-total-size-in-bytes:
7458
7459
7460
7461 c7 0/subop/copy *(edi+0xc) -2/imm32/uninitialized
7462 $populate-mu-type:end:
7463
7464 81 0/subop/add %esp 0x224/imm32
7465
7466 5f/pop-to-edi
7467 5e/pop-to-esi
7468 5b/pop-to-ebx
7469 5a/pop-to-edx
7470 59/pop-to-ecx
7471 58/pop-to-eax
7472
7473 81 0/subop/add %esp 4/imm32
7474
7475 89/<- %esp 5/r32/ebp
7476 5d/pop-to-ebp
7477 c3/return
7478
7479 $populate-mu-type:abort:
7480
7481 (write-buffered Stderr "incomplete type definition '")
7482 (type-name *edi)
7483 (write-buffered Stderr %eax)
7484 (write-buffered Stderr "\n")
7485 (flush Stderr)
7486
7487 bb/copy-to-ebx 1/imm32
7488 b8/copy-to-eax 1/imm32/exit
7489 cd/syscall 0x80/imm8
7490
7491
7492 type-name:
7493
7494 55/push-ebp
7495 89/<- %ebp 4/r32/esp
7496
7497 (index Type-id *(ebp+8))
7498 $type-name:end:
7499
7500 89/<- %esp 5/r32/ebp
7501 5d/pop-to-ebp
7502 c3/return
7503
7504 index:
7505
7506 55/push-ebp
7507 89/<- %ebp 4/r32/esp
7508
7509 56/push-esi
7510
7511
7512 8b/-> *(ebp+8) 6/r32/esi
7513
7514 8b/-> *(ebp+0xc) 0/r32/eax
7515
7516 8b/-> *(esi+eax+0xc) 0/r32/eax
7517 $index:end:
7518
7519 5e/pop-to-esi
7520
7521 89/<- %esp 5/r32/ebp
7522 5d/pop-to-ebp
7523 c3/return
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534 populate-mu-type-sizes:
7535
7536 55/push-ebp
7537 89/<- %ebp 4/r32/esp
7538 $populate-mu-type-sizes:total-sizes:
7539
7540 (lookup *_Program-types *_Program-types->payload)
7541 {
7542
7543 3d/compare-eax-and 0/imm32/null
7544 74/jump-if-= break/disp8
7545 (populate-mu-type-sizes-in-type %eax)
7546
7547 (lookup *(eax+0x10) *(eax+0x14))
7548 eb/jump loop/disp8
7549 }
7550 $populate-mu-type-sizes:offsets:
7551
7552 (lookup *_Program-types *_Program-types->payload)
7553 {
7554
7555 3d/compare-eax-and 0/imm32/null
7556 74/jump-if-= break/disp8
7557 (populate-mu-type-offsets %eax)
7558
7559 (lookup *(eax+0x10) *(eax+0x14))
7560 eb/jump loop/disp8
7561 }
7562 $populate-mu-type-sizes:end:
7563
7564 89/<- %esp 5/r32/ebp
7565 5d/pop-to-ebp
7566 c3/return
7567
7568
7569
7570
7571 populate-mu-type-sizes-in-type:
7572
7573 55/push-ebp
7574 89/<- %ebp 4/r32/esp
7575
7576 50/push-eax
7577 51/push-ecx
7578 52/push-edx
7579 56/push-esi
7580 57/push-edi
7581
7582 8b/-> *(ebp+8) 6/r32/esi
7583
7584 81 7/subop/compare *(esi+0xc) 0/imm32
7585 0f 8d/jump-if->= $populate-mu-type-sizes-in-type:end/disp32
7586
7587 81 7/subop/compare *(esi+0xc) -1/imm32/being-computed
7588 0f 84/jump-if-= $populate-mu-type-sizes-in-type:abort/disp32
7589
7590 c7 0/subop/copy *(esi+0xc) -1/imm32/being-computed
7591
7592 bf/copy-to-edi 0/imm32
7593
7594
7595 (lookup *(esi+4) *(esi+8))
7596 89/<- %ecx 0/r32/eax
7597
7598 8b/-> *ecx 2/r32/edx
7599
7600 8d/copy-address *(ecx+0xc) 1/r32/ecx
7601
7602 8d/copy-address *(ecx+edx) 2/r32/edx
7603 {
7604 $populate-mu-type-sizes-in-type:loop:
7605
7606 39/compare %ecx 2/r32/edx
7607 73/jump-if-addr>= break/disp8
7608
7609 (lookup *(ecx+8) *(ecx+0xc))
7610
7611 (lookup *eax *(eax+4))
7612 (compute-size-of-var %eax)
7613
7614 01/add-to %edi 0/r32/eax
7615
7616 81 0/subop/add %ecx 0x10/imm32
7617
7618 eb/jump loop/disp8
7619 }
7620
7621 89/<- *(esi+0xc) 7/r32/edi
7622 $populate-mu-type-sizes-in-type:end:
7623
7624 5f/pop-to-edi
7625 5e/pop-to-esi
7626 5a/pop-to-edx
7627 59/pop-to-ecx
7628 58/pop-to-eax
7629
7630 89/<- %esp 5/r32/ebp
7631 5d/pop-to-ebp
7632 c3/return
7633
7634 $populate-mu-type-sizes-in-type:abort:
7635 (write-buffered Stderr "cycle in type definitions\n")
7636 (flush Stderr)
7637
7638 bb/copy-to-ebx 1/imm32
7639 b8/copy-to-eax 1/imm32/exit
7640 cd/syscall 0x80/imm8
7641
7642
7643
7644
7645 compute-size-of-var:
7646
7647 55/push-ebp
7648 89/<- %ebp 4/r32/esp
7649
7650 51/push-ecx
7651
7652 8b/-> *(ebp+8) 1/r32/ecx
7653 (lookup *(ecx+8) *(ecx+0xc))
7654 89/<- %ecx 0/r32/eax
7655
7656 {
7657 81 7/subop/compare *ecx 0/imm32/false
7658 75/jump-if-!= break/disp8
7659 (lookup *(ecx+4) *(ecx+8))
7660 89/<- %ecx 0/r32/eax
7661 }
7662
7663 (compute-size-of-type-id *(ecx+4))
7664 $compute-size-of-var:end:
7665
7666 59/pop-to-ecx
7667
7668 89/<- %esp 5/r32/ebp
7669 5d/pop-to-ebp
7670 c3/return
7671
7672 compute-size-of-type-id:
7673
7674 55/push-ebp
7675 89/<- %ebp 4/r32/esp
7676
7677 51/push-ecx
7678
7679 68/push 0/imm32
7680 68/push 0/imm32
7681 89/<- %ecx 4/r32/esp
7682
7683 8b/-> *(ebp+8) 0/r32/eax
7684
7685 3d/compare-eax-and 0/imm32
7686 74/jump-if-= $compute-size-of-type-id:end/disp8
7687
7688
7689 (find-typeinfo %eax %ecx)
7690 {
7691 81 7/subop/compare *ecx 0/imm32
7692 74/jump-if-= break/disp8
7693 $compute-size-of-type-id:user-defined:
7694 (populate-mu-type-sizes %eax)
7695 8b/-> *(eax+0xc) 0/r32/eax
7696 eb/jump $compute-size-of-type-id:end/disp8
7697 }
7698
7699 b8/copy-to-eax 4/imm32
7700 $compute-size-of-type-id:end:
7701
7702 81 0/subop/add %esp 8/imm32
7703
7704 59/pop-to-ecx
7705
7706 89/<- %esp 5/r32/ebp
7707 5d/pop-to-ebp
7708 c3/return
7709
7710
7711
7712
7713 populate-mu-type-offsets:
7714
7715 55/push-ebp
7716 89/<- %ebp 4/r32/esp
7717
7718 50/push-eax
7719 51/push-ecx
7720 52/push-edx
7721 53/push-ebx
7722 56/push-esi
7723 57/push-edi
7724
7725
7726 bf/copy-to-edi 0/imm32
7727
7728 8b/-> *(ebp+8) 1/r32/ecx
7729 (lookup *(ecx+4) *(ecx+8))
7730 89/<- %ecx 0/r32/eax
7731
7732 8b/-> *ecx 2/r32/edx
7733 c1 5/subop/shift-right-logical %edx 4/imm8
7734
7735 bb/copy-to-ebx 0/imm32
7736 {
7737 $populate-mu-type-offsets:loop:
7738 39/compare %ebx 2/r32/edx
7739 7d/jump-if->= break/disp8
7740
7741
7742
7743
7744
7745
7746
7747 (locate-typeinfo-entry-with-index %ecx %ebx)
7748 89/<- %esi 0/r32/eax
7749
7750
7751 (lookup *(esi+0xc) *(esi+0x10))
7752 89/<- *(eax+0x14) 7/r32/edi
7753
7754 (lookup *esi *(esi+4))
7755 (size-of %eax)
7756 01/add-to %edi 0/r32/eax
7757
7758 43/increment-ebx
7759 eb/jump loop/disp8
7760 }
7761 $populate-mu-type-offsets:end:
7762
7763 5f/pop-to-edi
7764 5e/pop-to-esi
7765 5b/pop-to-ebx
7766 5a/pop-to-edx
7767 59/pop-to-ecx
7768 58/pop-to-eax
7769
7770 89/<- %esp 5/r32/ebp
7771 5d/pop-to-ebp
7772 c3/return
7773
7774 locate-typeinfo-entry-with-index:
7775
7776 55/push-ebp
7777 89/<- %ebp 4/r32/esp
7778
7779 51/push-ecx
7780 52/push-edx
7781 53/push-ebx
7782 56/push-esi
7783 57/push-edi
7784
7785 8b/-> *(ebp+8) 6/r32/esi
7786
7787 8d/copy-address *(esi+0xc) 1/r32/ecx
7788
7789 8b/-> *esi 2/r32/edx
7790 8d/copy-address *(ecx+edx) 2/r32/edx
7791 {
7792 $locate-typeinfo-entry-with-index:loop:
7793 39/compare %ecx 2/r32/edx
7794 73/jump-if-addr>= $locate-typeinfo-entry-with-index:abort/disp8
7795
7796 (lookup *(ecx+8) *(ecx+0xc))
7797
7798 8b/-> *(eax+8) 3/r32/ebx
7799
7800
7801
7802
7803
7804
7805 39/compare *(ebp+0xc) 3/r32/ebx
7806 74/jump-if-= $locate-typeinfo-entry-with-index:end/disp8
7807
7808 81 0/subop/add %ecx 0x10/imm32
7809
7810 eb/jump loop/disp8
7811 }
7812
7813 b8/copy-to-eax 0/imm32
7814 $locate-typeinfo-entry-with-index:end:
7815
7816
7817
7818
7819
7820 5f/pop-to-edi
7821 5e/pop-to-esi
7822 5b/pop-to-ebx
7823 5a/pop-to-edx
7824 59/pop-to-ecx
7825
7826 89/<- %esp 5/r32/ebp
7827 5d/pop-to-ebp
7828 c3/return
7829
7830 $locate-typeinfo-entry-with-index:abort:
7831 (write-buffered Stderr "overflowing typeinfo-entry->index ")
7832 (print-int32-buffered Stderr %ecx)
7833 (write-buffered Stderr "\n")
7834 (flush Stderr)
7835
7836 bb/copy-to-ebx 1/imm32
7837 b8/copy-to-eax 1/imm32/exit
7838 cd/syscall 0x80/imm8
7839
7840
7841 dump-typeinfos:
7842
7843 55/push-ebp
7844 89/<- %ebp 4/r32/esp
7845
7846 50/push-eax
7847
7848 (write-buffered Stderr *(ebp+8))
7849 (flush Stderr)
7850
7851 (lookup *_Program-types *_Program-types->payload)
7852 {
7853
7854 3d/compare-eax-and 0/imm32
7855 74/jump-if-= break/disp8
7856 (write-buffered Stderr "---\n")
7857 (flush Stderr)
7858 (dump-typeinfo %eax)
7859
7860 (lookup *(eax+0x10) *(eax+0x14))
7861 eb/jump loop/disp8
7862 }
7863 $dump-typeinfos:end:
7864
7865 58/pop-to-eax
7866
7867 89/<- %esp 5/r32/ebp
7868 5d/pop-to-ebp
7869 c3/return
7870
7871 dump-typeinfo:
7872
7873 55/push-ebp
7874 89/<- %ebp 4/r32/esp
7875
7876 50/push-eax
7877 51/push-ecx
7878 52/push-edx
7879 53/push-ebx
7880 56/push-esi
7881 57/push-edi
7882
7883 8b/-> *(ebp+8) 6/r32/esi
7884
7885 (lookup *(esi+4) *(esi+8))
7886 89/<- %ecx 0/r32/eax
7887 (write-buffered Stderr "id:")
7888 (print-int32-buffered Stderr *esi)
7889 (write-buffered Stderr "\n")
7890 (write-buffered Stderr "fields @ ")
7891 (print-int32-buffered Stderr %ecx)
7892 (write-buffered Stderr Newline)
7893 (flush Stderr)
7894 (write-buffered Stderr " write: ")
7895 (print-int32-buffered Stderr *ecx)
7896 (write-buffered Stderr Newline)
7897 (flush Stderr)
7898 (write-buffered Stderr " read: ")
7899 (print-int32-buffered Stderr *(ecx+4))
7900 (write-buffered Stderr Newline)
7901 (flush Stderr)
7902 (write-buffered Stderr " size: ")
7903 (print-int32-buffered Stderr *(ecx+8))
7904 (write-buffered Stderr Newline)
7905 (flush Stderr)
7906
7907 8b/-> *ecx 2/r32/edx
7908
7909 8d/copy-address *(ecx+0xc) 1/r32/ecx
7910
7911 8d/copy-address *(ecx+edx) 2/r32/edx
7912 {
7913 $dump-typeinfo:loop:
7914
7915 39/compare %ecx 2/r32/edx
7916 0f 83/jump-if-addr>= break/disp32
7917 (write-buffered Stderr " row:\n")
7918 (write-buffered Stderr " key: ")
7919 (print-int32-buffered Stderr *ecx)
7920 (write-buffered Stderr ",")
7921 (print-int32-buffered Stderr *(ecx+4))
7922 (write-buffered Stderr " = '")
7923 (lookup *ecx *(ecx+4))
7924 (write-buffered Stderr %eax)
7925 (write-buffered Stderr "' @ ")
7926 (print-int32-buffered Stderr %eax)
7927 (write-buffered Stderr Newline)
7928 (flush Stderr)
7929 (write-buffered Stderr " value: ")
7930 (print-int32-buffered Stderr *(ecx+8))
7931 (write-buffered Stderr ",")
7932 (print-int32-buffered Stderr *(ecx+0xc))
7933 (write-buffered Stderr " = typeinfo-entry@")
7934 (lookup *(ecx+8) *(ecx+0xc))
7935 (print-int32-buffered Stderr %eax)
7936 (write-buffered Stderr Newline)
7937 (flush Stderr)
7938 (write-buffered Stderr " input var@")
7939 (print-int32-buffered Stderr *eax)
7940 (write-buffered Stderr ",")
7941 (print-int32-buffered Stderr *(eax+4))
7942 (write-buffered Stderr "->")
7943 (lookup *eax *(eax+4))
7944 (print-int32-buffered Stderr %eax)
7945 {
7946 3d/compare-eax-and 0/imm32
7947 74/jump-if-= break/disp8
7948 (write-buffered Stderr " ")
7949
7950 }
7951 (write-buffered Stderr Newline)
7952 (flush Stderr)
7953 (lookup *(ecx+8) *(ecx+0xc))
7954 (write-buffered Stderr " index: ")
7955 (print-int32-buffered Stderr *(eax+8))
7956 (write-buffered Stderr Newline)
7957 (flush Stderr)
7958 (write-buffered Stderr " output var@")
7959 (print-int32-buffered Stderr *(eax+0xc))
7960 (write-buffered Stderr ",")
7961 (print-int32-buffered Stderr *(eax+0x10))
7962 (write-buffered Stderr "->")
7963 (lookup *(eax+0xc) *(eax+0x10))
7964 (print-int32-buffered Stderr %eax)
7965 (write-buffered Stderr Newline)
7966 (flush Stderr)
7967 {
7968 3d/compare-eax-and 0/imm32
7969 0f 84/jump-if-= break/disp32
7970 (write-buffered Stderr " name: ")
7971 89/<- %ebx 0/r32/eax
7972 (print-int32-buffered Stderr *ebx)
7973 (write-buffered Stderr ",")
7974 (print-int32-buffered Stderr *(ebx+4))
7975 (write-buffered Stderr "->")
7976 (lookup *ebx *(ebx+4))
7977 (print-int32-buffered Stderr %eax)
7978 {
7979 3d/compare-eax-and 0/imm32
7980 74/jump-if-= break/disp8
7981 (write-buffered Stderr Space)
7982 (write-buffered Stderr %eax)
7983 }
7984 (write-buffered Stderr Newline)
7985 (flush Stderr)
7986 (write-buffered Stderr " block depth: ")
7987 (print-int32-buffered Stderr *(ebx+0x10))
7988 (write-buffered Stderr Newline)
7989 (flush Stderr)
7990 (write-buffered Stderr " stack offset: ")
7991 (print-int32-buffered Stderr *(ebx+0x14))
7992 (write-buffered Stderr Newline)
7993 (flush Stderr)
7994 (write-buffered Stderr " reg: ")
7995 (print-int32-buffered Stderr *(ebx+0x18))
7996 (write-buffered Stderr ",")
7997 (print-int32-buffered Stderr *(ebx+0x1c))
7998 (write-buffered Stderr "->")
7999 (flush Stderr)
8000 (lookup *(ebx+0x18) *(ebx+0x1c))
8001 (print-int32-buffered Stderr %eax)
8002 {
8003 3d/compare-eax-and 0/imm32
8004 74/jump-if-= break/disp8
8005 (write-buffered Stderr Space)
8006 (write-buffered Stderr %eax)
8007 }
8008 (write-buffered Stderr Newline)
8009 (flush Stderr)
8010 }
8011 (flush Stderr)
8012
8013 81 0/subop/add %ecx 0x10/imm32
8014
8015 e9/jump loop/disp32
8016 }
8017 $dump-typeinfo:end:
8018
8019 5f/pop-to-edi
8020 5e/pop-to-esi
8021 5b/pop-to-ebx
8022 5a/pop-to-edx
8023 59/pop-to-ecx
8024 58/pop-to-eax
8025
8026 89/<- %esp 5/r32/ebp
8027 5d/pop-to-ebp
8028 c3/return
8029
8030
8031
8032
8033
8034 check-mu-types:
8035
8036 55/push-ebp
8037 89/<- %ebp 4/r32/esp
8038
8039 $check-mu-types:end:
8040
8041 89/<- %esp 5/r32/ebp
8042 5d/pop-to-ebp
8043 c3/return
8044
8045 size-of:
8046
8047 55/push-ebp
8048 89/<- %ebp 4/r32/esp
8049
8050 51/push-ecx
8051
8052 8b/-> *(ebp+8) 1/r32/ecx
8053
8054
8055
8056
8057
8058
8059
8060 (lookup *(ecx+8) *(ecx+0xc))
8061 89/<- %ecx 0/r32/eax
8062
8063 {
8064 (is-mu-array? %ecx)
8065 3d/compare-eax-and 0/imm32/false
8066 74/jump-if-= break/disp8
8067 (size-of-array %ecx)
8068 eb/jump $size-of:end/disp8
8069 }
8070
8071 {
8072 81 7/subop/compare *ecx 0/imm32/false
8073 75/jump-if-!= break/disp8
8074 (lookup *(ecx+4) *(ecx+8))
8075 89/<- %ecx 0/r32/eax
8076 }
8077
8078 (size-of-type-id *(ecx+4))
8079 $size-of:end:
8080
8081 59/pop-to-ecx
8082
8083 89/<- %esp 5/r32/ebp
8084 5d/pop-to-ebp
8085 c3/return
8086
8087 size-of-deref:
8088
8089 55/push-ebp
8090 89/<- %ebp 4/r32/esp
8091
8092 51/push-ecx
8093
8094 8b/-> *(ebp+8) 1/r32/ecx
8095 (lookup *(ecx+8) *(ecx+0xc))
8096 89/<- %ecx 0/r32/eax
8097
8098
8099 (lookup *(ecx+0xc) *(ecx+0x10))
8100 89/<- %ecx 0/r32/eax
8101
8102 {
8103 (is-mu-array? %ecx)
8104 3d/compare-eax-and 0/imm32/false
8105 74/jump-if-= break/disp8
8106 (size-of-array %ecx)
8107 eb/jump $size-of:end/disp8
8108 }
8109
8110 {
8111 81 7/subop/compare *ecx 0/imm32/false
8112 75/jump-if-!= break/disp8
8113 (lookup *(ecx+4) *(ecx+8))
8114 89/<- %ecx 0/r32/eax
8115 }
8116
8117 (size-of-type-id *(ecx+4))
8118 $size-of-deref:end:
8119
8120 59/pop-to-ecx
8121
8122 89/<- %esp 5/r32/ebp
8123 5d/pop-to-ebp
8124 c3/return
8125
8126 is-mu-array?:
8127
8128 55/push-ebp
8129 89/<- %ebp 4/r32/esp
8130
8131 51/push-ecx
8132
8133 8b/-> *(ebp+8) 1/r32/ecx
8134
8135 81 7/subop/compare *ecx 0/imm32/false
8136 75/jump-if-!= $is-mu-array?:return-false/disp8
8137
8138 (lookup *(ecx+4) *(ecx+8))
8139 81 7/subop/compare *eax 0/imm32/false
8140 74/jump-if-= $is-mu-array?:return-false/disp8
8141
8142 81 7/subop/compare *(eax+4) 3/imm32/array-type-id
8143 0f 94/set-if-= %al
8144 81 4/subop/and %eax 0xff/imm32
8145 eb/jump $is-mu-array?:end/disp8
8146 $is-mu-array?:return-false:
8147 b8/copy-to-eax 0/imm32/false
8148 $is-mu-array?:end:
8149
8150 59/pop-to-ecx
8151
8152 89/<- %esp 5/r32/ebp
8153 5d/pop-to-ebp
8154 c3/return
8155
8156 size-of-array:
8157
8158 55/push-ebp
8159 89/<- %ebp 4/r32/esp
8160
8161 51/push-ecx
8162 52/push-edx
8163
8164 8b/-> *(ebp+8) 1/r32/ecx
8165
8166 (lookup *(ecx+0xc) *(ecx+0x10))
8167 89/<- %ecx 0/r32/eax
8168
8169 (lookup *(ecx+4) *(ecx+8))
8170 8b/-> *(eax+4) 2/r32/edx
8171
8172 (lookup *(ecx+0xc) *(ecx+0x10))
8173 (lookup *(eax+4) *(eax+8))
8174 8b/-> *(eax+4) 1/r32/ecx
8175
8176 (size-of-type-id %edx)
8177 f7 4/subop/multiply-into-eax %ecx
8178 05/add-to-eax 4/imm32
8179 $size-of-array:end:
8180
8181 5a/pop-to-edx
8182 59/pop-to-ecx
8183
8184 89/<- %esp 5/r32/ebp
8185 5d/pop-to-ebp
8186 c3/return
8187
8188 size-of-type-id:
8189
8190 55/push-ebp
8191 89/<- %ebp 4/r32/esp
8192
8193 51/push-ecx
8194
8195 68/push 0/imm32
8196 68/push 0/imm32
8197 89/<- %ecx 4/r32/esp
8198
8199 8b/-> *(ebp+8) 0/r32/eax
8200
8201 3d/compare-eax-and 0/imm32
8202 74/jump-if-= $size-of-type-id:end/disp8
8203
8204 3d/compare-eax-and 4/imm32/handle
8205 {
8206 75/jump-if-!= break/disp8
8207 b8/copy-to-eax 8/imm32
8208 eb/jump $size-of-type-id:end/disp8
8209 }
8210
8211
8212 (find-typeinfo %eax %ecx)
8213 {
8214 81 7/subop/compare *ecx 0/imm32
8215 74/jump-if-= break/disp8
8216 $size-of-type-id:user-defined:
8217 (lookup *ecx *(ecx+4))
8218 8b/-> *(eax+0xc) 0/r32/eax
8219 eb/jump $size-of-type-id:end/disp8
8220 }
8221
8222 b8/copy-to-eax 4/imm32
8223 $size-of-type-id:end:
8224
8225 81 0/subop/add %esp 8/imm32
8226
8227 59/pop-to-ecx
8228
8229 89/<- %esp 5/r32/ebp
8230 5d/pop-to-ebp
8231 c3/return
8232
8233 type-equal?:
8234
8235 55/push-ebp
8236 89/<- %ebp 4/r32/esp
8237
8238 51/push-ecx
8239 52/push-edx
8240
8241 8b/-> *(ebp+8) 1/r32/ecx
8242
8243 8b/-> *(ebp+0xc) 2/r32/edx
8244
8245 8b/-> %ecx 0/r32/eax
8246 39/compare %edx 0/r32/eax
8247 b8/copy-to-eax 1/imm32/true
8248 74/jump-if-= $type-equal?:end/disp8
8249
8250 81 7/subop/compare %ecx 0x10000/imm32
8251 b8/copy-to-eax 0/imm32/false
8252 72/jump-if-addr< $type-equal?:end/disp8
8253
8254 81 7/subop/compare %edx 0x10000/imm32
8255 b8/copy-to-eax 0/imm32/false
8256 72/jump-if-addr< $type-equal?:end/disp8
8257
8258 (type-equal? *(ecx+4) *(edx+4))
8259 3d/compare-eax-and 0/imm32/false
8260 74/jump-if-= $type-equal?:end/disp8
8261
8262 (type-equal? *(ecx+8) *(edx+8))
8263 $type-equal?:end:
8264
8265 5a/pop-to-edx
8266 59/pop-to-ecx
8267
8268 89/<- %esp 5/r32/ebp
8269 5d/pop-to-ebp
8270 c3/return
8271
8272
8273
8274
8275
8276 == data
8277
8278 Curr-block-depth:
8279 0/imm32
8280 Curr-local-stack-offset:
8281 0/imm32
8282
8283 == code
8284
8285 emit-subx:
8286
8287 55/push-ebp
8288 89/<- %ebp 4/r32/esp
8289
8290 50/push-eax
8291
8292 (lookup *_Program-functions *_Program-functions->payload)
8293 {
8294
8295 3d/compare-eax-and 0/imm32
8296 0f 84/jump-if-= break/disp32
8297 (emit-subx-function *(ebp+8) %eax)
8298
8299 (lookup *(eax+0x20) *(eax+0x24))
8300 e9/jump loop/disp32
8301 }
8302 $emit-subx:end:
8303
8304 58/pop-to-eax
8305
8306 89/<- %esp 5/r32/ebp
8307 5d/pop-to-ebp
8308 c3/return
8309
8310 emit-subx-function:
8311
8312 55/push-ebp
8313 89/<- %ebp 4/r32/esp
8314
8315 (populate-mu-type-offsets-in-inouts *(ebp+0xc))
8316
8317 50/push-eax
8318 51/push-ecx
8319 52/push-edx
8320 57/push-edi
8321
8322 c7 0/subop/copy *Curr-block-depth 1/imm32
8323 c7 0/subop/copy *Curr-local-stack-offset 0/imm32
8324
8325 8b/-> *(ebp+0xc) 1/r32/ecx
8326
8327 81 5/subop/subtract %esp 0xc00/imm32
8328 68/push 0xc00/imm32/size
8329 68/push 0/imm32/top
8330 89/<- %edx 4/r32/esp
8331
8332 (lookup *ecx *(ecx+4))
8333
8334 (write-buffered *(ebp+8) %eax)
8335 (write-buffered *(ebp+8) ":\n")
8336 (emit-subx-prologue *(ebp+8))
8337
8338 (lookup *(ecx+0x10) *(ecx+0x14))
8339 89/<- %edi 0/r32/eax
8340
8341 (lookup *(ecx+0x18) *(ecx+0x1c))
8342
8343 (emit-subx-block *(ebp+8) %eax %edx %edi)
8344 (emit-subx-epilogue *(ebp+8))
8345
8346
8347 $emit-subx-function:end:
8348
8349 81 0/subop/add %esp 0xc08/imm32
8350
8351 5f/pop-to-edi
8352 5a/pop-to-edx
8353 59/pop-to-ecx
8354 58/pop-to-eax
8355
8356 89/<- %esp 5/r32/ebp
8357 5d/pop-to-ebp
8358 c3/return
8359
8360 populate-mu-type-offsets-in-inouts:
8361
8362 55/push-ebp
8363 89/<- %ebp 4/r32/esp
8364
8365 50/push-eax
8366 51/push-ecx
8367 52/push-edx
8368 53/push-ebx
8369 57/push-edi
8370
8371 ba/copy-to-edx 8/imm32
8372
8373 8b/-> *(ebp+8) 1/r32/ecx
8374 (lookup *(ecx+8) *(ecx+0xc))
8375 89/<- %ecx 0/r32/eax
8376 {
8377 $populate-mu-type-offsets-in-inouts:loop:
8378 81 7/subop/compare %ecx 0/imm32
8379 74/jump-if-= break/disp8
8380
8381 (lookup *ecx *(ecx+4))
8382 89/<- %ebx 0/r32/eax
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393 89/<- *(ebx+0x14) 2/r32/edx
8394
8395 (size-of %ebx)
8396 01/add-to %edx 0/r32/eax
8397
8398 (lookup *(ecx+8) *(ecx+0xc))
8399 89/<- %ecx 0/r32/eax
8400
8401 eb/jump loop/disp8
8402 }
8403 $populate-mu-type-offsets-in-inouts:end:
8404
8405 5f/pop-to-edi
8406 5b/pop-to-ebx
8407 5a/pop-to-edx
8408 59/pop-to-ecx
8409 58/pop-to-eax
8410
8411 89/<- %esp 5/r32/ebp
8412 5d/pop-to-ebp
8413 c3/return
8414
8415 emit-subx-stmt-list:
8416
8417 55/push-ebp
8418 89/<- %ebp 4/r32/esp
8419
8420 50/push-eax
8421 51/push-ecx
8422 53/push-ebx
8423 56/push-esi
8424
8425 8b/-> *(ebp+0xc) 6/r32/esi
8426
8427 {
8428 $emit-subx-stmt-list:loop:
8429 81 7/subop/compare %esi 0/imm32
8430 0f 84/jump-if-= break/disp32
8431
8432 (lookup *esi *(esi+4))
8433 89/<- %ecx 0/r32/eax
8434 {
8435 $emit-subx-stmt-list:check-for-block:
8436 81 7/subop/compare *ecx 0/imm32/block
8437 75/jump-if-!= break/disp8
8438 $emit-subx-stmt-list:block:
8439 (emit-subx-block *(ebp+8) %ecx *(ebp+0x10) *(ebp+0x14))
8440 }
8441 {
8442 $emit-subx-stmt-list:check-for-stmt:
8443 81 7/subop/compare *ecx 1/imm32/stmt1
8444 0f 85/jump-if-!= break/disp32
8445 $emit-subx-stmt-list:stmt1:
8446 {
8447 (is-mu-branch? %ecx)
8448 3d/compare-eax-and 0/imm32/false
8449 0f 84/jump-if-= break/disp32
8450 $emit-subx-stmt-list:branch-stmt:
8451 +-- 27 lines: # unconditional loops ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
8478 +-- 16 lines: # unconditional breaks ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
8494 +-- 38 lines: # simple conditional branches without a target ---------------------------------------------------------------------------------------------------------------------------------------------------
8532 +-- 19 lines: # conditional branches with an explicit target ---------------------------------------------------------------------------------------------------------------------------------------------------
8551 }
8552 $emit-subx-stmt-list:1-to-1:
8553 (emit-subx-stmt *(ebp+8) %ecx Primitives)
8554 e9/jump $emit-subx-stmt-list:continue/disp32
8555 }
8556 {
8557 $emit-subx-stmt-list:check-for-var-def:
8558 81 7/subop/compare *ecx 2/imm32/var-def
8559 75/jump-if-!= break/disp8
8560 $emit-subx-stmt-list:var-def:
8561 (emit-subx-var-def *(ebp+8) %ecx)
8562 (push *(ebp+0x10) *(ecx+4))
8563 (push *(ebp+0x10) *(ecx+8))
8564 (push *(ebp+0x10) 0)
8565
8566 eb/jump $emit-subx-stmt-list:continue/disp8
8567 }
8568 {
8569 $emit-subx-stmt-list:check-for-reg-var-def:
8570 81 7/subop/compare *ecx 3/imm32/reg-var-def
8571 0f 85/jump-if-!= break/disp32
8572 $emit-subx-stmt-list:reg-var-def:
8573
8574 (push-output-and-maybe-emit-spill *(ebp+8) %ecx *(ebp+0x10) %esi *(ebp+0x14))
8575
8576 (emit-subx-stmt *(ebp+8) %ecx Primitives)
8577
8578 eb/jump $emit-subx-stmt-list:continue/disp8
8579 }
8580 $emit-subx-stmt-list:continue:
8581
8582 (lookup *(esi+8) *(esi+0xc))
8583 89/<- %esi 0/r32/eax
8584 e9/jump loop/disp32
8585 }
8586 $emit-subx-stmt-list:emit-cleanup:
8587 (emit-cleanup-code-until-depth *(ebp+8) *(ebp+0x10) *Curr-block-depth)
8588 $emit-subx-stmt-list:clean-up:
8589 (clean-up-blocks *(ebp+0x10) *Curr-block-depth)
8590 $emit-subx-stmt-list:end:
8591
8592 5e/pop-to-esi
8593 5b/pop-to-ebx
8594 59/pop-to-ecx
8595 58/pop-to-eax
8596
8597 89/<- %esp 5/r32/ebp
8598 5d/pop-to-ebp
8599 c3/return
8600
8601
8602 push-output-and-maybe-emit-spill:
8603
8604 55/push-ebp
8605 89/<- %ebp 4/r32/esp
8606
8607 50/push-eax
8608 51/push-ecx
8609 52/push-edx
8610
8611 8b/-> *(ebp+0xc) 1/r32/ecx
8612
8613 (lookup *(ecx+0x14) *(ecx+0x18))
8614
8615
8616 (lookup *eax *(eax+4))
8617 89/<- %ecx 0/r32/eax
8618
8619 8b/-> *Curr-block-depth 0/r32/eax
8620 89/<- *(ecx+0x10) 0/r32/eax
8621
8622
8623
8624
8625
8626
8627
8628
8629 81 7/subop/compare *(ecx+0x18) 0/imm32
8630 0f 84/jump-if-= $push-output-and-maybe-emit-spill:abort/disp32
8631
8632 (not-yet-spilled-this-block? %ecx *(ebp+0x10))
8633 89/<- %edx 0/r32/eax
8634 3d/compare-eax-and 0/imm32/false
8635 0f 84/jump-if-= $push-output-and-maybe-emit-spill:push/disp32
8636 (will-not-write-some-register? %ecx *(ebp+0x14) *(ebp+0x18))
8637 89/<- %edx 0/r32/eax
8638
8639 3d/compare-eax-and 0/imm32/false
8640 0f 84/jump-if-= $push-output-and-maybe-emit-spill:push/disp32
8641
8642
8643 81 5/subop/subtract *Curr-local-stack-offset 4/imm32
8644
8645 (emit-indent *(ebp+8) *Curr-block-depth)
8646 (write-buffered *(ebp+8) "ff 6/subop/push %")
8647 (lookup *(ecx+0x18) *(ecx+0x1c))
8648 (write-buffered *(ebp+8) %eax)
8649 (write-buffered *(ebp+8) Newline)
8650 $push-output-and-maybe-emit-spill:push:
8651 8b/-> *(ebp+0xc) 1/r32/ecx
8652 (lookup *(ecx+0x14) *(ecx+0x18))
8653
8654 (push *(ebp+0x10) *eax)
8655 (push *(ebp+0x10) *(eax+4))
8656 (push *(ebp+0x10) %edx)
8657 $push-output-and-maybe-emit-spill:end:
8658
8659 5a/pop-to-edx
8660 59/pop-to-ecx
8661 58/pop-to-eax
8662
8663 89/<- %esp 5/r32/ebp
8664 5d/pop-to-ebp
8665 c3/return
8666
8667 $push-output-and-maybe-emit-spill:abort:
8668
8669 (write-buffered Stderr "var '")
8670 (write-buffered Stderr *eax)
8671 (write-buffered Stderr "' initialized from an instruction must live in a register\n")
8672 (flush Stderr)
8673
8674 bb/copy-to-ebx 1/imm32
8675 b8/copy-to-eax 1/imm32/exit
8676 cd/syscall 0x80/imm8
8677
8678
8679 emit-subx-cleanup-and-unconditional-nonlocal-branch:
8680
8681 55/push-ebp
8682 89/<- %ebp 4/r32/esp
8683
8684 50/push-eax
8685 51/push-ecx
8686
8687 8b/-> *(ebp+0xc) 1/r32/ecx
8688
8689 (lookup *(ecx+0xc) *(ecx+0x10))
8690 (lookup *eax *(eax+4))
8691 (lookup *eax *(eax+4))
8692
8693 (emit-cleanup-code-until-target *(ebp+8) *(ebp+0x10) %eax)
8694
8695 (emit-indent *(ebp+8) *Curr-block-depth)
8696 (write-buffered *(ebp+8) "e9/jump ")
8697 (write-buffered *(ebp+8) %eax)
8698 (lookup *(ecx+4) *(ecx+8))
8699 (string-starts-with? %eax "break")
8700 3d/compare-eax-and 0/imm32/false
8701 {
8702 74/jump-if-= break/disp8
8703 (write-buffered *(ebp+8) ":break/disp32\n")
8704 }
8705 3d/compare-eax-and 0/imm32/false
8706 {
8707 75/jump-if-!= break/disp8
8708 (write-buffered *(ebp+8) ":loop/disp32\n")
8709 }
8710 $emit-subx-cleanup-and-unconditional-nonlocal-branch:end:
8711
8712 59/pop-to-ecx
8713 58/pop-to-eax
8714
8715 89/<- %esp 5/r32/ebp
8716 5d/pop-to-ebp
8717 c3/return
8718
8719 is-mu-branch?:
8720
8721 55/push-ebp
8722 89/<- %ebp 4/r32/esp
8723
8724 51/push-ecx
8725
8726 8b/-> *(ebp+8) 1/r32/ecx
8727 (lookup *(ecx+4) *(ecx+8))
8728 89/<- %ecx 0/r32/eax
8729
8730 (string-starts-with? %ecx "loop")
8731 3d/compare-eax-and 0/imm32/false
8732 75/jump-if-not-equal $is-mu-branch?:end/disp8
8733
8734 (string-starts-with? %ecx "break")
8735 $is-mu-branch?:end:
8736
8737 59/pop-to-ecx
8738
8739 89/<- %esp 5/r32/ebp
8740 5d/pop-to-ebp
8741 c3/return
8742
8743 emit-reverse-break:
8744
8745 55/push-ebp
8746 89/<- %ebp 4/r32/esp
8747
8748 50/push-eax
8749
8750 8b/-> *(ebp+0xc) 0/r32/eax
8751
8752 (lookup *(eax+4) *(eax+8))
8753 (get Reverse-branch %eax 0x10 "reverse-branch: ")
8754 (emit-indent *(ebp+8) *Curr-block-depth)
8755 (lookup *eax *(eax+4))
8756 (write-buffered *(ebp+8) %eax)
8757 (write-buffered *(ebp+8) " break/disp32\n")
8758 $emit-reverse-break:end:
8759
8760 58/pop-to-eax
8761
8762 89/<- %esp 5/r32/ebp
8763 5d/pop-to-ebp
8764 c3/return
8765
8766 == data
8767
8768
8769 Reverse-branch:
8770
8771 0x140/imm32/write
8772 0/imm32/read
8773 0x140/imm32/size
8774
8775 0x11/imm32/alloc-id _string-break-if-=/imm32 0x11/imm32/alloc-id _string_0f_85_jump_label/imm32
8776 0x11/imm32/alloc-id _string-loop-if-=/imm32 0x11/imm32/alloc-id _string_0f_85_jump_label/imm32
8777 0x11/imm32/alloc-id _string-break-if-!=/imm32 0x11/imm32/alloc-id _string_0f_84_jump_label/imm32
8778 0x11/imm32/alloc-id _string-loop-if-!=/imm32 0x11/imm32/alloc-id _string_0f_84_jump_label/imm32
8779 0x11/imm32/alloc-id _string-break-if-</imm32 0x11/imm32/alloc-id _string_0f_8d_jump_label/imm32
8780 0x11/imm32/alloc-id _string-loop-if-</imm32 0x11/imm32/alloc-id _string_0f_8d_jump_label/imm32
8781 0x11/imm32/alloc-id _string-break-if->/imm32 0x11/imm32/alloc-id _string_0f_8e_jump_label/imm32
8782 0x11/imm32/alloc-id _string-loop-if->/imm32 0x11/imm32/alloc-id _string_0f_8e_jump_label/imm32
8783 0x11/imm32/alloc-id _string-break-if-<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
8784 0x11/imm32/alloc-id _string-loop-if-<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
8785 0x11/imm32/alloc-id _string-break-if->=/imm32 0x11/imm32/alloc-id _string_0f_8c_jump_label/imm32
8786 0x11/imm32/alloc-id _string-loop-if->=/imm32 0x11/imm32/alloc-id _string_0f_8c_jump_label/imm32
8787 0x11/imm32/alloc-id _string-break-if-addr</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
8788 0x11/imm32/alloc-id _string-loop-if-addr</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
8789 0x11/imm32/alloc-id _string-break-if-addr>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
8790 0x11/imm32/alloc-id _string-loop-if-addr>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
8791 0x11/imm32/alloc-id _string-break-if-addr<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
8792 0x11/imm32/alloc-id _string-loop-if-addr<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
8793 0x11/imm32/alloc-id _string-break-if-addr>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
8794 0x11/imm32/alloc-id _string-loop-if-addr>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
8795
8796 == code
8797
8798 emit-unconditional-jump-to-depth:
8799
8800 55/push-ebp
8801 89/<- %ebp 4/r32/esp
8802
8803 50/push-eax
8804 51/push-ecx
8805 52/push-edx
8806 53/push-ebx
8807 56/push-esi
8808
8809 8b/-> *(ebp+0xc) 1/r32/ecx
8810
8811 8b/-> *ecx 0/r32/eax
8812
8813 8d/copy-address *(ecx+eax-4) 6/r32/esi
8814
8815 8d/copy-address *(ecx+8) 1/r32/ecx
8816
8817 8b/-> *(ebp+0x10) 2/r32/edx
8818 {
8819 $emit-unconditional-jump-to-depth:loop:
8820
8821 39/compare %esi 1/r32/ecx
8822 0f 82/jump-if-addr< break/disp32
8823
8824 (lookup *esi *(esi+4))
8825 89/<- %ebx 0/r32/eax
8826
8827 39/compare *(ebx+0x10) 2/r32/edx
8828 0f 8c/jump-if-< break/disp32
8829 {
8830 $emit-unconditional-jump-to-depth:check:
8831
8832 39/compare *(ebx+0x10) 2/r32/edx
8833 0f 85/jump-if-!= break/disp32
8834 $emit-unconditional-jump-to-depth:depth-found:
8835
8836 (size-of %ebx)
8837 3d/compare-eax-and 0/imm32
8838 0f 85/jump-if-!= break/disp32
8839 $emit-unconditional-jump-to-depth:label-found:
8840
8841 (emit-indent *(ebp+8) *Curr-block-depth)
8842 (write-buffered *(ebp+8) "e9/jump ")
8843 (lookup *ebx *(ebx+4))
8844 (write-buffered *(ebp+8) %eax)
8845 (write-buffered *(ebp+8) ":")
8846 (write-buffered *(ebp+8) *(ebp+0x14))
8847 (write-buffered *(ebp+8) "/disp32\n")
8848 eb/jump $emit-unconditional-jump-to-depth:end/disp8
8849 }
8850
8851 81 5/subop/subtract %esi 0xc/imm32
8852 e9/jump loop/disp32
8853 }
8854
8855 $emit-unconditional-jump-to-depth:end:
8856
8857 5e/pop-to-esi
8858 5b/pop-to-ebx
8859 5a/pop-to-edx
8860 59/pop-to-ecx
8861 58/pop-to-eax
8862
8863 89/<- %esp 5/r32/ebp
8864 5d/pop-to-ebp
8865 c3/return
8866
8867
8868
8869 emit-cleanup-code-until-depth:
8870
8871 55/push-ebp
8872 89/<- %ebp 4/r32/esp
8873
8874 50/push-eax
8875 51/push-ecx
8876 52/push-edx
8877 53/push-ebx
8878 56/push-esi
8879
8880
8881
8882 8b/-> *(ebp+0xc) 1/r32/ecx
8883
8884 8b/-> *ecx 6/r32/esi
8885
8886 8d/copy-address *(ecx+esi-4) 6/r32/esi
8887
8888 81 0/subop/add %ecx 8/imm32
8889
8890 8b/-> *(ebp+0x10) 2/r32/edx
8891 {
8892 $emit-cleanup-code-until-depth:loop:
8893
8894 39/compare %esi 1/r32/ecx
8895 0f 82/jump-if-addr< break/disp32
8896
8897 (lookup *esi *(esi+4))
8898 89/<- %ebx 0/r32/eax
8899
8900
8901
8902
8903
8904
8905 39/compare *(ebx+0x10) 2/r32/edx
8906 0f 8c/jump-if-< break/disp32
8907
8908 81 7/subop/compare *(ebx+0x18) 0/imm32
8909 {
8910 0f 84/jump-if-= break/disp32
8911 {
8912 $emit-cleanup-code-until-depth:check-for-previous-spill:
8913 8b/-> *(esi+8) 0/r32/eax
8914 3d/compare-eax-and 0/imm32/false
8915 74/jump-if-= break/disp8
8916 $emit-cleanup-code-until-depth:reclaim-var-in-register:
8917 (emit-indent *(ebp+8) *Curr-block-depth)
8918 (write-buffered *(ebp+8) "8f 0/subop/pop %")
8919 (lookup *(ebx+0x18) *(ebx+0x1c))
8920 (write-buffered *(ebp+8) %eax)
8921 (write-buffered *(ebp+8) Newline)
8922 }
8923 eb/jump $emit-cleanup-code-until-depth:continue/disp8
8924 }
8925
8926 {
8927 75/jump-if-!= break/disp8
8928 $emit-cleanup-code-until-depth:var-on-stack:
8929 (size-of %ebx)
8930
8931 3d/compare-eax-and 0/imm32
8932 74/jump-if-= break/disp8
8933 $emit-cleanup-code-until-depth:reclaim-var-on-stack:
8934 (emit-indent *(ebp+8) *Curr-block-depth)
8935 (write-buffered *(ebp+8) "81 0/subop/add %esp ")
8936 (print-int32-buffered *(ebp+8) %eax)
8937 (write-buffered *(ebp+8) "/imm32\n")
8938 }
8939 $emit-cleanup-code-until-depth:continue:
8940
8941 81 5/subop/subtract %esi 0xc/imm32
8942 e9/jump loop/disp32
8943 }
8944 $emit-cleanup-code-until-depth:end:
8945
8946 5e/pop-to-esi
8947 5b/pop-to-ebx
8948 5a/pop-to-edx
8949 59/pop-to-ecx
8950 58/pop-to-eax
8951
8952 89/<- %esp 5/r32/ebp
8953 5d/pop-to-ebp
8954 c3/return
8955
8956
8957
8958 emit-cleanup-code-until-target:
8959
8960 55/push-ebp
8961 89/<- %ebp 4/r32/esp
8962
8963 50/push-eax
8964 51/push-ecx
8965 52/push-edx
8966 53/push-ebx
8967
8968 8b/-> *(ebp+0xc) 1/r32/ecx
8969
8970 8b/-> *ecx 0/r32/eax
8971
8972 8d/copy-address *(ecx+eax-4) 2/r32/edx
8973
8974 81 0/subop/add %ecx 8/imm32
8975 {
8976 $emit-cleanup-code-until-target:loop:
8977
8978 39/compare %edx 1/r32/ecx
8979 0f 82/jump-if-addr< break/disp32
8980
8981 (lookup *edx *(edx+4))
8982 89/<- %ebx 0/r32/eax
8983
8984 (lookup *ebx *(ebx+4))
8985 (string-equal? %eax *(ebp+0x10))
8986 3d/compare-eax-and 0/imm32/false
8987 0f 85/jump-if-!= break/disp32
8988
8989 81 7/subop/compare *(ebx+0x18) 0/imm32
8990 {
8991 0f 84/jump-if-= break/disp32
8992 {
8993 $emit-cleanup-code-until-target:check-for-previous-spill:
8994 8b/-> *(edx+8) 0/r32/eax
8995 3d/compare-eax-and 0/imm32/false
8996 74/jump-if-= break/disp8
8997 $emit-cleanup-code-until-target:reclaim-var-in-register:
8998 (emit-indent *(ebp+8) *Curr-block-depth)
8999 (write-buffered *(ebp+8) "8f 0/subop/pop %")
9000 (lookup *(ebx+0x18) *(ebx+0x1c))
9001 (write-buffered *(ebp+8) %eax)
9002 (write-buffered *(ebp+8) Newline)
9003 }
9004 eb/jump $emit-cleanup-code-until-target:continue/disp8
9005 }
9006
9007 {
9008 75/jump-if-!= break/disp8
9009 $emit-cleanup-code-until-target:reclaim-var-on-stack:
9010 (size-of %ebx)
9011
9012 3d/compare-eax-and 0/imm32
9013 74/jump-if-= break/disp8
9014
9015 (emit-indent *(ebp+8) *Curr-block-depth)
9016 (write-buffered *(ebp+8) "81 0/subop/add %esp ")
9017 (print-int32-buffered *(ebp+8) %eax)
9018 (write-buffered *(ebp+8) "/imm32\n")
9019 }
9020 $emit-cleanup-code-until-target:continue:
9021
9022 81 5/subop/subtract %edx 0xc/imm32
9023 e9/jump loop/disp32
9024 }
9025 $emit-cleanup-code-until-target:end:
9026
9027 5b/pop-to-ebx
9028 5a/pop-to-edx
9029 59/pop-to-ecx
9030 58/pop-to-eax
9031
9032 89/<- %esp 5/r32/ebp
9033 5d/pop-to-ebp
9034 c3/return
9035
9036
9037
9038
9039 not-yet-spilled-this-block?:
9040
9041 55/push-ebp
9042 89/<- %ebp 4/r32/esp
9043
9044 51/push-ecx
9045 52/push-edx
9046 53/push-ebx
9047 56/push-esi
9048 57/push-edi
9049
9050 8b/-> *(ebp+0xc) 1/r32/ecx
9051
9052 8b/-> *ecx 0/r32/eax
9053
9054 8d/copy-address *(ecx+eax-4) 2/r32/edx
9055
9056 8d/copy-address *(ecx+8) 1/r32/ecx
9057
9058 8b/-> *(ebp+8) 3/r32/ebx
9059 8b/-> *(ebx+0x10) 3/r32/ebx
9060
9061 8b/-> *(ebp+8) 6/r32/esi
9062 (lookup *(esi+0x18) *(esi+0x1c))
9063 89/<- %esi 0/r32/eax
9064 {
9065 $not-yet-spilled-this-block?:loop:
9066
9067 39/compare %edx 1/r32/ecx
9068 0f 82/jump-if-addr< break/disp32
9069
9070 (lookup *edx *(edx+4))
9071 89/<- %edi 0/r32/eax
9072
9073 39/compare *(edi+0x10) 3/r32/ebx
9074 0f 8c/jump-if-< break/disp32
9075
9076 (lookup *(edi+0x18) *(edi+0x1c))
9077 89/<- %edi 0/r32/eax
9078
9079 {
9080 $not-yet-spilled-this-block?:check-reg:
9081 81 7/subop/compare %edi 0/imm32
9082 0f 84/jump-if-= break/disp32
9083
9084 (string-equal? %esi %edi)
9085 3d/compare-eax-and 0/imm32/false
9086 74/jump-if-= break/disp8
9087 $not-yet-spilled-this-block?:return-false:
9088 b8/copy-to-eax 0/imm32/false
9089 eb/jump $not-yet-spilled-this-block?:end/disp8
9090 }
9091 $not-yet-spilled-this-block?:continue:
9092
9093 81 5/subop/subtract %edx 0xc/imm32
9094 e9/jump loop/disp32
9095 }
9096 $not-yet-spilled-this-block?:return-true:
9097
9098 b8/copy-to-eax 1/imm32/true
9099 $not-yet-spilled-this-block?:end:
9100
9101 5f/pop-to-edi
9102 5e/pop-to-esi
9103 5b/pop-to-ebx
9104 5a/pop-to-edx
9105 59/pop-to-ecx
9106
9107 89/<- %esp 5/r32/ebp
9108 5d/pop-to-ebp
9109 c3/return
9110
9111
9112 will-not-write-some-register?:
9113
9114 55/push-ebp
9115 89/<- %ebp 4/r32/esp
9116
9117 8b/-> *(ebp+8) 0/r32/eax
9118
9119 (lookup *(eax+0x18) *(eax+0x1c))
9120
9121 (find-register *(ebp+0x10) %eax)
9122
9123 {
9124 3d/compare-eax-and 0/imm32
9125 75/jump-if-!= break/disp8
9126 b8/copy-to-eax 1/imm32/true
9127 eb/jump $will-not-write-some-register?:end/disp8
9128 }
9129
9130 (assigns-in-stmts? *(ebp+0xc) %eax)
9131 3d/compare-eax-and 0/imm32/false
9132
9133 0f 94/set-if-= %al
9134 $will-not-write-some-register?:end:
9135
9136 89/<- %esp 5/r32/ebp
9137 5d/pop-to-ebp
9138 c3/return
9139
9140
9141
9142 find-register:
9143
9144 55/push-ebp
9145 89/<- %ebp 4/r32/esp
9146
9147 51/push-ecx
9148
9149 8b/-> *(ebp+8) 1/r32/ecx
9150 {
9151 $find-register:loop:
9152
9153 81 7/subop/compare %ecx 0/imm32
9154 74/jump-if-= break/disp8
9155
9156 (lookup *ecx *(ecx+4))
9157 (lookup *(eax+0x18) *(eax+0x1c))
9158
9159 $find-register:compare:
9160 (string-equal? *(ebp+0xc) %eax)
9161 {
9162 3d/compare-eax-and 0/imm32/false
9163 74/jump-if-= break/disp8
9164 $find-register:found:
9165 (lookup *ecx *(ecx+4))
9166 eb/jump $find-register:end/disp8
9167 }
9168
9169 (lookup *(ecx+8) *(ecx+0xc))
9170 89/<- %ecx 0/r32/eax
9171
9172 eb/jump loop/disp8
9173 }
9174 $find-register:end:
9175
9176 59/pop-to-ecx
9177
9178 89/<- %esp 5/r32/ebp
9179 5d/pop-to-ebp
9180 c3/return
9181
9182 assigns-in-stmts?:
9183
9184 55/push-ebp
9185 89/<- %ebp 4/r32/esp
9186
9187 51/push-ecx
9188
9189 8b/-> *(ebp+8) 1/r32/ecx
9190 {
9191
9192 81 7/subop/compare %ecx 0/imm32
9193 74/jump-if-= break/disp8
9194
9195 (lookup *ecx *(ecx+4))
9196 (assigns-in-stmt? %eax *(ebp+0xc))
9197 3d/compare-eax-and 0/imm32/false
9198 75/jump-if-!= break/disp8
9199
9200 (lookup *(ecx+8) *(ecx+0xc))
9201 89/<- %ecx 0/r32/eax
9202
9203 eb/jump loop/disp8
9204 }
9205 $assigns-in-stmts?:end:
9206
9207 59/pop-to-ecx
9208
9209 89/<- %esp 5/r32/ebp
9210 5d/pop-to-ebp
9211 c3/return
9212
9213 assigns-in-stmt?:
9214
9215 55/push-ebp
9216 89/<- %ebp 4/r32/esp
9217
9218 51/push-ecx
9219
9220 8b/-> *(ebp+8) 1/r32/ecx
9221
9222 {
9223 81 7/subop/compare *ecx 1/imm32/stmt1
9224 75/jump-if-!= break/disp8
9225 (lookup *(ecx+0x14) *(ecx+0x18))
9226 (assigns-in-stmt-vars? %eax *(ebp+0xc))
9227 eb/jump $assigns-in-stmt?:end/disp8
9228 }
9229
9230 {
9231 81 7/subop/compare *ecx 0/imm32/block
9232 75/jump-if-!= break/disp8
9233 (lookup *(ecx+4) *(ecx+8))
9234 (assigns-in-stmts? %eax *(ebp+0xc))
9235 eb/jump $assigns-in-stmt?:end/disp8
9236 }
9237
9238 b8/copy 0/imm32/false
9239 $assigns-in-stmt?:end:
9240
9241 59/pop-to-ecx
9242
9243 89/<- %esp 5/r32/ebp
9244 5d/pop-to-ebp
9245 c3/return
9246
9247 assigns-in-stmt-vars?:
9248
9249 55/push-ebp
9250 89/<- %ebp 4/r32/esp
9251
9252 51/push-ecx
9253
9254 8b/-> *(ebp+8) 1/r32/ecx
9255 {
9256
9257 81 7/subop/compare %ecx 0/imm32
9258 74/jump-if-= break/disp8
9259
9260 (lookup *ecx *(ecx+4))
9261
9262 {
9263 39/compare *(ebp+0xc) 0/r32/eax
9264 75/jump-if-!= break/disp8
9265 81 7/subop/compare *(ecx+0x10) 0/imm32/false
9266 75/jump-if-!= break/disp8
9267 b8/copy-to-eax 1/imm32/true
9268 eb/jump $assigns-in-stmt-vars?:end/disp8
9269 }
9270
9271 (lookup *(ecx+8) *(ecx+0xc))
9272 89/<- %ecx 0/r32/eax
9273
9274 eb/jump loop/disp8
9275 }
9276 $assigns-in-stmt-vars?:end:
9277
9278 59/pop-to-ecx
9279
9280 89/<- %esp 5/r32/ebp
9281 5d/pop-to-ebp
9282 c3/return
9283
9284
9285
9286
9287
9288 same-register-spilled-before?:
9289
9290 55/push-ebp
9291 89/<- %ebp 4/r32/esp
9292
9293 51/push-ecx
9294 52/push-edx
9295 53/push-ebx
9296 56/push-esi
9297 57/push-edi
9298
9299 8b/-> *(ebp+8) 1/r32/ecx
9300
9301 (lookup *(ecx+0x18) *(ecx+0x1c))
9302 89/<- %edx 0/r32/eax
9303
9304 8b/-> *(ecx+0x10) 3/r32/ebx
9305
9306 8b/-> *(ebp+0xc) 1/r32/ecx
9307 81 0/subop/add %ecx 8/imm32
9308
9309
9310
9311 8b/-> *(ebp+0x10) 6/r32/esi
9312
9313 81 5/subop/subtract %esi 8/imm32
9314 {
9315 $same-register-spilled-before?:loop:
9316
9317 39/compare %esi 1/r32/ecx
9318 0f 82/jump-if-addr< break/disp32
9319
9320 (lookup *esi *(esi+4))
9321
9322 39/compare *(eax+0x10) 3/r32/ebx
9323 0f 8c/jump-if-< break/disp32
9324
9325 81 7/subop/compare *(eax+0x18) 0/imm32
9326 74/jump-if-= $same-register-spilled-before?:continue/disp8
9327
9328 (lookup *(eax+0x18) *(eax+0x1c))
9329 (string-equal? %eax %edx)
9330 3d/compare-eax-and 0/imm32/false
9331 b8/copy-to-eax 1/imm32/true
9332 75/jump-if-!= $same-register-spilled-before?:end/disp8
9333 $same-register-spilled-before?:continue:
9334
9335 81 5/subop/subtract %esi 8/imm32
9336 e9/jump loop/disp32
9337 }
9338 $same-register-spilled-before?:false:
9339 b8/copy-to-eax 0/imm32/false
9340 $same-register-spilled-before?:end:
9341
9342 5f/pop-to-edi
9343 5e/pop-to-esi
9344 5b/pop-to-ebx
9345 5a/pop-to-edx
9346 59/pop-to-ecx
9347
9348 89/<- %esp 5/r32/ebp
9349 5d/pop-to-ebp
9350 c3/return
9351
9352
9353 clean-up-blocks:
9354
9355 55/push-ebp
9356 89/<- %ebp 4/r32/esp
9357
9358 50/push-eax
9359 51/push-ecx
9360 56/push-esi
9361
9362 8b/-> *(ebp+8) 6/r32/esi
9363
9364 8b/-> *(ebp+0xc) 1/r32/ecx
9365 {
9366 $clean-up-blocks:reclaim-loop:
9367
9368 8b/-> *esi 0/r32/eax
9369 3d/compare-eax-and 0/imm32
9370 0f 8e/jump-if-<= break/disp32
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381 (lookup *(esi+eax-4) *(esi+eax))
9382
9383 39/compare *(eax+0x10) 1/r32/ecx
9384 7c/jump-if-< break/disp8
9385
9386 81 7/subop/compare *(eax+0x18) 0/imm32
9387 {
9388 75/jump-if-!= break/disp8
9389 $clean-up-blocks:reclaim-var-on-stack:
9390 (size-of %eax)
9391 01/add-to *Curr-local-stack-offset 0/r32/eax
9392 }
9393 (pop %esi)
9394 (pop %esi)
9395 (pop %esi)
9396 e9/jump loop/disp32
9397 }
9398 $clean-up-blocks:end:
9399
9400 5e/pop-to-esi
9401 59/pop-to-ecx
9402 58/pop-to-eax
9403
9404 89/<- %esp 5/r32/ebp
9405 5d/pop-to-ebp
9406 c3/return
9407
9408 emit-subx-var-def:
9409
9410 55/push-ebp
9411 89/<- %ebp 4/r32/esp
9412
9413 50/push-eax
9414 51/push-ecx
9415 52/push-edx
9416
9417 8b/-> *(ebp+0xc) 0/r32/eax
9418
9419 (lookup *(eax+4) *(eax+8))
9420 89/<- %ecx 0/r32/eax
9421
9422 8b/-> *Curr-block-depth 0/r32/eax
9423 89/<- *(ecx+0x10) 0/r32/eax
9424
9425 (size-of %ecx)
9426 89/<- %edx 0/r32/eax
9427
9428 29/subtract-from *Curr-local-stack-offset 2/r32/edx
9429
9430 8b/-> *Curr-local-stack-offset 0/r32/eax
9431 89/<- *(ecx+0x14) 0/r32/eax
9432
9433 {
9434 (lookup *(ecx+8) *(ecx+0xc))
9435 (is-mu-array? %eax)
9436 3d/compare-eax-and 0/imm32/false
9437 0f 84/jump-if-= break/disp32
9438
9439 81 5/subop/subtract %edx 4/imm32
9440 (emit-indent *(ebp+8) *Curr-block-depth)
9441 (write-buffered *(ebp+8) "(push-n-zero-bytes ")
9442 (print-int32-buffered *(ebp+8) %edx)
9443 (write-buffered *(ebp+8) ")\n")
9444 (emit-indent *(ebp+8) *Curr-block-depth)
9445 (write-buffered *(ebp+8) "68/push ")
9446 (print-int32-buffered *(ebp+8) %edx)
9447 (write-buffered *(ebp+8) "/imm32\n")
9448 eb/jump $emit-subx-var-def:end/disp8
9449 }
9450
9451 {
9452 81 7/subop/compare %edx 0/imm32
9453 7e/jump-if-<= break/disp8
9454 (emit-indent *(ebp+8) *Curr-block-depth)
9455 (write-buffered *(ebp+8) "68/push 0/imm32\n")
9456
9457 81 5/subop/subtract %edx 4/imm32
9458
9459 eb/jump loop/disp8
9460 }
9461 $emit-subx-var-def:end:
9462
9463 5a/pop-to-edx
9464 59/pop-to-ecx
9465 58/pop-to-eax
9466
9467 89/<- %esp 5/r32/ebp
9468 5d/pop-to-ebp
9469 c3/return
9470
9471 emit-subx-stmt:
9472
9473 55/push-ebp
9474 89/<- %ebp 4/r32/esp
9475
9476 50/push-eax
9477 51/push-ecx
9478
9479
9480 8b/-> *(ebp+0xc) 1/r32/ecx
9481 (lookup *(ecx+4) *(ecx+8))
9482 89/<- %ecx 0/r32/eax
9483
9484 {
9485
9486 (string-equal? %ecx "length")
9487 3d/compare-eax-and 0/imm32
9488 0f 84/jump-if-= break/disp32
9489 (translate-mu-length-stmt *(ebp+8) *(ebp+0xc))
9490 e9/jump $emit-subx-stmt:end/disp32
9491 }
9492
9493 {
9494
9495 (string-equal? %ecx "index")
9496 3d/compare-eax-and 0/imm32
9497 0f 84/jump-if-= break/disp32
9498 (translate-mu-index-stmt *(ebp+8) *(ebp+0xc))
9499 e9/jump $emit-subx-stmt:end/disp32
9500 }
9501
9502 {
9503
9504 (string-equal? %ecx "compute-offset")
9505 3d/compare-eax-and 0/imm32
9506 0f 84/jump-if-= break/disp32
9507 (translate-mu-compute-index-stmt *(ebp+8) *(ebp+0xc))
9508 e9/jump $emit-subx-stmt:end/disp32
9509 }
9510
9511 {
9512
9513 (string-equal? %ecx "get")
9514 3d/compare-eax-and 0/imm32
9515 0f 84/jump-if-= break/disp32
9516 (translate-mu-get-stmt *(ebp+8) *(ebp+0xc))
9517 e9/jump $emit-subx-stmt:end/disp32
9518 }
9519
9520 {
9521 $emit-subx-stmt:check-for-primitive:
9522
9523 (find-matching-primitive *(ebp+0x10) *(ebp+0xc))
9524 3d/compare-eax-and 0/imm32
9525 74/jump-if-= break/disp8
9526 $emit-subx-stmt:primitive:
9527 (emit-subx-primitive *(ebp+8) *(ebp+0xc) %eax)
9528 e9/jump $emit-subx-stmt:end/disp32
9529 }
9530
9531
9532 $emit-subx-stmt:call:
9533 (emit-call *(ebp+8) *(ebp+0xc))
9534 $emit-subx-stmt:end:
9535
9536 59/pop-to-ecx
9537 58/pop-to-eax
9538
9539 89/<- %esp 5/r32/ebp
9540 5d/pop-to-ebp
9541 c3/return
9542
9543 translate-mu-length-stmt:
9544
9545 55/push-ebp
9546 89/<- %ebp 4/r32/esp
9547
9548 50/push-eax
9549 51/push-ecx
9550 52/push-edx
9551 53/push-ebx
9552 56/push-esi
9553
9554 8b/-> *(ebp+0xc) 6/r32/esi
9555
9556 (lookup *(esi+0xc) *(esi+0x10))
9557 (lookup *eax *(eax+4))
9558 89/<- %ebx 0/r32/eax
9559
9560 (array-element-type-id %ebx)
9561 (size-of-type-id %eax)
9562 89/<- %ecx 0/r32/eax
9563
9564 (lookup *(esi+0x14) *(esi+0x18))
9565 (lookup *eax *(eax+4))
9566 (lookup *(eax+0x18) *(eax+0x1c))
9567 89/<- %edx 0/r32/eax
9568
9569 {
9570 81 7/subop/compare %ecx 1/imm32
9571 75/jump-if-!= break/disp8
9572 (emit-save-size-to *(ebp+8) %ebx %edx)
9573 e9/jump $translate-mu-length-stmt:end/disp32
9574 }
9575
9576 {
9577 (power-of-2? %ecx)
9578 3d/compare-eax-and 0/imm32/false
9579 74/jump-if-= break/disp8
9580 81 7/subop/compare %ecx 0xff/imm32
9581 7f/jump-if-> break/disp8
9582 (emit-save-size-to *(ebp+8) %ebx %edx)
9583 (emit-divide-by-shift-right *(ebp+8) %edx %ecx)
9584 e9/jump $translate-mu-length-stmt:end/disp32
9585 }
9586
9587
9588 {
9589 (string-equal? %edx "eax")
9590 3d/compare-eax-and 0/imm32/false
9591 75/break-if-!= break/disp8
9592 (emit-indent *(ebp+8) *Curr-block-depth)
9593 (write-buffered *(ebp+8) "50/push-eax\n")
9594 }
9595 {
9596 (string-equal? %edx "ecx")
9597 3d/compare-eax-and 0/imm32/false
9598 75/break-if-!= break/disp8
9599 (emit-indent *(ebp+8) *Curr-block-depth)
9600 (write-buffered *(ebp+8) "51/push-ecx\n")
9601 }
9602 {
9603 (string-equal? %edx "edx")
9604 3d/compare-eax-and 0/imm32/false
9605 75/break-if-!= break/disp8
9606 (emit-indent *(ebp+8) *Curr-block-depth)
9607 (write-buffered *(ebp+8) "52/push-edx\n")
9608 }
9609
9610 (emit-save-size-to *(ebp+8) %ebx "eax")
9611 (emit-indent *(ebp+8) *Curr-block-depth)
9612 (write-buffered *(ebp+8) "31/xor %edx 2/r32/edx\n")
9613 (emit-indent *(ebp+8) *Curr-block-depth)
9614 (write-buffered *(ebp+8) "b9/copy-to-ecx ")
9615 (print-int32-buffered *(ebp+8) %ecx)
9616 (write-buffered *(ebp+8) "/imm32\n")
9617 (emit-indent *(ebp+8) *Curr-block-depth)
9618 (write-buffered *(ebp+8) "f7 7/subop/idiv-eax-edx-by %ecx\n")
9619 {
9620 (string-equal? %edx "eax")
9621 3d/compare-eax-and 0/imm32/false
9622 75/break-if-!= break/disp8
9623 (emit-indent *(ebp+8) *Curr-block-depth)
9624 (write-buffered *(ebp+8) "89/<- %")
9625 (write-buffered *(ebp+8) %edx)
9626 (write-buffered *(ebp+8) " 0/r32/eax\n")
9627 }
9628
9629 {
9630 (string-equal? %edx "edx")
9631 3d/compare-eax-and 0/imm32/false
9632 75/break-if-!= break/disp8
9633 (emit-indent *(ebp+8) *Curr-block-depth)
9634 (write-buffered *(ebp+8) "5a/pop-to-edx\n")
9635 }
9636 {
9637 (string-equal? %edx "ecx")
9638 3d/compare-eax-and 0/imm32/false
9639 75/break-if-!= break/disp8
9640 (emit-indent *(ebp+8) *Curr-block-depth)
9641 (write-buffered *(ebp+8) "59/pop-to-ecx\n")
9642 }
9643 {
9644 (string-equal? %edx "eax")
9645 3d/compare-eax-and 0/imm32/false
9646 75/break-if-!= break/disp8
9647 (emit-indent *(ebp+8) *Curr-block-depth)
9648 (write-buffered *(ebp+8) "58/pop-to-eax\n")
9649 }
9650 $translate-mu-length-stmt:end:
9651
9652 5e/pop-to-esi
9653 5b/pop-to-ebx
9654 5a/pop-to-edx
9655 59/pop-to-ecx
9656 58/pop-to-eax
9657
9658 89/<- %esp 5/r32/ebp
9659 5d/pop-to-ebp
9660 c3/return
9661
9662 emit-save-size-to:
9663
9664 55/push-ebp
9665 89/<- %ebp 4/r32/esp
9666
9667 50/push-eax
9668 53/push-ebx
9669
9670 8b/-> *(ebp+0xc) 3/r32/ebx
9671 (emit-indent *(ebp+8) *Curr-block-depth)
9672 (write-buffered *(ebp+8) "8b/-> *")
9673
9674 {
9675 81 7/subop/compare *(ebx+0x18)) 0/imm32
9676 74/jump-if-= break/disp8
9677 $emit-save-size-to:emit-base-from-register:
9678 (lookup *(ebx+0x18) *(ebx+0x1c))
9679 (write-buffered *(ebp+8) %eax)
9680 eb/jump $emit-save-size-to:emit-output/disp8
9681 }
9682
9683 {
9684 81 7/subop/compare *(ebx+0x14)) 0/imm32
9685 74/jump-if-= break/disp8
9686 $emit-save-size-to:emit-base-from-stack:
9687 (write-buffered *(ebp+8) "(ebp+")
9688 (print-int32-buffered *(ebp+8) *(ebx+0x14))
9689 (write-buffered *(ebp+8) ")")
9690 }
9691 $emit-save-size-to:emit-output:
9692 (write-buffered *(ebp+8) " ")
9693 (get Registers *(ebp+0x10) 0xc "Registers")
9694 (print-int32-buffered *(ebp+8) *eax)
9695 (write-buffered *(ebp+8) "/r32\n")
9696 $emit-save-size-to:end:
9697
9698 5b/pop-to-ebx
9699 58/pop-to-eax
9700
9701 89/<- %esp 5/r32/ebp
9702 5d/pop-to-ebp
9703 c3/return
9704
9705 emit-divide-by-shift-right:
9706
9707 55/push-ebp
9708 89/<- %ebp 4/r32/esp
9709
9710 50/push-eax
9711
9712 (emit-indent *(ebp+8) *Curr-block-depth)
9713 (write-buffered *(ebp+8) "c1/shift 5/subop/>> %")
9714 (write-buffered *(ebp+8) *(ebp+0xc))
9715 (write-buffered *(ebp+8) Space)
9716 (num-shift-rights *(ebp+0x10))
9717 (print-int32-buffered *(ebp+8) %eax)
9718 (write-buffered *(ebp+8) "/imm8\n")
9719 $emit-divide-by-shift-right:end:
9720
9721 58/pop-to-eax
9722
9723 89/<- %esp 5/r32/ebp
9724 5d/pop-to-ebp
9725 c3/return
9726
9727 translate-mu-index-stmt:
9728
9729 55/push-ebp
9730 89/<- %ebp 4/r32/esp
9731
9732 51/push-ecx
9733
9734 8b/-> *(ebp+0xc) 1/r32/ecx
9735
9736 (lookup *(ecx+0xc) *(ecx+0x10))
9737 (lookup *eax *(eax+4))
9738 89/<- %ecx 0/r32/eax
9739
9740 {
9741 81 7/subop/compare *(ecx+0x18) 0/imm32
9742 74/jump-if-= break/disp8
9743
9744 (translate-mu-index-stmt-with-array-in-register *(ebp+8) *(ebp+0xc))
9745 eb/jump $translate-mu-index-stmt:end/disp8
9746 }
9747
9748 {
9749 81 7/subop/compare *(ecx+0x14) 0/imm32
9750 74/jump-if-= break/disp8
9751
9752 (translate-mu-index-stmt-with-array-on-stack *(ebp+8) *(ebp+0xc))
9753 eb/jump $translate-mu-index-stmt:end/disp8
9754 }
9755 $translate-mu-index-stmt:end:
9756
9757 59/pop-to-ecx
9758
9759 89/<- %esp 5/r32/ebp
9760 5d/pop-to-ebp
9761 c3/return
9762
9763 $translate-mu-index-stmt-with-array:error1:
9764 (write-buffered Stderr "couldn't translate an index instruction. second (index) input must either lie in a register or be a literal\n")
9765 (flush Stderr)
9766
9767 bb/copy-to-ebx 1/imm32
9768 b8/copy-to-eax 1/imm32/exit
9769 cd/syscall 0x80/imm8
9770
9771
9772 $translate-mu-index-stmt-with-array:error2:
9773 (write-buffered Stderr "couldn't translate an index instruction. second (index) input when in a register must be an int or offset\n")
9774 (flush Stderr)
9775
9776 bb/copy-to-ebx 1/imm32
9777 b8/copy-to-eax 1/imm32/exit
9778 cd/syscall 0x80/imm8
9779
9780
9781 translate-mu-index-stmt-with-array-in-register:
9782
9783 55/push-ebp
9784 89/<- %ebp 4/r32/esp
9785
9786 50/push-eax
9787 51/push-ecx
9788 52/push-edx
9789 53/push-ebx
9790
9791 (emit-indent *(ebp+8) *Curr-block-depth)
9792 (write-buffered *(ebp+8) "8d/copy-address *(")
9793
9794 $translate-mu-index-stmt-with-array-in-register:emit-base:
9795
9796 8b/-> *(ebp+0xc) 1/r32/ecx
9797
9798 (lookup *(ecx+0xc) *(ecx+0x10))
9799 (lookup *eax *(eax+4))
9800 89/<- %ebx 0/r32/eax
9801
9802 (lookup *(ebx+0x18) *(ebx+0x1c))
9803 (write-buffered *(ebp+8) %eax)
9804 (write-buffered *(ebp+8) " + ")
9805
9806 (lookup *(ecx+0xc) *(ecx+0x10))
9807 (lookup *(eax+8) *(eax+0xc))
9808 (lookup *eax *(eax+4))
9809 89/<- %edx 0/r32/eax
9810
9811 81 7/subop/compare *(edx+0x18) 0/imm32
9812 {
9813 0f 84/jump-if-= break/disp32
9814 $translate-mu-index-stmt-with-array-in-register:emit-register-index:
9815
9816 (lookup *(edx+8) *(edx+0xc))
9817 (is-simple-mu-type? %eax 1)
9818 3d/compare-eax-and 0/imm32/false
9819 {
9820 0f 84/jump-if-= break/disp32
9821 $translate-mu-index-stmt-with-array-in-register:emit-int-register-index:
9822
9823
9824 (lookup *(edx+0x18) *(edx+0x1c))
9825 (write-buffered *(ebp+8) %eax)
9826 (write-buffered *(ebp+8) "<<")
9827
9828
9829 (array-element-type-id %ebx)
9830 (size-of-type-id %eax)
9831 (num-shift-rights %eax)
9832 (print-int32-buffered *(ebp+8) %eax)
9833 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-register-index-done/disp32
9834 }
9835
9836 (lookup *(edx+8) *(edx+0xc))
9837 81 7/subop/compare *eax 0/imm32/false
9838 0f 85/jump-if-!= $translate-mu-index-stmt-with-array:error2/disp32
9839
9840 (lookup *(eax+4) *(eax+8))
9841 (is-simple-mu-type? %eax 7)
9842 3d/compare-eax-and 0/imm32/false
9843 {
9844 0f 84/jump-if-= break/disp32
9845
9846 $translate-mu-index-stmt-with-array-in-register:emit-offset-register-index:
9847 (lookup *(edx+0x18) *(edx+0x1c))
9848 (write-buffered *(ebp+8) %eax)
9849 }
9850 $translate-mu-index-stmt-with-array-in-register:emit-register-index-done:
9851 (write-buffered *(ebp+8) " + 4) ")
9852 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-output/disp32
9853 }
9854
9855 (lookup *(edx+8) *(edx+0xc))
9856 (is-simple-mu-type? %eax 0)
9857 3d/compare-eax-and 0/imm32/false
9858 {
9859 0f 84/jump-if-= break/disp32
9860 $translate-mu-index-stmt-with-array-in-register:emit-literal-index:
9861
9862 (lookup *edx *(edx+4))
9863 (parse-hex-int %eax)
9864 89/<- %edx 0/r32/eax
9865
9866 (array-element-type-id %ebx)
9867 (size-of-type-id %eax)
9868 f7 4/subop/multiply-into-eax %edx
9869
9870 05/add-to-eax 4/imm32
9871
9872
9873 (print-int32-buffered *(ebp+8) %eax)
9874 (write-buffered *(ebp+8) ") ")
9875 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-output/disp32
9876 }
9877
9878 e9/jump $translate-mu-index-stmt-with-array:error1/disp32
9879 $translate-mu-index-stmt-with-array-in-register:emit-output:
9880
9881 8b/-> *(ebp+0xc) 1/r32/ecx
9882 (lookup *(ecx+0x14) *(ecx+0x18))
9883 (lookup *eax *(eax+4))
9884 (lookup *(eax+0x18) *(eax+0x1c))
9885 (get Registers %eax 0xc "Registers")
9886 (print-int32-buffered *(ebp+8) *eax)
9887 (write-buffered *(ebp+8) "/r32\n")
9888 $translate-mu-index-stmt-with-array-in-register:end:
9889
9890 5b/pop-to-ebx
9891 5a/pop-to-edx
9892 59/pop-to-ecx
9893 58/pop-to-eax
9894
9895 89/<- %esp 5/r32/ebp
9896 5d/pop-to-ebp
9897 c3/return
9898
9899 translate-mu-index-stmt-with-array-on-stack:
9900
9901 55/push-ebp
9902 89/<- %ebp 4/r32/esp
9903
9904 50/push-eax
9905 51/push-ecx
9906 52/push-edx
9907 53/push-ebx
9908
9909 (emit-indent *(ebp+8) *Curr-block-depth)
9910 (write-buffered *(ebp+8) "8d/copy-address *(ebp + ")
9911
9912 8b/-> *(ebp+0xc) 0/r32/eax
9913 (lookup *(eax+0xc) *(eax+0x10))
9914 89/<- %edx 0/r32/eax
9915
9916 (lookup *eax *(eax+4))
9917 89/<- %ecx 0/r32/eax
9918
9919 (lookup *(edx+8) *(edx+0xc))
9920
9921 (lookup *eax *(eax+4))
9922 89/<- %edx 0/r32/eax
9923
9924 81 7/subop/compare *(edx+0x18) 0/imm32
9925 {
9926 0f 84/jump-if-= break/disp32
9927 $translate-mu-index-stmt-with-array-on-stack:emit-register-index:
9928
9929 (lookup *(edx+8) *(edx+0xc))
9930 (is-simple-mu-type? %eax 1)
9931 3d/compare-eax-and 0/imm32/false
9932 {
9933 0f 84/jump-if-= break/disp32
9934 $translate-mu-index-stmt-with-array-on-stack:emit-int-register-index:
9935
9936
9937 (lookup *(edx+0x18) *(edx+0x1c))
9938 (write-buffered *(ebp+8) %eax)
9939 (write-buffered *(ebp+8) "<<")
9940
9941
9942 (array-element-type-id %ecx)
9943 (size-of-type-id %eax)
9944 (num-shift-rights %eax)
9945 (print-int32-buffered *(ebp+8) %eax)
9946
9947 (write-buffered *(ebp+8) " + ")
9948
9949 8b/-> *(ecx+0x14) 0/r32/eax
9950 05/add-to-eax 4/imm32
9951 (print-int32-buffered *(ebp+8) %eax)
9952 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-register-index-done/disp32
9953 }
9954
9955 (lookup *(edx+8) *(edx+0xc))
9956 81 7/subop/compare *eax 0/imm32/false
9957 0f 85/jump-if-!= $translate-mu-index-stmt-with-array:error2/disp32
9958
9959 (lookup *(eax+4) *(eax+8))
9960 (is-simple-mu-type? %eax 7)
9961 3d/compare-eax-and 0/imm32/false
9962 {
9963 0f 84/jump-if-= break/disp32
9964
9965 $translate-mu-index-stmt-with-array-on-stack:emit-offset-register-index:
9966 (lookup *(edx+0x18) *(edx+0x1c))
9967 (write-buffered *(ebp+8) %eax)
9968 }
9969 $translate-mu-index-stmt-with-array-on-stack:emit-register-index-done:
9970 (write-buffered *(ebp+8) ") ")
9971 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-output/disp32
9972 }
9973
9974 (lookup *(edx+8) *(edx+0xc))
9975 (is-simple-mu-type? %eax 0)
9976 3d/compare-eax-and 0/imm32/false
9977 {
9978 0f 84/jump-if-= break/disp32
9979 $translate-mu-index-stmt-with-array-on-stack:emit-literal-index:
9980
9981 (lookup *edx *(edx+4))
9982 (parse-hex-int %eax)
9983 89/<- %edx 0/r32/eax
9984
9985 (array-element-type-id %ecx)
9986 (size-of-type-id %eax)
9987 f7 4/subop/multiply-into-eax %edx
9988
9989 03/add *(ecx+0x14) 0/r32/eax
9990
9991 05/add-to-eax 4/imm32
9992
9993
9994 (print-int32-buffered *(ebp+8) %eax)
9995 (write-buffered *(ebp+8) ") ")
9996 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-output/disp32
9997 }
9998
9999 e9/jump $translate-mu-index-stmt-with-array:error1/disp32
10000 $translate-mu-index-stmt-with-array-on-stack:emit-output:
10001
10002 8b/-> *(ebp+0xc) 0/r32/eax
10003 (lookup *(eax+0x14) *(eax+0x18))
10004 (lookup *eax *(eax+4))
10005 (lookup *(eax+0x18) *(eax+0x1c))
10006 (get Registers %eax 0xc "Registers")
10007 (print-int32-buffered *(ebp+8) *eax)
10008 (write-buffered *(ebp+8) "/r32\n")
10009 $translate-mu-index-stmt-with-array-on-stack:end:
10010
10011 5b/pop-to-ebx
10012 5a/pop-to-edx
10013 59/pop-to-ecx
10014 58/pop-to-eax
10015
10016 89/<- %esp 5/r32/ebp
10017 5d/pop-to-ebp
10018 c3/return
10019
10020 translate-mu-compute-index-stmt:
10021
10022 55/push-ebp
10023 89/<- %ebp 4/r32/esp
10024
10025 50/push-eax
10026 51/push-ecx
10027 52/push-edx
10028 53/push-ebx
10029
10030 (emit-indent *(ebp+8) *Curr-block-depth)
10031 (write-buffered *(ebp+8) "69/multiply")
10032
10033 8b/-> *(ebp+0xc) 1/r32/ecx
10034
10035 (lookup *(ecx+0xc) *(ecx+0x10))
10036 89/<- %ebx 0/r32/eax
10037 $translate-mu-compute-index-stmt:emit-index:
10038 (lookup *(ebx+8) *(ebx+0xc))
10039 (emit-subx-var-as-rm32 *(ebp+8) %eax)
10040 (write-buffered *(ebp+8) Space)
10041 $translate-mu-compute-index-stmt:emit-elem-size:
10042
10043 (lookup *ebx *(ebx+4))
10044 89/<- %ebx 0/r32/eax
10045
10046 (array-element-type-id %ebx)
10047 (size-of-type-id %eax)
10048 (print-int32-buffered *(ebp+8) %eax)
10049 (write-buffered *(ebp+8) "/imm32 ")
10050 $translate-mu-compute-index-stmt:emit-output:
10051
10052 (lookup *(ecx+0x14) *(ecx+0x18))
10053 (lookup *eax *(eax+4))
10054 (lookup *(eax+0x18) *(eax+0x1c))
10055 (get Registers %eax 0xc "Registers")
10056 (print-int32-buffered *(ebp+8) *eax)
10057 (write-buffered *(ebp+8) "/r32\n")
10058 $translate-mu-compute-index-stmt:end:
10059
10060 5b/pop-to-ebx
10061 5a/pop-to-edx
10062 59/pop-to-ecx
10063 58/pop-to-eax
10064
10065 89/<- %esp 5/r32/ebp
10066 5d/pop-to-ebp
10067 c3/return
10068
10069 translate-mu-get-stmt:
10070
10071 55/push-ebp
10072 89/<- %ebp 4/r32/esp
10073
10074 50/push-eax
10075 51/push-ecx
10076 52/push-edx
10077
10078 (emit-indent *(ebp+8) *Curr-block-depth)
10079 (write-buffered *(ebp+8) "8d/copy-address ")
10080
10081 8b/-> *(ebp+0xc) 1/r32/ecx
10082
10083 (mu-get-offset %ecx)
10084 89/<- %edx 0/r32/eax
10085
10086 (lookup *(ecx+0xc) *(ecx+0x10))
10087 (lookup *eax *(eax+4))
10088
10089 81 7/subop/compare *(eax+0x18) 0/imm32
10090 {
10091 0f 84/jump-if-= break/disp32
10092 $translate-mu-get-stmt:emit-register-input:
10093
10094 (write-buffered *(ebp+8) "*(")
10095 (lookup *(eax+0x18) *(eax+0x1c))
10096 (write-buffered *(ebp+8) %eax)
10097 (write-buffered *(ebp+8) " + ")
10098 (print-int32-buffered *(ebp+8) %edx)
10099 (write-buffered *(ebp+8) ") ")
10100 e9/jump $translate-mu-get-stmt:emit-output/disp32
10101 }
10102
10103 {
10104 $translate-mu-get-stmt:emit-stack-input:
10105
10106 (write-buffered *(ebp+8) "*(ebp+")
10107 03/add *(eax+0x14) 2/r32/edx
10108 (print-int32-buffered *(ebp+8) %edx)
10109 (write-buffered *(ebp+8) ") ")
10110 eb/jump $translate-mu-get-stmt:emit-output/disp8
10111 }
10112 $translate-mu-get-stmt:emit-output:
10113
10114 (lookup *(ecx+0x14) *(ecx+0x18))
10115 (lookup *eax *(eax+4))
10116
10117 (lookup *(eax+0x18) *(eax+0x1c))
10118 (get Registers %eax 0xc "Registers")
10119 (print-int32-buffered *(ebp+8) *eax)
10120 (write-buffered *(ebp+8) "/r32\n")
10121 $translate-mu-get-stmt:end:
10122
10123 5a/pop-to-edx
10124 59/pop-to-ecx
10125 58/pop-to-eax
10126
10127 89/<- %esp 5/r32/ebp
10128 5d/pop-to-ebp
10129 c3/return
10130
10131 array-element-type-id:
10132
10133
10134 55/push-ebp
10135 89/<- %ebp 4/r32/esp
10136
10137 8b/-> *(ebp+8) 0/r32/eax
10138 (lookup *(eax+8) *(eax+0xc))
10139
10140 (lookup *(eax+0xc) *(eax+0x10))
10141
10142
10143 (lookup *(eax+0xc) *(eax+0x10))
10144
10145 (lookup *(eax+4) *(eax+8))
10146 8b/-> *(eax+4) 0/r32/eax
10147 $array-element-type-id:end:
10148
10149 89/<- %esp 5/r32/ebp
10150 5d/pop-to-ebp
10151 c3/return
10152
10153 power-of-2?:
10154
10155
10156 55/push-ebp
10157 89/<- %ebp 4/r32/esp
10158
10159 8b/-> *(ebp+8) 0/r32/eax
10160
10161 3d/compare-eax-with 0/imm32
10162 0f 8c/jump-if-< $power-of-2?:abort/disp32
10163
10164 48/decrement-eax
10165
10166 23/and-> *(ebp+8) 0/r32/eax
10167
10168 3d/compare-eax-and 0/imm32
10169 0f 94/set-byte-if-= %al
10170 81 4/subop/and %eax 0xff/imm32
10171 $power-of-2?:end:
10172
10173 89/<- %esp 5/r32/ebp
10174 5d/pop-to-ebp
10175 c3/return
10176
10177 $power-of-2?:abort:
10178 (write-buffered Stderr "power-of-2?: negative number\n")
10179 (flush Stderr)
10180
10181 bb/copy-to-ebx 1/imm32
10182 b8/copy-to-eax 1/imm32/exit
10183 cd/syscall 0x80/imm8
10184
10185
10186 num-shift-rights:
10187
10188
10189 55/push-ebp
10190 89/<- %ebp 4/r32/esp
10191
10192 51/push-ecx
10193
10194 8b/-> *(ebp+8) 1/r32/ecx
10195
10196 b8/copy-to-eax 0/imm32
10197 {
10198
10199 81 7/subop/compare %ecx 1/imm32
10200 7e/jump-if-<= break/disp8
10201 40/increment-eax
10202 c1/shift 5/subop/arithmetic-right %ecx 1/imm8
10203 eb/jump loop/disp8
10204 }
10205 $num-shift-rights:end:
10206
10207 59/pop-to-ecx
10208
10209 89/<- %esp 5/r32/ebp
10210 5d/pop-to-ebp
10211 c3/return
10212
10213 mu-get-offset:
10214
10215 55/push-ebp
10216 89/<- %ebp 4/r32/esp
10217
10218 8b/-> *(ebp+8) 0/r32/eax
10219 (lookup *(eax+0xc) *(eax+0x10))
10220 (lookup *(eax+8) *(eax+0xc))
10221
10222 (lookup *eax *(eax+4))
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233 8b/-> *(eax+0x14) 0/r32/eax
10234
10235
10236
10237
10238 $emit-get-offset:end:
10239
10240 89/<- %esp 5/r32/ebp
10241 5d/pop-to-ebp
10242 c3/return
10243
10244 emit-subx-block:
10245
10246 55/push-ebp
10247 89/<- %ebp 4/r32/esp
10248
10249 50/push-eax
10250 51/push-ecx
10251 56/push-esi
10252
10253 8b/-> *(ebp+0xc) 6/r32/esi
10254
10255 (lookup *(esi+0xc) *(esi+0x10))
10256 8b/-> *Curr-block-depth 1/r32/ecx
10257 89/<- *(eax+0x10) 1/r32/ecx
10258
10259 (lookup *(esi+4) *(esi+8))
10260
10261 {
10262 $emit-subx-block:check-empty:
10263 3d/compare-eax-and 0/imm32
10264 0f 84/jump-if-= break/disp32
10265 (emit-indent *(ebp+8) *Curr-block-depth)
10266 (write-buffered *(ebp+8) "{\n")
10267
10268 (lookup *(esi+0xc) *(esi+0x10))
10269 89/<- %ecx 0/r32/eax
10270
10271 (lookup *ecx *(ecx+4))
10272 (write-buffered *(ebp+8) %eax)
10273 (write-buffered *(ebp+8) ":loop:\n")
10274 ff 0/subop/increment *Curr-block-depth
10275 (push *(ebp+0x10) *(esi+0xc))
10276 (push *(ebp+0x10) *(esi+0x10))
10277 (push *(ebp+0x10) 0)
10278
10279 (lookup *(esi+4) *(esi+8))
10280 (emit-subx-stmt-list *(ebp+8) %eax *(ebp+0x10) *(ebp+0x14))
10281 (pop *(ebp+0x10))
10282 (pop *(ebp+0x10))
10283 (pop *(ebp+0x10))
10284 ff 1/subop/decrement *Curr-block-depth
10285 (emit-indent *(ebp+8) *Curr-block-depth)
10286 (write-buffered *(ebp+8) "}\n")
10287 (lookup *ecx *(ecx+4))
10288 (write-buffered *(ebp+8) %eax)
10289 (write-buffered *(ebp+8) ":break:\n")
10290 }
10291 $emit-subx-block:end:
10292
10293 5e/pop-to-esi
10294 59/pop-to-ecx
10295 58/pop-to-eax
10296
10297 89/<- %esp 5/r32/ebp
10298 5d/pop-to-ebp
10299 c3/return
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350 == data
10351 Primitives:
10352
10353 _Primitive-increment-eax:
10354
10355 0x11/imm32/alloc-id:fake
10356 _string-increment/imm32/name
10357 0/imm32/no-inouts
10358 0/imm32/no-inouts
10359 0x11/imm32/alloc-id:fake
10360 Single-int-var-in-eax/imm32/outputs
10361 0x11/imm32/alloc-id:fake
10362 _string_40_increment_eax/imm32/subx-name
10363 0/imm32/no-rm32
10364 0/imm32/no-r32
10365 0/imm32/no-imm32
10366 0/imm32/no-disp32
10367 0/imm32/output-is-write-only
10368 0x11/imm32/alloc-id:fake
10369 _Primitive-increment-ecx/imm32/next
10370 _Primitive-increment-ecx:
10371 0x11/imm32/alloc-id:fake:payload
10372
10373 0x11/imm32/alloc-id:fake
10374 _string-increment/imm32/name
10375 0/imm32/no-inouts
10376 0/imm32/no-inouts
10377 0x11/imm32/alloc-id:fake
10378 Single-int-var-in-ecx/imm32/outputs
10379 0x11/imm32/alloc-id:fake
10380 _string_41_increment_ecx/imm32/subx-name
10381 0/imm32/no-rm32
10382 0/imm32/no-r32
10383 0/imm32/no-imm32
10384 0/imm32/no-disp32
10385 0/imm32/output-is-write-only
10386 0x11/imm32/alloc-id:fake
10387 _Primitive-increment-edx/imm32/next
10388 _Primitive-increment-edx:
10389 0x11/imm32/alloc-id:fake:payload
10390
10391 0x11/imm32/alloc-id:fake
10392 _string-increment/imm32/name
10393 0/imm32/no-inouts
10394 0/imm32/no-inouts
10395 0x11/imm32/alloc-id:fake
10396 Single-int-var-in-edx/imm32/outputs
10397 0x11/imm32/alloc-id:fake
10398 _string_42_increment_edx/imm32/subx-name
10399 0/imm32/no-rm32
10400 0/imm32/no-r32
10401 0/imm32/no-imm32
10402 0/imm32/no-disp32
10403 0/imm32/output-is-write-only
10404 0x11/imm32/alloc-id:fake
10405 _Primitive-increment-ebx/imm32/next
10406 _Primitive-increment-ebx:
10407 0x11/imm32/alloc-id:fake:payload
10408
10409 0x11/imm32/alloc-id:fake
10410 _string-increment/imm32/name
10411 0/imm32/no-inouts
10412 0/imm32/no-inouts
10413 0x11/imm32/alloc-id:fake
10414 Single-int-var-in-ebx/imm32/outputs
10415 0x11/imm32/alloc-id:fake
10416 _string_43_increment_ebx/imm32/subx-name
10417 0/imm32/no-rm32
10418 0/imm32/no-r32
10419 0/imm32/no-imm32
10420 0/imm32/no-disp32
10421 0/imm32/output-is-write-only
10422 0x11/imm32/alloc-id:fake
10423 _Primitive-increment-esi/imm32/next
10424 _Primitive-increment-esi:
10425 0x11/imm32/alloc-id:fake:payload
10426
10427 0x11/imm32/alloc-id:fake
10428 _string-increment/imm32/name
10429 0/imm32/no-inouts
10430 0/imm32/no-inouts
10431 0x11/imm32/alloc-id:fake
10432 Single-int-var-in-esi/imm32/outputs
10433 0x11/imm32/alloc-id:fake
10434 _string_46_increment_esi/imm32/subx-name
10435 0/imm32/no-rm32
10436 0/imm32/no-r32
10437 0/imm32/no-imm32
10438 0/imm32/no-disp32
10439 0/imm32/output-is-write-only
10440 0x11/imm32/alloc-id:fake
10441 _Primitive-increment-edi/imm32/next
10442 _Primitive-increment-edi:
10443 0x11/imm32/alloc-id:fake:payload
10444
10445 0x11/imm32/alloc-id:fake
10446 _string-increment/imm32/name
10447 0/imm32/no-inouts
10448 0/imm32/no-inouts
10449 0x11/imm32/alloc-id:fake
10450 Single-int-var-in-edi/imm32/outputs
10451 0x11/imm32/alloc-id:fake
10452 _string_47_increment_edi/imm32/subx-name
10453 0/imm32/no-rm32
10454 0/imm32/no-r32
10455 0/imm32/no-imm32
10456 0/imm32/no-disp32
10457 0/imm32/output-is-write-only
10458 0x11/imm32/alloc-id:fake
10459 _Primitive-decrement-eax/imm32/next
10460 _Primitive-decrement-eax:
10461 0x11/imm32/alloc-id:fake:payload
10462
10463 0x11/imm32/alloc-id:fake
10464 _string-decrement/imm32/name
10465 0/imm32/no-inouts
10466 0/imm32/no-inouts
10467 0x11/imm32/alloc-id:fake
10468 Single-int-var-in-eax/imm32/outputs
10469 0x11/imm32/alloc-id:fake
10470 _string_48_decrement_eax/imm32/subx-name
10471 0/imm32/no-rm32
10472 0/imm32/no-r32
10473 0/imm32/no-imm32
10474 0/imm32/no-disp32
10475 0/imm32/output-is-write-only
10476 0x11/imm32/alloc-id:fake
10477 _Primitive-decrement-ecx/imm32/next
10478 _Primitive-decrement-ecx:
10479 0x11/imm32/alloc-id:fake:payload
10480
10481 0x11/imm32/alloc-id:fake
10482 _string-decrement/imm32/name
10483 0/imm32/no-inouts
10484 0/imm32/no-inouts
10485 0x11/imm32/alloc-id:fake
10486 Single-int-var-in-ecx/imm32/outputs
10487 0x11/imm32/alloc-id:fake
10488 _string_49_decrement_ecx/imm32/subx-name
10489 0/imm32/no-rm32
10490 0/imm32/no-r32
10491 0/imm32/no-imm32
10492 0/imm32/no-disp32
10493 0/imm32/output-is-write-only
10494 0x11/imm32/alloc-id:fake
10495 _Primitive-decrement-edx/imm32/next
10496 _Primitive-decrement-edx:
10497 0x11/imm32/alloc-id:fake:payload
10498
10499 0x11/imm32/alloc-id:fake
10500 _string-decrement/imm32/name
10501 0/imm32/no-inouts
10502 0/imm32/no-inouts
10503 0x11/imm32/alloc-id:fake
10504 Single-int-var-in-edx/imm32/outputs
10505 0x11/imm32/alloc-id:fake
10506 _string_4a_decrement_edx/imm32/subx-name
10507 0/imm32/no-rm32
10508 0/imm32/no-r32
10509 0/imm32/no-imm32
10510 0/imm32/no-disp32
10511 0/imm32/output-is-write-only
10512 0x11/imm32/alloc-id:fake
10513 _Primitive-decrement-ebx/imm32/next
10514 _Primitive-decrement-ebx:
10515 0x11/imm32/alloc-id:fake:payload
10516
10517 0x11/imm32/alloc-id:fake
10518 _string-decrement/imm32/name
10519 0/imm32/no-inouts
10520 0/imm32/no-inouts
10521 0x11/imm32/alloc-id:fake
10522 Single-int-var-in-ebx/imm32/outputs
10523 0x11/imm32/alloc-id:fake
10524 _string_4b_decrement_ebx/imm32/subx-name
10525 0/imm32/no-rm32
10526 0/imm32/no-r32
10527 0/imm32/no-imm32
10528 0/imm32/no-disp32
10529 0/imm32/output-is-write-only
10530 0x11/imm32/alloc-id:fake
10531 _Primitive-decrement-esi/imm32/next
10532 _Primitive-decrement-esi:
10533 0x11/imm32/alloc-id:fake:payload
10534
10535 0x11/imm32/alloc-id:fake
10536 _string-decrement/imm32/name
10537 0/imm32/no-inouts
10538 0/imm32/no-inouts
10539 0x11/imm32/alloc-id:fake
10540 Single-int-var-in-esi/imm32/outputs
10541 0x11/imm32/alloc-id:fake
10542 _string_4e_decrement_esi/imm32/subx-name
10543 0/imm32/no-rm32
10544 0/imm32/no-r32
10545 0/imm32/no-imm32
10546 0/imm32/no-disp32
10547 0/imm32/output-is-write-only
10548 0x11/imm32/alloc-id:fake
10549 _Primitive-decrement-edi/imm32/next
10550 _Primitive-decrement-edi:
10551 0x11/imm32/alloc-id:fake:payload
10552
10553 0x11/imm32/alloc-id:fake
10554 _string-decrement/imm32/name
10555 0/imm32/no-inouts
10556 0/imm32/no-inouts
10557 0x11/imm32/alloc-id:fake
10558 Single-int-var-in-edi/imm32/outputs
10559 0x11/imm32/alloc-id:fake
10560 _string_4f_decrement_edi/imm32/subx-name
10561 0/imm32/no-rm32
10562 0/imm32/no-r32
10563 0/imm32/no-imm32
10564 0/imm32/no-disp32
10565 0/imm32/output-is-write-only
10566 0x11/imm32/alloc-id:fake
10567 _Primitive-increment-mem/imm32/next
10568 _Primitive-increment-mem:
10569 0x11/imm32/alloc-id:fake:payload
10570
10571 0x11/imm32/alloc-id:fake
10572 _string-increment/imm32/name
10573 0x11/imm32/alloc-id:fake
10574 Single-int-var-in-mem/imm32/inouts
10575 0/imm32/no-outputs
10576 0/imm32/no-outputs
10577 0x11/imm32/alloc-id:fake
10578 _string_ff_subop_increment/imm32/subx-name
10579 1/imm32/rm32-is-first-inout
10580 0/imm32/no-r32
10581 0/imm32/no-imm32
10582 0/imm32/no-disp32
10583 0/imm32/output-is-write-only
10584 0x11/imm32/alloc-id:fake
10585 _Primitive-increment-reg/imm32/next
10586 _Primitive-increment-reg:
10587 0x11/imm32/alloc-id:fake:payload
10588
10589 0x11/imm32/alloc-id:fake
10590 _string-increment/imm32/name
10591 0/imm32/no-inouts
10592 0/imm32/no-inouts
10593 0x11/imm32/alloc-id:fake
10594 Single-int-var-in-some-register/imm32/outputs
10595 0x11/imm32/alloc-id:fake
10596 _string_ff_subop_increment/imm32/subx-name
10597 3/imm32/rm32-is-first-output
10598 0/imm32/no-r32
10599 0/imm32/no-imm32
10600 0/imm32/no-disp32
10601 0/imm32/output-is-write-only
10602 0x11/imm32/alloc-id:fake
10603 _Primitive-decrement-mem/imm32/next
10604 _Primitive-decrement-mem:
10605 0x11/imm32/alloc-id:fake:payload
10606
10607 0x11/imm32/alloc-id:fake
10608 _string-decrement/imm32/name
10609 0x11/imm32/alloc-id:fake
10610 Single-int-var-in-mem/imm32/inouts
10611 0/imm32/no-outputs
10612 0/imm32/no-outputs
10613 0x11/imm32/alloc-id:fake
10614 _string_ff_subop_decrement/imm32/subx-name
10615 1/imm32/rm32-is-first-inout
10616 0/imm32/no-r32
10617 0/imm32/no-imm32
10618 0/imm32/no-disp32
10619 0/imm32/output-is-write-only
10620 0x11/imm32/alloc-id:fake
10621 _Primitive-decrement-reg/imm32/next
10622 _Primitive-decrement-reg:
10623 0x11/imm32/alloc-id:fake:payload
10624
10625 0x11/imm32/alloc-id:fake
10626 _string-decrement/imm32/name
10627 0/imm32/no-inouts
10628 0/imm32/no-inouts
10629 0x11/imm32/alloc-id:fake
10630 Single-int-var-in-some-register/imm32/outputs
10631 0x11/imm32/alloc-id:fake
10632 _string_ff_subop_decrement/imm32/subx-name
10633 3/imm32/rm32-is-first-output
10634 0/imm32/no-r32
10635 0/imm32/no-imm32
10636 0/imm32/no-disp32
10637 0/imm32/output-is-write-only
10638 0x11/imm32/alloc-id:fake
10639 _Primitive-add-to-eax/imm32/next
10640
10641 _Primitive-add-to-eax:
10642 0x11/imm32/alloc-id:fake:payload
10643
10644 0x11/imm32/alloc-id:fake
10645 _string-add/imm32/name
10646 0x11/imm32/alloc-id:fake
10647 Single-lit-var/imm32/inouts
10648 0x11/imm32/alloc-id:fake
10649 Single-int-var-in-eax/imm32/outputs
10650 0x11/imm32/alloc-id:fake
10651 _string_05_add_to_eax/imm32/subx-name
10652 0/imm32/no-rm32
10653 0/imm32/no-r32
10654 1/imm32/imm32-is-first-inout
10655 0/imm32/no-disp32
10656 0/imm32/output-is-write-only
10657 0x11/imm32/alloc-id:fake
10658 _Primitive-add-reg-to-reg/imm32/next
10659 _Primitive-add-reg-to-reg:
10660 0x11/imm32/alloc-id:fake:payload
10661
10662 0x11/imm32/alloc-id:fake
10663 _string-add/imm32/name
10664 0x11/imm32/alloc-id:fake
10665 Single-int-var-in-some-register/imm32/inouts
10666 0x11/imm32/alloc-id:fake
10667 Single-int-var-in-some-register/imm32/outputs
10668 0x11/imm32/alloc-id:fake
10669 _string_01_add_to/imm32/subx-name
10670 3/imm32/rm32-is-first-output
10671 1/imm32/r32-is-first-inout
10672 0/imm32/no-imm32
10673 0/imm32/no-disp32
10674 0/imm32/output-is-write-only
10675 0x11/imm32/alloc-id:fake
10676 _Primitive-add-reg-to-mem/imm32/next
10677 _Primitive-add-reg-to-mem:
10678 0x11/imm32/alloc-id:fake:payload
10679
10680 0x11/imm32/alloc-id:fake
10681 _string-add-to/imm32/name
10682 0x11/imm32/alloc-id:fake
10683 Two-args-int-stack-int-reg/imm32/inouts
10684 0/imm32/no-outputs
10685 0/imm32/no-outputs
10686 0x11/imm32/alloc-id:fake
10687 _string_01_add_to/imm32/subx-name
10688 1/imm32/rm32-is-first-inout
10689 2/imm32/r32-is-second-inout
10690 0/imm32/no-imm32
10691 0/imm32/no-disp32
10692 0/imm32/output-is-write-only
10693 0x11/imm32/alloc-id:fake
10694 _Primitive-add-mem-to-reg/imm32/next
10695 _Primitive-add-mem-to-reg:
10696 0x11/imm32/alloc-id:fake:payload
10697
10698 0x11/imm32/alloc-id:fake
10699 _string-add/imm32/name
10700 0x11/imm32/alloc-id:fake
10701 Single-int-var-in-mem/imm32/inouts
10702 0x11/imm32/alloc-id:fake
10703 Single-int-var-in-some-register/imm32/outputs
10704 0x11/imm32/alloc-id:fake
10705 _string_03_add/imm32/subx-name
10706 1/imm32/rm32-is-first-inout
10707 3/imm32/r32-is-first-output
10708 0/imm32/no-imm32
10709 0/imm32/no-disp32
10710 0/imm32/output-is-write-only
10711 0x11/imm32/alloc-id:fake
10712 _Primitive-add-lit-to-reg/imm32/next
10713 _Primitive-add-lit-to-reg:
10714 0x11/imm32/alloc-id:fake:payload
10715
10716 0x11/imm32/alloc-id:fake
10717 _string-add/imm32/name
10718 0x11/imm32/alloc-id:fake
10719 Single-lit-var/imm32/inouts
10720 0x11/imm32/alloc-id:fake
10721 Single-int-var-in-some-register/imm32/outputs
10722 0x11/imm32/alloc-id:fake
10723 _string_81_subop_add/imm32/subx-name
10724 3/imm32/rm32-is-first-output
10725 0/imm32/no-r32
10726 1/imm32/imm32-is-first-inout
10727 0/imm32/no-disp32
10728 0/imm32/output-is-write-only
10729 0x11/imm32/alloc-id:fake
10730 _Primitive-add-lit-to-mem/imm32/next
10731 _Primitive-add-lit-to-mem:
10732 0x11/imm32/alloc-id:fake:payload
10733
10734 0x11/imm32/alloc-id:fake
10735 _string-add-to/imm32/name
10736 0x11/imm32/alloc-id:fake
10737 Int-var-and-literal/imm32/inouts
10738 0/imm32/no-outputs
10739 0/imm32/no-outputs
10740 0x11/imm32/alloc-id:fake
10741 _string_81_subop_add/imm32/subx-name
10742 1/imm32/rm32-is-first-inout
10743 0/imm32/no-r32
10744 2/imm32/imm32-is-second-inout
10745 0/imm32/no-disp32
10746 0/imm32/output-is-write-only
10747 0x11/imm32/alloc-id:fake
10748 _Primitive-subtract-from-eax/imm32/next
10749
10750 _Primitive-subtract-from-eax:
10751 0x11/imm32/alloc-id:fake:payload
10752
10753 0x11/imm32/alloc-id:fake
10754 _string-subtract/imm32/name
10755 0x11/imm32/alloc-id:fake
10756 Single-lit-var/imm32/inouts
10757 0x11/imm32/alloc-id:fake
10758 Single-int-var-in-eax/imm32/outputs
10759 0x11/imm32/alloc-id:fake
10760 _string_2d_subtract_from_eax/imm32/subx-name
10761 0/imm32/no-rm32
10762 0/imm32/no-r32
10763 1/imm32/imm32-is-first-inout
10764 0/imm32/no-disp32
10765 0/imm32/output-is-write-only
10766 0x11/imm32/alloc-id:fake
10767 _Primitive-subtract-reg-from-reg/imm32/next
10768 _Primitive-subtract-reg-from-reg:
10769 0x11/imm32/alloc-id:fake:payload
10770
10771 0x11/imm32/alloc-id:fake
10772 _string-subtract/imm32/name
10773 0x11/imm32/alloc-id:fake
10774 Single-int-var-in-some-register/imm32/inouts
10775 0x11/imm32/alloc-id:fake
10776 Single-int-var-in-some-register/imm32/outputs
10777 0x11/imm32/alloc-id:fake
10778 _string_29_subtract_from/imm32/subx-name
10779 3/imm32/rm32-is-first-output
10780 1/imm32/r32-is-first-inout
10781 0/imm32/no-imm32
10782 0/imm32/no-disp32
10783 0/imm32/output-is-write-only
10784 0x11/imm32/alloc-id:fake
10785 _Primitive-subtract-reg-from-mem/imm32/next
10786 _Primitive-subtract-reg-from-mem:
10787 0x11/imm32/alloc-id:fake:payload
10788
10789 0x11/imm32/alloc-id:fake
10790 _string-subtract-from/imm32/name
10791 0x11/imm32/alloc-id:fake
10792 Two-args-int-stack-int-reg/imm32/inouts
10793 0/imm32/no-outputs
10794 0/imm32/no-outputs
10795 0x11/imm32/alloc-id:fake
10796 _string_29_subtract_from/imm32/subx-name
10797 1/imm32/rm32-is-first-inout
10798 2/imm32/r32-is-second-inout
10799 0/imm32/no-imm32
10800 0/imm32/no-disp32
10801 0/imm32/output-is-write-only
10802 0x11/imm32/alloc-id:fake
10803 _Primitive-subtract-mem-from-reg/imm32/next
10804 _Primitive-subtract-mem-from-reg:
10805 0x11/imm32/alloc-id:fake:payload
10806
10807 0x11/imm32/alloc-id:fake
10808 _string-subtract/imm32/name
10809 0x11/imm32/alloc-id:fake
10810 Single-int-var-in-mem/imm32/inouts
10811 0x11/imm32/alloc-id:fake
10812 Single-int-var-in-some-register/imm32/outputs
10813 0x11/imm32/alloc-id:fake
10814 _string_2b_subtract/imm32/subx-name
10815 1/imm32/rm32-is-first-inout
10816 3/imm32/r32-is-first-output
10817 0/imm32/no-imm32
10818 0/imm32/no-disp32
10819 0/imm32/output-is-write-only
10820 0x11/imm32/alloc-id:fake
10821 _Primitive-subtract-lit-from-reg/imm32/next
10822 _Primitive-subtract-lit-from-reg:
10823 0x11/imm32/alloc-id:fake:payload
10824
10825 0x11/imm32/alloc-id:fake
10826 _string-subtract/imm32/name
10827 0x11/imm32/alloc-id:fake
10828 Single-lit-var/imm32/inouts
10829 0x11/imm32/alloc-id:fake
10830 Single-int-var-in-some-register/imm32/outputs
10831 0x11/imm32/alloc-id:fake
10832 _string_81_subop_subtract/imm32/subx-name
10833 3/imm32/rm32-is-first-output
10834 0/imm32/no-r32
10835 1/imm32/imm32-is-first-inout
10836 0/imm32/no-disp32
10837 0/imm32/output-is-write-only
10838 0x11/imm32/alloc-id:fake
10839 _Primitive-subtract-lit-from-mem/imm32/next
10840 _Primitive-subtract-lit-from-mem:
10841 0x11/imm32/alloc-id:fake:payload
10842
10843 0x11/imm32/alloc-id:fake
10844 _string-subtract-from/imm32/name
10845 0x11/imm32/alloc-id:fake
10846 Int-var-and-literal/imm32/inouts
10847 0/imm32/no-outputs
10848 0/imm32/no-outputs
10849 0x11/imm32/alloc-id:fake
10850 _string_81_subop_subtract/imm32/subx-name
10851 1/imm32/rm32-is-first-inout
10852 0/imm32/no-r32
10853 2/imm32/imm32-is-first-inout
10854 0/imm32/no-disp32
10855 0/imm32/output-is-write-only
10856 0x11/imm32/alloc-id:fake
10857 _Primitive-and-with-eax/imm32/next
10858
10859 _Primitive-and-with-eax:
10860 0x11/imm32/alloc-id:fake:payload
10861
10862 0x11/imm32/alloc-id:fake
10863 _string-and/imm32/name
10864 0x11/imm32/alloc-id:fake
10865 Single-lit-var/imm32/inouts
10866 0x11/imm32/alloc-id:fake
10867 Single-int-var-in-eax/imm32/outputs
10868 0x11/imm32/alloc-id:fake
10869 _string_25_and_with_eax/imm32/subx-name
10870 0/imm32/no-rm32
10871 0/imm32/no-r32
10872 1/imm32/imm32-is-first-inout
10873 0/imm32/no-disp32
10874 0/imm32/output-is-write-only
10875 0x11/imm32/alloc-id:fake
10876 _Primitive-and-reg-with-reg/imm32/next
10877 _Primitive-and-reg-with-reg:
10878 0x11/imm32/alloc-id:fake:payload
10879
10880 0x11/imm32/alloc-id:fake
10881 _string-and/imm32/name
10882 0x11/imm32/alloc-id:fake
10883 Single-int-var-in-some-register/imm32/inouts
10884 0x11/imm32/alloc-id:fake
10885 Single-int-var-in-some-register/imm32/outputs
10886 0x11/imm32/alloc-id:fake
10887 _string_21_and_with/imm32/subx-name
10888 3/imm32/rm32-is-first-output
10889 1/imm32/r32-is-first-inout
10890 0/imm32/no-imm32
10891 0/imm32/no-disp32
10892 0/imm32/output-is-write-only
10893 0x11/imm32/alloc-id:fake
10894 _Primitive-and-reg-with-mem/imm32/next
10895 _Primitive-and-reg-with-mem:
10896 0x11/imm32/alloc-id:fake:payload
10897
10898 0x11/imm32/alloc-id:fake
10899 _string-and-with/imm32/name
10900 0x11/imm32/alloc-id:fake
10901 Two-args-int-stack-int-reg/imm32/inouts
10902 0/imm32/no-outputs
10903 0/imm32/no-outputs
10904 0x11/imm32/alloc-id:fake
10905 _string_21_and_with/imm32/subx-name
10906 1/imm32/rm32-is-first-inout
10907 2/imm32/r32-is-second-inout
10908 0/imm32/no-imm32
10909 0/imm32/no-disp32
10910 0/imm32/output-is-write-only
10911 0x11/imm32/alloc-id:fake
10912 _Primitive-and-mem-with-reg/imm32/next
10913 _Primitive-and-mem-with-reg:
10914 0x11/imm32/alloc-id:fake:payload
10915
10916 0x11/imm32/alloc-id:fake
10917 _string-and/imm32/name
10918 0x11/imm32/alloc-id:fake
10919 Single-int-var-in-mem/imm32/inouts
10920 0x11/imm32/alloc-id:fake
10921 Single-int-var-in-some-register/imm32/outputs
10922 0x11/imm32/alloc-id:fake
10923 _string_23_and/imm32/subx-name
10924 1/imm32/rm32-is-first-inout
10925 3/imm32/r32-is-first-output
10926 0/imm32/no-imm32
10927 0/imm32/no-disp32
10928 0/imm32/output-is-write-only
10929 0x11/imm32/alloc-id:fake
10930 _Primitive-and-lit-with-reg/imm32/next
10931 _Primitive-and-lit-with-reg:
10932 0x11/imm32/alloc-id:fake:payload
10933
10934 0x11/imm32/alloc-id:fake
10935 _string-and/imm32/name
10936 0x11/imm32/alloc-id:fake
10937 Single-lit-var/imm32/inouts
10938 0x11/imm32/alloc-id:fake
10939 Single-int-var-in-some-register/imm32/outputs
10940 0x11/imm32/alloc-id:fake
10941 _string_81_subop_and/imm32/subx-name
10942 3/imm32/rm32-is-first-output
10943 0/imm32/no-r32
10944 1/imm32/imm32-is-first-inout
10945 0/imm32/no-disp32
10946 0/imm32/output-is-write-only
10947 0x11/imm32/alloc-id:fake
10948 _Primitive-and-lit-with-mem/imm32/next
10949 _Primitive-and-lit-with-mem:
10950 0x11/imm32/alloc-id:fake:payload
10951
10952 0x11/imm32/alloc-id:fake
10953 _string-and-with/imm32/name
10954 0x11/imm32/alloc-id:fake
10955 Int-var-and-literal/imm32/inouts
10956 0/imm32/no-outputs
10957 0/imm32/no-outputs
10958 0x11/imm32/alloc-id:fake
10959 _string_81_subop_and/imm32/subx-name
10960 1/imm32/rm32-is-first-inout
10961 0/imm32/no-r32
10962 2/imm32/imm32-is-first-inout
10963 0/imm32/no-disp32
10964 0/imm32/output-is-write-only
10965 0x11/imm32/alloc-id:fake
10966 _Primitive-or-with-eax/imm32/next
10967
10968 _Primitive-or-with-eax:
10969 0x11/imm32/alloc-id:fake:payload
10970
10971 0x11/imm32/alloc-id:fake
10972 _string-or/imm32/name
10973 0x11/imm32/alloc-id:fake
10974 Single-lit-var/imm32/inouts
10975 0x11/imm32/alloc-id:fake
10976 Single-int-var-in-eax/imm32/outputs
10977 0x11/imm32/alloc-id:fake
10978 _string_0d_or_with_eax/imm32/subx-name
10979 0/imm32/no-rm32
10980 0/imm32/no-r32
10981 1/imm32/imm32-is-first-inout
10982 0/imm32/no-disp32
10983 0/imm32/output-is-write-only
10984 0x11/imm32/alloc-id:fake
10985 _Primitive-or-reg-with-reg/imm32/next
10986 _Primitive-or-reg-with-reg:
10987 0x11/imm32/alloc-id:fake:payload
10988
10989 0x11/imm32/alloc-id:fake
10990 _string-or/imm32/name
10991 0x11/imm32/alloc-id:fake
10992 Single-int-var-in-some-register/imm32/inouts
10993 0x11/imm32/alloc-id:fake
10994 Single-int-var-in-some-register/imm32/outputs
10995 0x11/imm32/alloc-id:fake
10996 _string_09_or_with/imm32/subx-name
10997 3/imm32/rm32-is-first-output
10998 1/imm32/r32-is-first-inout
10999 0/imm32/no-imm32
11000 0/imm32/no-disp32
11001 0/imm32/output-is-write-only
11002 0x11/imm32/alloc-id:fake
11003 _Primitive-or-reg-with-mem/imm32/next
11004 _Primitive-or-reg-with-mem:
11005 0x11/imm32/alloc-id:fake:payload
11006
11007 0x11/imm32/alloc-id:fake
11008 _string-or-with/imm32/name
11009 0x11/imm32/alloc-id:fake
11010 Two-args-int-stack-int-reg/imm32/inouts
11011 0/imm32/no-outputs
11012 0/imm32/no-outputs
11013 0x11/imm32/alloc-id:fake
11014 _string_09_or_with/imm32/subx-name
11015 1/imm32/rm32-is-first-inout
11016 2/imm32/r32-is-second-inout
11017 0/imm32/no-imm32
11018 0/imm32/no-disp32
11019 0/imm32/output-is-write-only
11020 0x11/imm32/alloc-id:fake
11021 _Primitive-or-mem-with-reg/imm32/next
11022 _Primitive-or-mem-with-reg:
11023 0x11/imm32/alloc-id:fake:payload
11024
11025 0x11/imm32/alloc-id:fake
11026 _string-or/imm32/name
11027 0x11/imm32/alloc-id:fake
11028 Single-int-var-in-mem/imm32/inouts
11029 0x11/imm32/alloc-id:fake
11030 Single-int-var-in-some-register/imm32/outputs
11031 0x11/imm32/alloc-id:fake
11032 _string_0b_or/imm32/subx-name
11033 1/imm32/rm32-is-first-inout
11034 3/imm32/r32-is-first-output
11035 0/imm32/no-imm32
11036 0/imm32/no-disp32
11037 0/imm32/output-is-write-only
11038 0x11/imm32/alloc-id:fake
11039 _Primitive-or-lit-with-reg/imm32/next
11040 _Primitive-or-lit-with-reg:
11041 0x11/imm32/alloc-id:fake:payload
11042
11043 0x11/imm32/alloc-id:fake
11044 _string-or/imm32/name
11045 0x11/imm32/alloc-id:fake
11046 Single-lit-var/imm32/inouts
11047 0x11/imm32/alloc-id:fake
11048 Single-int-var-in-some-register/imm32/outputs
11049 0x11/imm32/alloc-id:fake
11050 _string_81_subop_or/imm32/subx-name
11051 3/imm32/rm32-is-first-output
11052 0/imm32/no-r32
11053 1/imm32/imm32-is-first-inout
11054 0/imm32/no-disp32
11055 0/imm32/output-is-write-only
11056 0x11/imm32/alloc-id:fake
11057 _Primitive-or-lit-with-mem/imm32/next
11058 _Primitive-or-lit-with-mem:
11059 0x11/imm32/alloc-id:fake:payload
11060
11061 0x11/imm32/alloc-id:fake
11062 _string-or-with/imm32/name
11063 0x11/imm32/alloc-id:fake
11064 Int-var-and-literal/imm32/inouts
11065 0/imm32/no-outputs
11066 0/imm32/no-outputs
11067 0x11/imm32/alloc-id:fake
11068 _string_81_subop_or/imm32/subx-name
11069 1/imm32/rm32-is-first-inout
11070 0/imm32/no-r32
11071 2/imm32/imm32-is-second-inout
11072 0/imm32/no-disp32
11073 0/imm32/output-is-write-only
11074 0x11/imm32/alloc-id:fake
11075 _Primitive-xor-with-eax/imm32/next
11076
11077 _Primitive-xor-with-eax:
11078 0x11/imm32/alloc-id:fake:payload
11079
11080 0x11/imm32/alloc-id:fake
11081 _string-xor/imm32/name
11082 0x11/imm32/alloc-id:fake
11083 Single-lit-var/imm32/inouts
11084 0x11/imm32/alloc-id:fake
11085 Single-int-var-in-eax/imm32/outputs
11086 0x11/imm32/alloc-id:fake
11087 _string_35_xor_with_eax/imm32/subx-name
11088 0/imm32/no-rm32
11089 0/imm32/no-r32
11090 1/imm32/imm32-is-first-inout
11091 0/imm32/no-disp32
11092 0/imm32/output-is-write-only
11093 0x11/imm32/alloc-id:fake
11094 _Primitive-xor-reg-with-reg/imm32/next
11095 _Primitive-xor-reg-with-reg:
11096 0x11/imm32/alloc-id:fake:payload
11097
11098 0x11/imm32/alloc-id:fake
11099 _string-xor/imm32/name
11100 0x11/imm32/alloc-id:fake
11101 Single-int-var-in-some-register/imm32/inouts
11102 0x11/imm32/alloc-id:fake
11103 Single-int-var-in-some-register/imm32/outputs
11104 0x11/imm32/alloc-id:fake
11105 _string_31_xor_with/imm32/subx-name
11106 3/imm32/rm32-is-first-output
11107 1/imm32/r32-is-first-inout
11108 0/imm32/no-imm32
11109 0/imm32/no-disp32
11110 0/imm32/output-is-write-only
11111 0x11/imm32/alloc-id:fake
11112 _Primitive-xor-reg-with-mem/imm32/next
11113 _Primitive-xor-reg-with-mem:
11114 0x11/imm32/alloc-id:fake:payload
11115
11116 0x11/imm32/alloc-id:fake
11117 _string-xor-with/imm32/name
11118 0x11/imm32/alloc-id:fake
11119 Two-args-int-stack-int-reg/imm32/inouts
11120 0/imm32/no-outputs
11121 0/imm32/no-outputs
11122 0x11/imm32/alloc-id:fake
11123 _string_31_xor_with/imm32/subx-name
11124 1/imm32/rm32-is-first-inout
11125 2/imm32/r32-is-second-inout
11126 0/imm32/no-imm32
11127 0/imm32/no-disp32
11128 0/imm32/output-is-write-only
11129 0x11/imm32/alloc-id:fake
11130 _Primitive-xor-mem-with-reg/imm32/next
11131 _Primitive-xor-mem-with-reg:
11132 0x11/imm32/alloc-id:fake:payload
11133
11134 0x11/imm32/alloc-id:fake
11135 _string-xor/imm32/name
11136 0x11/imm32/alloc-id:fake
11137 Single-int-var-in-mem/imm32/inouts
11138 0x11/imm32/alloc-id:fake
11139 Single-int-var-in-some-register/imm32/outputs
11140 0x11/imm32/alloc-id:fake
11141 _string_33_xor/imm32/subx-name
11142 1/imm32/rm32-is-first-inout
11143 3/imm32/r32-is-first-output
11144 0/imm32/no-imm32
11145 0/imm32/no-disp32
11146 0/imm32/output-is-write-only
11147 0x11/imm32/alloc-id:fake
11148 _Primitive-xor-lit-with-reg/imm32/next
11149 _Primitive-xor-lit-with-reg:
11150 0x11/imm32/alloc-id:fake:payload
11151
11152 0x11/imm32/alloc-id:fake
11153 _string-xor/imm32/name
11154 0x11/imm32/alloc-id:fake
11155 Single-lit-var/imm32/inouts
11156 0x11/imm32/alloc-id:fake
11157 Single-int-var-in-some-register/imm32/outputs
11158 0x11/imm32/alloc-id:fake
11159 _string_81_subop_xor/imm32/subx-name
11160 3/imm32/rm32-is-first-output
11161 0/imm32/no-r32
11162 1/imm32/imm32-is-first-inout
11163 0/imm32/no-disp32
11164 0/imm32/output-is-write-only
11165 0x11/imm32/alloc-id:fake
11166 _Primitive-xor-lit-with-mem/imm32/next
11167 _Primitive-xor-lit-with-mem:
11168 0x11/imm32/alloc-id:fake:payload
11169
11170 0x11/imm32/alloc-id:fake
11171 _string-xor-with/imm32/name
11172 0x11/imm32/alloc-id:fake
11173 Int-var-and-literal/imm32/inouts
11174 0/imm32/no-outputs
11175 0/imm32/no-outputs
11176 0x11/imm32/alloc-id:fake
11177 _string_81_subop_xor/imm32/subx-name
11178 1/imm32/rm32-is-first-inout
11179 0/imm32/no-r32
11180 2/imm32/imm32-is-first-inout
11181 0/imm32/no-disp32
11182 0/imm32/output-is-write-only
11183 0x11/imm32/alloc-id:fake
11184 _Primitive-copy-to-eax/imm32/next
11185
11186 _Primitive-copy-to-eax:
11187 0x11/imm32/alloc-id:fake:payload
11188
11189 0x11/imm32/alloc-id:fake
11190 _string-copy/imm32/name
11191 0x11/imm32/alloc-id:fake
11192 Single-lit-var/imm32/inouts
11193 0x11/imm32/alloc-id:fake
11194 Single-int-var-in-eax/imm32/outputs
11195 0x11/imm32/alloc-id:fake
11196 _string_b8_copy_to_eax/imm32/subx-name
11197 0/imm32/no-rm32
11198 0/imm32/no-r32
11199 1/imm32/imm32-is-first-inout
11200 0/imm32/no-disp32
11201 1/imm32/output-is-write-only
11202 0x11/imm32/alloc-id:fake
11203 _Primitive-copy-to-ecx/imm32/next
11204 _Primitive-copy-to-ecx:
11205 0x11/imm32/alloc-id:fake:payload
11206
11207 0x11/imm32/alloc-id:fake
11208 _string-copy/imm32/name
11209 0x11/imm32/alloc-id:fake
11210 Single-lit-var/imm32/inouts
11211 0x11/imm32/alloc-id:fake
11212 Single-int-var-in-ecx/imm32/outputs
11213 0x11/imm32/alloc-id:fake
11214 _string_b9_copy_to_ecx/imm32/subx-name
11215 0/imm32/no-rm32
11216 0/imm32/no-r32
11217 1/imm32/imm32-is-first-inout
11218 0/imm32/no-disp32
11219 1/imm32/output-is-write-only
11220 0x11/imm32/alloc-id:fake
11221 _Primitive-copy-to-edx/imm32/next
11222 _Primitive-copy-to-edx:
11223 0x11/imm32/alloc-id:fake:payload
11224
11225 0x11/imm32/alloc-id:fake
11226 _string-copy/imm32/name
11227 0x11/imm32/alloc-id:fake
11228 Single-lit-var/imm32/inouts
11229 0x11/imm32/alloc-id:fake
11230 Single-int-var-in-edx/imm32/outputs
11231 0x11/imm32/alloc-id:fake
11232 _string_ba_copy_to_edx/imm32/subx-name
11233 0/imm32/no-rm32
11234 0/imm32/no-r32
11235 1/imm32/imm32-is-first-inout
11236 0/imm32/no-disp32
11237 1/imm32/output-is-write-only
11238 0x11/imm32/alloc-id:fake
11239 _Primitive-copy-to-ebx/imm32/next
11240 _Primitive-copy-to-ebx:
11241 0x11/imm32/alloc-id:fake:payload
11242
11243 0x11/imm32/alloc-id:fake
11244 _string-copy/imm32/name
11245 0x11/imm32/alloc-id:fake
11246 Single-lit-var/imm32/inouts
11247 0x11/imm32/alloc-id:fake
11248 Single-int-var-in-ebx/imm32/outputs
11249 0x11/imm32/alloc-id:fake
11250 _string_bb_copy_to_ebx/imm32/subx-name
11251 0/imm32/no-rm32
11252 0/imm32/no-r32
11253 1/imm32/imm32-is-first-inout
11254 0/imm32/no-disp32
11255 1/imm32/output-is-write-only
11256 0x11/imm32/alloc-id:fake
11257 _Primitive-copy-to-esi/imm32/next
11258 _Primitive-copy-to-esi:
11259 0x11/imm32/alloc-id:fake:payload
11260
11261 0x11/imm32/alloc-id:fake
11262 _string-copy/imm32/name
11263 0x11/imm32/alloc-id:fake
11264 Single-lit-var/imm32/inouts
11265 0x11/imm32/alloc-id:fake
11266 Single-int-var-in-esi/imm32/outputs
11267 0x11/imm32/alloc-id:fake
11268 _string_be_copy_to_esi/imm32/subx-name
11269 0/imm32/no-rm32
11270 0/imm32/no-r32
11271 1/imm32/imm32-is-first-inout
11272 0/imm32/no-disp32
11273 1/imm32/output-is-write-only
11274 0x11/imm32/alloc-id:fake
11275 _Primitive-copy-to-edi/imm32/next
11276 _Primitive-copy-to-edi:
11277 0x11/imm32/alloc-id:fake:payload
11278
11279 0x11/imm32/alloc-id:fake
11280 _string-copy/imm32/name
11281 0x11/imm32/alloc-id:fake
11282 Single-lit-var/imm32/inouts
11283 0x11/imm32/alloc-id:fake
11284 Single-int-var-in-edi/imm32/outputs
11285 0x11/imm32/alloc-id:fake
11286 _string_bf_copy_to_edi/imm32/subx-name
11287 0/imm32/no-rm32
11288 0/imm32/no-r32
11289 1/imm32/imm32-is-first-inout
11290 0/imm32/no-disp32
11291 1/imm32/output-is-write-only
11292 0x11/imm32/alloc-id:fake
11293 _Primitive-copy-reg-to-reg/imm32/next
11294 _Primitive-copy-reg-to-reg:
11295 0x11/imm32/alloc-id:fake:payload
11296
11297 0x11/imm32/alloc-id:fake
11298 _string-copy/imm32/name
11299 0x11/imm32/alloc-id:fake
11300 Single-int-var-in-some-register/imm32/inouts
11301 0x11/imm32/alloc-id:fake
11302 Single-int-var-in-some-register/imm32/outputs
11303 0x11/imm32/alloc-id:fake
11304 _string_89_<-/imm32/subx-name
11305 3/imm32/rm32-is-first-output
11306 1/imm32/r32-is-first-inout
11307 0/imm32/no-imm32
11308 0/imm32/no-disp32
11309 1/imm32/output-is-write-only
11310 0x11/imm32/alloc-id:fake
11311 _Primitive-copy-reg-to-mem/imm32/next
11312 _Primitive-copy-reg-to-mem:
11313 0x11/imm32/alloc-id:fake:payload
11314
11315 0x11/imm32/alloc-id:fake
11316 _string-copy-to/imm32/name
11317 0x11/imm32/alloc-id:fake
11318 Two-args-int-stack-int-reg/imm32/inouts
11319 0/imm32/no-outputs
11320 0/imm32/no-outputs
11321 0x11/imm32/alloc-id:fake
11322 _string_89_<-/imm32/subx-name
11323 1/imm32/rm32-is-first-inout
11324 2/imm32/r32-is-second-inout
11325 0/imm32/no-imm32
11326 0/imm32/no-disp32
11327 1/imm32/output-is-write-only
11328 0x11/imm32/alloc-id:fake
11329 _Primitive-copy-mem-to-reg/imm32/next
11330 _Primitive-copy-mem-to-reg:
11331 0x11/imm32/alloc-id:fake:payload
11332
11333 0x11/imm32/alloc-id:fake
11334 _string-copy/imm32/name
11335 0x11/imm32/alloc-id:fake
11336 Single-int-var-in-mem/imm32/inouts
11337 0x11/imm32/alloc-id:fake
11338 Single-int-var-in-some-register/imm32/outputs
11339 0x11/imm32/alloc-id:fake
11340 _string_8b_->/imm32/subx-name
11341 1/imm32/rm32-is-first-inout
11342 3/imm32/r32-is-first-output
11343 0/imm32/no-imm32
11344 0/imm32/no-disp32
11345 1/imm32/output-is-write-only
11346 0x11/imm32/alloc-id:fake
11347 _Primitive-copy-lit-to-reg/imm32/next
11348 _Primitive-copy-lit-to-reg:
11349 0x11/imm32/alloc-id:fake:payload
11350
11351 0x11/imm32/alloc-id:fake
11352 _string-copy/imm32/name
11353 0x11/imm32/alloc-id:fake
11354 Single-lit-var/imm32/inouts
11355 0x11/imm32/alloc-id:fake
11356 Single-int-var-in-some-register/imm32/outputs
11357 0x11/imm32/alloc-id:fake
11358 _string_c7_subop_copy/imm32/subx-name
11359 3/imm32/rm32-is-first-output
11360 0/imm32/no-r32
11361 1/imm32/imm32-is-first-inout
11362 0/imm32/no-disp32
11363 1/imm32/output-is-write-only
11364 0x11/imm32/alloc-id:fake
11365 _Primitive-copy-lit-to-mem/imm32/next
11366 _Primitive-copy-lit-to-mem:
11367 0x11/imm32/alloc-id:fake:payload
11368
11369 0x11/imm32/alloc-id:fake
11370 _string-copy-to/imm32/name
11371 0x11/imm32/alloc-id:fake
11372 Int-var-and-literal/imm32/inouts
11373 0/imm32/no-outputs
11374 0/imm32/no-outputs
11375 0x11/imm32/alloc-id:fake
11376 _string_c7_subop_copy/imm32/subx-name
11377 1/imm32/rm32-is-first-inout
11378 0/imm32/no-r32
11379 2/imm32/imm32-is-first-inout
11380 0/imm32/no-disp32
11381 1/imm32/output-is-write-only
11382 0x11/imm32/alloc-id:fake
11383 _Primitive-address/imm32/next
11384
11385 _Primitive-address:
11386 0x11/imm32/alloc-id:fake:payload
11387
11388 0x11/imm32/alloc-id:fake
11389 _string-address/imm32/name
11390 0x11/imm32/alloc-id:fake
11391 Single-int-var-in-mem/imm32/inouts
11392 0x11/imm32/alloc-id:fake
11393 Single-addr-var-in-some-register/imm32/outputs
11394 0x11/imm32/alloc-id:fake
11395 _string_8d_copy_address/imm32/subx-name
11396 1/imm32/rm32-is-first-inout
11397 3/imm32/r32-is-first-output
11398 0/imm32/no-imm32
11399 0/imm32/no-disp32
11400 1/imm32/output-is-write-only
11401 0x11/imm32/alloc-id:fake
11402 _Primitive-compare-mem-with-reg/imm32/next
11403
11404 _Primitive-compare-mem-with-reg:
11405 0x11/imm32/alloc-id:fake:payload
11406
11407 0x11/imm32/alloc-id:fake
11408 _string-compare/imm32/name
11409 0x11/imm32/alloc-id:fake
11410 Two-args-int-stack-int-reg/imm32/inouts
11411 0/imm32/no-outputs
11412 0/imm32/no-outputs
11413 0x11/imm32/alloc-id:fake
11414 _string_39_compare->/imm32/subx-name
11415 1/imm32/rm32-is-first-inout
11416 2/imm32/r32-is-second-inout
11417 0/imm32/no-imm32
11418 0/imm32/no-disp32
11419 0/imm32/output-is-write-only
11420 0x11/imm32/alloc-id:fake
11421 _Primitive-compare-reg-with-mem/imm32/next
11422 _Primitive-compare-reg-with-mem:
11423 0x11/imm32/alloc-id:fake:payload
11424
11425 0x11/imm32/alloc-id:fake
11426 _string-compare/imm32/name
11427 0x11/imm32/alloc-id:fake
11428 Two-args-int-reg-int-stack/imm32/inouts
11429 0/imm32/no-outputs
11430 0/imm32/no-outputs
11431 0x11/imm32/alloc-id:fake
11432 _string_3b_compare<-/imm32/subx-name
11433 2/imm32/rm32-is-second-inout
11434 1/imm32/r32-is-first-inout
11435 0/imm32/no-imm32
11436 0/imm32/no-disp32
11437 0/imm32/output-is-write-only
11438 0x11/imm32/alloc-id:fake
11439 _Primitive-compare-eax-with-literal/imm32/next
11440 _Primitive-compare-eax-with-literal:
11441 0x11/imm32/alloc-id:fake:payload
11442
11443 0x11/imm32/alloc-id:fake
11444 _string-compare/imm32/name
11445 0x11/imm32/alloc-id:fake
11446 Two-args-int-eax-int-literal/imm32/inouts
11447 0/imm32/no-outputs
11448 0/imm32/no-outputs
11449 0x11/imm32/alloc-id:fake
11450 _string_3d_compare_eax_with/imm32/subx-name
11451 0/imm32/no-rm32
11452 0/imm32/no-r32
11453 2/imm32/imm32-is-second-inout
11454 0/imm32/no-disp32
11455 0/imm32/output-is-write-only
11456 0x11/imm32/alloc-id:fake
11457 _Primitive-compare-reg-with-literal/imm32/next
11458 _Primitive-compare-reg-with-literal:
11459 0x11/imm32/alloc-id:fake:payload
11460
11461 0x11/imm32/alloc-id:fake
11462 _string-compare/imm32/name
11463 0x11/imm32/alloc-id:fake
11464 Int-var-in-register-and-literal/imm32/inouts
11465 0/imm32/no-outputs
11466 0/imm32/no-outputs
11467 0x11/imm32/alloc-id:fake
11468 _string_81_subop_compare/imm32/subx-name
11469 1/imm32/rm32-is-first-inout
11470 0/imm32/no-r32
11471 2/imm32/imm32-is-second-inout
11472 0/imm32/no-disp32
11473 0/imm32/output-is-write-only
11474 0x11/imm32/alloc-id:fake
11475 _Primitive-compare-mem-with-literal/imm32/next
11476 _Primitive-compare-mem-with-literal:
11477 0x11/imm32/alloc-id:fake:payload
11478
11479 0x11/imm32/alloc-id:fake
11480 _string-compare/imm32/name
11481 0x11/imm32/alloc-id:fake
11482 Int-var-and-literal/imm32/inouts
11483 0/imm32/no-outputs
11484 0/imm32/no-outputs
11485 0x11/imm32/alloc-id:fake
11486 _string_81_subop_compare/imm32/subx-name
11487 1/imm32/rm32-is-first-inout
11488 0/imm32/no-r32
11489 2/imm32/imm32-is-second-inout
11490 0/imm32/no-disp32
11491 0/imm32/output-is-write-only
11492 0x11/imm32/alloc-id:fake
11493 _Primitive-multiply-reg-by-mem/imm32/next
11494
11495 _Primitive-multiply-reg-by-mem:
11496 0x11/imm32/alloc-id:fake:payload
11497
11498 0x11/imm32/alloc-id:fake
11499 _string-multiply/imm32/name
11500 0x11/imm32/alloc-id:fake
11501 Single-int-var-in-mem/imm32/inouts
11502 0x11/imm32/alloc-id:fake
11503 Single-int-var-in-some-register/imm32/outputs
11504 0x11/imm32/alloc-id:fake
11505 _string_0f_af_multiply/imm32/subx-name
11506 1/imm32/rm32-is-first-inout
11507 3/imm32/r32-is-first-output
11508 0/imm32/no-imm32
11509 0/imm32/no-disp32
11510 0/imm32/output-is-write-only
11511 0x11/imm32/alloc-id:fake
11512 _Primitive-break-if-addr</imm32/next
11513
11514 _Primitive-break-if-addr<:
11515 0x11/imm32/alloc-id:fake:payload
11516 0x11/imm32/alloc-id:fake
11517 _string-break-if-addr</imm32/name
11518 0/imm32/no-inouts
11519 0/imm32/no-inouts
11520 0/imm32/no-outputs
11521 0/imm32/no-outputs
11522 0x11/imm32/alloc-id:fake
11523 _string_0f_82_jump_break/imm32/subx-name
11524 0/imm32/no-rm32
11525 0/imm32/no-r32
11526 0/imm32/no-imm32
11527 0/imm32/no-disp32
11528 0/imm32/no-output
11529 0x11/imm32/alloc-id:fake
11530 _Primitive-break-if-addr>=/imm32/next
11531 _Primitive-break-if-addr>=:
11532 0x11/imm32/alloc-id:fake:payload
11533 0x11/imm32/alloc-id:fake
11534 _string-break-if-addr>=/imm32/name
11535 0/imm32/no-inouts
11536 0/imm32/no-inouts
11537 0/imm32/no-outputs
11538 0/imm32/no-outputs
11539 0x11/imm32/alloc-id:fake
11540 _string_0f_83_jump_break/imm32/subx-name
11541 0/imm32/no-rm32
11542 0/imm32/no-r32
11543 0/imm32/no-imm32
11544 0/imm32/no-disp32
11545 0/imm32/no-output
11546 0x11/imm32/alloc-id:fake
11547 _Primitive-break-if-=/imm32/next
11548 _Primitive-break-if-=:
11549 0x11/imm32/alloc-id:fake:payload
11550 0x11/imm32/alloc-id:fake
11551 _string-break-if-=/imm32/name
11552 0/imm32/no-inouts
11553 0/imm32/no-inouts
11554 0/imm32/no-outputs
11555 0/imm32/no-outputs
11556 0x11/imm32/alloc-id:fake
11557 _string_0f_84_jump_break/imm32/subx-name
11558 0/imm32/no-rm32
11559 0/imm32/no-r32
11560 0/imm32/no-imm32
11561 0/imm32/no-disp32
11562 0/imm32/no-output
11563 0x11/imm32/alloc-id:fake
11564 _Primitive-break-if-!=/imm32/next
11565 _Primitive-break-if-!=:
11566 0x11/imm32/alloc-id:fake:payload
11567 0x11/imm32/alloc-id:fake
11568 _string-break-if-!=/imm32/name
11569 0/imm32/no-inouts
11570 0/imm32/no-inouts
11571 0/imm32/no-outputs
11572 0/imm32/no-outputs
11573 0x11/imm32/alloc-id:fake
11574 _string_0f_85_jump_break/imm32/subx-name
11575 0/imm32/no-rm32
11576 0/imm32/no-r32
11577 0/imm32/no-imm32
11578 0/imm32/no-disp32
11579 0/imm32/no-output
11580 0x11/imm32/alloc-id:fake
11581 _Primitive-break-if-addr<=/imm32/next
11582 _Primitive-break-if-addr<=:
11583 0x11/imm32/alloc-id:fake:payload
11584 0x11/imm32/alloc-id:fake
11585 _string-break-if-addr<=/imm32/name
11586 0/imm32/no-inouts
11587 0/imm32/no-inouts
11588 0/imm32/no-outputs
11589 0/imm32/no-outputs
11590 0x11/imm32/alloc-id:fake
11591 _string_0f_86_jump_break/imm32/subx-name
11592 0/imm32/no-rm32
11593 0/imm32/no-r32
11594 0/imm32/no-imm32
11595 0/imm32/no-disp32
11596 0/imm32/no-output
11597 0x11/imm32/alloc-id:fake
11598 _Primitive-break-if-addr>/imm32/next
11599 _Primitive-break-if-addr>:
11600 0x11/imm32/alloc-id:fake:payload
11601 0x11/imm32/alloc-id:fake
11602 _string-break-if-addr>/imm32/name
11603 0/imm32/no-inouts
11604 0/imm32/no-inouts
11605 0/imm32/no-outputs
11606 0/imm32/no-outputs
11607 0x11/imm32/alloc-id:fake
11608 _string_0f_87_jump_break/imm32/subx-name
11609 0/imm32/no-rm32
11610 0/imm32/no-r32
11611 0/imm32/no-imm32
11612 0/imm32/no-disp32
11613 0/imm32/no-output
11614 0x11/imm32/alloc-id:fake
11615 _Primitive-break-if-</imm32/next
11616 _Primitive-break-if-<:
11617 0x11/imm32/alloc-id:fake:payload
11618 0x11/imm32/alloc-id:fake
11619 _string-break-if-</imm32/name
11620 0/imm32/no-inouts
11621 0/imm32/no-inouts
11622 0/imm32/no-outputs
11623 0/imm32/no-outputs
11624 0x11/imm32/alloc-id:fake
11625 _string_0f_8c_jump_break/imm32/subx-name
11626 0/imm32/no-rm32
11627 0/imm32/no-r32
11628 0/imm32/no-imm32
11629 0/imm32/no-disp32
11630 0/imm32/no-output
11631 0x11/imm32/alloc-id:fake
11632 _Primitive-break-if->=/imm32/next
11633 _Primitive-break-if->=:
11634 0x11/imm32/alloc-id:fake:payload
11635 0x11/imm32/alloc-id:fake
11636 _string-break-if->=/imm32/name
11637 0/imm32/no-inouts
11638 0/imm32/no-inouts
11639 0/imm32/no-outputs
11640 0/imm32/no-outputs
11641 0x11/imm32/alloc-id:fake
11642 _string_0f_8d_jump_break/imm32/subx-name
11643 0/imm32/no-rm32
11644 0/imm32/no-r32
11645 0/imm32/no-imm32
11646 0/imm32/no-disp32
11647 0/imm32/no-output
11648 0x11/imm32/alloc-id:fake
11649 _Primitive-break-if-<=/imm32/next
11650 _Primitive-break-if-<=:
11651 0x11/imm32/alloc-id:fake:payload
11652 0x11/imm32/alloc-id:fake
11653 _string-break-if-<=/imm32/name
11654 0/imm32/no-inouts
11655 0/imm32/no-inouts
11656 0/imm32/no-outputs
11657 0/imm32/no-outputs
11658 0x11/imm32/alloc-id:fake
11659 _string_0f_8e_jump_break/imm32/subx-name
11660 0/imm32/no-rm32
11661 0/imm32/no-r32
11662 0/imm32/no-imm32
11663 0/imm32/no-disp32
11664 0/imm32/no-output
11665 0x11/imm32/alloc-id:fake
11666 _Primitive-break-if->/imm32/next
11667 _Primitive-break-if->:
11668 0x11/imm32/alloc-id:fake:payload
11669 0x11/imm32/alloc-id:fake
11670 _string-break-if->/imm32/name
11671 0/imm32/no-inouts
11672 0/imm32/no-inouts
11673 0/imm32/no-outputs
11674 0/imm32/no-outputs
11675 0x11/imm32/alloc-id:fake
11676 _string_0f_8f_jump_break/imm32/subx-name
11677 0/imm32/no-rm32
11678 0/imm32/no-r32
11679 0/imm32/no-imm32
11680 0/imm32/no-disp32
11681 0/imm32/no-output
11682 0x11/imm32/alloc-id:fake
11683 _Primitive-break/imm32/next
11684 _Primitive-break:
11685 0x11/imm32/alloc-id:fake:payload
11686 0x11/imm32/alloc-id:fake
11687 _string-break/imm32/name
11688 0/imm32/no-inouts
11689 0/imm32/no-inouts
11690 0/imm32/no-outputs
11691 0/imm32/no-outputs
11692 0x11/imm32/alloc-id:fake
11693 _string_e9_jump_break/imm32/subx-name
11694 0/imm32/no-rm32
11695 0/imm32/no-r32
11696 0/imm32/no-imm32
11697 0/imm32/no-disp32
11698 0/imm32/no-output
11699 0x11/imm32/alloc-id:fake
11700 _Primitive-loop-if-addr</imm32/next
11701 _Primitive-loop-if-addr<:
11702 0x11/imm32/alloc-id:fake:payload
11703 0x11/imm32/alloc-id:fake
11704 _string-loop-if-addr</imm32/name
11705 0/imm32/no-inouts
11706 0/imm32/no-inouts
11707 0/imm32/no-outputs
11708 0/imm32/no-outputs
11709 0x11/imm32/alloc-id:fake
11710 _string_0f_82_jump_loop/imm32/subx-name
11711 0/imm32/no-rm32
11712 0/imm32/no-r32
11713 0/imm32/no-imm32
11714 0/imm32/no-disp32
11715 0/imm32/no-output
11716 0x11/imm32/alloc-id:fake
11717 _Primitive-loop-if-addr>=/imm32/next
11718 _Primitive-loop-if-addr>=:
11719 0x11/imm32/alloc-id:fake:payload
11720 0x11/imm32/alloc-id:fake
11721 _string-loop-if-addr>=/imm32/name
11722 0/imm32/no-inouts
11723 0/imm32/no-inouts
11724 0/imm32/no-outputs
11725 0/imm32/no-outputs
11726 0x11/imm32/alloc-id:fake
11727 _string_0f_83_jump_loop/imm32/subx-name
11728 0/imm32/no-rm32
11729 0/imm32/no-r32
11730 0/imm32/no-imm32
11731 0/imm32/no-disp32
11732 0/imm32/no-output
11733 0x11/imm32/alloc-id:fake
11734 _Primitive-loop-if-=/imm32/next
11735 _Primitive-loop-if-=:
11736 0x11/imm32/alloc-id:fake:payload
11737 0x11/imm32/alloc-id:fake
11738 _string-loop-if-=/imm32/name
11739 0/imm32/no-inouts
11740 0/imm32/no-inouts
11741 0/imm32/no-outputs
11742 0/imm32/no-outputs
11743 0x11/imm32/alloc-id:fake
11744 _string_0f_84_jump_loop/imm32/subx-name
11745 0/imm32/no-rm32
11746 0/imm32/no-r32
11747 0/imm32/no-imm32
11748 0/imm32/no-disp32
11749 0/imm32/no-output
11750 0x11/imm32/alloc-id:fake
11751 _Primitive-loop-if-!=/imm32/next
11752 _Primitive-loop-if-!=:
11753 0x11/imm32/alloc-id:fake:payload
11754 0x11/imm32/alloc-id:fake
11755 _string-loop-if-!=/imm32/name
11756 0/imm32/no-inouts
11757 0/imm32/no-inouts
11758 0/imm32/no-outputs
11759 0/imm32/no-outputs
11760 0x11/imm32/alloc-id:fake
11761 _string_0f_85_jump_loop/imm32/subx-name
11762 0/imm32/no-rm32
11763 0/imm32/no-r32
11764 0/imm32/no-imm32
11765 0/imm32/no-disp32
11766 0/imm32/no-output
11767 0x11/imm32/alloc-id:fake
11768 _Primitive-loop-if-addr<=/imm32/next
11769 _Primitive-loop-if-addr<=:
11770 0x11/imm32/alloc-id:fake:payload
11771 0x11/imm32/alloc-id:fake
11772 _string-loop-if-addr<=/imm32/name
11773 0/imm32/no-inouts
11774 0/imm32/no-inouts
11775 0/imm32/no-outputs
11776 0/imm32/no-outputs
11777 0x11/imm32/alloc-id:fake
11778 _string_0f_86_jump_loop/imm32/subx-name
11779 0/imm32/no-rm32
11780 0/imm32/no-r32
11781 0/imm32/no-imm32
11782 0/imm32/no-disp32
11783 0/imm32/no-output
11784 0x11/imm32/alloc-id:fake
11785 _Primitive-loop-if-addr>/imm32/next
11786 _Primitive-loop-if-addr>:
11787 0x11/imm32/alloc-id:fake:payload
11788 0x11/imm32/alloc-id:fake
11789 _string-loop-if-addr>/imm32/name
11790 0/imm32/no-inouts
11791 0/imm32/no-inouts
11792 0/imm32/no-outputs
11793 0/imm32/no-outputs
11794 0x11/imm32/alloc-id:fake
11795 _string_0f_87_jump_loop/imm32/subx-name
11796 0/imm32/no-rm32
11797 0/imm32/no-r32
11798 0/imm32/no-imm32
11799 0/imm32/no-disp32
11800 0/imm32/no-output
11801 0x11/imm32/alloc-id:fake
11802 _Primitive-loop-if-</imm32/next
11803 _Primitive-loop-if-<:
11804 0x11/imm32/alloc-id:fake:payload
11805 0x11/imm32/alloc-id:fake
11806 _string-loop-if-</imm32/name
11807 0/imm32/no-inouts
11808 0/imm32/no-inouts
11809 0/imm32/no-outputs
11810 0/imm32/no-outputs
11811 0x11/imm32/alloc-id:fake
11812 _string_0f_8c_jump_loop/imm32/subx-name
11813 0/imm32/no-rm32
11814 0/imm32/no-r32
11815 0/imm32/no-imm32
11816 0/imm32/no-disp32
11817 0/imm32/no-output
11818 0x11/imm32/alloc-id:fake
11819 _Primitive-loop-if->=/imm32/next
11820 _Primitive-loop-if->=:
11821 0x11/imm32/alloc-id:fake:payload
11822 0x11/imm32/alloc-id:fake
11823 _string-loop-if->=/imm32/name
11824 0/imm32/no-inouts
11825 0/imm32/no-inouts
11826 0/imm32/no-outputs
11827 0/imm32/no-outputs
11828 0x11/imm32/alloc-id:fake
11829 _string_0f_8d_jump_loop/imm32/subx-name
11830 0/imm32/no-rm32
11831 0/imm32/no-r32
11832 0/imm32/no-imm32
11833 0/imm32/no-disp32
11834 0/imm32/no-output
11835 0x11/imm32/alloc-id:fake
11836 _Primitive-loop-if-<=/imm32/next
11837 _Primitive-loop-if-<=:
11838 0x11/imm32/alloc-id:fake:payload
11839 0x11/imm32/alloc-id:fake
11840 _string-loop-if-<=/imm32/name
11841 0/imm32/no-inouts
11842 0/imm32/no-inouts
11843 0/imm32/no-outputs
11844 0/imm32/no-outputs
11845 0x11/imm32/alloc-id:fake
11846 _string_0f_8e_jump_loop/imm32/subx-name
11847 0/imm32/no-rm32
11848 0/imm32/no-r32
11849 0/imm32/no-imm32
11850 0/imm32/no-disp32
11851 0/imm32/no-output
11852 0x11/imm32/alloc-id:fake
11853 _Primitive-loop-if->/imm32/next
11854 _Primitive-loop-if->:
11855 0x11/imm32/alloc-id:fake:payload
11856 0x11/imm32/alloc-id:fake
11857 _string-loop-if->/imm32/name
11858 0/imm32/no-inouts
11859 0/imm32/no-inouts
11860 0/imm32/no-outputs
11861 0/imm32/no-outputs
11862 0x11/imm32/alloc-id:fake
11863 _string_0f_8f_jump_loop/imm32/subx-name
11864 0/imm32/no-rm32
11865 0/imm32/no-r32
11866 0/imm32/no-imm32
11867 0/imm32/no-disp32
11868 0/imm32/no-output
11869 0x11/imm32/alloc-id:fake
11870 _Primitive-loop/imm32/next
11871 _Primitive-loop:
11872 0x11/imm32/alloc-id:fake:payload
11873 0x11/imm32/alloc-id:fake
11874 _string-loop/imm32/name
11875 0/imm32/no-inouts
11876 0/imm32/no-inouts
11877 0/imm32/no-outputs
11878 0/imm32/no-outputs
11879 0x11/imm32/alloc-id:fake
11880 _string_e9_jump_loop/imm32/subx-name
11881 0/imm32/no-rm32
11882 0/imm32/no-r32
11883 0/imm32/no-imm32
11884 0/imm32/no-disp32
11885 0/imm32/no-output
11886 0x11/imm32/alloc-id:fake
11887 _Primitive-break-if-addr<-named/imm32/next
11888
11889 _Primitive-break-if-addr<-named:
11890 0x11/imm32/alloc-id:fake:payload
11891 0x11/imm32/alloc-id:fake
11892 _string-break-if-addr</imm32/name
11893 0x11/imm32/alloc-id:fake
11894 Single-lit-var/imm32/inouts
11895 0/imm32/no-outputs
11896 0/imm32/no-outputs
11897 0x11/imm32/alloc-id:fake
11898 _string_0f_82_jump_label/imm32/subx-name
11899 0/imm32/no-rm32
11900 0/imm32/no-r32
11901 0/imm32/no-imm32
11902 1/imm32/disp32-is-first-inout
11903 0/imm32/no-output
11904 0x11/imm32/alloc-id:fake
11905 _Primitive-break-if-addr>=-named/imm32/next
11906 _Primitive-break-if-addr>=-named:
11907 0x11/imm32/alloc-id:fake:payload
11908 0x11/imm32/alloc-id:fake
11909 _string-break-if-addr>=/imm32/name
11910 0x11/imm32/alloc-id:fake
11911 Single-lit-var/imm32/inouts
11912 0/imm32/no-outputs
11913 0/imm32/no-outputs
11914 0x11/imm32/alloc-id:fake
11915 _string_0f_83_jump_label/imm32/subx-name
11916 0/imm32/no-rm32
11917 0/imm32/no-r32
11918 0/imm32/no-imm32
11919 1/imm32/disp32-is-first-inout
11920 0/imm32/no-output
11921 0x11/imm32/alloc-id:fake
11922 _Primitive-break-if-=-named/imm32/next
11923 _Primitive-break-if-=-named:
11924 0x11/imm32/alloc-id:fake:payload
11925 0x11/imm32/alloc-id:fake
11926 _string-break-if-=/imm32/name
11927 0x11/imm32/alloc-id:fake
11928 Single-lit-var/imm32/inouts
11929 0/imm32/no-outputs
11930 0/imm32/no-outputs
11931 0x11/imm32/alloc-id:fake
11932 _string_0f_84_jump_label/imm32/subx-name
11933 0/imm32/no-rm32
11934 0/imm32/no-r32
11935 0/imm32/no-imm32
11936 1/imm32/disp32-is-first-inout
11937 0/imm32/no-output
11938 0x11/imm32/alloc-id:fake
11939 _Primitive-break-if-!=-named/imm32/next
11940 _Primitive-break-if-!=-named:
11941 0x11/imm32/alloc-id:fake:payload
11942 0x11/imm32/alloc-id:fake
11943 _string-break-if-!=/imm32/name
11944 0x11/imm32/alloc-id:fake
11945 Single-lit-var/imm32/inouts
11946 0/imm32/no-outputs
11947 0/imm32/no-outputs
11948 0x11/imm32/alloc-id:fake
11949 _string_0f_85_jump_label/imm32/subx-name
11950 0/imm32/no-rm32
11951 0/imm32/no-r32
11952 0/imm32/no-imm32
11953 1/imm32/disp32-is-first-inout
11954 0/imm32/no-output
11955 0x11/imm32/alloc-id:fake
11956 _Primitive-break-if-addr<=-named/imm32/next
11957 _Primitive-break-if-addr<=-named:
11958 0x11/imm32/alloc-id:fake:payload
11959 0x11/imm32/alloc-id:fake
11960 _string-break-if-addr<=/imm32/name
11961 0x11/imm32/alloc-id:fake
11962 Single-lit-var/imm32/inouts
11963 0/imm32/no-outputs
11964 0/imm32/no-outputs
11965 0x11/imm32/alloc-id:fake
11966 _string_0f_86_jump_label/imm32/subx-name
11967 0/imm32/no-rm32
11968 0/imm32/no-r32
11969 0/imm32/no-imm32
11970 1/imm32/disp32-is-first-inout
11971 0/imm32/no-output
11972 0x11/imm32/alloc-id:fake
11973 _Primitive-break-if-addr>-named/imm32/next
11974 _Primitive-break-if-addr>-named:
11975 0x11/imm32/alloc-id:fake:payload
11976 0x11/imm32/alloc-id:fake
11977 _string-break-if-addr>/imm32/name
11978 0x11/imm32/alloc-id:fake
11979 Single-lit-var/imm32/inouts
11980 0/imm32/no-outputs
11981 0/imm32/no-outputs
11982 0x11/imm32/alloc-id:fake
11983 _string_0f_87_jump_label/imm32/subx-name
11984 0/imm32/no-rm32
11985 0/imm32/no-r32
11986 0/imm32/no-imm32
11987 1/imm32/disp32-is-first-inout
11988 0/imm32/no-output
11989 0x11/imm32/alloc-id:fake
11990 _Primitive-break-if-<-named/imm32/next
11991 _Primitive-break-if-<-named:
11992 0x11/imm32/alloc-id:fake:payload
11993 0x11/imm32/alloc-id:fake
11994 _string-break-if-</imm32/name
11995 0x11/imm32/alloc-id:fake
11996 Single-lit-var/imm32/inouts
11997 0/imm32/no-outputs
11998 0/imm32/no-outputs
11999 0x11/imm32/alloc-id:fake
12000 _string_0f_8c_jump_label/imm32/subx-name
12001 0/imm32/no-rm32
12002 0/imm32/no-r32
12003 0/imm32/no-imm32
12004 1/imm32/disp32-is-first-inout
12005 0/imm32/no-output
12006 0x11/imm32/alloc-id:fake
12007 _Primitive-break-if->=-named/imm32/next
12008 _Primitive-break-if->=-named:
12009 0x11/imm32/alloc-id:fake:payload
12010 0x11/imm32/alloc-id:fake
12011 _string-break-if->=/imm32/name
12012 0x11/imm32/alloc-id:fake
12013 Single-lit-var/imm32/inouts
12014 0/imm32/no-outputs
12015 0/imm32/no-outputs
12016 0x11/imm32/alloc-id:fake
12017 _string_0f_8d_jump_label/imm32/subx-name
12018 0/imm32/no-rm32
12019 0/imm32/no-r32
12020 0/imm32/no-imm32
12021 1/imm32/disp32-is-first-inout
12022 0/imm32/no-output
12023 0x11/imm32/alloc-id:fake
12024 _Primitive-break-if-<=-named/imm32/next
12025 _Primitive-break-if-<=-named:
12026 0x11/imm32/alloc-id:fake:payload
12027 0x11/imm32/alloc-id:fake
12028 _string-break-if-<=/imm32/name
12029 0x11/imm32/alloc-id:fake
12030 Single-lit-var/imm32/inouts
12031 0/imm32/no-outputs
12032 0/imm32/no-outputs
12033 0x11/imm32/alloc-id:fake
12034 _string_0f_8e_jump_label/imm32/subx-name
12035 0/imm32/no-rm32
12036 0/imm32/no-r32
12037 0/imm32/no-imm32
12038 1/imm32/disp32-is-first-inout
12039 0/imm32/no-output
12040 0x11/imm32/alloc-id:fake
12041 _Primitive-break-if->-named/imm32/next
12042 _Primitive-break-if->-named:
12043 0x11/imm32/alloc-id:fake:payload
12044 0x11/imm32/alloc-id:fake
12045 _string-break-if->/imm32/name
12046 0x11/imm32/alloc-id:fake
12047 Single-lit-var/imm32/inouts
12048 0/imm32/no-outputs
12049 0/imm32/no-outputs
12050 0x11/imm32/alloc-id:fake
12051 _string_0f_8f_jump_label/imm32/subx-name
12052 0/imm32/no-rm32
12053 0/imm32/no-r32
12054 0/imm32/no-imm32
12055 1/imm32/disp32-is-first-inout
12056 0/imm32/no-output
12057 0x11/imm32/alloc-id:fake
12058 _Primitive-break-named/imm32/next
12059 _Primitive-break-named:
12060 0x11/imm32/alloc-id:fake:payload
12061 0x11/imm32/alloc-id:fake
12062 _string-break/imm32/name
12063 0x11/imm32/alloc-id:fake
12064 Single-lit-var/imm32/inouts
12065 0/imm32/no-outputs
12066 0/imm32/no-outputs
12067 0x11/imm32/alloc-id:fake
12068 _string_e9_jump_label/imm32/subx-name
12069 0/imm32/no-rm32
12070 0/imm32/no-r32
12071 0/imm32/no-imm32
12072 1/imm32/disp32-is-first-inout
12073 0/imm32/no-output
12074 0x11/imm32/alloc-id:fake
12075 _Primitive-loop-if-addr<-named/imm32/next
12076 _Primitive-loop-if-addr<-named:
12077 0x11/imm32/alloc-id:fake:payload
12078 0x11/imm32/alloc-id:fake
12079 _string-loop-if-addr</imm32/name
12080 0x11/imm32/alloc-id:fake
12081 Single-lit-var/imm32/inouts
12082 0/imm32/no-outputs
12083 0/imm32/no-outputs
12084 0x11/imm32/alloc-id:fake
12085 _string_0f_82_jump_label/imm32/subx-name
12086 0/imm32/no-rm32
12087 0/imm32/no-r32
12088 0/imm32/no-imm32
12089 1/imm32/disp32-is-first-inout
12090 0/imm32/no-output
12091 0x11/imm32/alloc-id:fake
12092 _Primitive-loop-if-addr>=-named/imm32/next
12093 _Primitive-loop-if-addr>=-named:
12094 0x11/imm32/alloc-id:fake:payload
12095 0x11/imm32/alloc-id:fake
12096 _string-loop-if-addr>=/imm32/name
12097 0x11/imm32/alloc-id:fake
12098 Single-lit-var/imm32/inouts
12099 0/imm32/no-outputs
12100 0/imm32/no-outputs
12101 0x11/imm32/alloc-id:fake
12102 _string_0f_83_jump_label/imm32/subx-name
12103 0/imm32/no-rm32
12104 0/imm32/no-r32
12105 0/imm32/no-imm32
12106 1/imm32/disp32-is-first-inout
12107 0/imm32/no-output
12108 0x11/imm32/alloc-id:fake
12109 _Primitive-loop-if-=-named/imm32/next
12110 _Primitive-loop-if-=-named:
12111 0x11/imm32/alloc-id:fake:payload
12112 0x11/imm32/alloc-id:fake
12113 _string-loop-if-=/imm32/name
12114 0x11/imm32/alloc-id:fake
12115 Single-lit-var/imm32/inouts
12116 0/imm32/no-outputs
12117 0/imm32/no-outputs
12118 0x11/imm32/alloc-id:fake
12119 _string_0f_84_jump_label/imm32/subx-name
12120 0/imm32/no-rm32
12121 0/imm32/no-r32
12122 0/imm32/no-imm32
12123 1/imm32/disp32-is-first-inout
12124 0/imm32/no-output
12125 0x11/imm32/alloc-id:fake
12126 _Primitive-loop-if-!=-named/imm32/next
12127 _Primitive-loop-if-!=-named:
12128 0x11/imm32/alloc-id:fake:payload
12129 0x11/imm32/alloc-id:fake
12130 _string-loop-if-!=/imm32/name
12131 0x11/imm32/alloc-id:fake
12132 Single-lit-var/imm32/inouts
12133 0/imm32/no-outputs
12134 0/imm32/no-outputs
12135 0x11/imm32/alloc-id:fake
12136 _string_0f_85_jump_label/imm32/subx-name
12137 0/imm32/no-rm32
12138 0/imm32/no-r32
12139 0/imm32/no-imm32
12140 1/imm32/disp32-is-first-inout
12141 0/imm32/no-output
12142 0x11/imm32/alloc-id:fake
12143 _Primitive-loop-if-addr<=-named/imm32/next
12144 _Primitive-loop-if-addr<=-named:
12145 0x11/imm32/alloc-id:fake:payload
12146 0x11/imm32/alloc-id:fake
12147 _string-loop-if-addr<=/imm32/name
12148 0x11/imm32/alloc-id:fake
12149 Single-lit-var/imm32/inouts
12150 0/imm32/no-outputs
12151 0/imm32/no-outputs
12152 0x11/imm32/alloc-id:fake
12153 _string_0f_86_jump_label/imm32/subx-name
12154 0/imm32/no-rm32
12155 0/imm32/no-r32
12156 0/imm32/no-imm32
12157 1/imm32/disp32-is-first-inout
12158 0/imm32/no-output
12159 0x11/imm32/alloc-id:fake
12160 _Primitive-loop-if-addr>-named/imm32/next
12161 _Primitive-loop-if-addr>-named:
12162 0x11/imm32/alloc-id:fake:payload
12163 0x11/imm32/alloc-id:fake
12164 _string-loop-if-addr>/imm32/name
12165 0x11/imm32/alloc-id:fake
12166 Single-lit-var/imm32/inouts
12167 0/imm32/no-outputs
12168 0/imm32/no-outputs
12169 0x11/imm32/alloc-id:fake
12170 _string_0f_87_jump_label/imm32/subx-name
12171 0/imm32/no-rm32
12172 0/imm32/no-r32
12173 0/imm32/no-imm32
12174 1/imm32/disp32-is-first-inout
12175 0/imm32/no-output
12176 0x11/imm32/alloc-id:fake
12177 _Primitive-loop-if-<-named/imm32/next
12178 _Primitive-loop-if-<-named:
12179 0x11/imm32/alloc-id:fake:payload
12180 0x11/imm32/alloc-id:fake
12181 _string-loop-if-</imm32/name
12182 0x11/imm32/alloc-id:fake
12183 Single-lit-var/imm32/inouts
12184 0/imm32/no-outputs
12185 0/imm32/no-outputs
12186 0x11/imm32/alloc-id:fake
12187 _string_0f_8c_jump_label/imm32/subx-name
12188 0/imm32/no-rm32
12189 0/imm32/no-r32
12190 0/imm32/no-imm32
12191 1/imm32/disp32-is-first-inout
12192 0/imm32/no-output
12193 0x11/imm32/alloc-id:fake
12194 _Primitive-loop-if->=-named/imm32/next
12195 _Primitive-loop-if->=-named:
12196 0x11/imm32/alloc-id:fake:payload
12197 0x11/imm32/alloc-id:fake
12198 _string-loop-if->=/imm32/name
12199 0x11/imm32/alloc-id:fake
12200 Single-lit-var/imm32/inouts
12201 0/imm32/no-outputs
12202 0/imm32/no-outputs
12203 0x11/imm32/alloc-id:fake
12204 _string_0f_8d_jump_label/imm32/subx-name
12205 0/imm32/no-rm32
12206 0/imm32/no-r32
12207 0/imm32/no-imm32
12208 1/imm32/disp32-is-first-inout
12209 0/imm32/no-output
12210 0x11/imm32/alloc-id:fake
12211 _Primitive-loop-if-<=-named/imm32/next
12212 _Primitive-loop-if-<=-named:
12213 0x11/imm32/alloc-id:fake:payload
12214 0x11/imm32/alloc-id:fake
12215 _string-loop-if-<=/imm32/name
12216 0x11/imm32/alloc-id:fake
12217 Single-lit-var/imm32/inouts
12218 0/imm32/no-outputs
12219 0/imm32/no-outputs
12220 0x11/imm32/alloc-id:fake
12221 _string_0f_8e_jump_label/imm32/subx-name
12222 0/imm32/no-rm32
12223 0/imm32/no-r32
12224 0/imm32/no-imm32
12225 1/imm32/disp32-is-first-inout
12226 0/imm32/no-output
12227 0x11/imm32/alloc-id:fake
12228 _Primitive-loop-if->-named/imm32/next
12229 _Primitive-loop-if->-named:
12230 0x11/imm32/alloc-id:fake:payload
12231 0x11/imm32/alloc-id:fake
12232 _string-loop-if->/imm32/name
12233 0x11/imm32/alloc-id:fake
12234 Single-lit-var/imm32/inouts
12235 0/imm32/no-outputs
12236 0/imm32/no-outputs
12237 0x11/imm32/alloc-id:fake
12238 _string_0f_8f_jump_label/imm32/subx-name
12239 0/imm32/no-rm32
12240 0/imm32/no-r32
12241 0/imm32/no-imm32
12242 1/imm32/disp32-is-first-inout
12243 0/imm32/no-output
12244 0x11/imm32/alloc-id:fake
12245 _Primitive-loop-named/imm32/next
12246 _Primitive-loop-named:
12247 0x11/imm32/alloc-id:fake:payload
12248 0x11/imm32/alloc-id:fake
12249 _string-loop/imm32/name
12250 0x11/imm32/alloc-id:fake
12251 Single-lit-var/imm32/inouts
12252 0/imm32/no-outputs
12253 0/imm32/no-outputs
12254 0x11/imm32/alloc-id:fake
12255 _string_e9_jump_label/imm32/subx-name
12256 0/imm32/no-rm32
12257 0/imm32/no-r32
12258 0/imm32/no-imm32
12259 1/imm32/disp32-is-first-inout
12260 0/imm32/no-output
12261 0/imm32/next
12262 0/imm32/next
12263
12264
12265 _string-add:
12266 0x11/imm32/alloc-id:fake:payload
12267
12268 0x3/imm32/size
12269 0x61/a 0x64/d 0x64/d
12270 _string-address:
12271 0x11/imm32/alloc-id:fake:payload
12272
12273 0x7/imm32/size
12274 0x61/a 0x64/d 0x64/d 0x72/r 0x65/e 0x73/s 0x73/s
12275 _string-add-to:
12276 0x11/imm32/alloc-id:fake:payload
12277
12278 0x6/imm32/size
12279 0x61/a 0x64/d 0x64/d 0x2d/dash 0x74/t 0x6f/o
12280 _string-and:
12281 0x11/imm32/alloc-id:fake:payload
12282
12283 0x3/imm32/size
12284 0x61/a 0x6e/n 0x64/d
12285 _string-and-with:
12286 0x11/imm32/alloc-id:fake:payload
12287
12288 0x8/imm32/size
12289 0x61/a 0x6e/n 0x64/d 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
12290 _string-break:
12291 0x11/imm32/alloc-id:fake:payload
12292
12293 0x5/imm32/size
12294 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k
12295 _string-break-if-<:
12296 0x11/imm32/alloc-id:fake:payload
12297
12298 0xa/imm32/size
12299 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/<
12300 _string-break-if-<=:
12301 0x11/imm32/alloc-id:fake:payload
12302
12303 0xb/imm32/size
12304 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/=
12305 _string-break-if-=:
12306 0x11/imm32/alloc-id:fake:payload
12307
12308 0xa/imm32/size
12309 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/=
12310 _string-break-if->:
12311 0x11/imm32/alloc-id:fake:payload
12312
12313 0xa/imm32/size
12314 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/>
12315 _string-break-if->=:
12316 0x11/imm32/alloc-id:fake:payload
12317
12318 0xb/imm32/size
12319 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/=
12320 _string-break-if-!=:
12321 0x11/imm32/alloc-id:fake:payload
12322
12323 0xb/imm32/size
12324 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/=
12325 _string-break-if-addr<:
12326 0x11/imm32/alloc-id:fake:payload
12327
12328 0xe/imm32/size
12329 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/<
12330 _string-break-if-addr<=:
12331 0x11/imm32/alloc-id:fake:payload
12332
12333 0xf/imm32/size
12334 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/=
12335 _string-break-if-addr>:
12336 0x11/imm32/alloc-id:fake:payload
12337
12338 0xe/imm32/size
12339 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/>
12340 _string-break-if-addr>=:
12341 0x11/imm32/alloc-id:fake:payload
12342
12343 0xf/imm32/size
12344 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/=
12345 _string-compare:
12346 0x11/imm32/alloc-id:fake:payload
12347
12348 0x7/imm32/size
12349 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e
12350 _string-copy:
12351 0x11/imm32/alloc-id:fake:payload
12352
12353 0x4/imm32/size
12354 0x63/c 0x6f/o 0x70/p 0x79/y
12355 _string-copy-to:
12356 0x11/imm32/alloc-id:fake:payload
12357
12358 0x7/imm32/size
12359 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x74/t 0x6f/o
12360 _string-decrement:
12361 0x11/imm32/alloc-id:fake:payload
12362
12363 0x9/imm32/size
12364 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t
12365 _string-increment:
12366 0x11/imm32/alloc-id:fake:payload
12367
12368 0x9/imm32/size
12369 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t
12370 _string-loop:
12371 0x11/imm32/alloc-id:fake:payload
12372
12373 0x4/imm32/size
12374 0x6c/l 0x6f/o 0x6f/o 0x70/p
12375 _string-loop-if-<:
12376 0x11/imm32/alloc-id:fake:payload
12377
12378 0x9/imm32/size
12379 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/<
12380 _string-loop-if-<=:
12381 0x11/imm32/alloc-id:fake:payload
12382
12383 0xa/imm32/size
12384 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/=
12385 _string-loop-if-=:
12386 0x11/imm32/alloc-id:fake:payload
12387
12388 0x9/imm32/size
12389 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/=
12390 _string-loop-if->:
12391 0x11/imm32/alloc-id:fake:payload
12392
12393 0x9/imm32/size
12394 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/>
12395 _string-loop-if->=:
12396 0x11/imm32/alloc-id:fake:payload
12397
12398 0xa/imm32/size
12399 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/=
12400 _string-loop-if-!=:
12401 0x11/imm32/alloc-id:fake:payload
12402
12403 0xa/imm32/size
12404 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/=
12405 _string-loop-if-addr<:
12406 0x11/imm32/alloc-id:fake:payload
12407
12408 0xd/imm32/size
12409 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/<
12410 _string-loop-if-addr<=:
12411 0x11/imm32/alloc-id:fake:payload
12412
12413 0xe/imm32/size
12414 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/=
12415 _string-loop-if-addr>:
12416 0x11/imm32/alloc-id:fake:payload
12417
12418 0xd/imm32/size
12419 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/>
12420 _string-loop-if-addr>=:
12421 0x11/imm32/alloc-id:fake:payload
12422
12423 0xe/imm32/size
12424 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/=
12425 _string-multiply:
12426 0x11/imm32/alloc-id:fake:payload
12427
12428 0x8/imm32/size
12429 0x6d/m 0x75/u 0x6c/l 0x74/t 0x69/i 0x70/p 0x6c/l 0x79/y
12430 _string-or:
12431 0x11/imm32/alloc-id:fake:payload
12432
12433 0x2/imm32/size
12434 0x6f/o 0x72/r
12435 _string-or-with:
12436 0x11/imm32/alloc-id:fake:payload
12437
12438 0x7/imm32/size
12439 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
12440 _string-subtract:
12441 0x11/imm32/alloc-id:fake:payload
12442
12443 0x8/imm32/size
12444 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t
12445 _string-subtract-from:
12446 0x11/imm32/alloc-id:fake:payload
12447
12448 0xd/imm32/size
12449 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
12450 _string-xor:
12451 0x11/imm32/alloc-id:fake:payload
12452
12453 0x3/imm32/size
12454 0x78/x 0x6f/o 0x72/r
12455 _string-xor-with:
12456 0x11/imm32/alloc-id:fake:payload
12457
12458 0x8/imm32/size
12459 0x78/x 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
12460
12461
12462 _string_01_add_to:
12463 0x11/imm32/alloc-id:fake:payload
12464
12465 0x9/imm32/size
12466 0x30/0 0x31/1 0x2f/slash 0x61/a 0x64/d 0x64/d 0x2d/dash 0x74/t 0x6f/o
12467 _string_03_add:
12468 0x11/imm32/alloc-id:fake:payload
12469
12470 0x6/imm32/size
12471 0x30/0 0x33/3 0x2f/slash 0x61/a 0x64/d 0x64/d
12472 _string_05_add_to_eax:
12473 0x11/imm32/alloc-id:fake:payload
12474
12475 0xd/imm32/size
12476 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
12477 _string_09_or_with:
12478 0x11/imm32/alloc-id:fake:payload
12479
12480 0xa/imm32/size
12481 0x30/0 0x39/9 0x2f/slash 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
12482 _string_0b_or:
12483 0x11/imm32/alloc-id:fake:payload
12484
12485 0x5/imm32/size
12486 0x30/0 0x62/b 0x2f/slash 0x6f/o 0x72/r
12487 _string_0d_or_with_eax:
12488 0x11/imm32/alloc-id:fake:payload
12489
12490 0xe/imm32/size
12491 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
12492 _string_0f_82_jump_label:
12493 0x11/imm32/alloc-id:fake:payload
12494
12495 0x13/imm32/size
12496 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/<
12497 _string_0f_82_jump_break:
12498 0x11/imm32/alloc-id:fake:payload
12499
12500 0x20/imm32/size
12501 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
12502 _string_0f_82_jump_loop:
12503 0x11/imm32/alloc-id:fake:payload
12504
12505 0x1f/imm32/size
12506 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
12507 _string_0f_83_jump_label:
12508 0x11/imm32/alloc-id:fake:payload
12509
12510 0x14/imm32/size
12511 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/=
12512 _string_0f_83_jump_break:
12513 0x11/imm32/alloc-id:fake:payload
12514
12515 0x21/imm32/size
12516 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
12517 _string_0f_83_jump_loop:
12518 0x11/imm32/alloc-id:fake:payload
12519
12520 0x20/imm32/size
12521 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
12522 _string_0f_84_jump_label:
12523 0x11/imm32/alloc-id:fake:payload
12524
12525 0xf/imm32/size
12526 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/=
12527 _string_0f_84_jump_break:
12528 0x11/imm32/alloc-id:fake:payload
12529
12530 0x1c/imm32/size
12531 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
12532 _string_0f_84_jump_loop:
12533 0x11/imm32/alloc-id:fake:payload
12534
12535 0x1b/imm32/size
12536 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
12537 _string_0f_85_jump_label:
12538 0x11/imm32/alloc-id:fake:payload
12539
12540 0x10/imm32/size
12541 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/=
12542 _string_0f_85_jump_break:
12543 0x11/imm32/alloc-id:fake:payload
12544
12545 0x1d/imm32/size
12546 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
12547 _string_0f_85_jump_loop:
12548 0x11/imm32/alloc-id:fake:payload
12549
12550 0x1c/imm32/size
12551 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
12552 _string_0f_86_jump_label:
12553 0x11/imm32/alloc-id:fake:payload
12554
12555 0x14/imm32/size
12556 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/=
12557 _string_0f_86_jump_break:
12558 0x11/imm32/alloc-id:fake:payload
12559
12560 0x21/imm32/size
12561 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
12562 _string_0f_86_jump_loop:
12563 0x11/imm32/alloc-id:fake:payload
12564
12565 0x20/imm32/size
12566 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
12567 _string_0f_87_jump_label:
12568 0x11/imm32/alloc-id:fake:payload
12569
12570 0x13/imm32/size
12571 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/>
12572 _string_0f_87_jump_break:
12573 0x11/imm32/alloc-id:fake:payload
12574
12575 0x20/imm32/size
12576 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
12577 _string_0f_87_jump_loop:
12578 0x11/imm32/alloc-id:fake:payload
12579
12580 0x1f/imm32/size
12581 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
12582 _string_0f_8c_jump_label:
12583 0x11/imm32/alloc-id:fake:payload
12584
12585 0xf/imm32/size
12586 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/<
12587 _string_0f_8c_jump_break:
12588 0x11/imm32/alloc-id:fake:payload
12589
12590 0x1c/imm32/size
12591 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
12592 _string_0f_8c_jump_loop:
12593 0x11/imm32/alloc-id:fake:payload
12594
12595 0x1b/imm32/size
12596 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
12597 _string_0f_8d_jump_label:
12598 0x11/imm32/alloc-id:fake:payload
12599
12600 0x10/imm32/size
12601 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/=
12602 _string_0f_8d_jump_break:
12603 0x11/imm32/alloc-id:fake:payload
12604
12605 0x1d/imm32/size
12606 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
12607 _string_0f_8d_jump_loop:
12608 0x11/imm32/alloc-id:fake:payload
12609
12610 0x1c/imm32/size
12611 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
12612 _string_0f_8e_jump_label:
12613 0x11/imm32/alloc-id:fake:payload
12614
12615 0x10/imm32/size
12616 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/=
12617 _string_0f_8e_jump_break:
12618 0x11/imm32/alloc-id:fake:payload
12619
12620 0x1d/imm32/size
12621 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
12622 _string_0f_8e_jump_loop:
12623 0x11/imm32/alloc-id:fake:payload
12624
12625 0x1c/imm32/size
12626 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
12627 _string_0f_8f_jump_label:
12628 0x11/imm32/alloc-id:fake:payload
12629
12630 0xf/imm32/size
12631 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/>
12632 _string_0f_8f_jump_break:
12633 0x11/imm32/alloc-id:fake:payload
12634
12635 0x1c/imm32/size
12636 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
12637 _string_0f_8f_jump_loop:
12638 0x11/imm32/alloc-id:fake:payload
12639
12640 0x1b/imm32/size
12641 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
12642 _string_0f_af_multiply:
12643 0x11/imm32/alloc-id:fake:payload
12644
12645 0xe/imm32/size
12646 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
12647 _string_21_and_with:
12648 0x11/imm32/alloc-id:fake:payload
12649
12650 0xb/imm32/size
12651 0x32/2 0x31/1 0x2f/slash 0x61/a 0x6e/n 0x64/d 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
12652 _string_23_and:
12653 0x11/imm32/alloc-id:fake:payload
12654
12655 0x6/imm32/size
12656 0x32/2 0x33/3 0x2f/slash 0x61/a 0x6e/n 0x64/d
12657 _string_25_and_with_eax:
12658 0x11/imm32/alloc-id:fake:payload
12659
12660 0xf/imm32/size
12661 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
12662 _string_29_subtract_from:
12663 0x11/imm32/alloc-id:fake:payload
12664
12665 0x10/imm32/size
12666 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
12667 _string_2b_subtract:
12668 0x11/imm32/alloc-id:fake:payload
12669
12670 0xb/imm32/size
12671 0x32/2 0x62/b 0x2f/slash 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t
12672 _string_2d_subtract_from_eax:
12673 0x11/imm32/alloc-id:fake:payload
12674
12675 0x14/imm32/size
12676 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
12677 _string_31_xor_with:
12678 0x11/imm32/alloc-id:fake:payload
12679
12680 0xb/imm32/size
12681 0x33/3 0x31/1 0x2f/slash 0x78/x 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
12682 _string_33_xor:
12683 0x11/imm32/alloc-id:fake:payload
12684
12685 0x6/imm32/size
12686 0x33/3 0x33/3 0x2f/slash 0x78/x 0x6f/o 0x72/r
12687 _string_35_xor_with_eax:
12688 0x11/imm32/alloc-id:fake:payload
12689
12690 0xf/imm32/size
12691 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
12692 _string_39_compare->:
12693 0x11/imm32/alloc-id:fake:payload
12694
12695 0xc/imm32/size
12696 0x33/3 0x39/9 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e 0x2d/dash 0x3e/>
12697 _string_3b_compare<-:
12698 0x11/imm32/alloc-id:fake:payload
12699
12700 0xc/imm32/size
12701 0x33/3 0x62/b 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e 0x3c/< 0x2d/dash
12702 _string_3d_compare_eax_with:
12703 0x11/imm32/alloc-id:fake:payload
12704
12705 0x13/imm32/size
12706 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
12707 _string_40_increment_eax:
12708 0x11/imm32/alloc-id:fake:payload
12709
12710 0x10/imm32/size
12711 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
12712 _string_41_increment_ecx:
12713 0x11/imm32/alloc-id:fake:payload
12714
12715 0x10/imm32/size
12716 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
12717 _string_42_increment_edx:
12718 0x11/imm32/alloc-id:fake:payload
12719
12720 0x10/imm32/size
12721 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
12722 _string_43_increment_ebx:
12723 0x11/imm32/alloc-id:fake:payload
12724
12725 0x10/imm32/size
12726 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
12727 _string_46_increment_esi:
12728 0x11/imm32/alloc-id:fake:payload
12729
12730 0x10/imm32/size
12731 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
12732 _string_47_increment_edi:
12733 0x11/imm32/alloc-id:fake:payload
12734
12735 0x10/imm32/size
12736 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
12737 _string_48_decrement_eax:
12738 0x11/imm32/alloc-id:fake:payload
12739
12740 0x10/imm32/size
12741 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
12742 _string_49_decrement_ecx:
12743 0x11/imm32/alloc-id:fake:payload
12744
12745 0x10/imm32/size
12746 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
12747 _string_4a_decrement_edx:
12748 0x11/imm32/alloc-id:fake:payload
12749
12750 0x10/imm32/size
12751 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
12752 _string_4b_decrement_ebx:
12753 0x11/imm32/alloc-id:fake:payload
12754
12755 0x10/imm32/size
12756 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
12757 _string_4e_decrement_esi:
12758 0x11/imm32/alloc-id:fake:payload
12759
12760 0x10/imm32/size
12761 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
12762 _string_4f_decrement_edi:
12763 0x11/imm32/alloc-id:fake:payload
12764
12765 0x10/imm32/size
12766 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
12767 _string_81_subop_add:
12768 0x11/imm32/alloc-id:fake:payload
12769
12770 0xe/imm32/size
12771 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
12772 _string_81_subop_or:
12773 0x11/imm32/alloc-id:fake:payload
12774
12775 0xd/imm32/size
12776 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
12777 _string_81_subop_and:
12778 0x11/imm32/alloc-id:fake:payload
12779
12780 0xe/imm32/size
12781 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
12782 _string_81_subop_subtract:
12783 0x11/imm32/alloc-id:fake:payload
12784
12785 0x13/imm32/size
12786 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
12787 _string_81_subop_xor:
12788 0x11/imm32/alloc-id:fake:payload
12789
12790 0xe/imm32/size
12791 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
12792 _string_81_subop_compare:
12793 0x11/imm32/alloc-id:fake:payload
12794
12795 0x12/imm32/size
12796 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
12797 _string_89_<-:
12798 0x11/imm32/alloc-id:fake:payload
12799
12800 0x5/imm32/size
12801 0x38/8 0x39/9 0x2f/slash 0x3c/< 0x2d/dash
12802 _string_8b_->:
12803 0x11/imm32/alloc-id:fake:payload
12804
12805 0x5/imm32/size
12806 0x38/8 0x62/b 0x2f/slash 0x2d/dash 0x3e/>
12807 _string_8d_copy_address:
12808 0x11/imm32/alloc-id:fake:payload
12809
12810 0xf/imm32/size
12811 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
12812 _string_b8_copy_to_eax:
12813 0x11/imm32/alloc-id:fake:payload
12814
12815 0xe/imm32/size
12816 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
12817 _string_b9_copy_to_ecx:
12818 0x11/imm32/alloc-id:fake:payload
12819
12820 0xe/imm32/size
12821 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
12822 _string_ba_copy_to_edx:
12823 0x11/imm32/alloc-id:fake:payload
12824
12825 0xe/imm32/size
12826 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
12827 _string_bb_copy_to_ebx:
12828 0x11/imm32/alloc-id:fake:payload
12829
12830 0xe/imm32/size
12831 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
12832 _string_be_copy_to_esi:
12833 0x11/imm32/alloc-id:fake:payload
12834
12835 0xe/imm32/size
12836 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
12837 _string_bf_copy_to_edi:
12838 0x11/imm32/alloc-id:fake:payload
12839
12840 0xe/imm32/size
12841 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
12842 _string_c7_subop_copy:
12843 0x11/imm32/alloc-id:fake:payload
12844
12845 0xf/imm32/size
12846 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
12847 _string_e9_jump_label:
12848 0x11/imm32/alloc-id:fake:payload
12849
12850 0x7/imm32/size
12851 0x65/e 0x39/9 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p
12852 _string_e9_jump_break:
12853 0x11/imm32/alloc-id:fake:payload
12854
12855 0x14/imm32/size
12856 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
12857 _string_e9_jump_loop:
12858 0x11/imm32/alloc-id:fake:payload
12859
12860 0x13/imm32/size
12861 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
12862 _string_ff_subop_increment:
12863 0x11/imm32/alloc-id:fake:payload
12864
12865 0x14/imm32/size
12866 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
12867 _string_ff_subop_decrement:
12868 0x11/imm32/alloc-id:fake:payload
12869
12870 0x14/imm32/size
12871 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
12872
12873 Single-int-var-in-mem:
12874 0x11/imm32/alloc-id:fake:payload
12875 0x11/imm32/alloc-id:fake
12876 Int-var-in-mem/imm32
12877 0/imm32/next
12878 0/imm32/next
12879
12880 Int-var-in-mem:
12881 0x11/imm32/alloc-id:fake:payload
12882 0/imm32/name
12883 0/imm32/name
12884 0x11/imm32/alloc-id:fake
12885 Type-int/imm32
12886 1/imm32/some-block-depth
12887 1/imm32/some-stack-offset
12888 0/imm32/no-register
12889 0/imm32/no-register
12890
12891 Two-args-int-stack-int-reg:
12892 0x11/imm32/alloc-id:fake:payload
12893 0x11/imm32/alloc-id:fake
12894 Int-var-in-mem/imm32
12895 0x11/imm32/alloc-id:fake
12896 Single-int-var-in-some-register/imm32/next
12897
12898 Two-args-int-reg-int-stack:
12899 0x11/imm32/alloc-id:fake:payload
12900 0x11/imm32/alloc-id:fake
12901 Int-var-in-some-register/imm32
12902 0x11/imm32/alloc-id:fake
12903 Single-int-var-in-mem/imm32/next
12904
12905 Two-args-int-eax-int-literal:
12906 0x11/imm32/alloc-id:fake:payload
12907 0x11/imm32/alloc-id:fake
12908 Int-var-in-eax/imm32
12909 0x11/imm32/alloc-id:fake
12910 Single-lit-var/imm32/next
12911
12912 Int-var-and-literal:
12913 0x11/imm32/alloc-id:fake:payload
12914 0x11/imm32/alloc-id:fake
12915 Int-var-in-mem/imm32
12916 0x11/imm32/alloc-id:fake
12917 Single-lit-var/imm32/next
12918
12919 Int-var-in-register-and-literal:
12920 0x11/imm32/alloc-id:fake:payload
12921 0x11/imm32/alloc-id:fake
12922 Int-var-in-some-register/imm32
12923 0x11/imm32/alloc-id:fake
12924 Single-lit-var/imm32/next
12925
12926 Single-int-var-in-some-register:
12927 0x11/imm32/alloc-id:fake:payload
12928 0x11/imm32/alloc-id:fake
12929 Int-var-in-some-register/imm32
12930 0/imm32/next
12931 0/imm32/next
12932
12933 Single-addr-var-in-some-register:
12934 0x11/imm32/alloc-id:fake:payload
12935 0x11/imm32/alloc-id:fake
12936 Addr-var-in-some-register/imm32
12937 0/imm32/next
12938 0/imm32/next
12939
12940 Int-var-in-some-register:
12941 0x11/imm32/alloc-id:fake:payload
12942 0/imm32/name
12943 0/imm32/name
12944 0x11/imm32/alloc-id:fake
12945 Type-int/imm32
12946 1/imm32/some-block-depth
12947 0/imm32/no-stack-offset
12948 0x11/imm32/alloc-id:fake
12949 Any-register/imm32
12950
12951 Any-register:
12952 0x11/imm32/alloc-id:fake:payload
12953 1/imm32/size
12954
12955 2a/asterisk
12956
12957 Addr-var-in-some-register:
12958 0x11/imm32/alloc-id:fake:payload
12959 0/imm32/name
12960 0/imm32/name
12961 0x11/imm32/alloc-id:fake
12962 Type-addr/imm32
12963 1/imm32/some-block-depth
12964 0/imm32/no-stack-offset
12965 0x11/imm32/alloc-id:fake
12966 Any-register/imm32
12967
12968 Single-int-var-in-eax:
12969 0x11/imm32/alloc-id:fake:payload
12970 0x11/imm32/alloc-id:fake
12971 Int-var-in-eax/imm32
12972 0/imm32/next
12973 0/imm32/next
12974
12975 Int-var-in-eax:
12976 0x11/imm32/alloc-id:fake:payload
12977 0/imm32/name
12978 0/imm32/name
12979 0x11/imm32/alloc-id:fake
12980 Type-int/imm32
12981 1/imm32/some-block-depth
12982 0/imm32/no-stack-offset
12983 0x11/imm32/alloc-id:fake
12984 $Register-eax/imm32
12985
12986 Single-int-var-in-ecx:
12987 0x11/imm32/alloc-id:fake:payload
12988 0x11/imm32/alloc-id:fake
12989 Int-var-in-ecx/imm32
12990 0/imm32/next
12991 0/imm32/next
12992
12993 Int-var-in-ecx:
12994 0x11/imm32/alloc-id:fake:payload
12995 0/imm32/name
12996 0/imm32/name
12997 0x11/imm32/alloc-id:fake
12998 Type-int/imm32
12999 1/imm32/some-block-depth
13000 0/imm32/no-stack-offset
13001 0x11/imm32/alloc-id:fake
13002 $Register-ecx/imm32/register
13003
13004 Single-int-var-in-edx:
13005 0x11/imm32/alloc-id:fake:payload
13006 0x11/imm32/alloc-id:fake
13007 Int-var-in-edx/imm32
13008 0/imm32/next
13009 0/imm32/next
13010
13011 Int-var-in-edx:
13012 0x11/imm32/alloc-id:fake:payload
13013 0/imm32/name
13014 0/imm32/name
13015 0x11/imm32/alloc-id:fake
13016 Type-int/imm32
13017 1/imm32/some-block-depth
13018 0/imm32/no-stack-offset
13019 0x11/imm32/alloc-id:fake
13020 $Register-edx/imm32/register
13021
13022 Single-int-var-in-ebx:
13023 0x11/imm32/alloc-id:fake:payload
13024 0x11/imm32/alloc-id:fake
13025 Int-var-in-ebx/imm32
13026 0/imm32/next
13027 0/imm32/next
13028
13029 Int-var-in-ebx:
13030 0x11/imm32/alloc-id:fake:payload
13031 0/imm32/name
13032 0/imm32/name
13033 0x11/imm32/alloc-id:fake
13034 Type-int/imm32
13035 1/imm32/some-block-depth
13036 0/imm32/no-stack-offset
13037 0x11/imm32/alloc-id:fake
13038 $Register-ebx/imm32/register
13039
13040 Single-int-var-in-esi:
13041 0x11/imm32/alloc-id:fake:payload
13042 0x11/imm32/alloc-id:fake
13043 Int-var-in-esi/imm32
13044 0/imm32/next
13045 0/imm32/next
13046
13047 Int-var-in-esi:
13048 0x11/imm32/alloc-id:fake:payload
13049 0/imm32/name
13050 0/imm32/name
13051 0x11/imm32/alloc-id:fake
13052 Type-int/imm32
13053 1/imm32/some-block-depth
13054 0/imm32/no-stack-offset
13055 0x11/imm32/alloc-id:fake
13056 $Register-esi/imm32/register
13057
13058 Single-int-var-in-edi:
13059 0x11/imm32/alloc-id:fake:payload
13060 0x11/imm32/alloc-id:fake
13061 Int-var-in-edi/imm32
13062 0/imm32/next
13063 0/imm32/next
13064
13065 Int-var-in-edi:
13066 0x11/imm32/alloc-id:fake:payload
13067 0/imm32/name
13068 0/imm32/name
13069 0x11/imm32/alloc-id:fake
13070 Type-int/imm32
13071 1/imm32/some-block-depth
13072 0/imm32/no-stack-offset
13073 0x11/imm32/alloc-id:fake
13074 $Register-edi/imm32/register
13075
13076 Single-lit-var:
13077 0x11/imm32/alloc-id:fake:payload
13078 0x11/imm32/alloc-id:fake
13079 Lit-var/imm32
13080 0/imm32/next
13081 0/imm32/next
13082
13083 Lit-var:
13084 0x11/imm32/alloc-id:fake:payload
13085 0/imm32/name
13086 0/imm32/name
13087 0x11/imm32/alloc-id:fake
13088 Type-literal/imm32
13089 1/imm32/some-block-depth
13090 0/imm32/no-stack-offset
13091 0/imm32/no-register
13092 0/imm32/no-register
13093
13094 Type-int:
13095 0x11/imm32/alloc-id:fake:payload
13096 1/imm32/left-is-atom
13097 1/imm32/value:int
13098 0/imm32/left:unused
13099 0/imm32/right:null
13100 0/imm32/right:null
13101
13102 Type-literal:
13103 0x11/imm32/alloc-id:fake:payload
13104 1/imm32/is-atom
13105 0/imm32/value:literal
13106 0/imm32/left:unused
13107 0/imm32/right:null
13108 0/imm32/right:null
13109
13110 Type-addr:
13111 0x11/imm32/alloc-id:fake:payload
13112 1/imm32/is-atom
13113 2/imm32/value:addr
13114 0/imm32/left:unused
13115 0/imm32/right:null
13116 0/imm32/right:null
13117
13118 == code
13119 emit-subx-primitive:
13120
13121 55/push-ebp
13122 89/<- %ebp 4/r32/esp
13123
13124 50/push-eax
13125 51/push-ecx
13126
13127 8b/-> *(ebp+0x10) 1/r32/ecx
13128
13129 (emit-indent *(ebp+8) *Curr-block-depth)
13130 (lookup *(ecx+0x18) *(ecx+0x1c))
13131 (write-buffered *(ebp+8) %eax)
13132
13133 (emit-subx-rm32 *(ebp+8) *(ecx+0x20) *(ebp+0xc))
13134
13135 (emit-subx-r32 *(ebp+8) *(ecx+0x24) *(ebp+0xc))
13136
13137 (emit-subx-imm32 *(ebp+8) *(ecx+0x28) *(ebp+0xc))
13138
13139 (emit-subx-disp32 *(ebp+8) *(ecx+0x2c) *(ebp+0xc))
13140 (write-buffered *(ebp+8) Newline)
13141 $emit-subx-primitive:end:
13142
13143 59/pop-to-ecx
13144 58/pop-to-eax
13145
13146 89/<- %esp 5/r32/ebp
13147 5d/pop-to-ebp
13148 c3/return
13149
13150 emit-subx-rm32:
13151
13152 55/push-ebp
13153 89/<- %ebp 4/r32/esp
13154
13155 50/push-eax
13156
13157 81 7/subop/compare *(ebp+0xc) 0/imm32
13158 74/jump-if-= $emit-subx-rm32:end/disp8
13159
13160 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
13161 (emit-subx-var-as-rm32 *(ebp+8) %eax)
13162 $emit-subx-rm32:end:
13163
13164 58/pop-to-eax
13165
13166 89/<- %esp 5/r32/ebp
13167 5d/pop-to-ebp
13168 c3/return
13169
13170 get-stmt-operand-from-arg-location:
13171
13172 55/push-ebp
13173 89/<- %ebp 4/r32/esp
13174
13175 51/push-ecx
13176
13177 8b/-> *(ebp+0xc) 0/r32/eax
13178
13179 8b/-> *(ebp+8) 1/r32/ecx
13180
13181 {
13182 3d/compare-eax-and 1/imm32
13183 75/jump-if-!= break/disp8
13184 $get-stmt-operand-from-arg-location:1:
13185 (lookup *(ecx+0xc) *(ecx+0x10))
13186 eb/jump $get-stmt-operand-from-arg-location:end/disp8
13187 }
13188
13189 {
13190 3d/compare-eax-and 2/imm32
13191 75/jump-if-!= break/disp8
13192 $get-stmt-operand-from-arg-location:2:
13193 (lookup *(ecx+0xc) *(ecx+0x10))
13194 (lookup *(eax+8) *(eax+0xc))
13195 eb/jump $get-stmt-operand-from-arg-location:end/disp8
13196 }
13197
13198 {
13199 3d/compare-eax-and 3/imm32
13200 75/jump-if-!= break/disp8
13201 $get-stmt-operand-from-arg-location:3:
13202 (lookup *(ecx+0x14) *(ecx+0x18))
13203 eb/jump $get-stmt-operand-from-arg-location:end/disp8
13204 }
13205
13206 e9/jump $get-stmt-operand-from-arg-location:abort/disp32
13207 $get-stmt-operand-from-arg-location:end:
13208
13209 59/pop-to-ecx
13210
13211 89/<- %esp 5/r32/ebp
13212 5d/pop-to-ebp
13213 c3/return
13214
13215 $get-stmt-operand-from-arg-location:abort:
13216
13217 (write-buffered Stderr "invalid arg-location ")
13218 (print-int32-buffered Stderr %eax)
13219 (write-buffered Stderr Newline)
13220 (flush Stderr)
13221
13222 bb/copy-to-ebx 1/imm32
13223 b8/copy-to-eax 1/imm32/exit
13224 cd/syscall 0x80/imm8
13225
13226
13227 emit-subx-r32:
13228
13229 55/push-ebp
13230 89/<- %ebp 4/r32/esp
13231
13232 50/push-eax
13233 51/push-ecx
13234
13235 81 7/subop/compare *(ebp+0xc) 0/imm32
13236 0f 84/jump-if-= $emit-subx-r32:end/disp32
13237
13238 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
13239 (lookup *eax *(eax+4))
13240 (lookup *(eax+0x18) *(eax+0x1c))
13241 (maybe-get Registers %eax 0xc)
13242 (write-buffered *(ebp+8) Space)
13243 (print-int32-buffered *(ebp+8) *eax)
13244 (write-buffered *(ebp+8) "/r32")
13245 $emit-subx-r32:end:
13246
13247 59/pop-to-ecx
13248 58/pop-to-eax
13249
13250 89/<- %esp 5/r32/ebp
13251 5d/pop-to-ebp
13252 c3/return
13253
13254 emit-subx-imm32:
13255
13256 55/push-ebp
13257 89/<- %ebp 4/r32/esp
13258
13259 50/push-eax
13260 51/push-ecx
13261
13262 81 7/subop/compare *(ebp+0xc) 0/imm32
13263 0f 84/jump-if-= $emit-subx-imm32:end/disp32
13264
13265 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
13266 (lookup *eax *(eax+4))
13267 (lookup *eax *(eax+4))
13268 (write-buffered *(ebp+8) Space)
13269 (write-buffered *(ebp+8) %eax)
13270 (write-buffered *(ebp+8) "/imm32")
13271 $emit-subx-imm32:end:
13272
13273 59/pop-to-ecx
13274 58/pop-to-eax
13275
13276 89/<- %esp 5/r32/ebp
13277 5d/pop-to-ebp
13278 c3/return
13279
13280 emit-subx-disp32:
13281
13282 55/push-ebp
13283 89/<- %ebp 4/r32/esp
13284
13285 50/push-eax
13286 51/push-ecx
13287
13288 81 7/subop/compare *(ebp+0xc) 0/imm32
13289 0f 84/jump-if-= $emit-subx-disp32:end/disp32
13290
13291 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
13292 (lookup *eax *(eax+4))
13293 (lookup *eax *(eax+4))
13294 (write-buffered *(ebp+8) Space)
13295 (write-buffered *(ebp+8) %eax)
13296
13297
13298 8b/-> *(ebp+0x10) 0/r32/eax
13299 (lookup *(eax+4) *(eax+8))
13300 89/<- %ecx 0/r32/eax
13301 {
13302 (string-starts-with? %ecx "break")
13303 3d/compare-eax-and 0/imm32/false
13304 74/jump-if-= break/disp8
13305 (write-buffered *(ebp+8) ":break")
13306 }
13307
13308 {
13309 (string-starts-with? %ecx "loop")
13310 3d/compare-eax-and 0/imm32/false
13311 74/jump-if-= break/disp8
13312 (write-buffered *(ebp+8) ":loop")
13313 }
13314 (write-buffered *(ebp+8) "/disp32")
13315 $emit-subx-disp32:end:
13316
13317 59/pop-to-ecx
13318 58/pop-to-eax
13319
13320 89/<- %esp 5/r32/ebp
13321 5d/pop-to-ebp
13322 c3/return
13323
13324 emit-call:
13325
13326 55/push-ebp
13327 89/<- %ebp 4/r32/esp
13328
13329 50/push-eax
13330 51/push-ecx
13331
13332 (emit-indent *(ebp+8) *Curr-block-depth)
13333 (write-buffered *(ebp+8) "(")
13334
13335 8b/-> *(ebp+0xc) 1/r32/ecx
13336
13337 (lookup *(ecx+4) *(ecx+8))
13338 (write-buffered *(ebp+8) %eax)
13339
13340
13341 (lookup *(ecx+0xc) *(ecx+0x10))
13342 {
13343
13344 3d/compare-eax-and 0/imm32
13345 74/jump-if-= break/disp8
13346
13347 (emit-subx-call-operand *(ebp+8) %eax)
13348
13349 (lookup *(eax+8) *(eax+0xc))
13350 eb/jump loop/disp8
13351 }
13352
13353 (write-buffered *(ebp+8) ")\n")
13354 $emit-call:end:
13355
13356 59/pop-to-ecx
13357 58/pop-to-eax
13358
13359 89/<- %esp 5/r32/ebp
13360 5d/pop-to-ebp
13361 c3/return
13362
13363 emit-subx-call-operand:
13364
13365
13366 55/push-ebp
13367 89/<- %ebp 4/r32/esp
13368
13369 50/push-eax
13370 51/push-ecx
13371 56/push-esi
13372
13373 8b/-> *(ebp+0xc) 1/r32/ecx
13374
13375 (lookup *ecx *(ecx+4))
13376 89/<- %esi 0/r32/eax
13377
13378 {
13379 $emit-subx-call-operand:check-for-register-direct:
13380 81 7/subop/compare *(esi+0x18) 0/imm32
13381 74/jump-if-= break/disp8
13382 81 7/subop/compare *(ecx+0x10) 0/imm32/false
13383 75/jump-if-!= break/disp8
13384 $emit-subx-call-operand:register-direct:
13385 (write-buffered *(ebp+8) " %")
13386 (lookup *(esi+0x18) *(esi+0x1c))
13387 (write-buffered *(ebp+8) %eax)
13388 e9/jump $emit-subx-call-operand:end/disp32
13389 }
13390
13391 {
13392 $emit-subx-call-operand:check-for-register-indirect:
13393 81 7/subop/compare *(esi+0x18) 0/imm32
13394 74/jump-if-= break/disp8
13395 81 7/subop/compare *(ecx+0x10) 0/imm32/false
13396 74/jump-if-= break/disp8
13397 $emit-subx-call-operand:register-indirect:
13398 (emit-subx-call-operand-register-indirect *(ebp+8) %esi)
13399 e9/jump $emit-subx-call-operand:end/disp32
13400 }
13401
13402 {
13403 81 7/subop/compare *(esi+0x14) 0/imm32
13404 74/jump-if-= break/disp8
13405 $emit-subx-call-operand:stack:
13406 (emit-subx-call-operand-stack *(ebp+8) %esi)
13407 e9/jump $emit-subx-call-operand:end/disp32
13408 }
13409
13410 {
13411 (lookup *(esi+8) *(esi+0xc))
13412 81 7/subop/compare *(eax+4) 0/imm32
13413 75/jump-if-!= break/disp8
13414 $emit-subx-call-operand:literal:
13415 (write-buffered *(ebp+8) Space)
13416 (lookup *esi *(esi+4))
13417 (write-buffered *(ebp+8) %eax)
13418 }
13419 $emit-subx-call-operand:end:
13420
13421 5e/pop-to-esi
13422 59/pop-to-ecx
13423 58/pop-to-eax
13424
13425 89/<- %esp 5/r32/ebp
13426 5d/pop-to-ebp
13427 c3/return
13428
13429 emit-subx-call-operand-register-indirect:
13430
13431 55/push-ebp
13432 89/<- %ebp 4/r32/esp
13433
13434 50/push-eax
13435 51/push-ecx
13436 56/push-esi
13437
13438 8b/-> *(ebp+0xc) 6/r32/esi
13439
13440 (size-of-deref %esi)
13441 89/<- %ecx 0/r32/eax
13442
13443 (lookup *(esi+0x18) *(esi+0x1c))
13444 89/<- %esi 0/r32/eax
13445
13446
13447 b8/copy-to-eax 0/imm32
13448 {
13449 $emit-subx-call-operand-register-indirect:loop:
13450
13451 39/compare %eax 1/r32/ecx
13452 7d/jump-if->= break/disp8
13453
13454 (write-buffered *(ebp+8) " *(")
13455 (write-buffered *(ebp+8) %esi)
13456 (write-buffered *(ebp+8) "+")
13457 (print-int32-buffered *(ebp+8) %eax)
13458 (write-buffered *(ebp+8) ")")
13459
13460 05/add-to-eax 4/imm32
13461
13462 eb/jump loop/disp8
13463 }
13464 $emit-subx-call-operand-register-indirect:end:
13465
13466 5e/pop-to-esi
13467 59/pop-to-ecx
13468 58/pop-to-eax
13469
13470 89/<- %esp 5/r32/ebp
13471 5d/pop-to-ebp
13472 c3/return
13473
13474 emit-subx-call-operand-stack:
13475
13476 55/push-ebp
13477 89/<- %ebp 4/r32/esp
13478
13479 50/push-eax
13480 51/push-ecx
13481 56/push-esi
13482
13483 8b/-> *(ebp+0xc) 6/r32/esi
13484
13485 8b/-> *(esi+0x14) 1/r32/ecx
13486
13487 (size-of %esi)
13488
13489 01/add-to %eax 1/r32/ecx
13490 {
13491 $emit-subx-call-operand-stack:loop:
13492
13493 39/compare %ecx 0/r32/eax
13494 7d/jump-if->= break/disp8
13495
13496 (write-buffered *(ebp+8) " *(ebp+")
13497 (print-int32-buffered *(ebp+8) %ecx)
13498 (write-buffered *(ebp+8) ")")
13499
13500 81 0/subop/add %ecx 4/imm32
13501
13502 eb/jump loop/disp8
13503 }
13504 $emit-subx-call-operand-stack:end:
13505
13506 5e/pop-to-esi
13507 59/pop-to-ecx
13508 58/pop-to-eax
13509
13510 89/<- %esp 5/r32/ebp
13511 5d/pop-to-ebp
13512 c3/return
13513
13514 emit-subx-var-as-rm32:
13515
13516 55/push-ebp
13517 89/<- %ebp 4/r32/esp
13518
13519 50/push-eax
13520 51/push-ecx
13521 56/push-esi
13522
13523 8b/-> *(ebp+0xc) 1/r32/ecx
13524
13525 (lookup *ecx *(ecx+4))
13526 89/<- %esi 0/r32/eax
13527
13528 {
13529 $emit-subx-var-as-rm32:check-for-register-indirect:
13530 81 7/subop/compare *(esi+0x18) 0/imm32
13531 74/jump-if-= break/disp8
13532 81 7/subop/compare *(ecx+0x10) 0/imm32/false
13533 74/jump-if-= break/disp8
13534 $emit-subx-var-as-rm32:register-indirect:
13535 (write-buffered *(ebp+8) " *")
13536 (lookup *(esi+0x18) *(esi+0x1c))
13537 (write-buffered *(ebp+8) %eax)
13538 e9/jump $emit-subx-var-as-rm32:end/disp32
13539 }
13540
13541 {
13542 $emit-subx-var-as-rm32:check-for-register-direct:
13543 81 7/subop/compare *(esi+0x18) 0/imm32
13544 74/jump-if-= break/disp8
13545 81 7/subop/compare *(ecx+0x10) 0/imm32/false
13546 75/jump-if-!= break/disp8
13547 $emit-subx-var-as-rm32:register-direct:
13548 (write-buffered *(ebp+8) " %")
13549 (lookup *(esi+0x18) *(esi+0x1c))
13550 (write-buffered *(ebp+8) %eax)
13551 e9/jump $emit-subx-var-as-rm32:end/disp32
13552 }
13553
13554 {
13555 81 7/subop/compare *(esi+0x14) 0/imm32
13556 74/jump-if-= break/disp8
13557 $emit-subx-var-as-rm32:stack:
13558 (write-buffered *(ebp+8) Space)
13559 (write-buffered *(ebp+8) "*(ebp+")
13560 (print-int32-buffered *(ebp+8) *(esi+0x14))
13561 (write-buffered *(ebp+8) ")")
13562 }
13563 $emit-subx-var-as-rm32:end:
13564
13565 5e/pop-to-esi
13566 59/pop-to-ecx
13567 58/pop-to-eax
13568
13569 89/<- %esp 5/r32/ebp
13570 5d/pop-to-ebp
13571 c3/return
13572
13573 find-matching-primitive:
13574
13575 55/push-ebp
13576 89/<- %ebp 4/r32/esp
13577
13578 51/push-ecx
13579
13580 8b/-> *(ebp+8) 1/r32/ecx
13581 {
13582 $find-matching-primitive:loop:
13583
13584 81 7/subop/compare %ecx 0/imm32
13585 0f 84/jump-if-= break/disp32
13586
13587 {
13588 (mu-stmt-matches-primitive? *(ebp+0xc) %ecx)
13589 3d/compare-eax-and 0/imm32/false
13590 74/jump-if-= break/disp8
13591 89/<- %eax 1/r32/ecx
13592 eb/jump $find-matching-primitive:end/disp8
13593 }
13594 $find-matching-primitive:next-primitive:
13595
13596 (lookup *(ecx+0x34) *(ecx+0x38))
13597 89/<- %ecx 0/r32/eax
13598
13599 e9/jump loop/disp32
13600 }
13601
13602 b8/copy-to-eax 0/imm32
13603 $find-matching-primitive:end:
13604
13605 59/pop-to-ecx
13606
13607 89/<- %esp 5/r32/ebp
13608 5d/pop-to-ebp
13609 c3/return
13610
13611 mu-stmt-matches-primitive?:
13612
13613
13614
13615
13616
13617
13618 55/push-ebp
13619 89/<- %ebp 4/r32/esp
13620
13621 51/push-ecx
13622 52/push-edx
13623 53/push-ebx
13624 56/push-esi
13625 57/push-edi
13626
13627 8b/-> *(ebp+8) 1/r32/ecx
13628
13629 8b/-> *(ebp+0xc) 2/r32/edx
13630 {
13631 $mu-stmt-matches-primitive?:check-name:
13632
13633
13634 (lookup *(ecx+4) *(ecx+8))
13635 89/<- %esi 0/r32/eax
13636
13637 (lookup *edx *(edx+4))
13638 89/<- %edi 0/r32/eax
13639 (string-equal? %esi %edi)
13640 3d/compare-eax-and 0/imm32/false
13641 75/jump-if-!= break/disp8
13642 b8/copy-to-eax 0/imm32
13643 e9/jump $mu-stmt-matches-primitive?:end/disp32
13644 }
13645
13646 (lookup *(ecx+0xc) *(ecx+0x10))
13647 89/<- %esi 0/r32/eax
13648
13649 (lookup *(edx+8) *(edx+0xc))
13650 89/<- %edi 0/r32/eax
13651 {
13652 $mu-stmt-matches-primitive?:inouts-loop:
13653
13654 {
13655 $mu-stmt-matches-primitive?:check-both-inouts-null:
13656 81 7/subop/compare %esi 0/imm32
13657 75/jump-if-!= break/disp8
13658 $mu-stmt-matches-primitive?:stmt-inout-null:
13659 81 7/subop/compare %edi 0/imm32
13660 0f 84/jump-if-= $mu-stmt-matches-primitive?:check-outputs/disp32
13661 $mu-stmt-matches-primitive?:stmt-inout-null-and-prim-inout-not-null:
13662
13663 b8/copy-to-eax 0/imm32/false
13664 e9/jump $mu-stmt-matches-primitive?:end/disp32
13665 }
13666
13667 {
13668 $mu-stmt-matches-primitive?:check-prim-inout-null:
13669 81 7/subop/compare %edi 0/imm32
13670 75/jump-if-!= break/disp8
13671 $mu-stmt-matches-primitive?:prim-inout-null:
13672 b8/copy-to-eax 0/imm32/false
13673 e9/jump $mu-stmt-matches-primitive?:end/disp32
13674 }
13675
13676 {
13677 $mu-stmt-matches-primitive?:check-inouts-match:
13678 (lookup *edi *(edi+4))
13679 (operand-matches-primitive? %esi %eax)
13680 3d/compare-eax-and 0/imm32/false
13681 75/jump-if-!= break/disp8
13682 $mu-stmt-matches-primitive?:inouts-match:
13683 b8/copy-to-eax 0/imm32/false
13684 e9/jump $mu-stmt-matches-primitive?:end/disp32
13685 }
13686 $mu-stmt-matches-primitive?:next-inout:
13687
13688 (lookup *(esi+8) *(esi+0xc))
13689 89/<- %esi 0/r32/eax
13690
13691 (lookup *(edi+8) *(edi+0xc))
13692 89/<- %edi 0/r32/eax
13693
13694 e9/jump loop/disp32
13695 }
13696 $mu-stmt-matches-primitive?:check-outputs:
13697
13698 (lookup *(ecx+0x14) *(ecx+0x18))
13699 89/<- %esi 0/r32/eax
13700
13701 (lookup *(edx+0x10) *(edx+0x14))
13702 89/<- %edi 0/r32/eax
13703 {
13704 $mu-stmt-matches-primitive?:outputs-loop:
13705
13706 {
13707 $mu-stmt-matches-primitive?:check-both-outputs-null:
13708 81 7/subop/compare %esi 0/imm32
13709 75/jump-if-!= break/disp8
13710 {
13711 $mu-stmt-matches-primitive?:stmt-output-null:
13712 81 7/subop/compare %edi 0/imm32
13713 75/jump-if-!= break/disp8
13714 $mu-stmt-matches-primitive?:both-outputs-null:
13715
13716 b8/copy-to-eax 1/imm32
13717 e9/jump $mu-stmt-matches-primitive?:end/disp32
13718 }
13719 $mu-stmt-matches-primitive?:stmt-output-null-and-prim-output-not-null:
13720
13721 b8/copy-to-eax 0/imm32
13722 e9/jump $mu-stmt-matches-primitive?:end/disp32
13723 }
13724
13725 {
13726 $mu-stmt-matches-primitive?:check-prim-output-null:
13727 81 7/subop/compare %edi 0/imm32
13728 75/jump-if-!= break/disp8
13729 $mu-stmt-matches-primitive?:prim-output-is-null:
13730 b8/copy-to-eax 0/imm32
13731 e9/jump $mu-stmt-matches-primitive?:end/disp32
13732 }
13733
13734 {
13735 $mu-stmt-matches-primitive?:check-outputs-match:
13736 (lookup *edi *(edi+4))
13737 (operand-matches-primitive? %esi %eax)
13738 3d/compare-eax-and 0/imm32/false
13739 75/jump-if-!= break/disp8
13740 $mu-stmt-matches-primitive?:outputs-match:
13741 b8/copy-to-eax 0/imm32
13742 e9/jump $mu-stmt-matches-primitive?:end/disp32
13743 }
13744 $mu-stmt-matches-primitive?:next-output:
13745
13746 (lookup *(esi+8) *(esi+0xc))
13747 89/<- %esi 0/r32/eax
13748
13749 (lookup *(edi+8) *(edi+0xc))
13750 89/<- %edi 0/r32/eax
13751
13752 e9/jump loop/disp32
13753 }
13754 $mu-stmt-matches-primitive?:return-true:
13755 b8/copy-to-eax 1/imm32
13756 $mu-stmt-matches-primitive?:end:
13757
13758 5f/pop-to-edi
13759 5e/pop-to-esi
13760 5b/pop-to-ebx
13761 5a/pop-to-edx
13762 59/pop-to-ecx
13763
13764 89/<- %esp 5/r32/ebp
13765 5d/pop-to-ebp
13766 c3/return
13767
13768 operand-matches-primitive?:
13769
13770 55/push-ebp
13771 89/<- %ebp 4/r32/esp
13772
13773 51/push-ecx
13774 52/push-edx
13775 53/push-ebx
13776 56/push-esi
13777 57/push-edi
13778
13779 8b/-> *(ebp+8) 1/r32/ecx
13780
13781 (lookup *ecx *(ecx+4))
13782 89/<- %esi 0/r32/eax
13783
13784 8b/-> *(ebp+0xc) 7/r32/edi
13785 $operand-matches-primitive?:check-type:
13786
13787
13788 (lookup *(esi+8) *(esi+0xc))
13789 89/<- %ebx 0/r32/eax
13790
13791 (lookup *(edi+8) *(edi+0xc))
13792 (subx-type-equal? %ebx %eax)
13793 3d/compare-eax-and 0/imm32/false
13794 0f 84/jump-if-= $operand-matches-primitive?:return-false/disp32
13795 {
13796 $operand-matches-primitive?:check-register:
13797
13798 {
13799 81 7/subop/compare *(edi+0x18) 0/imm32
13800 0f 85/jump-if-!= break/disp32
13801 81 7/subop/compare *(esi+0x18) 0/imm32
13802 74/jump-if-= break/disp8
13803 81 7/subop/compare *(ecx+0x10) 0/imm32/false
13804 74/jump-if-= break/disp8
13805 $operand-matches-primitive?:var-deref-match:
13806 e9/jump $operand-matches-primitive?:return-true/disp32
13807 }
13808
13809 {
13810 81 7/subop/compare *(edi+0x18) 0/imm32
13811 0f 84/jump-if-= break/disp32
13812 81 7/subop/compare *(esi+0x18) 0/imm32
13813 0f 84/jump-if-= break/disp32
13814 81 7/subop/compare *(ecx+0x10) 0/imm32/false
13815 74/jump-if-= break/disp8
13816 $operand-matches-primitive?:var-deref-no-match:
13817 e9/jump $operand-matches-primitive?:return-false/disp32
13818 }
13819
13820 {
13821
13822
13823 (lookup *(esi+0x18) *(esi+0x1c))
13824 89/<- %ebx 0/r32/eax
13825
13826 (lookup *(edi+0x18) *(edi+0x1c))
13827 89/<- %ecx 0/r32/eax
13828
13829 39/compare %ecx 3/r32/ebx
13830 74/jump-if-= break/disp8
13831 $operand-matches-primitive?:var-register-no-match:
13832
13833 81 7/subop/compare %ebx 0/imm32
13834 74/jump-if-= $operand-matches-primitive?:return-false/disp8
13835 81 7/subop/compare %ecx 0/imm32
13836 74/jump-if-= $operand-matches-primitive?:return-false/disp8
13837
13838 (string-equal? %ecx "*")
13839 3d/compare-eax-and 0/imm32/false
13840 75/jump-if-!= break/disp8
13841 $operand-matches-primitive?:wildcard-no-match:
13842
13843 (string-equal? %ecx %ebx)
13844 3d/compare-eax-and 0/imm32/false
13845 74/jump-if-= $operand-matches-primitive?:return-false/disp8
13846 }
13847 }
13848 $operand-matches-primitive?:return-true:
13849 b8/copy-to-eax 1/imm32/true
13850 eb/jump $operand-matches-primitive?:end/disp8
13851 $operand-matches-primitive?:return-false:
13852 b8/copy-to-eax 0/imm32/false
13853 $operand-matches-primitive?:end:
13854
13855 5f/pop-to-edi
13856 5e/pop-to-esi
13857 5b/pop-to-ebx
13858 5a/pop-to-edx
13859 59/pop-to-ecx
13860
13861 89/<- %esp 5/r32/ebp
13862 5d/pop-to-ebp
13863 c3/return
13864
13865 subx-type-equal?:
13866
13867 55/push-ebp
13868 89/<- %ebp 4/r32/esp
13869
13870 51/push-ecx
13871
13872 (is-simple-mu-type? *(ebp+8) 0)
13873 89/<- %ecx 0/r32/eax
13874
13875 (is-simple-mu-type? *(ebp+0xc) 0)
13876
13877 39/compare %eax 1/r32/ecx
13878 0f 94/set-byte-if-= %al
13879 81 4/subop/and %eax 0xff/imm32
13880 $subx-type-equal?:end:
13881
13882 59/pop-to-ecx
13883
13884 89/<- %esp 5/r32/ebp
13885 5d/pop-to-ebp
13886 c3/return
13887
13888 is-simple-mu-type?:
13889
13890 55/push-ebp
13891 89/<- %ebp 4/r32/esp
13892
13893 51/push-ecx
13894
13895 8b/-> *(ebp+0xc) 1/r32/ecx
13896
13897 8b/-> *(ebp+8) 0/r32/eax
13898 39/compare *(eax+4) 1/r32/ecx
13899 0f 94/set-byte-if-= %al
13900 81 4/subop/and %eax 0xff/imm32
13901 $is-simple-mu-type?:end:
13902
13903 59/pop-to-ecx
13904
13905 89/<- %esp 5/r32/ebp
13906 5d/pop-to-ebp
13907 c3/return
13908
13909 test-emit-subx-stmt-primitive:
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926 55/push-ebp
13927 89/<- %ebp 4/r32/esp
13928
13929 (clear-stream _test-output-stream)
13930 (clear-stream $_test-output-buffered-file->buffer)
13931
13932 $test-emit-subx-stmt-primitive:initialize-type:
13933
13934 68/push 0/imm32/right:null
13935 68/push 0/imm32/right:null
13936 68/push 0/imm32/left:unused
13937 68/push 1/imm32/value:int
13938 68/push 1/imm32/is-atom?:true
13939 68/push 0x11/imm32/alloc-id:fake:payload
13940 89/<- %ecx 4/r32/esp
13941 $test-emit-subx-stmt-primitive:initialize-var:
13942
13943 68/push 0/imm32/no-register
13944 68/push 0/imm32/no-register
13945 68/push -8/imm32/stack-offset
13946 68/push 1/imm32/block-depth
13947 51/push-ecx/type
13948 68/push 0x11/imm32/alloc-id:fake
13949 68/push 0/imm32/name
13950 68/push 0/imm32/name
13951 68/push 0x11/imm32/alloc-id:fake:payload
13952 89/<- %ecx 4/r32/esp
13953 $test-emit-subx-stmt-primitive:initialize-var-name:
13954
13955 8d/copy-address *(ecx+4) 0/r32/eax
13956 (copy-array Heap "foo" %eax)
13957 $test-emit-subx-stmt-primitive:initialize-stmt-var:
13958
13959 68/push 0/imm32/is-deref:false
13960 68/push 0/imm32/next
13961 68/push 0/imm32/next
13962 51/push-ecx/var-foo
13963 68/push 0x11/imm32/alloc-id:fake
13964 68/push 0x11/imm32/alloc-id:fake:payload
13965 89/<- %ebx 4/r32/esp
13966 $test-emit-subx-stmt-primitive:initialize-stmt:
13967
13968 68/push 0/imm32/no-outputs
13969 68/push 0/imm32/no-outputs
13970 53/push-ebx/inouts
13971 68/push 0x11/imm32/alloc-id:fake
13972 68/push 0/imm32/operation
13973 68/push 0/imm32/operation
13974 68/push 1/imm32/tag
13975 89/<- %esi 4/r32/esp
13976 $test-emit-subx-stmt-primitive:initialize-stmt-operation:
13977
13978 8d/copy-address *(esi+4) 0/r32/eax
13979 (copy-array Heap "increment" %eax)
13980 $test-emit-subx-stmt-primitive:initialize-primitive:
13981
13982 68/push 0/imm32/next
13983 68/push 0/imm32/next
13984 68/push 0/imm32/output-is-write-only
13985 68/push 0/imm32/no-disp32
13986 68/push 0/imm32/no-imm32
13987 68/push 0/imm32/no-r32
13988 68/push 1/imm32/rm32-is-first-inout
13989 68/push 0/imm32/subx-name
13990 68/push 0/imm32/subx-name
13991 68/push 0/imm32/no-outputs
13992 68/push 0/imm32/no-outputs
13993 53/push-ebx/inouts
13994 68/push 0x11/imm32/alloc-id:fake
13995 68/push 0/imm32/name
13996 68/push 0/imm32/name
13997 89/<- %ebx 4/r32/esp
13998 $test-emit-subx-stmt-primitive:initialize-primitive-name:
13999
14000 (copy-array Heap "increment" %ebx)
14001 $test-emit-subx-stmt-primitive:initialize-primitive-subx-name:
14002
14003 8d/copy-address *(ebx+0x18) 0/r32/eax
14004 (copy-array Heap "ff 0/subop/increment" %eax)
14005
14006 c7 0/subop/copy *Curr-block-depth 0/imm32
14007 (emit-subx-stmt _test-output-buffered-file %esi %ebx)
14008 (flush _test-output-buffered-file)
14009 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
14015
14016 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment *(ebp+0xfffffff8)" "F - test-emit-subx-stmt-primitive")
14017
14018 89/<- %esp 5/r32/ebp
14019 5d/pop-to-ebp
14020 c3/return
14021
14022 test-emit-subx-stmt-primitive-register:
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039 55/push-ebp
14040 89/<- %ebp 4/r32/esp
14041
14042 (clear-stream _test-output-stream)
14043 (clear-stream $_test-output-buffered-file->buffer)
14044 $test-emit-subx-stmt-primitive-register:initialize-type:
14045
14046 68/push 0/imm32/right:null
14047 68/push 0/imm32/right:null
14048 68/push 0/imm32/left:unused
14049 68/push 1/imm32/value:int
14050 68/push 1/imm32/is-atom?:true
14051 68/push 0x11/imm32/alloc-id:fake:payload
14052 89/<- %ecx 4/r32/esp
14053 $test-emit-subx-stmt-primitive-register:initialize-var:
14054
14055 68/push 0/imm32/register
14056 68/push 0/imm32/register
14057 68/push 0/imm32/no-stack-offset
14058 68/push 1/imm32/block-depth
14059 51/push-ecx
14060 68/push 0x11/imm32/alloc-id:fake
14061 68/push 0/imm32/name
14062 68/push 0/imm32/name
14063 68/push 0x11/imm32/alloc-id:fake:payload
14064 89/<- %ecx 4/r32/esp
14065 $test-emit-subx-stmt-primitive-register:initialize-var-name:
14066
14067 8d/copy-address *(ecx+4) 0/r32/eax
14068 (copy-array Heap "foo" %eax)
14069 $test-emit-subx-stmt-primitive-register:initialize-var-register:
14070
14071 8d/copy-address *(ecx+0x1c) 0/r32/eax
14072 (copy-array Heap "eax" %eax)
14073 $test-emit-subx-stmt-primitive-register:initialize-stmt-var:
14074
14075 68/push 0/imm32/is-deref:false
14076 68/push 0/imm32/next
14077 68/push 0/imm32/next
14078 51/push-ecx/var-foo
14079 68/push 0x11/imm32/alloc-id:fake
14080 68/push 0x11/imm32/alloc-id:fake:payload
14081 89/<- %ebx 4/r32/esp
14082 $test-emit-subx-stmt-primitive-register:initialize-stmt:
14083
14084 53/push-ebx/outputs
14085 68/push 0x11/imm32/alloc-id:fake
14086 68/push 0/imm32/no-inouts
14087 68/push 0/imm32/no-inouts
14088 68/push 0/imm32/operation
14089 68/push 0/imm32/operation
14090 68/push 1/imm32
14091 89/<- %esi 4/r32/esp
14092 $test-emit-subx-stmt-primitive-register:initialize-stmt-operation:
14093
14094 8d/copy-address *(esi+4) 0/r32/eax
14095 (copy-array Heap "increment" %eax)
14096 $test-emit-subx-stmt-primitive-register:initialize-formal-var:
14097
14098 68/push 0/imm32/register
14099 68/push 0/imm32/register
14100 68/push 0/imm32/no-stack-offset
14101 68/push 1/imm32/block-depth
14102 ff 6/subop/push *(ecx+0x10)
14103 68/push 0x11/imm32/alloc-id:fake
14104 68/push 0/imm32/name
14105 68/push 0/imm32/name
14106 68/push 0x11/imm32/alloc-id:fake:payload
14107 89/<- %ebx 4/r32/esp
14108 $test-emit-subx-stmt-primitive-register:initialize-formal-var-name:
14109
14110 8d/copy-address *(ebx+4) 0/r32/eax
14111 (copy-array Heap "dummy" %eax)
14112 $test-emit-subx-stmt-primitive-register:initialize-formal-register:
14113
14114 8d/copy-address *(ebx+0x1c) 0/r32/eax
14115 (copy-array Heap "*" %eax)
14116 $test-emit-subx-stmt-primitive-register:initialize-var-list:
14117
14118 68/push 0/imm32/next
14119 68/push 0/imm32/next
14120 53/push-ebx/formal-var
14121 68/push 0x11/imm32/alloc-id:fake
14122 68/push 0x11/imm32/alloc-id:fake:payload
14123 89/<- %ebx 4/r32/esp
14124 $test-emit-subx-stmt-primitive-register:initialize-primitive:
14125
14126 68/push 0/imm32/next
14127 68/push 0/imm32/next
14128 68/push 0/imm32/output-is-write-only
14129 68/push 0/imm32/no-disp32
14130 68/push 0/imm32/no-imm32
14131 68/push 0/imm32/no-r32
14132 68/push 3/imm32/rm32-is-first-output
14133 68/push 0/imm32/subx-name
14134 68/push 0/imm32/subx-name
14135 53/push-ebx/outputs
14136 68/push 0x11/imm32/alloc-id:fake
14137 68/push 0/imm32/no-inouts
14138 68/push 0/imm32/no-inouts
14139 68/push 0/imm32/name
14140 68/push 0/imm32/name
14141 89/<- %ebx 4/r32/esp
14142 $test-emit-subx-stmt-primitive-register:initialize-primitive-name:
14143
14144 (copy-array Heap "increment" %ebx)
14145 $test-emit-subx-stmt-primitive-register:initialize-primitive-subx-name:
14146
14147 8d/copy-address *(ebx+0x18) 0/r32/eax
14148 (copy-array Heap "ff 0/subop/increment" %eax)
14149
14150 c7 0/subop/copy *Curr-block-depth 0/imm32
14151 (emit-subx-stmt _test-output-buffered-file %esi %ebx)
14152 (flush _test-output-buffered-file)
14153 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
14159
14160 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-primitive-register")
14161
14162 89/<- %esp 5/r32/ebp
14163 5d/pop-to-ebp
14164 c3/return
14165
14166 test-emit-subx-stmt-select-primitive:
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186 55/push-ebp
14187 89/<- %ebp 4/r32/esp
14188
14189 (clear-stream _test-output-stream)
14190 (clear-stream $_test-output-buffered-file->buffer)
14191 $test-emit-subx-stmt-select-primitive:initialize-type:
14192
14193 68/push 0/imm32/right:null
14194 68/push 0/imm32/right:null
14195 68/push 0/imm32/left:unused
14196 68/push 1/imm32/value:int
14197 68/push 1/imm32/is-atom?:true
14198 68/push 0x11/imm32/alloc-id:fake:payload
14199 89/<- %ecx 4/r32/esp
14200 $test-emit-subx-stmt-select-primitive:initialize-var:
14201
14202 68/push 0/imm32/register
14203 68/push 0/imm32/register
14204 68/push 0/imm32/no-stack-offset
14205 68/push 1/imm32/block-depth
14206 51/push-ecx
14207 68/push 0x11/imm32/alloc-id:fake
14208 68/push 0/imm32/name
14209 68/push 0/imm32/name
14210 68/push 0x11/imm32/alloc-id:fake:payload
14211 89/<- %ecx 4/r32/esp
14212 $test-emit-subx-stmt-select-primitive:initialize-var-name:
14213
14214 8d/copy-address *(ecx+4) 0/r32/eax
14215 (copy-array Heap "foo" %eax)
14216 $test-emit-subx-stmt-select-primitive:initialize-var-register:
14217
14218 8d/copy-address *(ecx+0x1c) 0/r32/eax
14219 (copy-array Heap "eax" %eax)
14220 $test-emit-subx-stmt-select-primitive:initialize-stmt-var:
14221
14222 68/push 0/imm32/is-deref:false
14223 68/push 0/imm32/next
14224 68/push 0/imm32/next
14225 51/push-ecx/var-foo
14226 68/push 0x11/imm32/alloc-id:fake
14227 68/push 0x11/imm32/alloc-id:fake:payload
14228 89/<- %ebx 4/r32/esp
14229 $test-emit-subx-stmt-select-primitive:initialize-stmt:
14230
14231 53/push-ebx/outputs
14232 68/push 0x11/imm32/alloc-id:fake
14233 68/push 0/imm32/no-inouts
14234 68/push 0/imm32/no-inouts
14235 68/push 0/imm32/operation
14236 68/push 0/imm32/operation
14237 68/push 1/imm32
14238 89/<- %esi 4/r32/esp
14239 $test-emit-subx-stmt-select-primitive:initialize-stmt-operation:
14240
14241 8d/copy-address *(esi+4) 0/r32/eax
14242 (copy-array Heap "increment" %eax)
14243 $test-emit-subx-stmt-select-primitive:initialize-formal-var:
14244
14245 68/push 0/imm32/register
14246 68/push 0/imm32/register
14247 68/push 0/imm32/no-stack-offset
14248 68/push 1/imm32/block-depth
14249 ff 6/subop/push *(ecx+0x10)
14250 68/push 0x11/imm32/alloc-id:fake
14251 68/push 0/imm32/name
14252 68/push 0/imm32/name
14253 68/push 0x11/imm32/alloc-id:fake:payload
14254 89/<- %ebx 4/r32/esp
14255 $test-emit-subx-stmt-select-primitive:initialize-formal-var-name:
14256
14257 8d/copy-address *(ebx+4) 0/r32/eax
14258 (copy-array Heap "dummy" %eax)
14259 $test-emit-subx-stmt-select-primitive:initialize-formal-register:
14260
14261 8d/copy-address *(ebx+0x1c) 0/r32/eax
14262 (copy-array Heap "*" %eax)
14263 $test-emit-subx-stmt-select-primitive:initialize-var-list:
14264
14265 68/push 0/imm32/next
14266 68/push 0/imm32/next
14267 53/push-ebx/formal-var
14268 68/push 0x11/imm32/alloc-id:fake
14269 68/push 0x11/imm32/alloc-id:fake:payload
14270 89/<- %ebx 4/r32/esp
14271 $test-emit-subx-stmt-select-primitive:initialize-primitive2:
14272
14273 68/push 0/imm32/next
14274 68/push 0/imm32/next
14275 68/push 0/imm32/output-is-write-only
14276 68/push 0/imm32/no-disp32
14277 68/push 0/imm32/no-imm32
14278 68/push 0/imm32/no-r32
14279 68/push 3/imm32/rm32-is-first-output
14280 68/push 0/imm32/subx-name
14281 68/push 0/imm32/subx-name
14282 53/push-ebx/outputs
14283 68/push 0x11/imm32/alloc-id:fake
14284 68/push 0/imm32/no-inouts
14285 68/push 0/imm32/no-inouts
14286 68/push 0/imm32/name
14287 68/push 0/imm32/name
14288 68/push 0x11/imm32/alloc-id:fake:payload
14289 89/<- %edi 4/r32/esp
14290 $test-emit-subx-stmt-select-primitive:initialize-primitive2-name:
14291
14292 8d/copy-address *(edi+4) 0/r32/eax
14293 (copy-array Heap "increment" %eax)
14294 $test-emit-subx-stmt-select-primitive:initialize-primitive2-subx-name:
14295
14296 8d/copy-address *(edi+0x1c) 0/r32/eax
14297 (copy-array Heap "ff 0/subop/increment" %eax)
14298 $test-emit-subx-stmt-select-primitive:initialize-primitive:
14299
14300 57/push-edi
14301 68/push 0x11/imm32/alloc-id:fake
14302 68/push 0/imm32/output-is-write-only
14303 68/push 0/imm32/no-disp32
14304 68/push 0/imm32/no-imm32
14305 68/push 0/imm32/no-r32
14306 68/push 1/imm32/rm32-is-first-inout
14307 68/push 0/imm32/subx-name
14308 68/push 0/imm32/subx-name
14309 68/push 0/imm32/no-outputs
14310 68/push 0/imm32/no-outputs
14311 53/push-ebx/inouts
14312 68/push 0x11/imm32/alloc-id:fake
14313 68/push 0/imm32/name
14314 68/push 0/imm32/name
14315 89/<- %ebx 4/r32/esp
14316 $test-emit-subx-stmt-select-primitive:initialize-primitive-name:
14317
14318 (copy-array Heap "increment" %ebx)
14319 $test-emit-subx-stmt-select-primitive:initialize-primitive-subx-name:
14320
14321 8d/copy-address *(ebx+0x18) 0/r32/eax
14322 (copy-array Heap "ff 0/subop/increment" %eax)
14323
14324 c7 0/subop/copy *Curr-block-depth 0/imm32
14325 (emit-subx-stmt _test-output-buffered-file %esi %ebx)
14326 (flush _test-output-buffered-file)
14327 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
14333
14334 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-select-primitive")
14335
14336 89/<- %esp 5/r32/ebp
14337 5d/pop-to-ebp
14338 c3/return
14339
14340 test-emit-subx-stmt-select-primitive-2:
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360 55/push-ebp
14361 89/<- %ebp 4/r32/esp
14362
14363 (clear-stream _test-output-stream)
14364 (clear-stream $_test-output-buffered-file->buffer)
14365 $test-emit-subx-stmt-select-primitive-2:initialize-type:
14366
14367 68/push 0/imm32/right:null
14368 68/push 0/imm32/right:null
14369 68/push 0/imm32/left:unused
14370 68/push 1/imm32/value:int
14371 68/push 1/imm32/is-atom?:true
14372 68/push 0x11/imm32/alloc-id:fake:payload
14373 89/<- %ecx 4/r32/esp
14374 $test-emit-subx-stmt-select-primitive-2:initialize-var:
14375
14376 68/push 0/imm32/register
14377 68/push 0/imm32/register
14378 68/push 0/imm32/no-stack-offset
14379 68/push 1/imm32/block-depth
14380 51/push-ecx
14381 68/push 0x11/imm32/alloc-id:fake
14382 68/push 0/imm32/name
14383 68/push 0/imm32/name
14384 68/push 0x11/imm32/alloc-id:fake:payload
14385 89/<- %ecx 4/r32/esp
14386 $test-emit-subx-stmt-select-primitive-2:initialize-var-name:
14387
14388 8d/copy-address *(ecx+4) 0/r32/eax
14389 (copy-array Heap "foo" %eax)
14390 $test-emit-subx-stmt-select-primitive-2:initialize-var-register:
14391
14392 8d/copy-address *(ecx+0x1c) 0/r32/eax
14393 (copy-array Heap "eax" %eax)
14394 $test-emit-subx-stmt-select-primitive-2:initialize-stmt-var:
14395
14396 68/push 0/imm32/is-deref:false
14397 68/push 0/imm32/next
14398 68/push 0/imm32/next
14399 51/push-ecx/var-foo
14400 68/push 0x11/imm32/alloc-id:fake
14401 68/push 0x11/imm32/alloc-id:fake:payload
14402 89/<- %ebx 4/r32/esp
14403 $test-emit-subx-stmt-select-primitive-2:initialize-stmt:
14404
14405 68/push 0/imm32/no-outputs
14406 68/push 0/imm32/no-outputs
14407 53/push-ebx/inouts
14408 68/push 0x11/imm32/alloc-id:fake
14409 68/push 0/imm32/operation
14410 68/push 0/imm32/operation
14411 68/push 1/imm32
14412 89/<- %esi 4/r32/esp
14413 $test-emit-subx-stmt-select-primitive-2:initialize-stmt-operation:
14414
14415 8d/copy-address *(esi+4) 0/r32/eax
14416 (copy-array Heap "increment" %eax)
14417 $test-emit-subx-stmt-select-primitive-2:initialize-formal-var:
14418
14419 68/push 0/imm32/register
14420 68/push 0/imm32/register
14421 68/push 0/imm32/no-stack-offset
14422 68/push 1/imm32/block-depth
14423 ff 6/subop/push *(ecx+0x10)
14424 68/push 0x11/imm32/alloc-id:fake
14425 68/push 0/imm32/name
14426 68/push 0/imm32/name
14427 68/push 0x11/imm32/alloc-id:fake:payload
14428 89/<- %ebx 4/r32/esp
14429 $test-emit-subx-stmt-select-primitive-2:initialize-formal-var-name:
14430
14431 8d/copy-address *(ebx+4) 0/r32/eax
14432 (copy-array Heap "dummy" %eax)
14433 $test-emit-subx-stmt-select-primitive-2:initialize-formal-register:
14434
14435 8d/copy-address *(ebx+0x1c) 0/r32/eax
14436 (copy-array Heap "*" %eax)
14437 $test-emit-subx-stmt-select-primitive-2:initialize-var-list:
14438
14439 68/push 0/imm32/next
14440 68/push 0/imm32/next
14441 53/push-ebx/formal-var
14442 68/push 0x11/imm32/alloc-id:fake
14443 68/push 0x11/imm32/alloc-id:fake:payload
14444 89/<- %ebx 4/r32/esp
14445 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2:
14446
14447 68/push 0/imm32/next
14448 68/push 0/imm32/next
14449 68/push 0/imm32/output-is-write-only
14450 68/push 0/imm32/no-disp32
14451 68/push 0/imm32/no-imm32
14452 68/push 0/imm32/no-r32
14453 68/push 3/imm32/rm32-is-first-output
14454 68/push 0/imm32/subx-name
14455 68/push 0/imm32/subx-name
14456 53/push-ebx/outputs
14457 68/push 0x11/imm32/alloc-id:fake
14458 68/push 0/imm32/no-inouts
14459 68/push 0/imm32/no-inouts
14460 68/push 0/imm32/name
14461 68/push 0/imm32/name
14462 68/push 0x11/imm32/alloc-id:fake:payload
14463 89/<- %edi 4/r32/esp
14464 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2-name:
14465
14466 8d/copy-address *(edi+4) 0/r32/eax
14467 (copy-array Heap "increment" %eax)
14468 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2-subx-name:
14469
14470 8d/copy-address *(edi+0x1c) 0/r32/eax
14471 (copy-array Heap "ff 0/subop/increment" %eax)
14472 $test-emit-subx-stmt-select-primitive-2:initialize-primitive:
14473
14474 57/push-edi
14475 68/push 0x11/imm32/alloc-id:fake
14476 68/push 0/imm32/output-is-write-only
14477 68/push 0/imm32/no-disp32
14478 68/push 0/imm32/no-imm32
14479 68/push 0/imm32/no-r32
14480 68/push 1/imm32/rm32-is-first-inout
14481 68/push 0/imm32/subx-name
14482 68/push 0/imm32/subx-name
14483 68/push 0/imm32/no-outputs
14484 68/push 0/imm32/no-outputs
14485 53/push-ebx/inouts
14486 68/push 0x11/imm32/alloc-id:fake
14487 68/push 0/imm32/name
14488 68/push 0/imm32/name
14489 89/<- %ebx 4/r32/esp
14490 $test-emit-subx-stmt-select-primitive-2:initialize-primitive-name:
14491
14492 (copy-array Heap "increment" %ebx)
14493 $test-emit-subx-stmt-select-primitive-2:initialize-primitive-subx-name:
14494
14495 8d/copy-address *(ebx+0x18) 0/r32/eax
14496 (copy-array Heap "ff 0/subop/increment" %eax)
14497
14498 c7 0/subop/copy *Curr-block-depth 0/imm32
14499 (emit-subx-stmt _test-output-buffered-file %esi %ebx)
14500 (flush _test-output-buffered-file)
14501 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
14507
14508 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-select-primitive-2")
14509
14510 89/<- %esp 5/r32/ebp
14511 5d/pop-to-ebp
14512 c3/return
14513
14514 test-increment-register:
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528 55/push-ebp
14529 89/<- %ebp 4/r32/esp
14530
14531 (clear-stream _test-output-stream)
14532 (clear-stream $_test-output-buffered-file->buffer)
14533 $test-increment-register:initialize-type:
14534
14535 68/push 0/imm32/right:null
14536 68/push 0/imm32/right:null
14537 68/push 0/imm32/left:unused
14538 68/push 1/imm32/value:int
14539 68/push 1/imm32/is-atom?:true
14540 68/push 0x11/imm32/alloc-id:fake:payload
14541 89/<- %ecx 4/r32/esp
14542 $test-increment-register:initialize-var:
14543
14544 68/push 0/imm32/register
14545 68/push 0/imm32/register
14546 68/push 0/imm32/no-stack-offset
14547 68/push 1/imm32/block-depth
14548 51/push-ecx
14549 68/push 0x11/imm32/alloc-id:fake
14550 68/push 0/imm32/name
14551 68/push 0/imm32/name
14552 68/push 0x11/imm32/alloc-id:fake:payload
14553 89/<- %ecx 4/r32/esp
14554 $test-increment-register:initialize-var-name:
14555
14556 8d/copy-address *(ecx+4) 0/r32/eax
14557 (copy-array Heap "foo" %eax)
14558 $test-increment-register:initialize-var-register:
14559
14560 8d/copy-address *(ecx+0x1c) 0/r32/eax
14561 (copy-array Heap "eax" %eax)
14562 $test-increment-register:initialize-stmt-var:
14563
14564 68/push 0/imm32/is-deref:false
14565 68/push 0/imm32/next
14566 68/push 0/imm32/next
14567 51/push-ecx/var-foo
14568 68/push 0x11/imm32/alloc-id:fake
14569 68/push 0x11/imm32/alloc-id:fake:payload
14570 89/<- %ebx 4/r32/esp
14571 $test-increment-register:initialize-stmt:
14572
14573 53/push-ebx/outputs
14574 68/push 0x11/imm32/alloc-id:fake
14575 68/push 0/imm32/no-inouts
14576 68/push 0/imm32/no-inouts
14577 68/push 0/imm32/operation
14578 68/push 0/imm32/operation
14579 68/push 1/imm32
14580 89/<- %esi 4/r32/esp
14581 $test-increment-register:initialize-stmt-operation:
14582
14583 8d/copy-address *(esi+4) 0/r32/eax
14584 (copy-array Heap "increment" %eax)
14585
14586 c7 0/subop/copy *Curr-block-depth 0/imm32
14587 (emit-subx-stmt _test-output-buffered-file %esi Primitives)
14588 (flush _test-output-buffered-file)
14589 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
14595
14596 (check-next-stream-line-equal _test-output-stream "40/increment-eax" "F - test-increment-register")
14597
14598 89/<- %esp 5/r32/ebp
14599 5d/pop-to-ebp
14600 c3/return
14601
14602 test-add-reg-to-reg:
14603
14604
14605
14606
14607
14608 55/push-ebp
14609 89/<- %ebp 4/r32/esp
14610
14611 (clear-stream _test-output-stream)
14612 (clear-stream $_test-output-buffered-file->buffer)
14613 $test-add-reg-to-reg:initialize-type:
14614
14615 68/push 0/imm32/right:null
14616 68/push 0/imm32/right:null
14617 68/push 0/imm32/left:unused
14618 68/push 1/imm32/value:int
14619 68/push 1/imm32/is-atom?:true
14620 68/push 0x11/imm32/alloc-id:fake:payload
14621 89/<- %ecx 4/r32/esp
14622 $test-add-reg-to-reg:initialize-var1:
14623
14624 68/push 0/imm32/register
14625 68/push 0/imm32/register
14626 68/push 0/imm32/no-stack-offset
14627 68/push 1/imm32/block-depth
14628 51/push-ecx
14629 68/push 0x11/imm32/alloc-id:fake
14630 68/push 0/imm32/name
14631 68/push 0/imm32/name
14632 68/push 0x11/imm32/alloc-id:fake:payload
14633 89/<- %ecx 4/r32/esp
14634 $test-add-reg-to-reg:initialize-var1-name:
14635
14636 8d/copy-address *(ecx+4) 0/r32/eax
14637 (copy-array Heap "var1" %eax)
14638 $test-add-reg-to-reg:initialize-var1-register:
14639
14640 8d/copy-address *(ecx+0x1c) 0/r32/eax
14641 (copy-array Heap "eax" %eax)
14642 $test-add-reg-to-reg:initialize-var2:
14643
14644 68/push 0/imm32/register
14645 68/push 0/imm32/register
14646 68/push 0/imm32/no-stack-offset
14647 68/push 1/imm32/block-depth
14648 ff 6/subop/push *(ecx+0x10)
14649 68/push 0x11/imm32/alloc-id:fake
14650 68/push 0/imm32/name
14651 68/push 0/imm32/name
14652 68/push 0x11/imm32/alloc-id:fake:payload
14653 89/<- %edx 4/r32/esp
14654 $test-add-reg-to-reg:initialize-var2-name:
14655
14656 8d/copy-address *(edx+4) 0/r32/eax
14657 (copy-array Heap "var2" %eax)
14658 $test-add-reg-to-reg:initialize-var2-register:
14659
14660 8d/copy-address *(edx+0x1c) 0/r32/eax
14661 (copy-array Heap "ecx" %eax)
14662 $test-add-reg-to-reg:initialize-inouts:
14663
14664 68/push 0/imm32/is-deref:false
14665 68/push 0/imm32/next
14666 68/push 0/imm32/next
14667 52/push-edx/var2
14668 68/push 0x11/imm32/alloc-id:fake
14669 68/push 0x11/imm32/alloc-id:fake:payload
14670 89/<- %esi 4/r32/esp
14671 $test-add-reg-to-reg:initialize-outputs:
14672
14673 68/push 0/imm32/is-deref:false
14674 68/push 0/imm32/next
14675 68/push 0/imm32/next
14676 51/push-ecx/var1
14677 68/push 0x11/imm32/alloc-id:fake
14678 68/push 0x11/imm32/alloc-id:fake:payload
14679 89/<- %edi 4/r32/esp
14680 $test-add-reg-to-reg:initialize-stmt:
14681
14682 68/push 0/imm32/next
14683 68/push 0/imm32/next
14684 57/push-edi/outputs
14685 68/push 0x11/imm32/alloc-id:fake
14686 56/push-esi/inouts
14687 68/push 0x11/imm32/alloc-id:fake
14688 68/push 0/imm32/operation
14689 68/push 0/imm32/operation
14690 68/push 1/imm32/tag:stmt1
14691 89/<- %esi 4/r32/esp
14692 $test-add-reg-to-reg:initialize-stmt-operation:
14693
14694 8d/copy-address *(esi+4) 0/r32/eax
14695 (copy-array Heap "add" %eax)
14696
14697 c7 0/subop/copy *Curr-block-depth 0/imm32
14698 (emit-subx-stmt _test-output-buffered-file %esi Primitives)
14699 (flush _test-output-buffered-file)
14700 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
14706
14707 (check-next-stream-line-equal _test-output-stream "01/add-to %eax 0x00000001/r32" "F - test-add-reg-to-reg")
14708
14709 89/<- %esp 5/r32/ebp
14710 5d/pop-to-ebp
14711 c3/return
14712
14713 test-add-reg-to-mem:
14714
14715
14716
14717
14718
14719 55/push-ebp
14720 89/<- %ebp 4/r32/esp
14721
14722 (clear-stream _test-output-stream)
14723 (clear-stream $_test-output-buffered-file->buffer)
14724 $test-add-reg-to-mem:initialize-type:
14725
14726 68/push 0/imm32/right:null
14727 68/push 0/imm32/right:null
14728 68/push 0/imm32/left:unused
14729 68/push 1/imm32/value:int
14730 68/push 1/imm32/is-atom?:true
14731 68/push 0x11/imm32/alloc-id:fake:payload
14732 89/<- %ecx 4/r32/esp
14733 $test-add-reg-to-mem:initialize-var1:
14734
14735 68/push 0/imm32/register
14736 68/push 0/imm32/register
14737 68/push 8/imm32/stack-offset
14738 68/push 1/imm32/block-depth
14739 51/push-ecx
14740 68/push 0x11/imm32/alloc-id:fake
14741 68/push 0/imm32/name
14742 68/push 0/imm32/name
14743 68/push 0x11/imm32/alloc-id:fake:payload
14744 89/<- %ecx 4/r32/esp
14745 $test-add-reg-to-mem:initialize-var1-name:
14746
14747 8d/copy-address *(ecx+4) 0/r32/eax
14748 (copy-array Heap "var1" %eax)
14749 $test-add-reg-to-mem:initialize-var2:
14750
14751 68/push 0/imm32/register
14752 68/push 0/imm32/register
14753 68/push 0/imm32/no-stack-offset
14754 68/push 1/imm32/block-depth
14755 ff 6/subop/push *(ecx+0x10)
14756 68/push 0x11/imm32/alloc-id:fake
14757 68/push 0/imm32/name
14758 68/push 0/imm32/name
14759 68/push 0x11/imm32/alloc-id:fake:payload
14760 89/<- %edx 4/r32/esp
14761 $test-add-reg-to-mem:initialize-var2-name:
14762
14763 8d/copy-address *(edx+4) 0/r32/eax
14764 (copy-array Heap "var2" %eax)
14765 $test-add-reg-to-mem:initialize-var2-register:
14766
14767 8d/copy-address *(edx+0x1c) 0/r32/eax
14768 (copy-array Heap "ecx" %eax)
14769 $test-add-reg-to-mem:initialize-inouts:
14770
14771 68/push 0/imm32/is-deref:false
14772 68/push 0/imm32/next
14773 68/push 0/imm32/next
14774 52/push-edx/var2
14775 68/push 0x11/imm32/alloc-id:fake
14776 68/push 0x11/imm32/alloc-id:fake:payload
14777 89/<- %esi 4/r32/esp
14778
14779 68/push 0/imm32/is-deref:false
14780 56/push-esi/next
14781 68/push 0x11/imm32/alloc-id:fake
14782 51/push-ecx/var1
14783 68/push 0x11/imm32/alloc-id:fake
14784 68/push 0x11/imm32/alloc-id:fake:payload
14785 89/<- %esi 4/r32/esp
14786 $test-add-reg-to-mem:initialize-stmt:
14787
14788 68/push 0/imm32/next
14789 68/push 0/imm32/next
14790 68/push 0/imm32/outputs
14791 68/push 0/imm32/outputs
14792 56/push-esi/inouts
14793 68/push 0x11/imm32/alloc-id:fake
14794 68/push 0/imm32/operation
14795 68/push 0/imm32/operation
14796 68/push 1/imm32/tag:stmt1
14797 89/<- %esi 4/r32/esp
14798 $test-add-reg-to-mem:initialize-stmt-operation:
14799
14800 8d/copy-address *(esi+4) 0/r32/eax
14801 (copy-array Heap "add-to" %eax)
14802
14803 c7 0/subop/copy *Curr-block-depth 0/imm32
14804 (emit-subx-stmt _test-output-buffered-file %esi Primitives)
14805 (flush _test-output-buffered-file)
14806 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
14812
14813 (check-next-stream-line-equal _test-output-stream "01/add-to *(ebp+0x00000008) 0x00000001/r32" "F - test-add-reg-to-mem")
14814
14815 89/<- %esp 5/r32/ebp
14816 5d/pop-to-ebp
14817 c3/return
14818
14819 test-add-mem-to-reg:
14820
14821
14822
14823
14824
14825 55/push-ebp
14826 89/<- %ebp 4/r32/esp
14827
14828 (clear-stream _test-output-stream)
14829 (clear-stream $_test-output-buffered-file->buffer)
14830 $test-add-mem-to-reg:initialize-type:
14831
14832 68/push 0/imm32/right:null
14833 68/push 0/imm32/right:null
14834 68/push 0/imm32/left:unused
14835 68/push 1/imm32/value:int
14836 68/push 1/imm32/is-atom?:true
14837 68/push 0x11/imm32/alloc-id:fake:payload
14838 89/<- %ecx 4/r32/esp
14839 $test-add-mem-to-reg:initialize-var:
14840
14841 68/push 0/imm32/register
14842 68/push 0/imm32/register
14843 68/push 0/imm32/no-stack-offset
14844 68/push 1/imm32/block-depth
14845 51/push-ecx
14846 68/push 0x11/imm32/alloc-id:fake
14847 68/push 0/imm32/name
14848 68/push 0/imm32/name
14849 68/push 0x11/imm32/alloc-id:fake:payload
14850 89/<- %ecx 4/r32/esp
14851 $test-add-mem-to-reg:initialize-var-name:
14852
14853 8d/copy-address *(ecx+4) 0/r32/eax
14854 (copy-array Heap "var1" %eax)
14855 $test-add-mem-to-reg:initialize-var-register:
14856
14857 8d/copy-address *(ecx+0x1c) 0/r32/eax
14858 (copy-array Heap "eax" %eax)
14859 $test-add-mem-to-reg:initialize-var2:
14860
14861 68/push 0/imm32/register
14862 68/push 0/imm32/register
14863 68/push 8/imm32/stack-offset
14864 68/push 1/imm32/block-depth
14865 ff 6/subop/push *(ecx+0x10)
14866 68/push 0x11/imm32/alloc-id:fake
14867 68/push 0/imm32/name
14868 68/push 0/imm32/name
14869 68/push 0x11/imm32/alloc-id:fake:payload
14870 89/<- %edx 4/r32/esp
14871 $test-add-mem-to-reg:initialize-var2-name:
14872
14873 8d/copy-address *(edx+4) 0/r32/eax
14874 (copy-array Heap "var2" %eax)
14875 $test-add-mem-to-reg:initialize-inouts:
14876
14877 68/push 0/imm32/is-deref:false
14878 68/push 0/imm32/next
14879 68/push 0/imm32/next
14880 52/push-edx/var2
14881 68/push 0x11/imm32/alloc-id:fake
14882 68/push 0x11/imm32/alloc-id:fake:payload
14883 89/<- %esi 4/r32/esp
14884 $test-add-mem-to-reg:initialize-outputs:
14885
14886 68/push 0/imm32/is-deref:false
14887 68/push 0/imm32/next
14888 68/push 0/imm32/next
14889 51/push-ecx/var1
14890 68/push 0x11/imm32/alloc-id:fake
14891 68/push 0x11/imm32/alloc-id:fake:payload
14892 89/<- %edi 4/r32/esp
14893 $test-add-mem-to-reg:initialize-stmt:
14894
14895 68/push 0/imm32/next
14896 68/push 0/imm32/next
14897 57/push-edi/outputs
14898 68/push 0x11/imm32/alloc-id:fake
14899 56/push-esi/inouts
14900 68/push 0x11/imm32/alloc-id:fake
14901 68/push 0/imm32/operation
14902 68/push 0/imm32/operation
14903 68/push 1/imm32/tag:stmt1
14904 89/<- %esi 4/r32/esp
14905 $test-add-mem-to-reg:initialize-stmt-operation:
14906
14907 8d/copy-address *(esi+4) 0/r32/eax
14908 (copy-array Heap "add" %eax)
14909
14910 c7 0/subop/copy *Curr-block-depth 0/imm32
14911 (emit-subx-stmt _test-output-buffered-file %esi Primitives)
14912 (flush _test-output-buffered-file)
14913 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
14919
14920 (check-next-stream-line-equal _test-output-stream "03/add *(ebp+0x00000008) 0x00000000/r32" "F - test-add-mem-to-reg")
14921
14922 89/<- %esp 5/r32/ebp
14923 5d/pop-to-ebp
14924 c3/return
14925
14926 test-add-literal-to-eax:
14927
14928
14929
14930
14931
14932 55/push-ebp
14933 89/<- %ebp 4/r32/esp
14934
14935 (clear-stream _test-output-stream)
14936 (clear-stream $_test-output-buffered-file->buffer)
14937 $test-add-literal-to-eax:initialize-var-type:
14938
14939 68/push 0/imm32/right:null
14940 68/push 0/imm32/right:null
14941 68/push 0/imm32/left:unused
14942 68/push 1/imm32/value:int
14943 68/push 1/imm32/is-atom?:true
14944 68/push 0x11/imm32/alloc-id:fake:payload
14945 89/<- %ecx 4/r32/esp
14946 $test-add-literal-to-eax:initialize-var:
14947
14948 68/push 0/imm32/register
14949 68/push 0/imm32/register
14950 68/push 0/imm32/no-stack-offset
14951 68/push 1/imm32/block-depth
14952 51/push-ecx
14953 68/push 0x11/imm32/alloc-id:fake
14954 68/push 0/imm32/name
14955 68/push 0/imm32/name
14956 68/push 0x11/imm32/alloc-id:fake:payload
14957 89/<- %ecx 4/r32/esp
14958 $test-add-literal-to-eax:initialize-var-name:
14959
14960 8d/copy-address *(ecx+4) 0/r32/eax
14961 (copy-array Heap "v" %eax)
14962 $test-add-literal-to-eax:initialize-var-register:
14963
14964 8d/copy-address *(ecx+0x1c) 0/r32/eax
14965 (copy-array Heap "eax" %eax)
14966 $test-add-literal-to-eax:initialize-literal-type:
14967
14968 68/push 0/imm32/right:null
14969 68/push 0/imm32/right:null
14970 68/push 0/imm32/left:unused
14971 68/push 0/imm32/value:literal
14972 68/push 1/imm32/is-atom?:true
14973 68/push 0x11/imm32/alloc-id:fake:payload
14974 89/<- %edx 4/r32/esp
14975 $test-add-literal-to-eax:initialize-literal:
14976
14977 68/push 0/imm32/register
14978 68/push 0/imm32/register
14979 68/push 0/imm32/no-stack-offset
14980 68/push 1/imm32/block-depth
14981 52/push-edx
14982 68/push 0x11/imm32/alloc-id:fake
14983 68/push 0/imm32/name
14984 68/push 0/imm32/name
14985 68/push 0x11/imm32/alloc-id:fake:payload
14986 89/<- %edx 4/r32/esp
14987 $test-add-literal-to-eax:initialize-literal-value:
14988
14989 8d/copy-address *(edx+4) 0/r32/eax
14990 (copy-array Heap "0x34" %eax)
14991 $test-add-literal-to-eax:initialize-inouts:
14992
14993 68/push 0/imm32/is-deref:false
14994 68/push 0/imm32/next
14995 68/push 0/imm32/next
14996 52/push-edx/l
14997 68/push 0x11/imm32/alloc-id:fake
14998 68/push 0x11/imm32/alloc-id:fake:payload
14999 89/<- %esi 4/r32/esp
15000 $test-add-literal-to-eax:initialize-outputs:
15001
15002 68/push 0/imm32/is-deref:false
15003 68/push 0/imm32/next
15004 68/push 0/imm32/next
15005 51/push-ecx/v
15006 68/push 0x11/imm32/alloc-id:fake
15007 68/push 0x11/imm32/alloc-id:fake:payload
15008 89/<- %edi 4/r32/esp
15009 $test-add-literal-to-eax:initialize-stmt:
15010
15011 68/push 0/imm32/next
15012 68/push 0/imm32/next
15013 57/push-edi/outputs
15014 68/push 0x11/imm32/alloc-id:fake
15015 56/push-esi/inouts
15016 68/push 0x11/imm32/alloc-id:fake
15017 68/push 0/imm32/operation
15018 68/push 0/imm32/operation
15019 68/push 1/imm32/tag:stmt1
15020 89/<- %esi 4/r32/esp
15021 $test-add-literal-to-eax:initialize-stmt-operation:
15022
15023 8d/copy-address *(esi+4) 0/r32/eax
15024 (copy-array Heap "add" %eax)
15025
15026 c7 0/subop/copy *Curr-block-depth 0/imm32
15027 (emit-subx-stmt _test-output-buffered-file %esi Primitives)
15028 (flush _test-output-buffered-file)
15029 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
15035
15036 (check-next-stream-line-equal _test-output-stream "05/add-to-eax 0x34/imm32" "F - test-add-literal-to-eax")
15037
15038 89/<- %esp 5/r32/ebp
15039 5d/pop-to-ebp
15040 c3/return
15041
15042 test-add-literal-to-reg:
15043
15044
15045
15046
15047
15048 55/push-ebp
15049 89/<- %ebp 4/r32/esp
15050
15051 (clear-stream _test-output-stream)
15052 (clear-stream $_test-output-buffered-file->buffer)
15053 $test-add-literal-to-reg:initialize-var-type:
15054
15055 68/push 0/imm32/right:null
15056 68/push 0/imm32/right:null
15057 68/push 0/imm32/left:unused
15058 68/push 1/imm32/value:int
15059 68/push 1/imm32/is-atom?:true
15060 68/push 0x11/imm32/alloc-id:fake:payload
15061 89/<- %ecx 4/r32/esp
15062 $test-add-literal-to-reg:initialize-var:
15063
15064 68/push 0/imm32/register
15065 68/push 0/imm32/register
15066 68/push 0/imm32/no-stack-offset
15067 68/push 1/imm32/block-depth
15068 51/push-ecx
15069 68/push 0x11/imm32/alloc-id:fake
15070 68/push 0/imm32/name
15071 68/push 0/imm32/name
15072 68/push 0x11/imm32/alloc-id:fake:payload
15073 89/<- %ecx 4/r32/esp
15074 $test-add-literal-to-reg:initialize-var-name:
15075
15076 8d/copy-address *(ecx+4) 0/r32/eax
15077 (copy-array Heap "v" %eax)
15078 $test-add-literal-to-reg:initialize-var-register:
15079
15080 8d/copy-address *(ecx+0x1c) 0/r32/eax
15081 (copy-array Heap "ecx" %eax)
15082 $test-add-literal-to-reg:initialize-literal-type:
15083
15084 68/push 0/imm32/right:null
15085 68/push 0/imm32/right:null
15086 68/push 0/imm32/left:unused
15087 68/push 0/imm32/value:literal
15088 68/push 1/imm32/is-atom?:true
15089 68/push 0x11/imm32/alloc-id:fake:payload
15090 89/<- %edx 4/r32/esp
15091 $test-add-literal-to-reg:initialize-literal:
15092
15093 68/push 0/imm32/register
15094 68/push 0/imm32/register
15095 68/push 0/imm32/no-stack-offset
15096 68/push 1/imm32/block-depth
15097 52/push-edx
15098 68/push 0x11/imm32/alloc-id:fake
15099 68/push 0/imm32/name
15100 68/push 0/imm32/name
15101 68/push 0x11/imm32/alloc-id:fake:payload
15102 89/<- %edx 4/r32/esp
15103 $test-add-literal-to-reg:initialize-literal-value:
15104
15105 8d/copy-address *(edx+4) 0/r32/eax
15106 (copy-array Heap "0x34" %eax)
15107 $test-add-literal-to-reg:initialize-inouts:
15108
15109 68/push 0/imm32/is-deref:false
15110 68/push 0/imm32/next
15111 68/push 0/imm32/next
15112 52/push-edx/l
15113 68/push 0x11/imm32/alloc-id:fake
15114 68/push 0x11/imm32/alloc-id:fake:payload
15115 89/<- %esi 4/r32/esp
15116 $test-add-literal-to-reg:initialize-outputs:
15117
15118 68/push 0/imm32/is-deref:false
15119 68/push 0/imm32/next
15120 68/push 0/imm32/next
15121 51/push-ecx/v
15122 68/push 0x11/imm32/alloc-id:fake
15123 68/push 0x11/imm32/alloc-id:fake:payload
15124 89/<- %edi 4/r32/esp
15125 $test-add-literal-to-reg:initialize-stmt:
15126
15127 68/push 0/imm32/next
15128 68/push 0/imm32/next
15129 57/push-edi/outputs
15130 68/push 0x11/imm32/alloc-id:fake
15131 56/push-esi/inouts
15132 68/push 0x11/imm32/alloc-id:fake
15133 68/push 0/imm32/operation
15134 68/push 0/imm32/operation
15135 68/push 1/imm32/tag:stmt1
15136 89/<- %esi 4/r32/esp
15137 $test-add-literal-to-reg:initialize-stmt-operation:
15138
15139 8d/copy-address *(esi+4) 0/r32/eax
15140 (copy-array Heap "add" %eax)
15141
15142 c7 0/subop/copy *Curr-block-depth 0/imm32
15143 (emit-subx-stmt _test-output-buffered-file %esi Primitives)
15144 (flush _test-output-buffered-file)
15145 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
15151
15152 (check-next-stream-line-equal _test-output-stream "81 0/subop/add %ecx 0x34/imm32" "F - test-add-literal-to-reg")
15153
15154 89/<- %esp 5/r32/ebp
15155 5d/pop-to-ebp
15156 c3/return
15157
15158 test-add-literal-to-mem:
15159
15160
15161
15162
15163
15164 55/push-ebp
15165 89/<- %ebp 4/r32/esp
15166
15167 (clear-stream _test-output-stream)
15168 (clear-stream $_test-output-buffered-file->buffer)
15169 $test-add-literal-to-mem:initialize-type:
15170
15171 68/push 0/imm32/right:null
15172 68/push 0/imm32/right:null
15173 68/push 0/imm32/left:unused
15174 68/push 1/imm32/value:int
15175 68/push 1/imm32/is-atom?:true
15176 68/push 0x11/imm32/alloc-id:fake:payload
15177 89/<- %ecx 4/r32/esp
15178 $test-add-literal-to-mem:initialize-var1:
15179
15180 68/push 0/imm32/register
15181 68/push 0/imm32/register
15182 68/push 8/imm32/stack-offset
15183 68/push 1/imm32/block-depth
15184 51/push-ecx
15185 68/push 0x11/imm32/alloc-id:fake
15186 68/push 0/imm32/name
15187 68/push 0/imm32/name
15188 68/push 0x11/imm32/alloc-id:fake:payload
15189 89/<- %ecx 4/r32/esp
15190 $test-add-literal-to-mem:initialize-var1-name:
15191
15192 8d/copy-address *(ecx+4) 0/r32/eax
15193 (copy-array Heap "var1" %eax)
15194 $test-add-literal-to-mem:initialize-literal-type:
15195
15196 68/push 0/imm32/right:null
15197 68/push 0/imm32/right:null
15198 68/push 0/imm32/left:unused
15199 68/push 0/imm32/value:literal
15200 68/push 1/imm32/is-atom?:true
15201 68/push 0x11/imm32/alloc-id:fake:payload
15202 89/<- %edx 4/r32/esp
15203 $test-add-literal-to-mem:initialize-literal:
15204
15205 68/push 0/imm32/register
15206 68/push 0/imm32/register
15207 68/push 0/imm32/no-stack-offset
15208 68/push 1/imm32/block-depth
15209 52/push-edx
15210 68/push 0x11/imm32/alloc-id:fake
15211 68/push 0/imm32/name
15212 68/push 0/imm32/name
15213 68/push 0x11/imm32/alloc-id:fake:payload
15214 89/<- %edx 4/r32/esp
15215 $test-add-literal-to-mem:initialize-literal-value:
15216
15217 8d/copy-address *(edx+4) 0/r32/eax
15218 (copy-array Heap "0x34" %eax)
15219 $test-add-literal-to-mem:initialize-inouts:
15220
15221 68/push 0/imm32/is-deref:false
15222 68/push 0/imm32/next
15223 68/push 0/imm32/next
15224 52/push-edx/l
15225 68/push 0x11/imm32/alloc-id:fake
15226 68/push 0x11/imm32/alloc-id:fake:payload
15227 89/<- %esi 4/r32/esp
15228
15229 68/push 0/imm32/is-deref:false
15230 56/push-esi/next
15231 68/push 0x11/imm32/alloc-id:fake
15232 51/push-ecx/var1
15233 68/push 0x11/imm32/alloc-id:fake
15234 68/push 0x11/imm32/alloc-id:fake:payload
15235 89/<- %esi 4/r32/esp
15236 $test-add-literal-to-mem:initialize-stmt:
15237
15238 68/push 0/imm32/next
15239 68/push 0/imm32/next
15240 68/push 0/imm32/outputs
15241 68/push 0/imm32/outputs
15242 56/push-esi/inouts
15243 68/push 0x11/imm32/alloc-id:fake
15244 68/push 0/imm32/operation
15245 68/push 0/imm32/operation
15246 68/push 1/imm32/tag:stmt1
15247 89/<- %esi 4/r32/esp
15248 $test-add-literal-to-mem:initialize-stmt-operation:
15249
15250 8d/copy-address *(esi+4) 0/r32/eax
15251 (copy-array Heap "add-to" %eax)
15252
15253 c7 0/subop/copy *Curr-block-depth 0/imm32
15254 (emit-subx-stmt _test-output-buffered-file %esi Primitives)
15255 (flush _test-output-buffered-file)
15256 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
15262
15263 (check-next-stream-line-equal _test-output-stream "81 0/subop/add *(ebp+0x00000008) 0x34/imm32" "F - test-add-literal-to-mem")
15264
15265 89/<- %esp 5/r32/ebp
15266 5d/pop-to-ebp
15267 c3/return
15268
15269 test-compare-mem-with-reg:
15270
15271
15272
15273
15274
15275 55/push-ebp
15276 89/<- %ebp 4/r32/esp
15277
15278 (clear-stream _test-output-stream)
15279 (clear-stream $_test-output-buffered-file->buffer)
15280 $test-compare-mem-with-reg:initialize-type:
15281
15282 68/push 0/imm32/right:null
15283 68/push 0/imm32/right:null
15284 68/push 0/imm32/left:unused
15285 68/push 1/imm32/value:int
15286 68/push 1/imm32/is-atom?:true
15287 68/push 0x11/imm32/alloc-id:fake:payload
15288 89/<- %ecx 4/r32/esp
15289 $test-compare-mem-with-reg:initialize-var1:
15290
15291 68/push 0/imm32/register
15292 68/push 0/imm32/register
15293 68/push 8/imm32/stack-offset
15294 68/push 1/imm32/block-depth
15295 51/push-ecx
15296 68/push 0x11/imm32/alloc-id:fake
15297 68/push 0/imm32/name
15298 68/push 0/imm32/name
15299 68/push 0x11/imm32/alloc-id:fake:payload
15300 89/<- %ecx 4/r32/esp
15301 $test-compare-mem-with-reg:initialize-var1-name:
15302
15303 8d/copy-address *(ecx+4) 0/r32/eax
15304 (copy-array Heap "var1" %eax)
15305 $test-compare-mem-with-reg:initialize-var2:
15306
15307 68/push 0/imm32/register
15308 68/push 0/imm32/register
15309 68/push 0/imm32/no-stack-offset
15310 68/push 1/imm32/block-depth
15311 ff 6/subop/push *(ecx+0x10)
15312 68/push 0x11/imm32/alloc-id:fake
15313 68/push 0/imm32/name
15314 68/push 0/imm32/name
15315 68/push 0x11/imm32/alloc-id:fake:payload
15316 89/<- %edx 4/r32/esp
15317 $test-compare-mem-with-reg:initialize-var2-name:
15318
15319 8d/copy-address *(edx+4) 0/r32/eax
15320 (copy-array Heap "var2" %eax)
15321 $test-compare-mem-with-reg:initialize-var2-register:
15322
15323 8d/copy-address *(edx+0x1c) 0/r32/eax
15324 (copy-array Heap "eax" %eax)
15325 $test-compare-mem-with-reg:initialize-inouts:
15326
15327 68/push 0/imm32/is-deref:false
15328 68/push 0/imm32/next
15329 68/push 0/imm32/next
15330 52/push-edx/var2
15331 68/push 0x11/imm32/alloc-id:fake
15332 68/push 0x11/imm32/alloc-id:fake:payload
15333 89/<- %esi 4/r32/esp
15334
15335 68/push 0/imm32/is-deref:false
15336 56/push-esi/next
15337 68/push 0x11/imm32/alloc-id:fake
15338 51/push-ecx/var1
15339 68/push 0x11/imm32/alloc-id:fake
15340 68/push 0x11/imm32/alloc-id:fake:payload
15341 89/<- %esi 4/r32/esp
15342 $test-compare-mem-with-reg:initialize-stmt:
15343
15344 68/push 0/imm32/next
15345 68/push 0/imm32/next
15346 68/push 0/imm32/outputs
15347 68/push 0/imm32/outputs
15348 56/push-esi/inouts
15349 68/push 0x11/imm32/alloc-id:fake
15350 68/push 0/imm32/operation
15351 68/push 0/imm32/operation
15352 68/push 1/imm32/tag:stmt1
15353 89/<- %esi 4/r32/esp
15354 $test-compare-mem-with-reg:initialize-stmt-operation:
15355
15356 8d/copy-address *(esi+4) 0/r32/eax
15357 (copy-array Heap "compare" %eax)
15358
15359 c7 0/subop/copy *Curr-block-depth 0/imm32
15360 (emit-subx-stmt _test-output-buffered-file %esi Primitives)
15361 (flush _test-output-buffered-file)
15362 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
15368
15369 (check-next-stream-line-equal _test-output-stream "39/compare-> *(ebp+0x00000008) 0x00000000/r32" "F - test-compare-mem-with-reg")
15370
15371 89/<- %esp 5/r32/ebp
15372 5d/pop-to-ebp
15373 c3/return
15374
15375 test-compare-reg-with-mem:
15376
15377
15378
15379
15380
15381 55/push-ebp
15382 89/<- %ebp 4/r32/esp
15383
15384 (clear-stream _test-output-stream)
15385 (clear-stream $_test-output-buffered-file->buffer)
15386 $test-compare-reg-with-mem:initialize-type:
15387
15388 68/push 0/imm32/right:null
15389 68/push 0/imm32/right:null
15390 68/push 0/imm32/left:unused
15391 68/push 1/imm32/value:int
15392 68/push 1/imm32/is-atom?:true
15393 68/push 0x11/imm32/alloc-id:fake:payload
15394 89/<- %ecx 4/r32/esp
15395 $test-compare-reg-with-mem:initialize-var1:
15396
15397 68/push 0/imm32/register
15398 68/push 0/imm32/register
15399 68/push 0/imm32/no-stack-offset
15400 68/push 1/imm32/block-depth
15401 51/push-ecx
15402 68/push 0x11/imm32/alloc-id:fake
15403 68/push 0/imm32/name
15404 68/push 0/imm32/name
15405 68/push 0x11/imm32/alloc-id:fake:payload
15406 89/<- %ecx 4/r32/esp
15407 $test-compare-reg-with-mem:initialize-var1-name:
15408
15409 8d/copy-address *(ecx+4) 0/r32/eax
15410 (copy-array Heap "var1" %eax)
15411 $test-compare-reg-with-mem:initialize-var1-register:
15412
15413 8d/copy-address *(ecx+0x1c) 0/r32/eax
15414 (copy-array Heap "eax" %eax)
15415 $test-compare-reg-with-mem:initialize-var2:
15416
15417 68/push 0/imm32/register
15418 68/push 0/imm32/register
15419 68/push 8/imm32/stack-offset
15420 68/push 1/imm32/block-depth
15421 ff 6/subop/push *(ecx+0x10)
15422 68/push 0x11/imm32/alloc-id:fake
15423 68/push 0/imm32/name
15424 68/push 0/imm32/name
15425 68/push 0x11/imm32/alloc-id:fake:payload
15426 89/<- %edx 4/r32/esp
15427 $test-compare-reg-with-mem:initialize-var2-name:
15428
15429 8d/copy-address *(edx+4) 0/r32/eax
15430 (copy-array Heap "var2" %eax)
15431 $test-compare-reg-with-mem:initialize-inouts:
15432
15433 68/push 0/imm32/is-deref:false
15434 68/push 0/imm32/next
15435 68/push 0/imm32/next
15436 52/push-edx/var2
15437 68/push 0x11/imm32/alloc-id:fake
15438 68/push 0x11/imm32/alloc-id:fake:payload
15439 89/<- %esi 4/r32/esp
15440
15441 68/push 0/imm32/is-deref:false
15442 56/push-esi/next
15443 68/push 0x11/imm32/alloc-id:fake
15444 51/push-ecx/var1
15445 68/push 0x11/imm32/alloc-id:fake
15446 68/push 0x11/imm32/alloc-id:fake:payload
15447 89/<- %esi 4/r32/esp
15448 $test-compare-reg-with-mem:initialize-stmt:
15449
15450 68/push 0/imm32/next
15451 68/push 0/imm32/next
15452 68/push 0/imm32/outputs
15453 68/push 0/imm32/outputs
15454 56/push-esi/inouts
15455 68/push 0x11/imm32/alloc-id:fake
15456 68/push 0/imm32/operation
15457 68/push 0/imm32/operation
15458 68/push 1/imm32/tag:stmt1
15459 89/<- %esi 4/r32/esp
15460 $test-compare-reg-with-mem:initialize-stmt-operation:
15461
15462 8d/copy-address *(esi+4) 0/r32/eax
15463 (copy-array Heap "compare" %eax)
15464
15465 c7 0/subop/copy *Curr-block-depth 0/imm32
15466 (emit-subx-stmt _test-output-buffered-file %esi Primitives)
15467 (flush _test-output-buffered-file)
15468 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
15474
15475 (check-next-stream-line-equal _test-output-stream "3b/compare<- *(ebp+0x00000008) 0x00000000/r32" "F - test-compare-reg-with-mem")
15476
15477 89/<- %esp 5/r32/ebp
15478 5d/pop-to-ebp
15479 c3/return
15480
15481 test-compare-mem-with-literal:
15482
15483
15484
15485
15486
15487 55/push-ebp
15488 89/<- %ebp 4/r32/esp
15489
15490 (clear-stream _test-output-stream)
15491 (clear-stream $_test-output-buffered-file->buffer)
15492 $test-compare-mem-with-literal:initialize-type:
15493
15494 68/push 0/imm32/right:null
15495 68/push 0/imm32/right:null
15496 68/push 0/imm32/left:unused
15497 68/push 1/imm32/value:int
15498 68/push 1/imm32/is-atom?:true
15499 68/push 0x11/imm32/alloc-id:fake:payload
15500 89/<- %ecx 4/r32/esp
15501 $test-compare-mem-with-literal:initialize-var1:
15502
15503 68/push 0/imm32/register
15504 68/push 0/imm32/register
15505 68/push 8/imm32/stack-offset
15506 68/push 1/imm32/block-depth
15507 51/push-ecx
15508 68/push 0x11/imm32/alloc-id:fake
15509 68/push 0/imm32/name
15510 68/push 0/imm32/name
15511 68/push 0x11/imm32/alloc-id:fake:payload
15512 89/<- %ecx 4/r32/esp
15513 $test-compare-mem-with-literal:initialize-var1-name:
15514
15515 8d/copy-address *(ecx+4) 0/r32/eax
15516 (copy-array Heap "var1" %eax)
15517 $test-compare-mem-with-literal:initialize-literal-type:
15518
15519 68/push 0/imm32/right:null
15520 68/push 0/imm32/right:null
15521 68/push 0/imm32/left:unused
15522 68/push 0/imm32/value:literal
15523 68/push 1/imm32/is-atom?:true
15524 68/push 0x11/imm32/alloc-id:fake:payload
15525 89/<- %edx 4/r32/esp
15526 $test-compare-mem-with-literal:initialize-literal:
15527
15528 68/push 0/imm32/register
15529 68/push 0/imm32/register
15530 68/push 0/imm32/no-stack-offset
15531 68/push 1/imm32/block-depth
15532 52/push-edx
15533 68/push 0x11/imm32/alloc-id:fake
15534 68/push 0/imm32/name
15535 68/push 0/imm32/name
15536 68/push 0x11/imm32/alloc-id:fake:payload
15537 89/<- %edx 4/r32/esp
15538 $test-compare-mem-with-literal:initialize-literal-value:
15539
15540 8d/copy-address *(edx+4) 0/r32/eax
15541 (copy-array Heap "0x34" %eax)
15542 $test-compare-mem-with-literal:initialize-inouts:
15543
15544 68/push 0/imm32/is-deref:false
15545 68/push 0/imm32/next
15546 68/push 0/imm32/next
15547 52/push-edx/l
15548 68/push 0x11/imm32/alloc-id:fake
15549 68/push 0x11/imm32/alloc-id:fake:payload
15550 89/<- %esi 4/r32/esp
15551
15552 68/push 0/imm32/is-deref:false
15553 56/push-esi/next
15554 68/push 0x11/imm32/alloc-id:fake
15555 51/push-ecx/var1
15556 68/push 0x11/imm32/alloc-id:fake
15557 68/push 0x11/imm32/alloc-id:fake:payload
15558 89/<- %esi 4/r32/esp
15559 $test-compare-mem-with-literal:initialize-stmt:
15560
15561 68/push 0/imm32/next
15562 68/push 0/imm32/next
15563 68/push 0/imm32/outputs
15564 68/push 0/imm32/outputs
15565 56/push-esi/inouts
15566 68/push 0x11/imm32/alloc-id:fake
15567 68/push 0/imm32/operation
15568 68/push 0/imm32/operation
15569 68/push 1/imm32/tag:stmt1
15570 89/<- %esi 4/r32/esp
15571 $test-compare-mem-with-literal:initialize-stmt-operation:
15572
15573 8d/copy-address *(esi+4) 0/r32/eax
15574 (copy-array Heap "compare" %eax)
15575
15576 c7 0/subop/copy *Curr-block-depth 0/imm32
15577 (emit-subx-stmt _test-output-buffered-file %esi Primitives)
15578 (flush _test-output-buffered-file)
15579 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
15585
15586 (check-next-stream-line-equal _test-output-stream "81 7/subop/compare *(ebp+0x00000008) 0x34/imm32" "F - test-compare-mem-with-literal")
15587
15588 89/<- %esp 5/r32/ebp
15589 5d/pop-to-ebp
15590 c3/return
15591
15592 test-compare-eax-with-literal:
15593
15594
15595
15596
15597
15598 55/push-ebp
15599 89/<- %ebp 4/r32/esp
15600
15601 (clear-stream _test-output-stream)
15602 (clear-stream $_test-output-buffered-file->buffer)
15603 $test-compare-eax-with-literal:initialize-type:
15604
15605 68/push 0/imm32/right:null
15606 68/push 0/imm32/right:null
15607 68/push 0/imm32/left:unused
15608 68/push 1/imm32/value:int
15609 68/push 1/imm32/is-atom?:true
15610 68/push 0x11/imm32/alloc-id:fake:payload
15611 89/<- %ecx 4/r32/esp
15612 $test-compare-eax-with-literal:initialize-var1:
15613
15614 68/push 0/imm32/register
15615 68/push 0/imm32/register
15616 68/push 0/imm32/no-stack-offset
15617 68/push 1/imm32/block-depth
15618 51/push-ecx
15619 68/push 0x11/imm32/alloc-id:fake
15620 68/push 0/imm32/name
15621 68/push 0/imm32/name
15622 68/push 0x11/imm32/alloc-id:fake:payload
15623 89/<- %ecx 4/r32/esp
15624 $test-compare-eax-with-literal:initialize-var1-name:
15625
15626 8d/copy-address *(ecx+4) 0/r32/eax
15627 (copy-array Heap "var1" %eax)
15628 $test-compare-eax-with-literal:initialize-var1-register:
15629
15630 8d/copy-address *(ecx+0x1c) 0/r32/eax
15631 (copy-array Heap "eax" %eax)
15632 $test-compare-eax-with-literal:initialize-literal-type:
15633
15634 68/push 0/imm32/right:null
15635 68/push 0/imm32/right:null
15636 68/push 0/imm32/left:unused
15637 68/push 0/imm32/value:literal
15638 68/push 1/imm32/is-atom?:true
15639 68/push 0x11/imm32/alloc-id:fake:payload
15640 89/<- %edx 4/r32/esp
15641 $test-compare-eax-with-literal:initialize-literal:
15642
15643 68/push 0/imm32/register
15644 68/push 0/imm32/register
15645 68/push 0/imm32/no-stack-offset
15646 68/push 1/imm32/block-depth
15647 52/push-edx
15648 68/push 0x11/imm32/alloc-id:fake
15649 68/push 0/imm32/name
15650 68/push 0/imm32/name
15651 68/push 0x11/imm32/alloc-id:fake:payload
15652 89/<- %edx 4/r32/esp
15653 $test-compare-eax-with-literal:initialize-literal-value:
15654
15655 8d/copy-address *(edx+4) 0/r32/eax
15656 (copy-array Heap "0x34" %eax)
15657 $test-compare-eax-with-literal:initialize-inouts:
15658
15659 68/push 0/imm32/is-deref:false
15660 68/push 0/imm32/next
15661 68/push 0/imm32/next
15662 52/push-edx/l
15663 68/push 0x11/imm32/alloc-id:fake
15664 68/push 0x11/imm32/alloc-id:fake:payload
15665 89/<- %esi 4/r32/esp
15666
15667 68/push 0/imm32/is-deref:false
15668 56/push-esi/next
15669 68/push 0x11/imm32/alloc-id:fake
15670 51/push-ecx/var1
15671 68/push 0x11/imm32/alloc-id:fake
15672 68/push 0x11/imm32/alloc-id:fake:payload
15673 89/<- %esi 4/r32/esp
15674 $test-compare-eax-with-literal:initialize-stmt:
15675
15676 68/push 0/imm32/next
15677 68/push 0/imm32/next
15678 68/push 0/imm32/outputs
15679 68/push 0/imm32/outputs
15680 56/push-esi/inouts
15681 68/push 0x11/imm32/alloc-id:fake
15682 68/push 0/imm32/operation
15683 68/push 0/imm32/operation
15684 68/push 1/imm32/tag:stmt1
15685 89/<- %esi 4/r32/esp
15686 $test-compare-eax-with-literal:initialize-stmt-operation:
15687
15688 8d/copy-address *(esi+4) 0/r32/eax
15689 (copy-array Heap "compare" %eax)
15690
15691 c7 0/subop/copy *Curr-block-depth 0/imm32
15692 (emit-subx-stmt _test-output-buffered-file %esi Primitives)
15693 (flush _test-output-buffered-file)
15694 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
15700
15701 (check-next-stream-line-equal _test-output-stream "3d/compare-eax-with 0x34/imm32" "F - test-compare-eax-with-literal")
15702
15703 89/<- %esp 5/r32/ebp
15704 5d/pop-to-ebp
15705 c3/return
15706
15707 test-compare-reg-with-literal:
15708
15709
15710
15711
15712
15713 55/push-ebp
15714 89/<- %ebp 4/r32/esp
15715
15716 (clear-stream _test-output-stream)
15717 (clear-stream $_test-output-buffered-file->buffer)
15718 $test-compare-reg-with-literal:initialize-type:
15719
15720 68/push 0/imm32/right:null
15721 68/push 0/imm32/right:null
15722 68/push 0/imm32/left:unused
15723 68/push 1/imm32/value:int
15724 68/push 1/imm32/is-atom?:true
15725 68/push 0x11/imm32/alloc-id:fake:payload
15726 89/<- %ecx 4/r32/esp
15727 $test-compare-reg-with-literal:initialize-var1:
15728
15729 68/push 0/imm32/register
15730 68/push 0/imm32/register
15731 68/push 0/imm32/no-stack-offset
15732 68/push 1/imm32/block-depth
15733 51/push-ecx
15734 68/push 0x11/imm32/alloc-id:fake
15735 68/push 0/imm32/name
15736 68/push 0/imm32/name
15737 68/push 0x11/imm32/alloc-id:fake:payload
15738 89/<- %ecx 4/r32/esp
15739 $test-compare-reg-with-literal:initialize-var1-name:
15740
15741 8d/copy-address *(ecx+4) 0/r32/eax
15742 (copy-array Heap "var1" %eax)
15743 $test-compare-reg-with-literal:initialize-var1-register:
15744
15745 8d/copy-address *(ecx+0x1c) 0/r32/eax
15746 (copy-array Heap "ecx" %eax)
15747 $test-compare-reg-with-literal:initialize-literal-type:
15748
15749 68/push 0/imm32/right:null
15750 68/push 0/imm32/right:null
15751 68/push 0/imm32/left:unused
15752 68/push 0/imm32/value:literal
15753 68/push 1/imm32/is-atom?:true
15754 68/push 0x11/imm32/alloc-id:fake:payload
15755 89/<- %edx 4/r32/esp
15756 $test-compare-reg-with-literal:initialize-literal:
15757
15758 68/push 0/imm32/register
15759 68/push 0/imm32/register
15760 68/push 0/imm32/no-stack-offset
15761 68/push 1/imm32/block-depth
15762 52/push-edx
15763 68/push 0x11/imm32/alloc-id:fake
15764 68/push 0/imm32/name
15765 68/push 0/imm32/name
15766 68/push 0x11/imm32/alloc-id:fake:payload
15767 89/<- %edx 4/r32/esp
15768 $test-compare-reg-with-literal:initialize-literal-value:
15769
15770 8d/copy-address *(edx+4) 0/r32/eax
15771 (copy-array Heap "0x34" %eax)
15772 $test-compare-reg-with-literal:initialize-inouts:
15773
15774 68/push 0/imm32/is-deref:false
15775 68/push 0/imm32/next
15776 68/push 0/imm32/next
15777 52/push-edx/l
15778 68/push 0x11/imm32/alloc-id:fake
15779 68/push 0x11/imm32/alloc-id:fake:payload
15780 89/<- %esi 4/r32/esp
15781
15782 68/push 0/imm32/is-deref:false
15783 56/push-esi/next
15784 68/push 0x11/imm32/alloc-id:fake
15785 51/push-ecx/var1
15786 68/push 0x11/imm32/alloc-id:fake
15787 68/push 0x11/imm32/alloc-id:fake:payload
15788 89/<- %esi 4/r32/esp
15789 $test-compare-reg-with-literal:initialize-stmt:
15790
15791 68/push 0/imm32/next
15792 68/push 0/imm32/next
15793 68/push 0/imm32/outputs
15794 68/push 0/imm32/outputs
15795 56/push-esi/inouts
15796 68/push 0x11/imm32/alloc-id:fake
15797 68/push 0/imm32/operation
15798 68/push 0/imm32/operation
15799 68/push 1/imm32/tag:stmt1
15800 89/<- %esi 4/r32/esp
15801 $test-compare-reg-with-literal:initialize-stmt-operation:
15802
15803 8d/copy-address *(esi+4) 0/r32/eax
15804 (copy-array Heap "compare" %eax)
15805
15806 c7 0/subop/copy *Curr-block-depth 0/imm32
15807 (emit-subx-stmt _test-output-buffered-file %esi Primitives)
15808 (flush _test-output-buffered-file)
15809 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
15815
15816 (check-next-stream-line-equal _test-output-stream "81 7/subop/compare %ecx 0x34/imm32" "F - test-compare-reg-with-literal")
15817
15818 89/<- %esp 5/r32/ebp
15819 5d/pop-to-ebp
15820 c3/return
15821
15822 test-emit-subx-stmt-function-call:
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840 55/push-ebp
15841 89/<- %ebp 4/r32/esp
15842
15843 (clear-stream _test-output-stream)
15844 (clear-stream $_test-output-buffered-file->buffer)
15845 $test-emit-subx-function-call:initialize-type:
15846
15847 68/push 0/imm32/right:null
15848 68/push 0/imm32/right:null
15849 68/push 0/imm32/left:unused
15850 68/push 1/imm32/value:int
15851 68/push 1/imm32/is-atom?:true
15852 68/push 0x11/imm32/alloc-id:fake:payload
15853 89/<- %ecx 4/r32/esp
15854 $test-emit-subx-function-call:initialize-var:
15855
15856 68/push 0/imm32/no-register
15857 68/push 0/imm32/no-register
15858 68/push -8/imm32/stack-offset
15859 68/push 1/imm32/block-depth
15860 51/push-ecx/type
15861 68/push 0x11/imm32/alloc-id:fake
15862 68/push 0/imm32/name
15863 68/push 0/imm32/name
15864 68/push 0x11/imm32/alloc-id:fake:payload
15865 89/<- %ecx 4/r32/esp
15866 $test-emit-subx-function-call:initialize-var-name:
15867
15868 8d/copy-address *(ecx+4) 0/r32/eax
15869 (copy-array Heap "foo" %eax)
15870 $test-emit-subx-function-call:initialize-stmt-var:
15871
15872 68/push 0/imm32/is-deref:false
15873 68/push 0/imm32/next
15874 68/push 0/imm32/next
15875 51/push-ecx/var-foo
15876 68/push 0x11/imm32/alloc-id:fake
15877 68/push 0x11/imm32/alloc-id:fake:payload
15878 89/<- %ebx 4/r32/esp
15879 $test-emit-subx-function-call:initialize-stmt:
15880
15881 68/push 0/imm32/no-outputs
15882 68/push 0/imm32/no-outputs
15883 53/push-ebx/inouts
15884 68/push 0x11/imm32/alloc-id:fake
15885 68/push 0/imm32/operation
15886 68/push 0/imm32/operation
15887 68/push 1/imm32/tag
15888 89/<- %esi 4/r32/esp
15889 $test-emit-subx-function-call:initialize-stmt-operation:
15890
15891 8d/copy-address *(esi+4) 0/r32/eax
15892 (copy-array Heap "f" %eax)
15893
15894 c7 0/subop/copy *Curr-block-depth 0/imm32
15895 (emit-subx-stmt _test-output-buffered-file %esi 0)
15896 (flush _test-output-buffered-file)
15897 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
15903
15904 (check-next-stream-line-equal _test-output-stream "(f *(ebp+0xfffffff8))" "F - test-emit-subx-stmt-function-call")
15905
15906 89/<- %esp 5/r32/ebp
15907 5d/pop-to-ebp
15908 c3/return
15909
15910 test-emit-subx-stmt-function-call-with-literal-arg:
15911
15912
15913
15914
15915
15916
15917 55/push-ebp
15918 89/<- %ebp 4/r32/esp
15919
15920 (clear-stream _test-output-stream)
15921 (clear-stream $_test-output-buffered-file->buffer)
15922 $test-emit-subx-function-call-with-literal-arg:initialize-type:
15923
15924 68/push 0/imm32/right:null
15925 68/push 0/imm32/right:null
15926 68/push 0/imm32/left:unused
15927 68/push 0/imm32/value:literal
15928 68/push 1/imm32/is-atom?:true
15929 68/push 0x11/imm32/alloc-id:fake:payload
15930 89/<- %ecx 4/r32/esp
15931 $test-emit-subx-function-call-with-literal-arg:initialize-var:
15932
15933 68/push 0/imm32/no-register
15934 68/push 0/imm32/no-register
15935 68/push 0/imm32/no-stack-offset
15936 68/push 1/imm32/block-depth
15937 51/push-ecx/type
15938 68/push 0x11/imm32/alloc-id:fake
15939 68/push 0/imm32/name
15940 68/push 0/imm32/name
15941 68/push 0x11/imm32/alloc-id:fake:payload
15942 89/<- %ecx 4/r32/esp
15943 $test-emit-subx-function-call-with-literal-arg:initialize-var-name:
15944
15945 8d/copy-address *(ecx+4) 0/r32/eax
15946 (copy-array Heap "0x34" %eax)
15947 $test-emit-subx-function-call-with-literal-arg:initialize-stmt-var:
15948
15949 68/push 0/imm32/is-deref:false
15950 68/push 0/imm32/next
15951 68/push 0/imm32/next
15952 51/push-ecx/var-foo
15953 68/push 0x11/imm32/alloc-id:fake
15954 68/push 0x11/imm32/alloc-id:fake:payload
15955 89/<- %ebx 4/r32/esp
15956 $test-emit-subx-function-call-with-literal-arg:initialize-stmt:
15957
15958 68/push 0/imm32/no-outputs
15959 68/push 0/imm32/no-outputs
15960 53/push-ebx/inouts
15961 68/push 0x11/imm32/alloc-id:fake
15962 68/push 0/imm32/operation
15963 68/push 0/imm32/operation
15964 68/push 1/imm32/tag
15965 89/<- %esi 4/r32/esp
15966 $test-emit-subx-function-call-with-literal-arg:initialize-stmt-operation:
15967
15968 8d/copy-address *(esi+4) 0/r32/eax
15969 (copy-array Heap "f" %eax)
15970
15971 c7 0/subop/copy *Curr-block-depth 0/imm32
15972 (emit-subx-stmt _test-output-buffered-file %esi 0 %ebx)
15973 (flush _test-output-buffered-file)
15974 +-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------
15980
15981 (check-next-stream-line-equal _test-output-stream "(f 0x34)" "F - test-emit-subx-stmt-function-call-with-literal-arg")
15982
15983 89/<- %esp 5/r32/ebp
15984 5d/pop-to-ebp
15985 c3/return
15986
15987 emit-indent:
15988
15989 55/push-ebp
15990 89/<- %ebp 4/r32/esp
15991
15992 50/push-eax
15993
15994 8b/-> *(ebp+0xc) 0/r32/eax
15995 {
15996
15997 3d/compare-eax-with 0/imm32
15998 7e/jump-if-<= break/disp8
15999 (write-buffered *(ebp+8) " ")
16000 48/decrement-eax
16001 eb/jump loop/disp8
16002 }
16003 $emit-indent:end:
16004
16005 58/pop-to-eax
16006
16007 89/<- %esp 5/r32/ebp
16008 5d/pop-to-ebp
16009 c3/return
16010
16011 emit-subx-prologue:
16012
16013 55/push-ebp
16014 89/<- %ebp 4/r32/esp
16015
16016 (write-buffered *(ebp+8) " # . prologue\n")
16017 (write-buffered *(ebp+8) " 55/push-ebp\n")
16018 (write-buffered *(ebp+8) " 89/<- %ebp 4/r32/esp\n")
16019 $emit-subx-prologue:end:
16020
16021 89/<- %esp 5/r32/ebp
16022 5d/pop-to-ebp
16023 c3/return
16024
16025 emit-subx-epilogue:
16026
16027 55/push-ebp
16028 89/<- %ebp 4/r32/esp
16029
16030 (write-buffered *(ebp+8) " # . epilogue\n")
16031 (write-buffered *(ebp+8) " 89/<- %esp 5/r32/ebp\n")
16032 (write-buffered *(ebp+8) " 5d/pop-to-ebp\n")
16033 (write-buffered *(ebp+8) " c3/return\n")
16034 $emit-subx-epilogue:end:
16035
16036 89/<- %esp 5/r32/ebp
16037 5d/pop-to-ebp
16038 c3/return