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 == data
236
237 Program:
238 _Program-functions:
239 0/imm32
240 _Program-functions->payload:
241 0/imm32
242 _Program-types:
243 0/imm32
244 _Program-types->payload:
245 0/imm32
246 _Program-signatures:
247 0/imm32
248 _Program-signatures->payload:
249 0/imm32
250
251
252
253
254
255
256
257
258
259
260
261
262 Function-name:
263 0/imm32
264 Function-inouts:
265 8/imm32
266 Function-outputs:
267 0x10/imm32
268 Function-body:
269 0x18/imm32
270 Function-next:
271 0x20/imm32
272 Function-size:
273 0x28/imm32/40
274
275 Primitive-name:
276 0/imm32
277 Primitive-inouts:
278 8/imm32
279 Primitive-outputs:
280 0x10/imm32
281 Primitive-subx-name:
282 0x18/imm32
283 Primitive-subx-rm32:
284 0x20/imm32
285 Primitive-subx-r32:
286 0x24/imm32
287 Primitive-subx-imm32:
288 0x28/imm32
289 Primitive-subx-disp32:
290 0x2c/imm32
291 Primitive-output-is-write-only:
292 0x30/imm32
293 Primitive-next:
294 0x34/imm32
295 Primitive-size:
296 0x3c/imm32/60
297
298 Stmt-tag:
299 0/imm32
300
301 Block-stmts:
302 4/imm32
303 Block-var:
304 0xc/imm32
305
306 Stmt1-operation:
307 4/imm32
308 Stmt1-inouts:
309 0xc/imm32
310 Stmt1-outputs:
311 0x14/imm32
312
313 Vardef-var:
314 4/imm32
315
316 Regvardef-operation:
317 4/imm32
318 Regvardef-inouts:
319 0xc/imm32
320 Regvardef-outputs:
321 0x14/imm32
322
323 Stmt-size:
324 0x1c/imm32
325
326 Var-name:
327 0/imm32
328 Var-type:
329 8/imm32
330 Var-block-depth:
331 0x10/imm32
332 Var-offset:
333 0x14/imm32
334 Var-register:
335 0x18/imm32
336 Var-size:
337 0x20/imm32
338
339 List-value:
340 0/imm32
341 List-next:
342 8/imm32
343 List-size:
344 0x10/imm32
345
346
347 Stmt-var-value:
348 0/imm32
349 Stmt-var-next:
350 8/imm32
351 Stmt-var-is-deref:
352 0x10/imm32
353 Stmt-var-size:
354 0x14/imm32
355
356
357
358 Live-var-value:
359 0/imm32
360 Live-var-register-spilled:
361 8/imm32
362 Live-var-size:
363 0xc/imm32
364
365
366
367 Type-tree-is-atom:
368 0/imm32
369
370 Type-tree-value:
371 4/imm32
372 Type-tree-value-size:
373 8/imm32
374
375 Type-tree-left:
376 4/imm32
377 Type-tree-right:
378 0xc/imm32
379
380 Type-tree-size:
381 0x14/imm32
382
383
384
385
386 Type-id:
387 0/imm32/write
388 0/imm32/read
389 0x100/imm32/size
390
391 "literal"/imm32
392 "int"/imm32
393 "addr"/imm32
394 "array"/imm32
395 "handle"/imm32
396 "boolean"/imm32
397 "constant"/imm32
398 "offset"/imm32
399
400 "byte"/imm32
401 0/imm32
402
403 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
404 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
405 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
406 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
407 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
408 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
411 Primitive-type-ids:
412 0x24
413
414
415
416
417 Typeinfo-id:
418 0/imm32
419 Typeinfo-fields:
420 4/imm32
421
422
423
424
425
426 Typeinfo-total-size-in-bytes:
427 0xc/imm32
428 Typeinfo-next:
429 0x10/imm32
430 Typeinfo-size:
431 0x18/imm32
432
433
434
435 Typeinfo-fields-row-size:
436 0x10/imm32
437
438
439
440
441
442
443
444
445 Typeinfo-entry-input-var:
446 0/imm32
447 Typeinfo-entry-index:
448 8/imm32
449 Typeinfo-entry-output-var:
450 0xc/imm32
451 Typeinfo-entry-size:
452 0x14/imm32
453
454 == code
455
456 Entry:
457
458 89/<- %ebp 4/r32/esp
459 (new-segment *Heap-size Heap)
460
461 {
462
463 81 7/subop/compare *ebp 1/imm32
464 7e/jump-if-<= break/disp8
465
466 (kernel-string-equal? *(ebp+8) "test")
467 3d/compare-eax-and 0/imm32/false
468 74/jump-if-= break/disp8
469
470 (run-tests)
471
472 8b/-> *Num-test-failures 3/r32/ebx
473 eb/jump $mu-main:end/disp8
474 }
475
476 (convert-mu Stdin Stdout Stderr 0)
477 (flush Stdout)
478
479 bb/copy-to-ebx 0/imm32
480 $mu-main:end:
481 e8/call syscall_exit/disp32
482
483 convert-mu:
484
485 55/push-ebp
486 89/<- %ebp 4/r32/esp
487
488 50/push-eax
489
490 c7 0/subop/copy *Next-block-index 1/imm32
491 8b/-> *Primitive-type-ids 0/r32/eax
492 89/<- *Type-id 0/r32/eax
493 c7 0/subop/copy *_Program-functions 0/imm32
494 c7 0/subop/copy *_Program-functions->payload 0/imm32
495 c7 0/subop/copy *_Program-types 0/imm32
496 c7 0/subop/copy *_Program-types->payload 0/imm32
497
498 (parse-mu *(ebp+8) *(ebp+0x10) *(ebp+0x14))
499 (populate-mu-type-sizes *(ebp+0x10) *(ebp+0x14))
500
501 (check-mu-types *(ebp+0x10) *(ebp+0x14))
502 (emit-subx *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
503 $convert-mu:end:
504
505 58/pop-to-eax
506
507 89/<- %esp 5/r32/ebp
508 5d/pop-to-ebp
509 c3/return
510
511 test-convert-empty-input:
512
513
514 55/push-ebp
515 89/<- %ebp 4/r32/esp
516
517 (clear-stream _test-input-stream)
518 (clear-stream $_test-input-buffered-file->buffer)
519 (clear-stream _test-output-stream)
520 (clear-stream $_test-output-buffered-file->buffer)
521
522 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
523 (flush _test-output-buffered-file)
524 (check-stream-equal _test-output-stream "" "F - test-convert-empty-input")
525
526 89/<- %esp 5/r32/ebp
527 5d/pop-to-ebp
528 c3/return
529
530 test-convert-function-skeleton:
531
532 55/push-ebp
533 89/<- %ebp 4/r32/esp
534
535 (clear-stream _test-input-stream)
536 (clear-stream $_test-input-buffered-file->buffer)
537 (clear-stream _test-output-stream)
538 (clear-stream $_test-output-buffered-file->buffer)
539
540 (write _test-input-stream "fn foo {\n")
541 (write _test-input-stream "}\n")
542
543 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
544 (flush _test-output-buffered-file)
545 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
551
552 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-skeleton/0")
553 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-skeleton/1")
554 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-skeleton/2")
555 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-skeleton/3")
556 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-skeleton/4")
557 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-skeleton/5")
558 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-skeleton/6")
559 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-skeleton/7")
560
561 89/<- %esp 5/r32/ebp
562 5d/pop-to-ebp
563 c3/return
564
565 test-convert-multiple-function-skeletons:
566
567 55/push-ebp
568 89/<- %ebp 4/r32/esp
569
570 (clear-stream _test-input-stream)
571 (clear-stream $_test-input-buffered-file->buffer)
572 (clear-stream _test-output-stream)
573 (clear-stream $_test-output-buffered-file->buffer)
574
575 (write _test-input-stream "fn foo {\n")
576 (write _test-input-stream "}\n")
577 (write _test-input-stream "fn bar {\n")
578 (write _test-input-stream "}\n")
579
580 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
581 (flush _test-output-buffered-file)
582 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
588
589 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-multiple-function-skeletons/0")
590 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-multiple-function-skeletons/1")
591 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-multiple-function-skeletons/2")
592 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-multiple-function-skeletons/3")
593 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-multiple-function-skeletons/4")
594 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-multiple-function-skeletons/5")
595 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-multiple-function-skeletons/6")
596 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-multiple-function-skeletons/7")
597
598 (check-next-stream-line-equal _test-output-stream "bar:" "F - test-convert-multiple-function-skeletons/10")
599 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-multiple-function-skeletons/11")
600 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-multiple-function-skeletons/12")
601 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-multiple-function-skeletons/13")
602 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-multiple-function-skeletons/14")
603 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-multiple-function-skeletons/15")
604 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-multiple-function-skeletons/16")
605 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-multiple-function-skeletons/17")
606
607 89/<- %esp 5/r32/ebp
608 5d/pop-to-ebp
609 c3/return
610
611 test-convert-function-with-arg:
612
613 55/push-ebp
614 89/<- %ebp 4/r32/esp
615
616 (clear-stream _test-input-stream)
617 (clear-stream $_test-input-buffered-file->buffer)
618 (clear-stream _test-output-stream)
619 (clear-stream $_test-output-buffered-file->buffer)
620
621 (write _test-input-stream "fn foo n: int {\n")
622 (write _test-input-stream "}\n")
623
624 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
625 (flush _test-output-buffered-file)
626 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
632
633 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-arg/0")
634 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-arg/1")
635 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-arg/2")
636 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-arg/3")
637 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-arg/4")
638 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-arg/5")
639 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-arg/6")
640 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-arg/7")
641
642 89/<- %esp 5/r32/ebp
643 5d/pop-to-ebp
644 c3/return
645
646 test-convert-function-with-arg-and-body:
647
648 55/push-ebp
649 89/<- %ebp 4/r32/esp
650
651 (clear-stream _test-input-stream)
652 (clear-stream $_test-input-buffered-file->buffer)
653 (clear-stream _test-output-stream)
654 (clear-stream $_test-output-buffered-file->buffer)
655
656 (write _test-input-stream "fn foo n: int {\n")
657 (write _test-input-stream " increment n\n")
658 (write _test-input-stream "}\n")
659
660 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
661 (flush _test-output-buffered-file)
662 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
668
669 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-arg-and-body/0")
670 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-arg-and-body/1")
671 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-arg-and-body/2")
672 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-arg-and-body/3")
673 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-arg-and-body/4")
674 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-arg-and-body/5")
675 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-arg-and-body/6")
676 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-arg-and-body/7")
677 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-arg-and-body/8")
678 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-arg-and-body/9")
679 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-arg-and-body/10")
680 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-arg-and-body/11")
681 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-arg-and-body/12")
682
683 89/<- %esp 5/r32/ebp
684 5d/pop-to-ebp
685 c3/return
686
687 test-convert-function-distinguishes-args:
688
689 55/push-ebp
690 89/<- %ebp 4/r32/esp
691
692 (clear-stream _test-input-stream)
693 (clear-stream $_test-input-buffered-file->buffer)
694 (clear-stream _test-output-stream)
695 (clear-stream $_test-output-buffered-file->buffer)
696
697 (write _test-input-stream "fn foo a: int, b: int {\n")
698 (write _test-input-stream " increment b\n")
699 (write _test-input-stream "}\n")
700
701 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
702 (flush _test-output-buffered-file)
703 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
709
710 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-distinguishes-args/0")
711 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-distinguishes-args/1")
712 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-distinguishes-args/2")
713 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-distinguishes-args/3")
714 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-distinguishes-args/4")
715 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-distinguishes-args/5")
716 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x0000000c)" "F - test-convert-function-distinguishes-args/6")
717 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-distinguishes-args/7")
718 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-distinguishes-args/8")
719 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-distinguishes-args/9")
720 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-distinguishes-args/10")
721 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-distinguishes-args/11")
722 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-distinguishes-args/12")
723
724 89/<- %esp 5/r32/ebp
725 5d/pop-to-ebp
726 c3/return
727
728 test-convert-function-returns-result:
729
730 55/push-ebp
731 89/<- %ebp 4/r32/esp
732
733 (clear-stream _test-input-stream)
734 (clear-stream $_test-input-buffered-file->buffer)
735 (clear-stream _test-output-stream)
736 (clear-stream $_test-output-buffered-file->buffer)
737
738 (write _test-input-stream "fn foo a: int, b: int -> result/eax: int {\n")
739 (write _test-input-stream " result <- copy a\n")
740 (write _test-input-stream " result <- increment\n")
741 (write _test-input-stream "}\n")
742
743 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
744 (flush _test-output-buffered-file)
745 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
751
752 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-returns-result/0")
753 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-returns-result/1")
754 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-returns-result/2")
755 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-returns-result/3")
756 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-returns-result/4")
757 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-returns-result/5")
758 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-returns-result/6")
759 (check-next-stream-line-equal _test-output-stream " 40/increment-eax" "F - test-convert-function-returns-result/7")
760 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-returns-result/8")
761 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-returns-result/9")
762 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-returns-result/10")
763 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-returns-result/11")
764 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-returns-result/12")
765 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-returns-result/13")
766
767 89/<- %esp 5/r32/ebp
768 5d/pop-to-ebp
769 c3/return
770
771 test-convert-function-with-literal-arg:
772
773 55/push-ebp
774 89/<- %ebp 4/r32/esp
775
776 (clear-stream _test-input-stream)
777 (clear-stream $_test-input-buffered-file->buffer)
778 (clear-stream _test-output-stream)
779 (clear-stream $_test-output-buffered-file->buffer)
780
781 (write _test-input-stream "fn foo a: int, b: int -> result/eax: int {\n")
782 (write _test-input-stream " result <- copy a\n")
783 (write _test-input-stream " result <- add 1\n")
784 (write _test-input-stream "}\n")
785
786 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
787 (flush _test-output-buffered-file)
788 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
794
795 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-literal-arg/0")
796 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-literal-arg/1")
797 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-literal-arg/2")
798 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-literal-arg/3")
799 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-literal-arg/4")
800 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-literal-arg/5")
801 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-with-literal-arg/6")
802 (check-next-stream-line-equal _test-output-stream " 05/add-to-eax 1/imm32" "F - test-convert-function-with-literal-arg/7")
803 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-literal-arg/8")
804 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-literal-arg/9")
805 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-literal-arg/10")
806 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-literal-arg/11")
807 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-literal-arg/12")
808 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-literal-arg/13")
809
810 89/<- %esp 5/r32/ebp
811 5d/pop-to-ebp
812 c3/return
813
814 test-convert-function-with-literal-arg-2:
815
816 55/push-ebp
817 89/<- %ebp 4/r32/esp
818
819 (clear-stream _test-input-stream)
820 (clear-stream $_test-input-buffered-file->buffer)
821 (clear-stream _test-output-stream)
822 (clear-stream $_test-output-buffered-file->buffer)
823
824 (write _test-input-stream "fn foo a: int, b: int -> result/ebx: int {\n")
825 (write _test-input-stream " result <- copy a\n")
826 (write _test-input-stream " result <- add 1\n")
827 (write _test-input-stream "}\n")
828
829 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
830 (flush _test-output-buffered-file)
831 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
837
838 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-literal-arg-2/0")
839 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-literal-arg-2/1")
840 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-literal-arg-2/2")
841 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-literal-arg-2/3")
842 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-literal-arg-2/4")
843 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-literal-arg-2/5")
844 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000003/r32" "F - test-convert-function-with-literal-arg-2/6")
845 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %ebx 1/imm32" "F - test-convert-function-with-literal-arg-2/7")
846 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-literal-arg-2/8")
847 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-literal-arg-2/9")
848 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-literal-arg-2/10")
849 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-literal-arg-2/11")
850 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-literal-arg-2/12")
851 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-literal-arg-2/13")
852
853 89/<- %esp 5/r32/ebp
854 5d/pop-to-ebp
855 c3/return
856
857 test-convert-function-call-with-literal-arg:
858
859 55/push-ebp
860 89/<- %ebp 4/r32/esp
861
862 (clear-stream _test-input-stream)
863 (clear-stream $_test-input-buffered-file->buffer)
864 (clear-stream _test-output-stream)
865 (clear-stream $_test-output-buffered-file->buffer)
866
867 (write _test-input-stream "fn main -> result/ebx: int {\n")
868 (write _test-input-stream " result <- do-add 3 4\n")
869 (write _test-input-stream "}\n")
870 (write _test-input-stream "fn do-add a: int, b: int -> result/ebx: int {\n")
871 (write _test-input-stream " result <- copy a\n")
872 (write _test-input-stream " result <- add b\n")
873 (write _test-input-stream "}\n")
874
875 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
876 (flush _test-output-buffered-file)
877 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
883
884 (check-next-stream-line-equal _test-output-stream "main:" "F - test-convert-function-call-with-literal-arg/0")
885 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-literal-arg/1")
886 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-literal-arg/2")
887 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-literal-arg/3")
888 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-literal-arg/4")
889 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:loop:" "F - test-convert-function-call-with-literal-arg/5")
890 (check-next-stream-line-equal _test-output-stream " (do-add 3 4)" "F - test-convert-function-call-with-literal-arg/6")
891 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-literal-arg/7")
892 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:break:" "F - test-convert-function-call-with-literal-arg/8")
893 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-literal-arg/9")
894 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-literal-arg/10")
895 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-literal-arg/11")
896 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-literal-arg/12")
897 (check-next-stream-line-equal _test-output-stream "do-add:" "F - test-convert-function-call-with-literal-arg/13")
898 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-literal-arg/14")
899 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-literal-arg/15")
900 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-literal-arg/16")
901 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-literal-arg/17")
902 (check-next-stream-line-equal _test-output-stream "$do-add:0x00000002:loop:" "F - test-convert-function-call-with-literal-arg/18")
903 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/19")
904 (check-next-stream-line-equal _test-output-stream " 03/add *(ebp+0x0000000c) 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/20")
905 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-literal-arg/21")
906 (check-next-stream-line-equal _test-output-stream "$do-add:0x00000002:break:" "F - test-convert-function-call-with-literal-arg/22")
907 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-literal-arg/23")
908 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-literal-arg/24")
909 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-literal-arg/25")
910 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-literal-arg/26")
911
912 89/<- %esp 5/r32/ebp
913 5d/pop-to-ebp
914 c3/return
915
916 test-convert-function-call-with-signature:
917
918 55/push-ebp
919 89/<- %ebp 4/r32/esp
920
921 (clear-stream _test-input-stream)
922 (clear-stream $_test-input-buffered-file->buffer)
923 (clear-stream _test-output-stream)
924 (clear-stream $_test-output-buffered-file->buffer)
925
926 (write _test-input-stream "fn main -> result/ebx: int {\n")
927 (write _test-input-stream " result <- do-add 3 4\n")
928 (write _test-input-stream "}\n")
929 (write _test-input-stream "sig do-add a: int, b: int -> result/ebx: int\n")
930
931 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
932 (flush _test-output-buffered-file)
933 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
939
940 (check-next-stream-line-equal _test-output-stream "main:" "F - test-convert-function-call-with-signature/0")
941 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-signature/1")
942 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-signature/2")
943 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-signature/3")
944 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-signature/4")
945 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:loop:" "F - test-convert-function-call-with-signature/5")
946 (check-next-stream-line-equal _test-output-stream " (do-add 3 4)" "F - test-convert-function-call-with-signature/6")
947 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-signature/7")
948 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:break:" "F - test-convert-function-call-with-signature/8")
949 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-signature/9")
950 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-signature/10")
951 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-signature/11")
952 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-signature/12")
953
954 89/<- %esp 5/r32/ebp
955 5d/pop-to-ebp
956 c3/return
957
958 test-convert-function-with-local-var-in-mem:
959
960 55/push-ebp
961 89/<- %ebp 4/r32/esp
962
963 (clear-stream _test-input-stream)
964 (clear-stream $_test-input-buffered-file->buffer)
965 (clear-stream _test-output-stream)
966 (clear-stream $_test-output-buffered-file->buffer)
967
968 (write _test-input-stream "fn foo {\n")
969 (write _test-input-stream " var x: int\n")
970 (write _test-input-stream " increment x\n")
971 (write _test-input-stream "}\n")
972
973 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
974 (flush _test-output-buffered-file)
975 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
981
982 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-mem/0")
983 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-mem/1")
984 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-mem/2")
985 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-mem/3")
986 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-mem/4")
987 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-mem/5")
988 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-mem/6")
989 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-local-var-in-mem/7")
990 (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")
991 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-mem/9")
992 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-mem/10")
993 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-mem/11")
994 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-mem/12")
995 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-mem/13")
996 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-mem/14")
997
998 89/<- %esp 5/r32/ebp
999 5d/pop-to-ebp
1000 c3/return
1001
1002 test-local-var-in-mem-has-no-initializer:
1003
1004 55/push-ebp
1005 89/<- %ebp 4/r32/esp
1006
1007 (clear-stream _test-input-stream)
1008 (clear-stream $_test-input-buffered-file->buffer)
1009 (clear-stream _test-output-stream)
1010 (clear-stream $_test-output-buffered-file->buffer)
1011 (clear-stream _test-error-stream)
1012 (clear-stream $_test-error-buffered-file->buffer)
1013
1014 68/push 0/imm32
1015 68/push 0/imm32
1016 89/<- %edx 4/r32/esp
1017 (tailor-exit-descriptor %edx 0x10)
1018
1019 (write _test-input-stream "fn foo {\n")
1020 (write _test-input-stream " var x: int <- copy 0\n")
1021 (write _test-input-stream " increment x\n")
1022 (write _test-input-stream "}\n")
1023
1024 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1025
1026
1027 89/<- %edx 4/r32/esp
1028 (flush _test-output-buffered-file)
1029 (flush _test-error-buffered-file)
1030 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1036
1037 (check-stream-equal _test-output-stream "" "F - test-var-in-mem-has-no-initializer: output should be empty")
1038 (check-next-stream-line-equal _test-error-stream "fn foo: var x: variables on the stack can't take an initializer" "F - test-var-in-mem-has-no-initializer: error message")
1039
1040 (check-ints-equal *(edx+4) 2 "F - test-var-in-mem-has-no-initializer: exit status")
1041
1042 81 0/subop/add %esp 8/imm32
1043
1044 5d/pop-to-ebp
1045 c3/return
1046
1047 test-convert-function-with-local-var-with-compound-type-in-mem:
1048
1049 55/push-ebp
1050 89/<- %ebp 4/r32/esp
1051
1052 (clear-stream _test-input-stream)
1053 (clear-stream $_test-input-buffered-file->buffer)
1054 (clear-stream _test-output-stream)
1055 (clear-stream $_test-output-buffered-file->buffer)
1056
1057 (write _test-input-stream "fn foo {\n")
1058 (write _test-input-stream " var x: (addr int)\n")
1059 (write _test-input-stream " copy-to x, 0\n")
1060 (write _test-input-stream "}\n")
1061
1062 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1063 (flush _test-output-buffered-file)
1064 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1070
1071 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/0")
1072 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-with-compound-type-in-mem/1")
1073 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-with-compound-type-in-mem/2")
1074 (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")
1075 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-with-compound-type-in-mem/4")
1076 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/5")
1077 (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")
1078 (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")
1079 (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")
1080 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-with-compound-type-in-mem/9")
1081 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/10")
1082 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-with-compound-type-in-mem/11")
1083 (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")
1084 (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")
1085 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-with-compound-type-in-mem/14")
1086
1087 89/<- %esp 5/r32/ebp
1088 5d/pop-to-ebp
1089 c3/return
1090
1091 test-convert-function-with-local-var-in-reg:
1092
1093 55/push-ebp
1094 89/<- %ebp 4/r32/esp
1095
1096 (clear-stream _test-input-stream)
1097 (clear-stream $_test-input-buffered-file->buffer)
1098 (clear-stream _test-output-stream)
1099 (clear-stream $_test-output-buffered-file->buffer)
1100
1101 (write _test-input-stream "fn foo {\n")
1102 (write _test-input-stream " var x/ecx: int <- copy 3\n")
1103 (write _test-input-stream " x <- increment\n")
1104 (write _test-input-stream "}\n")
1105
1106 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1107 (flush _test-output-buffered-file)
1108 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1114
1115 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-reg/0")
1116 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-reg/1")
1117 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-reg/2")
1118 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-reg/3")
1119 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-reg/4")
1120 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-reg/5")
1121 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-local-var-in-reg/6")
1122 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-function-with-local-var-in-reg/7")
1123 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-convert-function-with-local-var-in-reg/8")
1124 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-local-var-in-reg/9")
1125 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-reg/10")
1126 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-reg/11")
1127 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-reg/12")
1128 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-reg/13")
1129 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-reg/14")
1130 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-reg/15")
1131
1132 89/<- %esp 5/r32/ebp
1133 5d/pop-to-ebp
1134 c3/return
1135
1136 test-convert-function-with-second-local-var-in-same-reg:
1137
1138 55/push-ebp
1139 89/<- %ebp 4/r32/esp
1140
1141 (clear-stream _test-input-stream)
1142 (clear-stream $_test-input-buffered-file->buffer)
1143 (clear-stream _test-output-stream)
1144 (clear-stream $_test-output-buffered-file->buffer)
1145
1146 (write _test-input-stream "fn foo {\n")
1147 (write _test-input-stream " var x/ecx: int <- copy 3\n")
1148 (write _test-input-stream " var y/ecx: int <- copy 4\n")
1149 (write _test-input-stream " y <- increment\n")
1150 (write _test-input-stream "}\n")
1151
1152 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1153 (flush _test-output-buffered-file)
1154 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1160
1161 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-second-local-var-in-same-reg/0")
1162 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-second-local-var-in-same-reg/1")
1163 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-second-local-var-in-same-reg/2")
1164 (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")
1165 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-second-local-var-in-same-reg/4")
1166 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-second-local-var-in-same-reg/5")
1167 (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")
1168 (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")
1169 (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")
1170 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-convert-function-with-second-local-var-in-same-reg/9")
1171 (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")
1172 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-second-local-var-in-same-reg/11")
1173 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-second-local-var-in-same-reg/12")
1174 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-second-local-var-in-same-reg/13")
1175 (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")
1176 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-second-local-var-in-same-reg/15")
1177 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-second-local-var-in-same-reg/16")
1178
1179 89/<- %esp 5/r32/ebp
1180 5d/pop-to-ebp
1181 c3/return
1182
1183 test-read-clobbered-reg-var:
1184
1185 55/push-ebp
1186 89/<- %ebp 4/r32/esp
1187
1188 (clear-stream _test-input-stream)
1189 (clear-stream $_test-input-buffered-file->buffer)
1190 (clear-stream _test-output-stream)
1191 (clear-stream $_test-output-buffered-file->buffer)
1192 (clear-stream _test-error-stream)
1193 (clear-stream $_test-error-buffered-file->buffer)
1194
1195 68/push 0/imm32
1196 68/push 0/imm32
1197 89/<- %edx 4/r32/esp
1198 (tailor-exit-descriptor %edx 0x10)
1199
1200 (write _test-input-stream "fn foo {\n")
1201 (write _test-input-stream " var x/ecx: int <- copy 3\n")
1202 (write _test-input-stream " var y/ecx: int <- copy 4\n")
1203 (write _test-input-stream " x <- increment\n")
1204 (write _test-input-stream "}\n")
1205
1206 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1207
1208
1209 89/<- %edx 4/r32/esp
1210 (flush _test-output-buffered-file)
1211 (flush _test-error-buffered-file)
1212 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1218
1219 (check-stream-equal _test-output-stream "" "F - test-read-clobbered-reg-var: output should be empty")
1220 (check-next-stream-line-equal _test-error-stream "fn foo: register ecx reads var 'x' after writing var 'y'" "F - test-read-clobbered-reg-var: error message")
1221
1222 (check-ints-equal *(edx+4) 2 "F - test-read-clobbered-reg-var: exit status")
1223
1224 81 0/subop/add %esp 8/imm32
1225
1226 5d/pop-to-ebp
1227 c3/return
1228
1229 test-convert-function-call:
1230
1231 55/push-ebp
1232 89/<- %ebp 4/r32/esp
1233
1234 (clear-stream _test-input-stream)
1235 (clear-stream $_test-input-buffered-file->buffer)
1236 (clear-stream _test-output-stream)
1237 (clear-stream $_test-output-buffered-file->buffer)
1238
1239 (write _test-input-stream "fn main -> result/ebx: int {\n")
1240 (write _test-input-stream " result <- foo\n")
1241 (write _test-input-stream "}\n")
1242 (write _test-input-stream "fn foo -> result/ebx: int {\n")
1243 (write _test-input-stream " result <- copy 3\n")
1244 (write _test-input-stream "}\n")
1245
1246 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1247 (flush _test-output-buffered-file)
1248 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1254
1255 (check-next-stream-line-equal _test-output-stream "main:" "F - test-convert-function-call/0")
1256 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call/1")
1257 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call/2")
1258 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call/3")
1259 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call/4")
1260 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:loop:" "F - test-convert-function-call/5")
1261 (check-next-stream-line-equal _test-output-stream " (foo)" "F - test-convert-function-call/6")
1262 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call/7")
1263 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:break:" "F - test-convert-function-call/8")
1264 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call/9")
1265 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call/10")
1266 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call/11")
1267 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call/12")
1268 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call/13")
1269 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call/14")
1270 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call/15")
1271 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call/16")
1272 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call/17")
1273 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-call/18")
1274 (check-next-stream-line-equal _test-output-stream " bb/copy-to-ebx 3/imm32" "F - test-convert-function-call/19")
1275 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call/20")
1276 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-call/21")
1277 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call/22")
1278 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call/23")
1279 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call/24")
1280 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call/25")
1281
1282 89/<- %esp 5/r32/ebp
1283 5d/pop-to-ebp
1284 c3/return
1285
1286 test-convert-function-call-with-incorrect-inout-type:
1287
1288 55/push-ebp
1289 89/<- %ebp 4/r32/esp
1290
1291 (clear-stream _test-input-stream)
1292 (clear-stream $_test-input-buffered-file->buffer)
1293 (clear-stream _test-output-stream)
1294 (clear-stream $_test-output-buffered-file->buffer)
1295 (clear-stream _test-error-stream)
1296 (clear-stream $_test-error-buffered-file->buffer)
1297
1298 68/push 0/imm32
1299 68/push 0/imm32
1300 89/<- %edx 4/r32/esp
1301 (tailor-exit-descriptor %edx 0x10)
1302
1303 (write _test-input-stream "fn f {\n")
1304 (write _test-input-stream " var x: int\n")
1305 (write _test-input-stream " g x\n")
1306 (write _test-input-stream "}\n")
1307 (write _test-input-stream "fn g a: foo {\n")
1308 (write _test-input-stream "}\n")
1309
1310 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1311
1312
1313 89/<- %edx 4/r32/esp
1314 (flush _test-output-buffered-file)
1315 (flush _test-error-buffered-file)
1316 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1322
1323 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-incorrect-inout-type: output should be empty")
1324 (check-next-stream-line-equal _test-error-stream "fn f: call g: type for inout 'x' is not right" "F - test-convert-function-call-with-incorrect-inout-type: error message")
1325
1326 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-incorrect-inout-type: exit status")
1327
1328 81 0/subop/add %esp 8/imm32
1329 5d/pop-to-ebp
1330 c3/return
1331
1332 test-convert-function-call-with-too-few-inouts:
1333
1334 55/push-ebp
1335 89/<- %ebp 4/r32/esp
1336
1337 (clear-stream _test-input-stream)
1338 (clear-stream $_test-input-buffered-file->buffer)
1339 (clear-stream _test-output-stream)
1340 (clear-stream $_test-output-buffered-file->buffer)
1341 (clear-stream _test-error-stream)
1342 (clear-stream $_test-error-buffered-file->buffer)
1343
1344 68/push 0/imm32
1345 68/push 0/imm32
1346 89/<- %edx 4/r32/esp
1347 (tailor-exit-descriptor %edx 0x10)
1348
1349 (write _test-input-stream "fn f {\n")
1350 (write _test-input-stream " g\n")
1351 (write _test-input-stream "}\n")
1352 (write _test-input-stream "fn g a: int {\n")
1353 (write _test-input-stream "}\n")
1354
1355 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1356
1357
1358 89/<- %edx 4/r32/esp
1359 (flush _test-output-buffered-file)
1360 (flush _test-error-buffered-file)
1361 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1367
1368 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-few-inouts: output should be empty")
1369 (check-next-stream-line-equal _test-error-stream "fn f: call g: too few inouts" "F - test-convert-function-call-with-too-few-inouts: error message")
1370
1371 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-few-inouts: exit status")
1372
1373 81 0/subop/add %esp 8/imm32
1374 5d/pop-to-ebp
1375 c3/return
1376
1377 test-convert-function-call-with-too-many-inouts:
1378
1379 55/push-ebp
1380 89/<- %ebp 4/r32/esp
1381
1382 (clear-stream _test-input-stream)
1383 (clear-stream $_test-input-buffered-file->buffer)
1384 (clear-stream _test-output-stream)
1385 (clear-stream $_test-output-buffered-file->buffer)
1386 (clear-stream _test-error-stream)
1387 (clear-stream $_test-error-buffered-file->buffer)
1388
1389 68/push 0/imm32
1390 68/push 0/imm32
1391 89/<- %edx 4/r32/esp
1392 (tailor-exit-descriptor %edx 0x10)
1393
1394 (write _test-input-stream "fn f {\n")
1395 (write _test-input-stream " var x: int\n")
1396 (write _test-input-stream " g x\n")
1397 (write _test-input-stream "}\n")
1398 (write _test-input-stream "fn g {\n")
1399 (write _test-input-stream "}\n")
1400
1401 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1402
1403
1404 89/<- %edx 4/r32/esp
1405 (flush _test-output-buffered-file)
1406 (flush _test-error-buffered-file)
1407 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1413
1414 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-many-inouts: output should be empty")
1415 (check-next-stream-line-equal _test-error-stream "fn f: call g: too many inouts" "F - test-convert-function-call-with-too-many-inouts: error message")
1416
1417 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-many-inouts: exit status")
1418
1419 81 0/subop/add %esp 8/imm32
1420 5d/pop-to-ebp
1421 c3/return
1422
1423 test-convert-function-call-with-incorrect-output-type:
1424
1425 55/push-ebp
1426 89/<- %ebp 4/r32/esp
1427
1428 (clear-stream _test-input-stream)
1429 (clear-stream $_test-input-buffered-file->buffer)
1430 (clear-stream _test-output-stream)
1431 (clear-stream $_test-output-buffered-file->buffer)
1432 (clear-stream _test-error-stream)
1433 (clear-stream $_test-error-buffered-file->buffer)
1434
1435 68/push 0/imm32
1436 68/push 0/imm32
1437 89/<- %edx 4/r32/esp
1438 (tailor-exit-descriptor %edx 0x10)
1439
1440 (write _test-input-stream "fn f {\n")
1441 (write _test-input-stream " var x/eax: int <- g\n")
1442 (write _test-input-stream "}\n")
1443 (write _test-input-stream "fn g -> a/eax: foo {\n")
1444 (write _test-input-stream "}\n")
1445
1446 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1447
1448
1449 89/<- %edx 4/r32/esp
1450 (flush _test-output-buffered-file)
1451 (flush _test-error-buffered-file)
1452 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1458
1459 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-incorrect-output-type: output should be empty")
1460 (check-next-stream-line-equal _test-error-stream "fn f: call g: type for output 'x' is not right" "F - test-convert-function-call-with-incorrect-output-type: error message")
1461
1462 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-incorrect-output-type: exit status")
1463
1464 81 0/subop/add %esp 8/imm32
1465 5d/pop-to-ebp
1466 c3/return
1467
1468 test-convert-function-call-with-too-few-outputs:
1469
1470 55/push-ebp
1471 89/<- %ebp 4/r32/esp
1472
1473 (clear-stream _test-input-stream)
1474 (clear-stream $_test-input-buffered-file->buffer)
1475 (clear-stream _test-output-stream)
1476 (clear-stream $_test-output-buffered-file->buffer)
1477 (clear-stream _test-error-stream)
1478 (clear-stream $_test-error-buffered-file->buffer)
1479
1480 68/push 0/imm32
1481 68/push 0/imm32
1482 89/<- %edx 4/r32/esp
1483 (tailor-exit-descriptor %edx 0x10)
1484
1485 (write _test-input-stream "fn f {\n")
1486 (write _test-input-stream " g\n")
1487 (write _test-input-stream "}\n")
1488 (write _test-input-stream "fn g -> a/eax: int {\n")
1489 (write _test-input-stream "}\n")
1490
1491 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1492
1493
1494 89/<- %edx 4/r32/esp
1495 (flush _test-output-buffered-file)
1496 (flush _test-error-buffered-file)
1497 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1503
1504 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-few-outputs: output should be empty")
1505 (check-next-stream-line-equal _test-error-stream "fn f: call g: too few outputs" "F - test-convert-function-call-with-too-few-outputs: error message")
1506
1507 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-few-outputs: exit status")
1508
1509 81 0/subop/add %esp 8/imm32
1510 5d/pop-to-ebp
1511 c3/return
1512
1513 test-convert-function-call-with-too-many-outputs:
1514
1515 55/push-ebp
1516 89/<- %ebp 4/r32/esp
1517
1518 (clear-stream _test-input-stream)
1519 (clear-stream $_test-input-buffered-file->buffer)
1520 (clear-stream _test-output-stream)
1521 (clear-stream $_test-output-buffered-file->buffer)
1522 (clear-stream _test-error-stream)
1523 (clear-stream $_test-error-buffered-file->buffer)
1524
1525 68/push 0/imm32
1526 68/push 0/imm32
1527 89/<- %edx 4/r32/esp
1528 (tailor-exit-descriptor %edx 0x10)
1529
1530 (write _test-input-stream "fn f {\n")
1531 (write _test-input-stream " var x/eax: int <- g\n")
1532 (write _test-input-stream "}\n")
1533 (write _test-input-stream "fn g {\n")
1534 (write _test-input-stream "}\n")
1535
1536 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1537
1538
1539 89/<- %edx 4/r32/esp
1540 (flush _test-output-buffered-file)
1541 (flush _test-error-buffered-file)
1542 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1548
1549 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-many-outputs: output should be empty")
1550 (check-next-stream-line-equal _test-error-stream "fn f: call g: too many outputs" "F - test-convert-function-call-with-too-many-outputs: error message")
1551
1552 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-many-outputs: exit status")
1553
1554 81 0/subop/add %esp 8/imm32
1555 5d/pop-to-ebp
1556 c3/return
1557
1558 test-convert-function-call-with-incorrect-output-register:
1559
1560 55/push-ebp
1561 89/<- %ebp 4/r32/esp
1562
1563 (clear-stream _test-input-stream)
1564 (clear-stream $_test-input-buffered-file->buffer)
1565 (clear-stream _test-output-stream)
1566 (clear-stream $_test-output-buffered-file->buffer)
1567 (clear-stream _test-error-stream)
1568 (clear-stream $_test-error-buffered-file->buffer)
1569
1570 68/push 0/imm32
1571 68/push 0/imm32
1572 89/<- %edx 4/r32/esp
1573 (tailor-exit-descriptor %edx 0x10)
1574
1575 (write _test-input-stream "fn f {\n")
1576 (write _test-input-stream " var x/ecx: int <- g\n")
1577 (write _test-input-stream "}\n")
1578 (write _test-input-stream "fn g -> a/eax: int {\n")
1579 (write _test-input-stream "}\n")
1580
1581 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1582
1583
1584 89/<- %edx 4/r32/esp
1585 (flush _test-output-buffered-file)
1586 (flush _test-error-buffered-file)
1587 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1593
1594 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-incorrect-output-register: output should be empty")
1595 (check-next-stream-line-equal _test-error-stream "fn f: call g: register for output 'x' is not right" "F - test-convert-function-call-with-incorrect-output-register: error message")
1596
1597 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-incorrect-output-register: exit status")
1598
1599 81 0/subop/add %esp 8/imm32
1600 5d/pop-to-ebp
1601 c3/return
1602
1603 test-convert-function-with-local-var-dereferenced:
1604
1605 55/push-ebp
1606 89/<- %ebp 4/r32/esp
1607
1608 (clear-stream _test-input-stream)
1609 (clear-stream $_test-input-buffered-file->buffer)
1610 (clear-stream _test-output-stream)
1611 (clear-stream $_test-output-buffered-file->buffer)
1612
1613 (write _test-input-stream "fn foo {\n")
1614 (write _test-input-stream " var x/ecx: (addr int) <- copy 0\n")
1615 (write _test-input-stream " increment *x\n")
1616 (write _test-input-stream "}\n")
1617
1618 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1619 (flush _test-output-buffered-file)
1620 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1626
1627 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-dereferenced/0")
1628 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-dereferenced/1")
1629 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-dereferenced/2")
1630 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-dereferenced/3")
1631 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-dereferenced/4")
1632 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-dereferenced/5")
1633 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-local-var-dereferenced/6")
1634 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-local-var-dereferenced/7")
1635 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *ecx" "F - test-convert-function-with-local-var-dereferenced/8")
1636 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-local-var-dereferenced/9")
1637 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-dereferenced/10")
1638 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-dereferenced/11")
1639 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-dereferenced/12")
1640 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-dereferenced/13")
1641 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-dereferenced/14")
1642 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-dereferenced/15")
1643
1644 89/<- %esp 5/r32/ebp
1645 5d/pop-to-ebp
1646 c3/return
1647
1648
1649 test-convert-function-with-byte-operations:
1650
1651 55/push-ebp
1652 89/<- %ebp 4/r32/esp
1653
1654 (clear-stream _test-input-stream)
1655 (clear-stream $_test-input-buffered-file->buffer)
1656 (clear-stream _test-output-stream)
1657 (clear-stream $_test-output-buffered-file->buffer)
1658
1659 (write _test-input-stream "fn foo {\n")
1660 (write _test-input-stream " var x/eax: byte <- copy 0\n")
1661 (write _test-input-stream " var y/ecx: byte <- copy 0\n")
1662 (write _test-input-stream " y <- copy-byte x\n")
1663 (write _test-input-stream " var z/edx: (addr byte) <- copy 0\n")
1664 (write _test-input-stream " y <- copy-byte *z\n")
1665 (write _test-input-stream " copy-byte-to *z, x\n")
1666 (write _test-input-stream "}\n")
1667
1668 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1669 (flush _test-output-buffered-file)
1670 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1676
1677 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-byte-operations/0")
1678 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-byte-operations/1")
1679 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-byte-operations/2")
1680 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-byte-operations/3")
1681 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-byte-operations/4")
1682 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-byte-operations/5")
1683 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-byte-operations/6")
1684 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-function-with-byte-operations/7")
1685 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-byte-operations/8")
1686 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-byte-operations/9")
1687 (check-next-stream-line-equal _test-output-stream " 8a/byte-> %eax 0x00000001/r32" "F - test-convert-function-with-byte-operations/10")
1688 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %edx" "F - test-convert-function-with-byte-operations/11")
1689 (check-next-stream-line-equal _test-output-stream " ba/copy-to-edx 0/imm32" "F - test-convert-function-with-byte-operations/12")
1690 (check-next-stream-line-equal _test-output-stream " 8a/byte-> *edx 0x00000001/r32" "F - test-convert-function-with-byte-operations/13")
1691 (check-next-stream-line-equal _test-output-stream " 88/byte<- *edx 0x00000000/r32" "F - test-convert-function-with-byte-operations/14")
1692 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %edx" "F - test-convert-function-with-byte-operations/15")
1693 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-byte-operations/16")
1694 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-byte-operations/17")
1695 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-byte-operations/18")
1696 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-byte-operations/19")
1697 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-byte-operations/20")
1698 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-byte-operations/21")
1699 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-byte-operations/22")
1700 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-byte-operations/23")
1701
1702 89/<- %esp 5/r32/ebp
1703 5d/pop-to-ebp
1704 c3/return
1705
1706
1707 test-copy-byte-var-from-fn-arg:
1708
1709 55/push-ebp
1710 89/<- %ebp 4/r32/esp
1711
1712 (clear-stream _test-input-stream)
1713 (clear-stream $_test-input-buffered-file->buffer)
1714 (clear-stream _test-output-stream)
1715 (clear-stream $_test-output-buffered-file->buffer)
1716
1717 (write _test-input-stream "fn foo x: byte, y: int {\n")
1718 (write _test-input-stream " var a/eax: byte <- copy x\n")
1719 (write _test-input-stream " var b/eax: int <- copy y\n")
1720 (write _test-input-stream "}\n")
1721
1722 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1723 (flush _test-output-buffered-file)
1724 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1730
1731 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-copy-byte-from-fn-arg/0")
1732 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-copy-byte-from-fn-arg/1")
1733 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-copy-byte-from-fn-arg/2")
1734 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-copy-byte-from-fn-arg/3")
1735 (check-next-stream-line-equal _test-output-stream " {" "F - test-copy-byte-from-fn-arg/4")
1736 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-copy-byte-from-fn-arg/5")
1737 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-copy-byte-from-fn-arg/6")
1738 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-copy-byte-from-fn-arg/7")
1739 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x0000000c) 0x00000000/r32" "F - test-copy-byte-from-fn-arg/8")
1740 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-copy-byte-from-fn-arg/9")
1741 (check-next-stream-line-equal _test-output-stream " }" "F - test-copy-byte-from-fn-arg/10")
1742 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-copy-byte-from-fn-arg/11")
1743 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-copy-byte-from-fn-arg/12")
1744 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-copy-byte-from-fn-arg/13")
1745 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-copy-byte-from-fn-arg/14")
1746 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-copy-byte-from-fn-arg/15")
1747
1748 89/<- %esp 5/r32/ebp
1749 5d/pop-to-ebp
1750 c3/return
1751
1752 test-convert-compare-register-with-literal:
1753
1754 55/push-ebp
1755 89/<- %ebp 4/r32/esp
1756
1757 (clear-stream _test-input-stream)
1758 (clear-stream $_test-input-buffered-file->buffer)
1759 (clear-stream _test-output-stream)
1760 (clear-stream $_test-output-buffered-file->buffer)
1761
1762 (write _test-input-stream "fn foo {\n")
1763 (write _test-input-stream " var x/ecx: int <- copy 0\n")
1764 (write _test-input-stream " compare x, 0\n")
1765 (write _test-input-stream "}\n")
1766
1767 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1768 (flush _test-output-buffered-file)
1769 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1775
1776 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-compare-register-with-literal/0")
1777 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-compare-register-with-literal/1")
1778 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-compare-register-with-literal/2")
1779 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-compare-register-with-literal/3")
1780 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-compare-register-with-literal/4")
1781 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-compare-register-with-literal/5")
1782 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-compare-register-with-literal/6")
1783 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-compare-register-with-literal/7")
1784 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %ecx 0/imm32" "F - test-convert-compare-register-with-literal/8")
1785 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-compare-register-with-literal/9")
1786 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-compare-register-with-literal/10")
1787 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-compare-register-with-literal/11")
1788 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-compare-register-with-literal/12")
1789 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-compare-register-with-literal/13")
1790 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-compare-register-with-literal/14")
1791 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-compare-register-with-literal/15")
1792
1793 89/<- %esp 5/r32/ebp
1794 5d/pop-to-ebp
1795 c3/return
1796
1797 test-unknown-variable:
1798
1799 55/push-ebp
1800 89/<- %ebp 4/r32/esp
1801
1802 (clear-stream _test-input-stream)
1803 (clear-stream $_test-input-buffered-file->buffer)
1804 (clear-stream _test-output-stream)
1805 (clear-stream $_test-output-buffered-file->buffer)
1806 (clear-stream _test-error-stream)
1807 (clear-stream $_test-error-buffered-file->buffer)
1808
1809 68/push 0/imm32
1810 68/push 0/imm32
1811 89/<- %edx 4/r32/esp
1812 (tailor-exit-descriptor %edx 0x10)
1813
1814 (write _test-input-stream "fn foo {\n")
1815 (write _test-input-stream " compare x, 0\n")
1816 (write _test-input-stream "}\n")
1817
1818 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1819
1820
1821 89/<- %edx 4/r32/esp
1822 (flush _test-output-buffered-file)
1823 (flush _test-error-buffered-file)
1824 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1830
1831 (check-stream-equal _test-output-stream "" "F - test-unknown-variable: output should be empty")
1832 (check-next-stream-line-equal _test-error-stream "fn foo: unknown variable 'x'" "F - test-unknown-variable: error message")
1833
1834 (check-ints-equal *(edx+4) 2 "F - test-unknown-variable: exit status")
1835
1836 81 0/subop/add %esp 8/imm32
1837
1838 5d/pop-to-ebp
1839 c3/return
1840
1841 test-convert-function-with-local-var-in-block:
1842
1843 55/push-ebp
1844 89/<- %ebp 4/r32/esp
1845
1846 (clear-stream _test-input-stream)
1847 (clear-stream $_test-input-buffered-file->buffer)
1848 (clear-stream _test-output-stream)
1849 (clear-stream $_test-output-buffered-file->buffer)
1850
1851 (write _test-input-stream "fn foo {\n")
1852 (write _test-input-stream " {\n")
1853 (write _test-input-stream " var x: int\n")
1854 (write _test-input-stream " increment x\n")
1855 (write _test-input-stream " }\n")
1856 (write _test-input-stream "}\n")
1857
1858 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1859 (flush _test-output-buffered-file)
1860 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1866
1867 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-block/0")
1868 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-block/1")
1869 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-block/2")
1870 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-block/3")
1871 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-block/4")
1872 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-block/5")
1873 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-block/6")
1874 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-local-var-in-block/7")
1875 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-block/8")
1876 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-local-var-in-block/9")
1877 (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")
1878 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-block/11")
1879 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-local-var-in-block/12")
1880 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-block/13")
1881 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-block/14")
1882 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-block/15")
1883 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-block/16")
1884 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-block/17")
1885 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-block/18")
1886
1887 89/<- %esp 5/r32/ebp
1888 5d/pop-to-ebp
1889 c3/return
1890
1891 test-convert-function-with-local-var-in-named-block:
1892
1893 55/push-ebp
1894 89/<- %ebp 4/r32/esp
1895
1896 (clear-stream _test-input-stream)
1897 (clear-stream $_test-input-buffered-file->buffer)
1898 (clear-stream _test-output-stream)
1899 (clear-stream $_test-output-buffered-file->buffer)
1900
1901 (write _test-input-stream "fn foo {\n")
1902 (write _test-input-stream " $bar: {\n")
1903 (write _test-input-stream " var x: int\n")
1904 (write _test-input-stream " increment x\n")
1905 (write _test-input-stream " }\n")
1906 (write _test-input-stream "}\n")
1907
1908 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1909 (flush _test-output-buffered-file)
1910 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1916
1917 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-named-block/0")
1918 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-named-block/1")
1919 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-named-block/2")
1920 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-named-block/3")
1921 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-named-block/4")
1922 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-named-block/5")
1923 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-named-block/6")
1924 (check-next-stream-line-equal _test-output-stream "$bar:loop:" "F - test-convert-function-with-local-var-in-named-block/7")
1925 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-named-block/8")
1926 (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")
1927 (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")
1928 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-named-block/11")
1929 (check-next-stream-line-equal _test-output-stream "$bar:break:" "F - test-convert-function-with-local-var-in-named-block/12")
1930 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-named-block/13")
1931 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-named-block/14")
1932 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-named-block/15")
1933 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-named-block/16")
1934 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-named-block/17")
1935 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-named-block/18")
1936
1937 89/<- %esp 5/r32/ebp
1938 5d/pop-to-ebp
1939 c3/return
1940
1941 test-unknown-variable-in-named-block:
1942
1943 55/push-ebp
1944 89/<- %ebp 4/r32/esp
1945
1946 (clear-stream _test-input-stream)
1947 (clear-stream $_test-input-buffered-file->buffer)
1948 (clear-stream _test-output-stream)
1949 (clear-stream $_test-output-buffered-file->buffer)
1950 (clear-stream _test-error-stream)
1951 (clear-stream $_test-error-buffered-file->buffer)
1952
1953 68/push 0/imm32
1954 68/push 0/imm32
1955 89/<- %edx 4/r32/esp
1956 (tailor-exit-descriptor %edx 0x10)
1957
1958 (write _test-input-stream "fn foo {\n")
1959 (write _test-input-stream " $a: {\n")
1960 (write _test-input-stream " compare x, 0\n")
1961 (write _test-input-stream " }\n")
1962 (write _test-input-stream "}\n")
1963
1964 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1965
1966
1967 89/<- %edx 4/r32/esp
1968 (flush _test-output-buffered-file)
1969 (flush _test-error-buffered-file)
1970 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1976
1977 (check-stream-equal _test-output-stream "" "F - test-unknown-variable-in-named-block: output should be empty")
1978 (check-next-stream-line-equal _test-error-stream "fn foo: unknown variable 'x'" "F - test-unknown-variable-in-named-block: error message")
1979
1980 (check-ints-equal *(edx+4) 2 "F - test-unknown-variable-in-named-block: exit status")
1981
1982 81 0/subop/add %esp 8/imm32
1983
1984 5d/pop-to-ebp
1985 c3/return
1986
1987 test-always-shadow-outermost-reg-vars-in-function:
1988
1989 55/push-ebp
1990 89/<- %ebp 4/r32/esp
1991
1992 (clear-stream _test-input-stream)
1993 (clear-stream $_test-input-buffered-file->buffer)
1994 (clear-stream _test-output-stream)
1995 (clear-stream $_test-output-buffered-file->buffer)
1996
1997 (write _test-input-stream "fn foo {\n")
1998 (write _test-input-stream " var x/ecx: int <- copy 3\n")
1999 (write _test-input-stream "}\n")
2000
2001 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2002 (flush _test-output-buffered-file)
2003 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2009
2010 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-always-shadow-outermost-reg-vars-in-function/0")
2011 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-always-shadow-outermost-reg-vars-in-function/1")
2012 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-always-shadow-outermost-reg-vars-in-function/2")
2013 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-always-shadow-outermost-reg-vars-in-function/3")
2014 (check-next-stream-line-equal _test-output-stream " {" "F - test-always-shadow-outermost-reg-vars-in-function/4")
2015 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-always-shadow-outermost-reg-vars-in-function/5")
2016 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-compare-register-with-literal/6")
2017 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-always-shadow-outermost-reg-vars-in-function/8")
2018 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-compare-register-with-literal/9")
2019 (check-next-stream-line-equal _test-output-stream " }" "F - test-always-shadow-outermost-reg-vars-in-function/12")
2020 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-always-shadow-outermost-reg-vars-in-function/13")
2021 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-always-shadow-outermost-reg-vars-in-function/14")
2022 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-always-shadow-outermost-reg-vars-in-function/15")
2023 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-always-shadow-outermost-reg-vars-in-function/16")
2024 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-always-shadow-outermost-reg-vars-in-function/17")
2025
2026 89/<- %esp 5/r32/ebp
2027 5d/pop-to-ebp
2028 c3/return
2029
2030 _pending-test-clobber-dead-local:
2031
2032 55/push-ebp
2033 89/<- %ebp 4/r32/esp
2034
2035 (clear-stream _test-input-stream)
2036 (clear-stream $_test-input-buffered-file->buffer)
2037 (clear-stream _test-output-stream)
2038 (clear-stream $_test-output-buffered-file->buffer)
2039
2040 (write _test-input-stream "fn foo {\n")
2041 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2042 (write _test-input-stream " {\n")
2043 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2044 (write _test-input-stream " }\n")
2045 (write _test-input-stream "}\n")
2046
2047 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2048 (flush _test-output-buffered-file)
2049 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2055
2056 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-clobber-dead-local/0")
2057 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-clobber-dead-local/1")
2058 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-clobber-dead-local/2")
2059 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-clobber-dead-local/3")
2060 (check-next-stream-line-equal _test-output-stream " {" "F - test-clobber-dead-local/4")
2061 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-clobber-dead-local/5")
2062 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-clobber-dead-local/6")
2063 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-clobber-dead-local/7")
2064 (check-next-stream-line-equal _test-output-stream " {" "F - test-clobber-dead-local/8")
2065 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-clobber-dead-local/9")
2066 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-clobber-dead-local/10")
2067 (check-next-stream-line-equal _test-output-stream " }" "F - test-clobber-dead-local/11")
2068 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-clobber-dead-local/12")
2069 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-clobber-dead-local/13")
2070 (check-next-stream-line-equal _test-output-stream " }" "F - test-clobber-dead-local/14")
2071 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-clobber-dead-local/15")
2072 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-clobber-dead-local/16")
2073 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-clobber-dead-local/17")
2074 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-clobber-dead-local/18")
2075 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-clobber-dead-local/19")
2076
2077 89/<- %esp 5/r32/ebp
2078 5d/pop-to-ebp
2079 c3/return
2080
2081 test-shadow-live-local:
2082
2083 55/push-ebp
2084 89/<- %ebp 4/r32/esp
2085
2086 (clear-stream _test-input-stream)
2087 (clear-stream $_test-input-buffered-file->buffer)
2088 (clear-stream _test-output-stream)
2089 (clear-stream $_test-output-buffered-file->buffer)
2090
2091 (write _test-input-stream "fn foo {\n")
2092 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2093 (write _test-input-stream " {\n")
2094 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2095 (write _test-input-stream " }\n")
2096 (write _test-input-stream " x <- increment\n")
2097 (write _test-input-stream "}\n")
2098
2099 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2100 (flush _test-output-buffered-file)
2101 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2107
2108 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-live-local/0")
2109 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-live-local/1")
2110 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-live-local/2")
2111 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-live-local/3")
2112 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-live-local/4")
2113 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-live-local/5")
2114 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-live-local/6")
2115 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-live-local/7")
2116 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-live-local/8")
2117 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-live-local/9")
2118 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-live-local/10")
2119 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-shadow-live-local/11")
2120 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-live-local/12")
2121 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-live-local/13")
2122 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-live-local/14")
2123 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-live-local/15")
2124 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-live-local/16")
2125 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-live-local/17")
2126 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-live-local/18")
2127 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-live-local/19")
2128 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-live-local/20")
2129 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-live-local/21")
2130 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-live-local/22")
2131
2132 89/<- %esp 5/r32/ebp
2133 5d/pop-to-ebp
2134 c3/return
2135
2136 test-shadow-name:
2137
2138 55/push-ebp
2139 89/<- %ebp 4/r32/esp
2140
2141 (clear-stream _test-input-stream)
2142 (clear-stream $_test-input-buffered-file->buffer)
2143 (clear-stream _test-output-stream)
2144 (clear-stream $_test-output-buffered-file->buffer)
2145
2146 (write _test-input-stream "fn foo {\n")
2147 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2148 (write _test-input-stream " {\n")
2149 (write _test-input-stream " var x/edx: int <- copy 4\n")
2150 (write _test-input-stream " }\n")
2151 (write _test-input-stream " x <- increment\n")
2152 (write _test-input-stream "}\n")
2153
2154 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2155 (flush _test-output-buffered-file)
2156 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2162
2163 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-name/0")
2164 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-name/1")
2165 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-name/2")
2166 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-name/3")
2167 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name/4")
2168 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-name/5")
2169 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-name/6")
2170 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-name/7")
2171 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name/8")
2172 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-name/9")
2173 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %edx" "F - test-shadow-name/10")
2174 (check-next-stream-line-equal _test-output-stream " ba/copy-to-edx 4/imm32" "F - test-shadow-name/11")
2175 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %edx" "F - test-shadow-name/12")
2176 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name/13")
2177 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-name/14")
2178 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-name/15")
2179 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-name/16")
2180 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name/17")
2181 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-name/18")
2182 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-name/19")
2183 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-name/20")
2184 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-name/21")
2185 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-name/22")
2186
2187 89/<- %esp 5/r32/ebp
2188 5d/pop-to-ebp
2189 c3/return
2190
2191 test-shadow-name-2:
2192
2193 55/push-ebp
2194 89/<- %ebp 4/r32/esp
2195
2196 (clear-stream _test-input-stream)
2197 (clear-stream $_test-input-buffered-file->buffer)
2198 (clear-stream _test-output-stream)
2199 (clear-stream $_test-output-buffered-file->buffer)
2200
2201 (write _test-input-stream "fn foo {\n")
2202 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2203 (write _test-input-stream " {\n")
2204 (write _test-input-stream " var x/edx: int <- copy 4\n")
2205 (write _test-input-stream " var y/ecx: int <- copy 5\n")
2206 (write _test-input-stream " }\n")
2207 (write _test-input-stream " x <- increment\n")
2208 (write _test-input-stream "}\n")
2209
2210 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2211 (flush _test-output-buffered-file)
2212 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2218
2219 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-name-2/0")
2220 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-name-2/1")
2221 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-name-2/2")
2222 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-name-2/3")
2223 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name-2/4")
2224 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-name-2/5")
2225 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-name-2/6")
2226 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-name-2/7")
2227 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name-2/8")
2228 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-name-2/9")
2229 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %edx" "F - test-shadow-name-2/10")
2230 (check-next-stream-line-equal _test-output-stream " ba/copy-to-edx 4/imm32" "F - test-shadow-name-2/11")
2231 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-name-2/12")
2232 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 5/imm32" "F - test-shadow-name-2/13")
2233 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-name-2/14")
2234 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %edx" "F - test-shadow-name-2/15")
2235 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name-2/16")
2236 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-name-2/17")
2237 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-name-2/18")
2238 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-name-2/19")
2239 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name-2/20")
2240 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-name-2/21")
2241 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-name-2/22")
2242 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-name-2/23")
2243 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-name-2/24")
2244 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-name-2/25")
2245
2246 89/<- %esp 5/r32/ebp
2247 5d/pop-to-ebp
2248 c3/return
2249
2250 test-do-not-spill-same-register-in-block:
2251
2252 55/push-ebp
2253 89/<- %ebp 4/r32/esp
2254
2255 (clear-stream _test-input-stream)
2256 (clear-stream $_test-input-buffered-file->buffer)
2257 (clear-stream _test-output-stream)
2258 (clear-stream $_test-output-buffered-file->buffer)
2259
2260 (write _test-input-stream "fn foo {\n")
2261 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2262 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2263 (write _test-input-stream " y <- increment\n")
2264 (write _test-input-stream "}\n")
2265
2266 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2267 (flush _test-output-buffered-file)
2268 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2274
2275 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-do-not-spill-same-register-in-block/0")
2276 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-do-not-spill-same-register-in-block/1")
2277 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-do-not-spill-same-register-in-block/2")
2278 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-do-not-spill-same-register-in-block/3")
2279 (check-next-stream-line-equal _test-output-stream " {" "F - test-do-not-spill-same-register-in-block/4")
2280 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-do-not-spill-same-register-in-block/5")
2281 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-do-not-spill-same-register-in-block/6")
2282 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-do-not-spill-same-register-in-block/7")
2283 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-do-not-spill-same-register-in-block/8")
2284 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-do-not-spill-same-register-in-block/9")
2285 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-do-not-spill-same-register-in-block/10")
2286 (check-next-stream-line-equal _test-output-stream " }" "F - test-do-not-spill-same-register-in-block/11")
2287 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-do-not-spill-same-register-in-block/12")
2288 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-do-not-spill-same-register-in-block/13")
2289 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-do-not-spill-same-register-in-block/14")
2290 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-do-not-spill-same-register-in-block/15")
2291 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-do-not-spill-same-register-in-block/16")
2292
2293 89/<- %esp 5/r32/ebp
2294 5d/pop-to-ebp
2295 c3/return
2296
2297 test-spill-different-register-in-block:
2298
2299 55/push-ebp
2300 89/<- %ebp 4/r32/esp
2301
2302 (clear-stream _test-input-stream)
2303 (clear-stream $_test-input-buffered-file->buffer)
2304 (clear-stream _test-output-stream)
2305 (clear-stream $_test-output-buffered-file->buffer)
2306
2307 (write _test-input-stream "fn foo {\n")
2308 (write _test-input-stream " var x/eax: int <- copy 3\n")
2309 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2310 (write _test-input-stream " y <- increment\n")
2311 (write _test-input-stream "}\n")
2312
2313 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2314 (flush _test-output-buffered-file)
2315 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2321
2322 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-spill-different-register-in-block/0")
2323 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-spill-different-register-in-block/1")
2324 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-spill-different-register-in-block/2")
2325 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-spill-different-register-in-block/3")
2326 (check-next-stream-line-equal _test-output-stream " {" "F - test-spill-different-register-in-block/4")
2327 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-spill-different-register-in-block/5")
2328 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-spill-different-register-in-block/6")
2329 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-spill-different-register-in-block/7")
2330 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-spill-different-register-in-block/8")
2331 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-spill-different-register-in-block/9")
2332 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-spill-different-register-in-block/10")
2333 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-spill-different-register-in-block/11")
2334 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-spill-different-register-in-block/12")
2335 (check-next-stream-line-equal _test-output-stream " }" "F - test-spill-different-register-in-block/13")
2336 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-spill-different-register-in-block/14")
2337 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-spill-different-register-in-block/15")
2338 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-spill-different-register-in-block/16")
2339 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-spill-different-register-in-block/17")
2340 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-spill-different-register-in-block/18")
2341
2342 89/<- %esp 5/r32/ebp
2343 5d/pop-to-ebp
2344 c3/return
2345
2346 test-shadow-live-output:
2347
2348 55/push-ebp
2349 89/<- %ebp 4/r32/esp
2350
2351 (clear-stream _test-input-stream)
2352 (clear-stream $_test-input-buffered-file->buffer)
2353 (clear-stream _test-output-stream)
2354 (clear-stream $_test-output-buffered-file->buffer)
2355
2356 (write _test-input-stream "fn foo -> x/ecx: int {\n")
2357 (write _test-input-stream " x <- copy 3\n")
2358 (write _test-input-stream " {\n")
2359 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2360 (write _test-input-stream " }\n")
2361 (write _test-input-stream " x <- increment\n")
2362 (write _test-input-stream "}\n")
2363
2364 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2365 (flush _test-output-buffered-file)
2366 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2372
2373 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-live-output/0")
2374 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-live-output/1")
2375 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-live-output/2")
2376 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-live-output/3")
2377 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-live-output/4")
2378 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-live-output/5")
2379 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-live-output/7")
2380 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-live-output/8")
2381 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-live-output/9")
2382 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-live-output/10")
2383 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-shadow-live-output/11")
2384 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-live-output/12")
2385 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-live-output/13")
2386 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-live-output/14")
2387 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-live-output/15")
2388 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-live-output/17")
2389 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-live-output/18")
2390 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-live-output/19")
2391 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-live-output/20")
2392 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-live-output/21")
2393 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-live-output/21")
2394
2395 89/<- %esp 5/r32/ebp
2396 5d/pop-to-ebp
2397 c3/return
2398
2399 test-stmt-defines-output-in-same-register-as-inout:
2400
2401 55/push-ebp
2402 89/<- %ebp 4/r32/esp
2403
2404 (clear-stream _test-input-stream)
2405 (clear-stream $_test-input-buffered-file->buffer)
2406 (clear-stream _test-output-stream)
2407 (clear-stream $_test-output-buffered-file->buffer)
2408 (clear-stream _test-error-stream)
2409 (clear-stream $_test-error-buffered-file->buffer)
2410
2411 68/push 0/imm32
2412 68/push 0/imm32
2413 89/<- %edx 4/r32/esp
2414 (tailor-exit-descriptor %edx 0x10)
2415
2416 (write _test-input-stream "fn foo -> x/ecx: int {\n")
2417 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2418 (write _test-input-stream " x <- copy y\n")
2419 (write _test-input-stream "}\n")
2420
2421 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2422
2423
2424 89/<- %edx 4/r32/esp
2425 (flush _test-output-buffered-file)
2426 (flush _test-error-buffered-file)
2427 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2433
2434 (check-stream-equal _test-error-stream "" "F - test-stmt-defines-output-in-same-register-as-inout: error stream should be empty")
2435
2436
2437 81 0/subop/add %esp 8/imm32
2438
2439 5d/pop-to-ebp
2440 c3/return
2441
2442 test-local-clobbered-by-fn-output:
2443
2444 55/push-ebp
2445 89/<- %ebp 4/r32/esp
2446
2447 (clear-stream _test-input-stream)
2448 (clear-stream $_test-input-buffered-file->buffer)
2449 (clear-stream _test-output-stream)
2450 (clear-stream $_test-output-buffered-file->buffer)
2451
2452 (write _test-input-stream "fn foo -> x/ecx: int {\n")
2453 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2454 (write _test-input-stream " x <- copy y\n")
2455 (write _test-input-stream "}\n")
2456
2457 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2458 (flush _test-output-buffered-file)
2459 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2465
2466 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-local-clobbered-by-fn-output/0")
2467 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-local-clobbered-by-fn-output/1")
2468 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-local-clobbered-by-fn-output/2")
2469 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-local-clobbered-by-fn-output/3")
2470 (check-next-stream-line-equal _test-output-stream " {" "F - test-local-clobbered-by-fn-output/4")
2471 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-local-clobbered-by-fn-output/5")
2472 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-local-clobbered-by-fn-output/6")
2473 (check-next-stream-line-equal _test-output-stream " 89/<- %ecx 0x00000001/r32" "F - test-local-clobbered-by-fn-output/7")
2474 (check-next-stream-line-equal _test-output-stream " }" "F - test-local-clobbered-by-fn-output/8")
2475 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-local-clobbered-by-fn-output/9")
2476 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-local-clobbered-by-fn-output/10")
2477 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-local-clobbered-by-fn-output/11")
2478 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-local-clobbered-by-fn-output/12")
2479 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-local-clobbered-by-fn-output/13")
2480
2481 89/<- %esp 5/r32/ebp
2482 5d/pop-to-ebp
2483 c3/return
2484
2485 test-read-output:
2486
2487 55/push-ebp
2488 89/<- %ebp 4/r32/esp
2489
2490 (clear-stream _test-input-stream)
2491 (clear-stream $_test-input-buffered-file->buffer)
2492 (clear-stream _test-output-stream)
2493 (clear-stream $_test-output-buffered-file->buffer)
2494
2495 (write _test-input-stream "fn foo -> x/ecx: int {\n")
2496 (write _test-input-stream " x <- copy 0x34\n")
2497 (write _test-input-stream " compare x, 0x35\n")
2498 (write _test-input-stream "}\n")
2499
2500 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2501 (flush _test-output-buffered-file)
2502 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2508
2509 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-read-output/0")
2510 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-read-output/1")
2511 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-read-output/2")
2512 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-read-output/3")
2513 (check-next-stream-line-equal _test-output-stream " {" "F - test-read-output/4")
2514 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-read-output/5")
2515 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0x34/imm32" "F - test-read-output/6")
2516 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %ecx 0x35/imm32" "F - test-read-output/7")
2517 (check-next-stream-line-equal _test-output-stream " }" "F - test-read-output/8")
2518 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-read-output/9")
2519 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-read-output/10")
2520 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-read-output/11")
2521 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-read-output/12")
2522 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-read-output/13")
2523
2524 89/<- %esp 5/r32/ebp
2525 5d/pop-to-ebp
2526 c3/return
2527
2528 test-fn-output-written-in-inner-block:
2529
2530 55/push-ebp
2531 89/<- %ebp 4/r32/esp
2532
2533 (clear-stream _test-input-stream)
2534 (clear-stream $_test-input-buffered-file->buffer)
2535 (clear-stream _test-output-stream)
2536 (clear-stream $_test-output-buffered-file->buffer)
2537
2538 (write _test-input-stream "fn foo -> out/edi: int {\n")
2539 (write _test-input-stream " var a/eax: int <- copy 3\n")
2540 (write _test-input-stream " {\n")
2541 (write _test-input-stream " var a/ecx: int <- copy 4\n")
2542 (write _test-input-stream " out <- copy a\n")
2543 (write _test-input-stream " }\n")
2544 (write _test-input-stream " compare a, 0\n")
2545 (write _test-input-stream "}\n")
2546
2547 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2548 (flush _test-output-buffered-file)
2549 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2555
2556
2557 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-fn-output-written-in-inner-block/0")
2558 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-fn-output-written-in-inner-block/1")
2559 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-fn-output-written-in-inner-block/2")
2560 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-fn-output-written-in-inner-block/3")
2561 (check-next-stream-line-equal _test-output-stream " {" "F - test-fn-output-written-in-inner-block/4")
2562 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-fn-output-written-in-inner-block/5")
2563 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-fn-output-written-in-inner-block/6")
2564 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-fn-output-written-in-inner-block/7")
2565 (check-next-stream-line-equal _test-output-stream " {" "F - test-fn-output-written-in-inner-block/8")
2566 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-fn-output-written-in-inner-block/9")
2567 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-fn-output-written-in-inner-block/10")
2568 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-fn-output-written-in-inner-block/10")
2569 (check-next-stream-line-equal _test-output-stream " 89/<- %edi 0x00000001/r32" "F - test-fn-output-written-in-inner-block/11")
2570 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-fn-output-written-in-inner-block/12")
2571 (check-next-stream-line-equal _test-output-stream " }" "F - test-fn-output-written-in-inner-block/13")
2572 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-fn-output-written-in-inner-block/14")
2573 (check-next-stream-line-equal _test-output-stream " 3d/compare-eax-with 0/imm32" "F - test-fn-output-written-in-inner-block/15")
2574 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-fn-output-written-in-inner-block/16")
2575 (check-next-stream-line-equal _test-output-stream " }" "F - test-fn-output-written-in-inner-block/17")
2576 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-fn-output-written-in-inner-block/18")
2577 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-fn-output-written-in-inner-block/19")
2578 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-fn-output-written-in-inner-block/20")
2579 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-fn-output-written-in-inner-block/21")
2580 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-fn-output-written-in-inner-block/22")
2581
2582 89/<- %esp 5/r32/ebp
2583 5d/pop-to-ebp
2584 c3/return
2585
2586 test-convert-function-with-branches-in-block:
2587
2588 55/push-ebp
2589 89/<- %ebp 4/r32/esp
2590
2591 (clear-stream _test-input-stream)
2592 (clear-stream $_test-input-buffered-file->buffer)
2593 (clear-stream _test-output-stream)
2594 (clear-stream $_test-output-buffered-file->buffer)
2595
2596 (write _test-input-stream "fn foo x: int {\n")
2597 (write _test-input-stream " {\n")
2598 (write _test-input-stream " break-if->=\n")
2599 (write _test-input-stream " loop-if-addr<\n")
2600 (write _test-input-stream " increment x\n")
2601 (write _test-input-stream " loop\n")
2602 (write _test-input-stream " }\n")
2603 (write _test-input-stream "}\n")
2604
2605 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2606 (flush _test-output-buffered-file)
2607 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2613
2614 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-in-block/0")
2615 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-in-block/1")
2616 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-in-block/2")
2617 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-in-block/3")
2618 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/4")
2619 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-in-block/5")
2620 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/6")
2621 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-in-block/7")
2622 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/8")
2623 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-in-block/9")
2624 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-in-block/10")
2625 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/11")
2626 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/12")
2627 (check-next-stream-line-equal _test-output-stream " 0f 83/jump-if-addr>= break/disp32" "F - test-convert-function-with-branches-in-block/13")
2628 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:loop/disp32" "F - test-convert-function-with-branches-in-block/14")
2629 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/15")
2630 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-branches-in-block/16")
2631 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-in-block/17")
2632 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/18")
2633 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-in-block/19")
2634 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/20")
2635 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-in-block/21")
2636 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-in-block/22")
2637 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-in-block/23")
2638 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-in-block/24")
2639 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-in-block/25")
2640
2641 89/<- %esp 5/r32/ebp
2642 5d/pop-to-ebp
2643 c3/return
2644
2645 test-convert-function-with-branches-in-named-block:
2646
2647 55/push-ebp
2648 89/<- %ebp 4/r32/esp
2649
2650 (clear-stream _test-input-stream)
2651 (clear-stream $_test-input-buffered-file->buffer)
2652 (clear-stream _test-output-stream)
2653 (clear-stream $_test-output-buffered-file->buffer)
2654
2655 (write _test-input-stream "fn foo x: int {\n")
2656 (write _test-input-stream " $bar: {\n")
2657 (write _test-input-stream " break-if->= $bar\n")
2658 (write _test-input-stream " loop-if-addr< $bar\n")
2659 (write _test-input-stream " increment x\n")
2660 (write _test-input-stream " loop\n")
2661 (write _test-input-stream " }\n")
2662 (write _test-input-stream "}\n")
2663
2664 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
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-function-with-branches-in-named-block/0")
2674 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-in-named-block/1")
2675 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-in-named-block/2")
2676 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-in-named-block/3")
2677 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/4")
2678 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-in-named-block/5")
2679 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/6")
2680 (check-next-stream-line-equal _test-output-stream "$bar:loop:" "F - test-convert-function-with-branches-in-named-block/7")
2681 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/8")
2682 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-in-named-block/9")
2683 (check-next-stream-line-equal _test-output-stream " e9/jump $bar:break/disp32" "F - test-convert-function-with-branches-in-named-block/10")
2684 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/11")
2685 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/12")
2686 (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")
2687 (check-next-stream-line-equal _test-output-stream " e9/jump $bar:loop/disp32" "F - test-convert-function-with-branches-in-named-block/14")
2688 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/15")
2689 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-branches-in-named-block/16")
2690 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-in-named-block/17")
2691 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/18")
2692 (check-next-stream-line-equal _test-output-stream "$bar:break:" "F - test-convert-function-with-branches-in-named-block/19")
2693 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/20")
2694 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-in-named-block/21")
2695 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-in-named-block/22")
2696 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-in-named-block/23")
2697 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-in-named-block/24")
2698 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-in-named-block/25")
2699
2700 89/<- %esp 5/r32/ebp
2701 5d/pop-to-ebp
2702 c3/return
2703
2704 test-convert-function-with-var-in-nested-block:
2705
2706 55/push-ebp
2707 89/<- %ebp 4/r32/esp
2708
2709 (clear-stream _test-input-stream)
2710 (clear-stream $_test-input-buffered-file->buffer)
2711 (clear-stream _test-output-stream)
2712 (clear-stream $_test-output-buffered-file->buffer)
2713
2714 (write _test-input-stream "fn foo x: int {\n")
2715 (write _test-input-stream " {\n")
2716 (write _test-input-stream " {\n")
2717 (write _test-input-stream " var x: int\n")
2718 (write _test-input-stream " increment x\n")
2719 (write _test-input-stream " }\n")
2720 (write _test-input-stream " }\n")
2721 (write _test-input-stream "}\n")
2722
2723 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2724 (flush _test-output-buffered-file)
2725 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2731
2732 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-var-in-nested-block/0")
2733 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-var-in-nested-block/1")
2734 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-var-in-nested-block/2")
2735 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-var-in-nested-block/3")
2736 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/4")
2737 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-var-in-nested-block/5")
2738 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/6")
2739 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-var-in-nested-block/7")
2740 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/8")
2741 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-var-in-nested-block/9")
2742 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-var-in-nested-block/10")
2743 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-var-in-nested-block/11")
2744 (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")
2745 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/13")
2746 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-var-in-nested-block/14")
2747 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/15")
2748 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-var-in-nested-block/16")
2749 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/17")
2750 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-var-in-nested-block/18")
2751 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-var-in-nested-block/19")
2752 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-var-in-nested-block/20")
2753 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-var-in-nested-block/21")
2754 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-var-in-nested-block/22")
2755
2756 89/<- %esp 5/r32/ebp
2757 5d/pop-to-ebp
2758 c3/return
2759
2760 test-convert-function-with-multiple-vars-in-nested-blocks:
2761
2762 55/push-ebp
2763 89/<- %ebp 4/r32/esp
2764
2765 (clear-stream _test-input-stream)
2766 (clear-stream $_test-input-buffered-file->buffer)
2767 (clear-stream _test-output-stream)
2768 (clear-stream $_test-output-buffered-file->buffer)
2769
2770 (write _test-input-stream "fn foo x: int {\n")
2771 (write _test-input-stream " {\n")
2772 (write _test-input-stream " var x/eax: int <- copy 0\n")
2773 (write _test-input-stream " {\n")
2774 (write _test-input-stream " var y: int\n")
2775 (write _test-input-stream " x <- add y\n")
2776 (write _test-input-stream " }\n")
2777 (write _test-input-stream " }\n")
2778 (write _test-input-stream "}\n")
2779
2780 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2781 (flush _test-output-buffered-file)
2782 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2788
2789 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/0")
2790 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-multiple-vars-in-nested-blocks/1")
2791 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/2")
2792 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/3")
2793 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/4")
2794 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/5")
2795 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/6")
2796 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/7")
2797 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-multiple-vars-in-nested-blocks/8")
2798 (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")
2799 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/10")
2800 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/11")
2801 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-multiple-vars-in-nested-blocks/12")
2802 (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")
2803 (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")
2804 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/15")
2805 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/16")
2806 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-multiple-vars-in-nested-blocks/17")
2807 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/18")
2808 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/19")
2809 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/20")
2810 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/21")
2811 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-multiple-vars-in-nested-blocks/22")
2812 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/23")
2813 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/24")
2814 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-multiple-vars-in-nested-blocks/25")
2815
2816 89/<- %esp 5/r32/ebp
2817 5d/pop-to-ebp
2818 c3/return
2819
2820 test-convert-function-with-branches-and-local-vars:
2821
2822
2823
2824
2825 55/push-ebp
2826 89/<- %ebp 4/r32/esp
2827
2828 (clear-stream _test-input-stream)
2829 (clear-stream $_test-input-buffered-file->buffer)
2830 (clear-stream _test-output-stream)
2831 (clear-stream $_test-output-buffered-file->buffer)
2832
2833 (write _test-input-stream "fn foo {\n")
2834 (write _test-input-stream " {\n")
2835 (write _test-input-stream " var x: int\n")
2836 (write _test-input-stream " break-if->=\n")
2837 (write _test-input-stream " increment x\n")
2838 (write _test-input-stream " }\n")
2839 (write _test-input-stream "}\n")
2840
2841 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2842 (flush _test-output-buffered-file)
2843 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2849
2850 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-and-local-vars/0")
2851 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-and-local-vars/1")
2852 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-and-local-vars/2")
2853 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-and-local-vars/3")
2854 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/4")
2855 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-and-local-vars/5")
2856 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/6")
2857 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-and-local-vars/7")
2858 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-branches-and-local-vars/8")
2859 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/9")
2860 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-and-local-vars/10")
2861 (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")
2862 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-and-local-vars/12")
2863 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/13")
2864 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-branches-and-local-vars/14")
2865 (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")
2866 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/16")
2867 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-and-local-vars/17")
2868 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/18")
2869 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-and-local-vars/19")
2870 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-and-local-vars/20")
2871 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-and-local-vars/21")
2872 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-and-local-vars/22")
2873 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-and-local-vars/23")
2874
2875 89/<- %esp 5/r32/ebp
2876 5d/pop-to-ebp
2877 c3/return
2878
2879 test-convert-function-with-conditional-loops-and-local-vars:
2880
2881
2882
2883
2884 55/push-ebp
2885 89/<- %ebp 4/r32/esp
2886
2887 (clear-stream _test-input-stream)
2888 (clear-stream $_test-input-buffered-file->buffer)
2889 (clear-stream _test-output-stream)
2890 (clear-stream $_test-output-buffered-file->buffer)
2891
2892 (write _test-input-stream "fn foo {\n")
2893 (write _test-input-stream " {\n")
2894 (write _test-input-stream " var x: int\n")
2895 (write _test-input-stream " loop-if->=\n")
2896 (write _test-input-stream " increment x\n")
2897 (write _test-input-stream " }\n")
2898 (write _test-input-stream "}\n")
2899
2900 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2901 (flush _test-output-buffered-file)
2902 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2908
2909 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-conditional-loops-and-local-vars/0")
2910 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-conditional-loops-and-local-vars/1")
2911 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/2")
2912 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-conditional-loops-and-local-vars/3")
2913 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/4")
2914 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-conditional-loops-and-local-vars/5")
2915 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/6")
2916 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-conditional-loops-and-local-vars/7")
2917 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-conditional-loops-and-local-vars/8")
2918 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/9")
2919 (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")
2920 (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")
2921 (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")
2922 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/13")
2923 (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")
2924 (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")
2925 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/16")
2926 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-conditional-loops-and-local-vars/17")
2927 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/18")
2928 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-conditional-loops-and-local-vars/19")
2929 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-conditional-loops-and-local-vars/20")
2930 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/21")
2931 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/22")
2932 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-conditional-loops-and-local-vars/23")
2933
2934 89/<- %esp 5/r32/ebp
2935 5d/pop-to-ebp
2936 c3/return
2937
2938 test-convert-function-with-unconditional-loops-and-local-vars:
2939
2940
2941
2942
2943 55/push-ebp
2944 89/<- %ebp 4/r32/esp
2945
2946 (clear-stream _test-input-stream)
2947 (clear-stream $_test-input-buffered-file->buffer)
2948 (clear-stream _test-output-stream)
2949 (clear-stream $_test-output-buffered-file->buffer)
2950
2951 (write _test-input-stream "fn foo {\n")
2952 (write _test-input-stream " {\n")
2953 (write _test-input-stream " var x: int\n")
2954 (write _test-input-stream " loop\n")
2955 (write _test-input-stream " increment x\n")
2956 (write _test-input-stream " }\n")
2957 (write _test-input-stream "}\n")
2958
2959 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2960 (flush _test-output-buffered-file)
2961 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2967
2968 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-unconditional-loops-and-local-vars/0")
2969 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-unconditional-loops-and-local-vars/1")
2970 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/2")
2971 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-unconditional-loops-and-local-vars/3")
2972 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-loops-and-local-vars/4")
2973 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-unconditional-loops-and-local-vars/5")
2974 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-loops-and-local-vars/6")
2975 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-unconditional-loops-and-local-vars/7")
2976 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-loops-and-local-vars/8")
2977 (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")
2978 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-unconditional-loops-and-local-vars/10")
2979
2980 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-loops-and-local-vars/11")
2981 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-unconditional-loops-and-local-vars/12")
2982 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-loops-and-local-vars/13")
2983 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-unconditional-loops-and-local-vars/14")
2984 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-unconditional-loops-and-local-vars/15")
2985 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/16")
2986 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/17")
2987 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-unconditional-loops-and-local-vars/18")
2988
2989 89/<- %esp 5/r32/ebp
2990 5d/pop-to-ebp
2991 c3/return
2992
2993 test-convert-function-with-branches-and-loops-and-local-vars:
2994
2995 55/push-ebp
2996 89/<- %ebp 4/r32/esp
2997
2998 (clear-stream _test-input-stream)
2999 (clear-stream $_test-input-buffered-file->buffer)
3000 (clear-stream _test-output-stream)
3001 (clear-stream $_test-output-buffered-file->buffer)
3002
3003 (write _test-input-stream "fn foo {\n")
3004 (write _test-input-stream " {\n")
3005 (write _test-input-stream " var x: int\n")
3006 (write _test-input-stream " break-if->=\n")
3007 (write _test-input-stream " increment x\n")
3008 (write _test-input-stream " loop\n")
3009 (write _test-input-stream " }\n")
3010 (write _test-input-stream "}\n")
3011
3012 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3013 (flush _test-output-buffered-file)
3014 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3020
3021 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-and-loops-and-local-vars/0")
3022 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-and-loops-and-local-vars/1")
3023 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-and-loops-and-local-vars/2")
3024 (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")
3025 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/4")
3026 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-and-loops-and-local-vars/5")
3027 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/6")
3028 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-and-loops-and-local-vars/7")
3029 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-branches-and-loops-and-local-vars/8")
3030 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/9")
3031 (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")
3032 (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")
3033 (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")
3034 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/13")
3035 (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")
3036 (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")
3037 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-and-loops-and-local-vars/16")
3038 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/17")
3039 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-and-loops-and-local-vars/18")
3040 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/19")
3041 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-and-loops-and-local-vars/20")
3042 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-and-loops-and-local-vars/21")
3043 (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")
3044 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-and-loops-and-local-vars/23")
3045 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-and-loops-and-local-vars/24")
3046
3047 89/<- %esp 5/r32/ebp
3048 5d/pop-to-ebp
3049 c3/return
3050
3051 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars:
3052
3053 55/push-ebp
3054 89/<- %ebp 4/r32/esp
3055
3056 (clear-stream _test-input-stream)
3057 (clear-stream $_test-input-buffered-file->buffer)
3058 (clear-stream _test-output-stream)
3059 (clear-stream $_test-output-buffered-file->buffer)
3060
3061 (write _test-input-stream "fn foo {\n")
3062 (write _test-input-stream " a: {\n")
3063 (write _test-input-stream " var x: int\n")
3064 (write _test-input-stream " {\n")
3065 (write _test-input-stream " var y: int\n")
3066 (write _test-input-stream " break-if->= a\n")
3067 (write _test-input-stream " increment x\n")
3068 (write _test-input-stream " loop\n")
3069 (write _test-input-stream " }\n")
3070 (write _test-input-stream " }\n")
3071 (write _test-input-stream "}\n")
3072
3073 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3074 (flush _test-output-buffered-file)
3075 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3081
3082 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/0")
3083 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/1")
3084 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/2")
3085 (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")
3086 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/4")
3087 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/5")
3088 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/6")
3089 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/7")
3090 (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")
3091 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/9")
3092 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/10")
3093 (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")
3094 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/12")
3095 (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")
3096 (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")
3097 (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")
3098 (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")
3099 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/17")
3100 (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")
3101 (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")
3102 (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")
3103 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/21")
3104 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/22")
3105 (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")
3106 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/24")
3107 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/25")
3108 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/26")
3109 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/27")
3110 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/28")
3111 (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")
3112 (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")
3113 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/31")
3114
3115 89/<- %esp 5/r32/ebp
3116 5d/pop-to-ebp
3117 c3/return
3118
3119 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2:
3120
3121 55/push-ebp
3122 89/<- %ebp 4/r32/esp
3123
3124 (clear-stream _test-input-stream)
3125 (clear-stream $_test-input-buffered-file->buffer)
3126 (clear-stream _test-output-stream)
3127 (clear-stream $_test-output-buffered-file->buffer)
3128
3129
3130 (write _test-input-stream "fn foo {\n")
3131 (write _test-input-stream " a: {\n")
3132 (write _test-input-stream " var x: int\n")
3133 (write _test-input-stream " {\n")
3134 (write _test-input-stream " break-if->= a\n")
3135 (write _test-input-stream " }\n")
3136 (write _test-input-stream " }\n")
3137 (write _test-input-stream "}\n")
3138
3139 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3140 (flush _test-output-buffered-file)
3141 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3147
3148 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/0")
3149 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/1")
3150 (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")
3151 (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")
3152 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/4")
3153 (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")
3154 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/6")
3155 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/7")
3156 (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")
3157 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/9")
3158 (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")
3159 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/11")
3160 (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")
3161 (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")
3162 (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")
3163 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/15")
3164 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/16")
3165 (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")
3166 (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")
3167 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/19")
3168 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/20")
3169 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/21")
3170 (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")
3171 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/23")
3172 (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")
3173 (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")
3174 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/26")
3175
3176 89/<- %esp 5/r32/ebp
3177 5d/pop-to-ebp
3178 c3/return
3179
3180 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3:
3181
3182 55/push-ebp
3183 89/<- %ebp 4/r32/esp
3184
3185 (clear-stream _test-input-stream)
3186 (clear-stream $_test-input-buffered-file->buffer)
3187 (clear-stream _test-output-stream)
3188 (clear-stream $_test-output-buffered-file->buffer)
3189
3190
3191 (write _test-input-stream "fn foo {\n")
3192 (write _test-input-stream " a: {\n")
3193 (write _test-input-stream " var x: int\n")
3194 (write _test-input-stream " {\n")
3195 (write _test-input-stream " break a\n")
3196 (write _test-input-stream " }\n")
3197 (write _test-input-stream " }\n")
3198 (write _test-input-stream "}\n")
3199
3200 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3201 (flush _test-output-buffered-file)
3202 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3208
3209 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/0")
3210 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/1")
3211 (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")
3212 (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")
3213 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/4")
3214 (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")
3215 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/6")
3216 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/7")
3217 (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")
3218 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/9")
3219 (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")
3220 (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")
3221 (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")
3222 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/14")
3223 (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")
3224 (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")
3225 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/17")
3226 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/18")
3227 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/19")
3228 (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")
3229 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/21")
3230 (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")
3231 (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")
3232 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/24")
3233
3234 89/<- %esp 5/r32/ebp
3235 5d/pop-to-ebp
3236 c3/return
3237
3238 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4:
3239
3240 55/push-ebp
3241 89/<- %ebp 4/r32/esp
3242
3243 (clear-stream _test-input-stream)
3244 (clear-stream $_test-input-buffered-file->buffer)
3245 (clear-stream _test-output-stream)
3246 (clear-stream $_test-output-buffered-file->buffer)
3247
3248 (write _test-input-stream "fn foo {\n")
3249 (write _test-input-stream " a: {\n")
3250 (write _test-input-stream " var x/esi: int <- copy 0\n")
3251 (write _test-input-stream " {\n")
3252 (write _test-input-stream " break a\n")
3253 (write _test-input-stream " }\n")
3254 (write _test-input-stream " }\n")
3255 (write _test-input-stream "}\n")
3256
3257 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3258 (flush _test-output-buffered-file)
3259 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3265
3266 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/0")
3267 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/1")
3268 (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")
3269 (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")
3270 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/4")
3271 (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")
3272 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/6")
3273 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/7")
3274 (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")
3275 (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")
3276 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/10")
3277 (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")
3278 (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")
3279 (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")
3280 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/14")
3281 (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")
3282 (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")
3283 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/17")
3284 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/18")
3285 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/19")
3286 (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")
3287 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/21")
3288 (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")
3289 (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")
3290 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/24")
3291
3292 89/<- %esp 5/r32/ebp
3293 5d/pop-to-ebp
3294 c3/return
3295
3296 test-convert-function-with-nonlocal-unconditional-break-and-local-vars:
3297
3298 55/push-ebp
3299 89/<- %ebp 4/r32/esp
3300
3301 (clear-stream _test-input-stream)
3302 (clear-stream $_test-input-buffered-file->buffer)
3303 (clear-stream _test-output-stream)
3304 (clear-stream $_test-output-buffered-file->buffer)
3305
3306 (write _test-input-stream "fn foo {\n")
3307 (write _test-input-stream " a: {\n")
3308 (write _test-input-stream " var x: int\n")
3309 (write _test-input-stream " {\n")
3310 (write _test-input-stream " var y: int\n")
3311 (write _test-input-stream " break a\n")
3312 (write _test-input-stream " increment x\n")
3313 (write _test-input-stream " }\n")
3314 (write _test-input-stream " }\n")
3315 (write _test-input-stream "}\n")
3316
3317 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3318 (flush _test-output-buffered-file)
3319 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3325
3326 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/0")
3327 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/1")
3328 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/2")
3329 (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")
3330 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/4")
3331 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/5")
3332 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/6")
3333 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/7")
3334 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/8")
3335 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/9")
3336 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/10")
3337 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/11")
3338 (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")
3339 (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")
3340 (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")
3341 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/15")
3342 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/16")
3343 (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")
3344 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/18")
3345 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/19")
3346 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/20")
3347 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/21")
3348 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/22")
3349 (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")
3350 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/24")
3351 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/25")
3352
3353 89/<- %esp 5/r32/ebp
3354 5d/pop-to-ebp
3355 c3/return
3356
3357 test-convert-function-with-unconditional-break-and-local-vars:
3358
3359 55/push-ebp
3360 89/<- %ebp 4/r32/esp
3361
3362 (clear-stream _test-input-stream)
3363 (clear-stream $_test-input-buffered-file->buffer)
3364 (clear-stream _test-output-stream)
3365 (clear-stream $_test-output-buffered-file->buffer)
3366
3367 (write _test-input-stream "fn foo {\n")
3368 (write _test-input-stream " {\n")
3369 (write _test-input-stream " var x: int\n")
3370 (write _test-input-stream " {\n")
3371 (write _test-input-stream " var y: int\n")
3372 (write _test-input-stream " break\n")
3373 (write _test-input-stream " increment x\n")
3374 (write _test-input-stream " }\n")
3375 (write _test-input-stream " }\n")
3376 (write _test-input-stream "}\n")
3377
3378 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3379 (flush _test-output-buffered-file)
3380 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3386
3387 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-unconditional-break-and-local-vars/0")
3388 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-unconditional-break-and-local-vars/1")
3389 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/2")
3390 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-unconditional-break-and-local-vars/3")
3391 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/4")
3392 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/5")
3393 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/6")
3394 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/7")
3395 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-break-and-local-vars/8")
3396 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/9")
3397 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/10")
3398 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-break-and-local-vars/11")
3399 (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")
3400 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/13")
3401 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/14")
3402 (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")
3403 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/16")
3404 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/17")
3405 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/18")
3406 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/19")
3407 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-unconditional-break-and-local-vars/20")
3408 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/21")
3409 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/22")
3410 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-unconditional-break-and-local-vars/23")
3411
3412 89/<- %esp 5/r32/ebp
3413 5d/pop-to-ebp
3414 c3/return
3415
3416 test-convert-function-with-nonlocal-unconditional-loop-and-local-vars:
3417
3418 55/push-ebp
3419 89/<- %ebp 4/r32/esp
3420
3421 (clear-stream _test-input-stream)
3422 (clear-stream $_test-input-buffered-file->buffer)
3423 (clear-stream _test-output-stream)
3424 (clear-stream $_test-output-buffered-file->buffer)
3425
3426 (write _test-input-stream "fn foo {\n")
3427 (write _test-input-stream " a: {\n")
3428 (write _test-input-stream " var x: int\n")
3429 (write _test-input-stream " {\n")
3430 (write _test-input-stream " var y: int\n")
3431 (write _test-input-stream " loop a\n")
3432 (write _test-input-stream " increment x\n")
3433 (write _test-input-stream " }\n")
3434 (write _test-input-stream " }\n")
3435 (write _test-input-stream "}\n")
3436
3437 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3438 (flush _test-output-buffered-file)
3439 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3445
3446 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/0")
3447 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/1")
3448 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/2")
3449 (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")
3450 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/4")
3451 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/5")
3452 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/6")
3453 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/7")
3454 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/8")
3455 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/9")
3456 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/10")
3457 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/11")
3458 (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")
3459 (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")
3460 (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")
3461 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/15")
3462 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/16")
3463 (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")
3464 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/18")
3465 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/19")
3466 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/20")
3467 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/21")
3468 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/22")
3469 (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")
3470 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/24")
3471 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/25")
3472
3473 89/<- %esp 5/r32/ebp
3474 5d/pop-to-ebp
3475 c3/return
3476
3477 test-convert-function-with-local-array-var-in-mem:
3478
3479 55/push-ebp
3480 89/<- %ebp 4/r32/esp
3481
3482 (clear-stream _test-input-stream)
3483 (clear-stream $_test-input-buffered-file->buffer)
3484 (clear-stream _test-output-stream)
3485 (clear-stream $_test-output-buffered-file->buffer)
3486
3487 (write _test-input-stream "fn foo {\n")
3488 (write _test-input-stream " var x: (array int 3)\n")
3489 (write _test-input-stream "}\n")
3490
3491 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3492 (flush _test-output-buffered-file)
3493 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3499
3500 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-array-var-in-mem/0")
3501 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-array-var-in-mem/1")
3502 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-array-var-in-mem/2")
3503 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-array-var-in-mem/3")
3504 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-array-var-in-mem/4")
3505 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-array-var-in-mem/5")
3506
3507 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-function-with-local-array-var-in-mem/7")
3508 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-function-with-local-array-var-in-mem/8")
3509
3510 (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")
3511
3512 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-array-var-in-mem/10")
3513 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-array-var-in-mem/11")
3514 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-array-var-in-mem/12")
3515 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-array-var-in-mem/13")
3516 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-array-var-in-mem/14")
3517 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-array-var-in-mem/15")
3518
3519 89/<- %esp 5/r32/ebp
3520 5d/pop-to-ebp
3521 c3/return
3522
3523
3524 test-convert-function-with-local-array-of-bytes-in-mem:
3525
3526 55/push-ebp
3527 89/<- %ebp 4/r32/esp
3528
3529 (clear-stream _test-input-stream)
3530 (clear-stream $_test-input-buffered-file->buffer)
3531 (clear-stream _test-output-stream)
3532 (clear-stream $_test-output-buffered-file->buffer)
3533
3534 (write _test-input-stream "fn foo {\n")
3535 (write _test-input-stream " var x: (array byte 3)\n")
3536 (write _test-input-stream "}\n")
3537
3538 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3539 (flush _test-output-buffered-file)
3540 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3546
3547 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-array-of-bytes-in-mem/0")
3548 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-array-of-bytes-in-mem/1")
3549 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-array-of-bytes-in-mem/2")
3550 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-array-of-bytes-in-mem/3")
3551 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-array-of-bytes-in-mem/4")
3552 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-array-of-bytes-in-mem/5")
3553
3554 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x00000003)" "F - test-convert-function-with-local-array-of-bytes-in-mem/7")
3555 (check-next-stream-line-equal _test-output-stream " 68/push 0x00000003/imm32" "F - test-convert-function-with-local-array-of-bytes-in-mem/8")
3556
3557 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000007/imm32" "F - test-convert-function-with-local-array-of-bytes-in-mem/9")
3558
3559 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-array-of-bytes-in-mem/10")
3560 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-array-of-bytes-in-mem/11")
3561 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-array-of-bytes-in-mem/12")
3562 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-array-of-bytes-in-mem/13")
3563 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-array-of-bytes-in-mem/14")
3564 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-array-of-bytes-in-mem/15")
3565
3566 89/<- %esp 5/r32/ebp
3567 5d/pop-to-ebp
3568 c3/return
3569
3570 test-convert-address:
3571
3572 55/push-ebp
3573 89/<- %ebp 4/r32/esp
3574
3575 (clear-stream _test-input-stream)
3576 (clear-stream $_test-input-buffered-file->buffer)
3577 (clear-stream _test-output-stream)
3578 (clear-stream $_test-output-buffered-file->buffer)
3579
3580 (write _test-input-stream "fn foo {\n")
3581 (write _test-input-stream " var a: int\n")
3582 (write _test-input-stream " var b/eax: (addr int) <- address a\n")
3583 (write _test-input-stream "}\n")
3584
3585 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3586 (flush _test-output-buffered-file)
3587 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3593
3594 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-address/0")
3595 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-address/1")
3596 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-address/2")
3597 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-address/3")
3598 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-address/4")
3599 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-address/5")
3600 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-address/6")
3601 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-address/7")
3602 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0xfffffffc) 0x00000000/r32" "F - test-convert-address/8")
3603 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-address/9")
3604 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-address/10")
3605 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-address/11")
3606 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-address/12")
3607 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-address/13")
3608 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-address/14")
3609 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-address/15")
3610 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-address/16")
3611
3612 89/<- %esp 5/r32/ebp
3613 5d/pop-to-ebp
3614 c3/return
3615
3616 test-convert-length-of-array:
3617
3618 55/push-ebp
3619 89/<- %ebp 4/r32/esp
3620
3621 (clear-stream _test-input-stream)
3622 (clear-stream $_test-input-buffered-file->buffer)
3623 (clear-stream _test-output-stream)
3624 (clear-stream $_test-output-buffered-file->buffer)
3625
3626 (write _test-input-stream "fn foo a: (addr array int) {\n")
3627 (write _test-input-stream " var b/eax: (addr array int) <- copy a\n")
3628 (write _test-input-stream " var c/eax: int <- length b\n")
3629 (write _test-input-stream "}\n")
3630
3631 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3632 (flush _test-output-buffered-file)
3633 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3639
3640 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array/0")
3641 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array/1")
3642 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array/2")
3643 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array/3")
3644 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array/4")
3645 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array/5")
3646 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array/6")
3647 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-length-of-array/7")
3648 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array/8")
3649 (check-next-stream-line-equal _test-output-stream " c1/shift 5/subop/>> %eax 0x00000002/imm8" "F - test-convert-length-of-array/9")
3650 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array/10")
3651 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array/11")
3652 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array/12")
3653 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array/13")
3654 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array/14")
3655 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array/15")
3656 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array/16")
3657
3658 89/<- %esp 5/r32/ebp
3659 5d/pop-to-ebp
3660 c3/return
3661
3662
3663 test-convert-length-of-array-of-bytes:
3664
3665 55/push-ebp
3666 89/<- %ebp 4/r32/esp
3667
3668 (clear-stream _test-input-stream)
3669 (clear-stream $_test-input-buffered-file->buffer)
3670 (clear-stream _test-output-stream)
3671 (clear-stream $_test-output-buffered-file->buffer)
3672
3673 (write _test-input-stream "fn foo a: (addr array byte) {\n")
3674 (write _test-input-stream " var b/eax: (addr array byte) <- copy a\n")
3675 (write _test-input-stream " var c/eax: int <- length b\n")
3676 (write _test-input-stream "}\n")
3677
3678 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3679 (flush _test-output-buffered-file)
3680 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3686
3687 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-bytes/0")
3688 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-bytes/1")
3689 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-bytes/2")
3690 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-of-bytes/3")
3691 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-bytes/4")
3692 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-bytes/5")
3693 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-of-bytes/6")
3694 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-length-of-array-of-bytes/7")
3695 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array-of-bytes/8")
3696 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-of-bytes/9")
3697 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-bytes/10")
3698 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-bytes/11")
3699 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-bytes/12")
3700 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-of-bytes/13")
3701 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-of-bytes/14")
3702 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-bytes/15")
3703
3704 89/<- %esp 5/r32/ebp
3705 5d/pop-to-ebp
3706 c3/return
3707
3708 test-convert-length-of-array-on-stack:
3709
3710 55/push-ebp
3711 89/<- %ebp 4/r32/esp
3712
3713 (clear-stream _test-input-stream)
3714 (clear-stream $_test-input-buffered-file->buffer)
3715 (clear-stream _test-output-stream)
3716 (clear-stream $_test-output-buffered-file->buffer)
3717
3718 (write _test-input-stream "fn foo {\n")
3719 (write _test-input-stream " var a: (array int 3)\n")
3720 (write _test-input-stream " var b/eax: int <- length a\n")
3721 (write _test-input-stream "}\n")
3722
3723 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3724 (flush _test-output-buffered-file)
3725 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3731
3732 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-on-stack/0")
3733 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-on-stack/1")
3734 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-on-stack/2")
3735 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-on-stack/3")
3736 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-on-stack/4")
3737 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-on-stack/5")
3738
3739 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-length-of-array-on-stack/6")
3740 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-length-of-array-on-stack/7")
3741 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-on-stack/8")
3742 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0xfffffff0) 0x00000000/r32" "F - test-convert-length-of-array-on-stack/9")
3743 (check-next-stream-line-equal _test-output-stream " c1/shift 5/subop/>> %eax 0x00000002/imm8" "F - test-convert-length-of-array-on-stack/10")
3744 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-on-stack/11")
3745 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000010/imm32" "F - test-convert-length-of-array-on-stack/12")
3746 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-on-stack/13")
3747 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-on-stack/14")
3748 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-on-stack/15")
3749 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-on-stack/16")
3750 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-on-stack/17")
3751 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-on-stack/18")
3752
3753 89/<- %esp 5/r32/ebp
3754 5d/pop-to-ebp
3755 c3/return
3756
3757 test-reg-var-def-with-read-of-same-register:
3758
3759 55/push-ebp
3760 89/<- %ebp 4/r32/esp
3761
3762 (clear-stream _test-input-stream)
3763 (clear-stream $_test-input-buffered-file->buffer)
3764 (clear-stream _test-output-stream)
3765 (clear-stream $_test-output-buffered-file->buffer)
3766 (clear-stream _test-error-stream)
3767 (clear-stream $_test-error-buffered-file->buffer)
3768
3769 68/push 0/imm32
3770 68/push 0/imm32
3771 89/<- %edx 4/r32/esp
3772 (tailor-exit-descriptor %edx 0x10)
3773
3774 (write _test-input-stream "fn foo {\n")
3775 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
3776 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
3777 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
3778 (write _test-input-stream "}\n")
3779
3780 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3781
3782
3783 89/<- %edx 4/r32/esp
3784 (flush _test-output-buffered-file)
3785 (flush _test-error-buffered-file)
3786 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3792 (check-stream-equal _test-error-stream "" "F - test-reg-var-def-with-read-of-same-register: error stream should be empty")
3793
3794 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-reg-var-def-with-read-of-same-register/0")
3795 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-reg-var-def-with-read-of-same-register/1")
3796 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-reg-var-def-with-read-of-same-register/2")
3797 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-reg-var-def-with-read-of-same-register/3")
3798 (check-next-stream-line-equal _test-output-stream " {" "F - test-reg-var-def-with-read-of-same-register/4")
3799 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-reg-var-def-with-read-of-same-register/5")
3800 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-reg-var-def-with-read-of-same-register/6")
3801 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-reg-var-def-with-read-of-same-register/7")
3802 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-reg-var-def-with-read-of-same-register/8")
3803 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-reg-var-def-with-read-of-same-register/9")
3804 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx<<0x00000002 + 4) 0x00000000/r32" "F - test-reg-var-def-with-read-of-same-register/11")
3805 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-reg-var-def-with-read-of-same-register/13")
3806 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-reg-var-def-with-read-of-same-register/14")
3807 (check-next-stream-line-equal _test-output-stream " }" "F - test-reg-var-def-with-read-of-same-register/15")
3808 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-reg-var-def-with-read-of-same-register/16")
3809 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-reg-var-def-with-read-of-same-register/17")
3810 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-reg-var-def-with-read-of-same-register/18")
3811 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-reg-var-def-with-read-of-same-register/19")
3812 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-reg-var-def-with-read-of-same-register/20")
3813
3814 81 0/subop/add %esp 8/imm32
3815
3816 5d/pop-to-ebp
3817 c3/return
3818
3819 test-convert-index-into-array:
3820
3821 55/push-ebp
3822 89/<- %ebp 4/r32/esp
3823
3824 (clear-stream _test-input-stream)
3825 (clear-stream $_test-input-buffered-file->buffer)
3826 (clear-stream _test-output-stream)
3827 (clear-stream $_test-output-buffered-file->buffer)
3828
3829 (write _test-input-stream "fn foo {\n")
3830 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
3831 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
3832 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
3833 (write _test-input-stream "}\n")
3834
3835 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3836 (flush _test-output-buffered-file)
3837 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3843
3844 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array/0")
3845 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array/1")
3846 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array/2")
3847 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array/3")
3848 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array/4")
3849 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array/5")
3850 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array/6")
3851 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array/7")
3852 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array/8")
3853 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array/9")
3854 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx<<0x00000002 + 4) 0x00000000/r32" "F - test-convert-index-into-array/10")
3855 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array/11")
3856 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array/12")
3857 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array/13")
3858 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array/14")
3859 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array/15")
3860 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array/16")
3861 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array/17")
3862 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array/18")
3863
3864 89/<- %esp 5/r32/ebp
3865 5d/pop-to-ebp
3866 c3/return
3867
3868 test-convert-index-into-array-of-bytes:
3869
3870 55/push-ebp
3871 89/<- %ebp 4/r32/esp
3872
3873 (clear-stream _test-input-stream)
3874 (clear-stream $_test-input-buffered-file->buffer)
3875 (clear-stream _test-output-stream)
3876 (clear-stream $_test-output-buffered-file->buffer)
3877
3878 (write _test-input-stream "fn foo {\n")
3879 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
3880 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
3881 (write _test-input-stream " var x/eax: (addr byte) <- index arr, idx\n")
3882 (write _test-input-stream "}\n")
3883
3884 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3885 (flush _test-output-buffered-file)
3886 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3892
3893 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes/0")
3894 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes/1")
3895 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes/2")
3896 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes/3")
3897 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes/4")
3898 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes/5")
3899 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes/6")
3900 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-of-bytes/7")
3901 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-of-bytes/8")
3902 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array-of-bytes/9")
3903 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx<<0x00000000 + 4) 0x00000000/r32" "F - test-convert-index-into-array-of-bytes/11")
3904 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-of-bytes/13")
3905 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes/14")
3906 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes/15")
3907 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes/16")
3908 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes/17")
3909 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes/18")
3910 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes/19")
3911 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes/20")
3912
3913 89/<- %esp 5/r32/ebp
3914 5d/pop-to-ebp
3915 c3/return
3916
3917 test-convert-index-into-array-with-literal:
3918
3919 55/push-ebp
3920 89/<- %ebp 4/r32/esp
3921
3922 (clear-stream _test-input-stream)
3923 (clear-stream $_test-input-buffered-file->buffer)
3924 (clear-stream _test-output-stream)
3925 (clear-stream $_test-output-buffered-file->buffer)
3926
3927 (write _test-input-stream "fn foo {\n")
3928 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
3929 (write _test-input-stream " var x/eax: (addr int) <- index arr, 2\n")
3930 (write _test-input-stream "}\n")
3931
3932 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3933 (flush _test-output-buffered-file)
3934 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3940
3941 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-with-literal/0")
3942 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-with-literal/1")
3943 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-with-literal/2")
3944 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-with-literal/3")
3945 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-with-literal/4")
3946 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-with-literal/5")
3947 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-with-literal/6")
3948 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-with-literal/7")
3949
3950 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x0000000c) 0x00000000/r32" "F - test-convert-index-into-array-with-literal/8")
3951 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-with-literal/9")
3952 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-with-literal/10")
3953 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-with-literal/11")
3954 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-with-literal/12")
3955 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-with-literal/13")
3956 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-with-literal/14")
3957 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-with-literal/15")
3958
3959 89/<- %esp 5/r32/ebp
3960 5d/pop-to-ebp
3961 c3/return
3962
3963 test-convert-index-into-array-of-bytes-with-literal:
3964
3965 55/push-ebp
3966 89/<- %ebp 4/r32/esp
3967
3968 (clear-stream _test-input-stream)
3969 (clear-stream $_test-input-buffered-file->buffer)
3970 (clear-stream _test-output-stream)
3971 (clear-stream $_test-output-buffered-file->buffer)
3972
3973 (write _test-input-stream "fn foo {\n")
3974 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
3975 (write _test-input-stream " var x/eax: (addr byte) <- index arr, 2\n")
3976 (write _test-input-stream "}\n")
3977
3978 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3979 (flush _test-output-buffered-file)
3980 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3986
3987 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-with-literal/0")
3988 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-with-literal/1")
3989 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-with-literal/2")
3990 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes-with-literal/3")
3991 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-with-literal/4")
3992 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-with-literal/5")
3993 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes-with-literal/6")
3994 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-of-bytes-with-literal/7")
3995
3996 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x00000006) 0x00000000/r32" "F - test-convert-index-into-array-of-bytes-with-literal/8")
3997 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-with-literal/9")
3998 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-with-literal/10")
3999 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-with-literal/11")
4000 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-with-literal/12")
4001 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-with-literal/13")
4002 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-with-literal/14")
4003 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-with-literal/15")
4004
4005 89/<- %esp 5/r32/ebp
4006 5d/pop-to-ebp
4007 c3/return
4008
4009 test-convert-index-into-array-on-stack:
4010
4011 55/push-ebp
4012 89/<- %ebp 4/r32/esp
4013
4014 (clear-stream _test-input-stream)
4015 (clear-stream $_test-input-buffered-file->buffer)
4016 (clear-stream _test-output-stream)
4017 (clear-stream $_test-output-buffered-file->buffer)
4018
4019 (write _test-input-stream "fn foo {\n")
4020 (write _test-input-stream " var arr: (array int 3)\n")
4021 (write _test-input-stream " var idx/eax: int <- copy 2\n")
4022 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
4023 (write _test-input-stream "}\n")
4024
4025 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4026 (flush _test-output-buffered-file)
4027 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4033
4034 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-on-stack/0")
4035 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-on-stack/1")
4036 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-on-stack/2")
4037 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-on-stack/3")
4038 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-on-stack/4")
4039 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-on-stack/5")
4040
4041 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-index-into-array-on-stack/6")
4042 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-index-into-array-on-stack/7")
4043
4044 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-on-stack/8")
4045 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 2/imm32" "F - test-convert-index-into-array-on-stack/9")
4046
4047 (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")
4048
4049 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-on-stack/11")
4050
4051 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000010/imm32" "F - test-convert-index-into-array-on-stack/12")
4052
4053 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-on-stack/13")
4054 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-on-stack/14")
4055 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-on-stack/15")
4056 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-on-stack/16")
4057 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-on-stack/17")
4058 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-on-stack/18")
4059
4060 89/<- %esp 5/r32/ebp
4061 5d/pop-to-ebp
4062 c3/return
4063
4064 test-convert-index-into-array-on-stack-with-literal:
4065
4066 55/push-ebp
4067 89/<- %ebp 4/r32/esp
4068
4069 (clear-stream _test-input-stream)
4070 (clear-stream $_test-input-buffered-file->buffer)
4071 (clear-stream _test-output-stream)
4072 (clear-stream $_test-output-buffered-file->buffer)
4073
4074 (write _test-input-stream "fn foo {\n")
4075 (write _test-input-stream " var arr: (array int 3)\n")
4076 (write _test-input-stream " var x/eax: (addr int) <- index arr, 2\n")
4077 (write _test-input-stream "}\n")
4078
4079 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4080 (flush _test-output-buffered-file)
4081 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4087
4088 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-on-stack-with-literal/0")
4089 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-on-stack-with-literal/1")
4090 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-on-stack-with-literal/2")
4091 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-on-stack-with-literal/3")
4092 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-on-stack-with-literal/4")
4093 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-on-stack-with-literal/5")
4094
4095 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-index-into-array-on-stack-with-literal/6")
4096 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-index-into-array-on-stack-with-literal/7")
4097
4098 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-on-stack-with-literal/8")
4099
4100 (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")
4101
4102 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-on-stack-with-literal/10")
4103
4104 (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")
4105
4106 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-on-stack-with-literal/12")
4107 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-on-stack-with-literal/13")
4108 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-on-stack-with-literal/14")
4109 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-on-stack-with-literal/15")
4110 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-on-stack-with-literal/16")
4111 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-on-stack-with-literal/17")
4112
4113 89/<- %esp 5/r32/ebp
4114 5d/pop-to-ebp
4115 c3/return
4116
4117 test-convert-index-into-array-of-bytes-on-stack-with-literal:
4118
4119 55/push-ebp
4120 89/<- %ebp 4/r32/esp
4121
4122 (clear-stream _test-input-stream)
4123 (clear-stream $_test-input-buffered-file->buffer)
4124 (clear-stream _test-output-stream)
4125 (clear-stream $_test-output-buffered-file->buffer)
4126
4127 (write _test-input-stream "fn foo {\n")
4128 (write _test-input-stream " var arr: (array byte 3)\n")
4129 (write _test-input-stream " var x/eax: (addr byte) <- index arr, 2\n")
4130 (write _test-input-stream "}\n")
4131
4132 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4133 (flush _test-output-buffered-file)
4134 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4140
4141 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/0")
4142 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/1")
4143 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/2")
4144 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/3")
4145 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/4")
4146 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/5")
4147
4148 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x00000003)" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/6")
4149 (check-next-stream-line-equal _test-output-stream " 68/push 0x00000003/imm32" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/7")
4150
4151 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/8")
4152
4153 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp + 0xffffffff) 0x00000000/r32" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/9")
4154
4155 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/10")
4156
4157 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000007/imm32" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/11")
4158
4159 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/12")
4160 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/13")
4161 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/14")
4162 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/15")
4163 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/16")
4164 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/17")
4165
4166 89/<- %esp 5/r32/ebp
4167 5d/pop-to-ebp
4168 c3/return
4169
4170 test-convert-index-into-array-using-offset:
4171
4172 55/push-ebp
4173 89/<- %ebp 4/r32/esp
4174
4175 (clear-stream _test-input-stream)
4176 (clear-stream $_test-input-buffered-file->buffer)
4177 (clear-stream _test-output-stream)
4178 (clear-stream $_test-output-buffered-file->buffer)
4179
4180 (write _test-input-stream "fn foo {\n")
4181 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
4182 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
4183 (write _test-input-stream " var off/ecx: (offset int) <- compute-offset arr, idx\n")
4184 (write _test-input-stream " var x/eax: (addr int) <- index arr, off\n")
4185 (write _test-input-stream "}\n")
4186
4187 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4188 (flush _test-output-buffered-file)
4189 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4195
4196 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-using-offset/0")
4197 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-using-offset/1")
4198 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-using-offset/2")
4199 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-using-offset/3")
4200 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-using-offset/4")
4201 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-using-offset/5")
4202 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-using-offset/6")
4203 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-using-offset/7")
4204 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-using-offset/8")
4205 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array-using-offset/9")
4206 (check-next-stream-line-equal _test-output-stream " 69/multiply %ecx 0x00000004/imm32 0x00000001/r32" "F - test-convert-index-into-array-using-offset/10")
4207 (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")
4208 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-using-offset/12")
4209 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-using-offset/13")
4210 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-using-offset/14")
4211 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-using-offset/15")
4212 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-using-offset/16")
4213 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-using-offset/17")
4214 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-using-offset/18")
4215 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-using-offset/19")
4216
4217 89/<- %esp 5/r32/ebp
4218 5d/pop-to-ebp
4219 c3/return
4220
4221 test-convert-index-into-array-of-bytes-using-offset:
4222
4223 55/push-ebp
4224 89/<- %ebp 4/r32/esp
4225
4226 (clear-stream _test-input-stream)
4227 (clear-stream $_test-input-buffered-file->buffer)
4228 (clear-stream _test-output-stream)
4229 (clear-stream $_test-output-buffered-file->buffer)
4230
4231 (write _test-input-stream "fn foo {\n")
4232 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
4233 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
4234 (write _test-input-stream " var off/ecx: (offset byte) <- compute-offset arr, idx\n")
4235 (write _test-input-stream " var x/eax: (addr byte) <- index arr, off\n")
4236 (write _test-input-stream "}\n")
4237
4238 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4239 (flush _test-output-buffered-file)
4240 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4246
4247 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-using-offset/0")
4248 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-using-offset/1")
4249 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-using-offset/2")
4250 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes-using-offset/3")
4251 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-using-offset/4")
4252 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-using-offset/5")
4253 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes-using-offset/6")
4254 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-of-bytes-using-offset/7")
4255 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-of-bytes-using-offset/8")
4256 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array-of-bytes-using-offset/9")
4257 (check-next-stream-line-equal _test-output-stream " 69/multiply %ecx 0x00000001/imm32 0x00000001/r32" "F - test-convert-index-into-array-of-bytes-using-offset/10")
4258 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx + 4) 0x00000000/r32" "F - test-convert-index-into-array-of-bytes-using-offset/11")
4259 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-of-bytes-using-offset/12")
4260 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-using-offset/13")
4261 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-using-offset/14")
4262 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-using-offset/15")
4263 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-using-offset/16")
4264 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-using-offset/17")
4265 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-using-offset/18")
4266 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-using-offset/19")
4267
4268 89/<- %esp 5/r32/ebp
4269 5d/pop-to-ebp
4270 c3/return
4271
4272 test-convert-index-into-array-using-offset-on-stack:
4273
4274 55/push-ebp
4275 89/<- %ebp 4/r32/esp
4276
4277 (clear-stream _test-input-stream)
4278 (clear-stream $_test-input-buffered-file->buffer)
4279 (clear-stream _test-output-stream)
4280 (clear-stream $_test-output-buffered-file->buffer)
4281
4282 (write _test-input-stream "fn foo {\n")
4283 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
4284 (write _test-input-stream " var idx: int\n")
4285 (write _test-input-stream " var off/ecx: (offset int) <- compute-offset arr, idx\n")
4286 (write _test-input-stream " var x/eax: (addr int) <- index arr, off\n")
4287 (write _test-input-stream "}\n")
4288
4289 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4290 (flush _test-output-buffered-file)
4291 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4297
4298 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-using-offset-on-stack/0")
4299 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-using-offset-on-stack/1")
4300 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-using-offset-on-stack/2")
4301 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-using-offset-on-stack/3")
4302 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-using-offset-on-stack/4")
4303 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-using-offset-on-stack/5")
4304 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-using-offset-on-stack/6")
4305 (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")
4306 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-index-into-array-using-offset-on-stack/8")
4307 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-using-offset-on-stack/9")
4308 (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")
4309 (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")
4310 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-using-offset-on-stack/12")
4311 (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")
4312 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-using-offset-on-stack/14")
4313 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-using-offset-on-stack/15")
4314 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-using-offset-on-stack/16")
4315 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-using-offset-on-stack/17")
4316 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-using-offset-on-stack/18")
4317 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-using-offset-on-stack/19")
4318 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-using-offset-on-stack/20")
4319
4320 89/<- %esp 5/r32/ebp
4321 5d/pop-to-ebp
4322 c3/return
4323
4324 test-convert-index-into-array-of-bytes-using-offset-on-stack:
4325
4326 55/push-ebp
4327 89/<- %ebp 4/r32/esp
4328
4329 (clear-stream _test-input-stream)
4330 (clear-stream $_test-input-buffered-file->buffer)
4331 (clear-stream _test-output-stream)
4332 (clear-stream $_test-output-buffered-file->buffer)
4333
4334 (write _test-input-stream "fn foo {\n")
4335 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
4336 (write _test-input-stream " var idx: int\n")
4337 (write _test-input-stream " var off/ecx: (offset byte) <- compute-offset arr, idx\n")
4338 (write _test-input-stream " var x/eax: (addr byte) <- index arr, off\n")
4339 (write _test-input-stream "}\n")
4340
4341 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4342 (flush _test-output-buffered-file)
4343 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4349
4350 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/0")
4351 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/1")
4352 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/2")
4353 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/3")
4354 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/4")
4355 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/5")
4356 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/6")
4357 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/7")
4358 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/8")
4359 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/9")
4360 (check-next-stream-line-equal _test-output-stream " 69/multiply *(ebp+0xfffffff8) 0x00000001/imm32 0x00000001/r32" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/10")
4361 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx + 4) 0x00000000/r32" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/11")
4362 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/12")
4363 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/13")
4364 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/14")
4365 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/15")
4366 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/16")
4367 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/17")
4368 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/18")
4369 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/19")
4370 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/20")
4371
4372 89/<- %esp 5/r32/ebp
4373 5d/pop-to-ebp
4374 c3/return
4375
4376 test-convert-function-and-type-definition:
4377
4378 55/push-ebp
4379 89/<- %ebp 4/r32/esp
4380
4381 (clear-stream _test-input-stream)
4382 (clear-stream $_test-input-buffered-file->buffer)
4383 (clear-stream _test-output-stream)
4384 (clear-stream $_test-output-buffered-file->buffer)
4385
4386 (write _test-input-stream "fn foo a: (addr t) {\n")
4387 (write _test-input-stream " var _a/eax: (addr t) <- copy a\n")
4388 (write _test-input-stream " var b/ecx: (addr int) <- get _a, x\n")
4389 (write _test-input-stream " var c/ecx: (addr int) <- get _a, y\n")
4390 (write _test-input-stream "}\n")
4391 (write _test-input-stream "type t {\n")
4392 (write _test-input-stream " x: int\n")
4393 (write _test-input-stream " y: int\n")
4394 (write _test-input-stream "}\n")
4395
4396 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4397 (flush _test-output-buffered-file)
4398 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4404
4405 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-and-type-definition/0")
4406 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-and-type-definition/1")
4407 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-and-type-definition/2")
4408 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-and-type-definition/3")
4409 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-and-type-definition/4")
4410 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-and-type-definition/5")
4411 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-and-type-definition/6")
4412 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-and-type-definition/7")
4413 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-and-type-definition/8")
4414 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x00000000) 0x00000001/r32" "F - test-convert-function-and-type-definition/9")
4415 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x00000004) 0x00000001/r32" "F - test-convert-function-and-type-definition/11")
4416 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-and-type-definition/13")
4417 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-and-type-definition/14")
4418 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-and-type-definition/15")
4419 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-and-type-definition/16")
4420 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-and-type-definition/17")
4421 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-and-type-definition/18")
4422 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-and-type-definition/19")
4423 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-and-type-definition/20")
4424
4425 89/<- %esp 5/r32/ebp
4426 5d/pop-to-ebp
4427 c3/return
4428
4429 test-convert-function-with-local-var-with-user-defined-type:
4430
4431 55/push-ebp
4432 89/<- %ebp 4/r32/esp
4433
4434 (clear-stream _test-input-stream)
4435 (clear-stream $_test-input-buffered-file->buffer)
4436 (clear-stream _test-output-stream)
4437 (clear-stream $_test-output-buffered-file->buffer)
4438
4439 (write _test-input-stream "fn foo {\n")
4440 (write _test-input-stream " var a: t\n")
4441 (write _test-input-stream "}\n")
4442 (write _test-input-stream "type t {\n")
4443 (write _test-input-stream " x: int\n")
4444 (write _test-input-stream " y: int\n")
4445 (write _test-input-stream "}\n")
4446
4447 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4448 (flush _test-output-buffered-file)
4449 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4455
4456 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-with-user-defined-type/0")
4457 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-with-user-defined-type/1")
4458 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-with-user-defined-type/2")
4459 (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")
4460 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-with-user-defined-type/4")
4461 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-with-user-defined-type/5")
4462 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-with-user-defined-type/6")
4463 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-with-user-defined-type/7")
4464 (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")
4465 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-with-user-defined-type/9")
4466 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-with-user-defined-type/10")
4467 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-with-user-defined-type/11")
4468 (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")
4469 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-with-user-defined-type/13")
4470 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-with-user-defined-type/14")
4471
4472 89/<- %esp 5/r32/ebp
4473 5d/pop-to-ebp
4474 c3/return
4475
4476 test-convert-function-call-with-arg-of-user-defined-type:
4477
4478 55/push-ebp
4479 89/<- %ebp 4/r32/esp
4480
4481 (clear-stream _test-input-stream)
4482 (clear-stream $_test-input-buffered-file->buffer)
4483 (clear-stream _test-output-stream)
4484 (clear-stream $_test-output-buffered-file->buffer)
4485
4486 (write _test-input-stream "fn f {\n")
4487 (write _test-input-stream " var a: t\n")
4488 (write _test-input-stream " foo a\n")
4489 (write _test-input-stream "}\n")
4490 (write _test-input-stream "fn foo x: t {\n")
4491 (write _test-input-stream "}\n")
4492 (write _test-input-stream "type t {\n")
4493 (write _test-input-stream " x: int\n")
4494 (write _test-input-stream " y: int\n")
4495 (write _test-input-stream "}\n")
4496
4497 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4498 (flush _test-output-buffered-file)
4499 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4505
4506 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type/0")
4507 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/1")
4508 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/2")
4509 (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")
4510 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type/4")
4511 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-arg-of-user-defined-type/5")
4512
4513 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type/6")
4514 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type/7")
4515
4516 (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")
4517
4518 (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")
4519 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type/10")
4520 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-arg-of-user-defined-type/11")
4521 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/12")
4522 (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")
4523 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/14")
4524 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/15")
4525 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type/16")
4526 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/17")
4527 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/18")
4528 (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")
4529 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/20")
4530 (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")
4531 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/22")
4532 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/23")
4533
4534 89/<- %esp 5/r32/ebp
4535 5d/pop-to-ebp
4536 c3/return
4537
4538 test-convert-function-call-with-arg-of-user-defined-type-register-indirect:
4539
4540 55/push-ebp
4541 89/<- %ebp 4/r32/esp
4542
4543 (clear-stream _test-input-stream)
4544 (clear-stream $_test-input-buffered-file->buffer)
4545 (clear-stream _test-output-stream)
4546 (clear-stream $_test-output-buffered-file->buffer)
4547
4548 (write _test-input-stream "fn f {\n")
4549 (write _test-input-stream " var a/eax: (addr t) <- copy 0\n")
4550 (write _test-input-stream " foo *a\n")
4551 (write _test-input-stream "}\n")
4552 (write _test-input-stream "fn foo x: t {\n")
4553 (write _test-input-stream "}\n")
4554 (write _test-input-stream "type t {\n")
4555 (write _test-input-stream " x: int\n")
4556 (write _test-input-stream " y: int\n")
4557 (write _test-input-stream "}\n")
4558
4559 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4560 (flush _test-output-buffered-file)
4561 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4567
4568 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type/0")
4569 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/1")
4570 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/2")
4571 (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")
4572 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type/4")
4573 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-arg-of-user-defined-type/5")
4574
4575 (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")
4576 (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")
4577
4578 (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")
4579
4580 (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")
4581 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type/10")
4582 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-arg-of-user-defined-type/11")
4583 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/12")
4584 (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")
4585 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/14")
4586 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/15")
4587 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type/16")
4588 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/17")
4589 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/18")
4590 (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")
4591 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/20")
4592 (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")
4593 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/22")
4594 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/23")
4595
4596 89/<- %esp 5/r32/ebp
4597 5d/pop-to-ebp
4598 c3/return
4599
4600
4601
4602 test-convert-function-call-with-arg-of-user-defined-type-by-reference:
4603
4604 55/push-ebp
4605 89/<- %ebp 4/r32/esp
4606
4607 (clear-stream _test-input-stream)
4608 (clear-stream $_test-input-buffered-file->buffer)
4609 (clear-stream _test-output-stream)
4610 (clear-stream $_test-output-buffered-file->buffer)
4611
4612 (write _test-input-stream "fn f {\n")
4613 (write _test-input-stream " var a: t\n")
4614 (write _test-input-stream " var b/eax: (addr t) <- address a\n")
4615 (write _test-input-stream " foo b\n")
4616 (write _test-input-stream "}\n")
4617 (write _test-input-stream "fn foo x: (addr t) {\n")
4618 (write _test-input-stream " var x/ecx: (addr int) <- copy x\n")
4619 (write _test-input-stream " increment *x\n")
4620 (write _test-input-stream "}\n")
4621 (write _test-input-stream "type t {\n")
4622 (write _test-input-stream " x: int\n")
4623 (write _test-input-stream " y: int\n")
4624 (write _test-input-stream "}\n")
4625
4626 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4627 (flush _test-output-buffered-file)
4628 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4634
4635 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/0")
4636 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/1")
4637 (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")
4638 (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")
4639 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/4")
4640 (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")
4641
4642 (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")
4643 (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")
4644
4645 (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")
4646 (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")
4647
4648 (check-next-stream-line-equal _test-output-stream " (foo %eax)" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/10")
4649
4650 (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")
4651 (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")
4652 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/13")
4653 (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")
4654 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/15")
4655 (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")
4656 (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")
4657 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/18")
4658 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/19")
4659 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/20")
4660 (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")
4661 (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")
4662 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/23")
4663 (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")
4664 (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")
4665 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000001/r32" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/26")
4666 (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")
4667 (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")
4668 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/29")
4669 (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")
4670 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/31")
4671 (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")
4672 (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")
4673 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/34")
4674
4675 89/<- %esp 5/r32/ebp
4676 5d/pop-to-ebp
4677 c3/return
4678
4679 test-convert-get-on-local-variable:
4680
4681 55/push-ebp
4682 89/<- %ebp 4/r32/esp
4683
4684 (clear-stream _test-input-stream)
4685 (clear-stream $_test-input-buffered-file->buffer)
4686 (clear-stream _test-output-stream)
4687 (clear-stream $_test-output-buffered-file->buffer)
4688
4689 (write _test-input-stream "fn foo {\n")
4690 (write _test-input-stream " var a: t\n")
4691 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
4692 (write _test-input-stream "}\n")
4693 (write _test-input-stream "type t {\n")
4694 (write _test-input-stream " x: int\n")
4695 (write _test-input-stream " y: int\n")
4696 (write _test-input-stream "}\n")
4697
4698 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4699 (flush _test-output-buffered-file)
4700 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4706
4707 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-local-variable/0")
4708 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-local-variable/1")
4709 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-local-variable/2")
4710 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-local-variable/3")
4711 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-local-variable/4")
4712 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-local-variable/5")
4713
4714 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-get-on-local-variable/6")
4715 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-get-on-local-variable/7")
4716
4717 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-local-variable/8")
4718
4719 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0xfffffffc) 0x00000001/r32" "F - test-convert-get-on-local-variable/9")
4720
4721 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-local-variable/10")
4722
4723 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000008/imm32" "F - test-convert-get-on-local-variable/11")
4724 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-local-variable/12")
4725 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-local-variable/13")
4726 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-local-variable/14")
4727 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-local-variable/15")
4728 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-local-variable/16")
4729 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-local-variable/17")
4730
4731 89/<- %esp 5/r32/ebp
4732 5d/pop-to-ebp
4733 c3/return
4734
4735 test-convert-get-on-function-argument:
4736
4737 55/push-ebp
4738 89/<- %ebp 4/r32/esp
4739
4740 (clear-stream _test-input-stream)
4741 (clear-stream $_test-input-buffered-file->buffer)
4742 (clear-stream _test-output-stream)
4743 (clear-stream $_test-output-buffered-file->buffer)
4744
4745 (write _test-input-stream "fn foo a: t {\n")
4746 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
4747 (write _test-input-stream "}\n")
4748 (write _test-input-stream "type t {\n")
4749 (write _test-input-stream " x: int\n")
4750 (write _test-input-stream " y: int\n")
4751 (write _test-input-stream "}\n")
4752
4753 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4754 (flush _test-output-buffered-file)
4755 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4761
4762 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-function-argument/0")
4763 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-function-argument/1")
4764 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-function-argument/2")
4765 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-function-argument/3")
4766 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-function-argument/4")
4767 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-function-argument/5")
4768
4769 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-function-argument/6")
4770
4771 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0x0000000c) 0x00000001/r32" "F - test-convert-get-on-function-argument/7")
4772
4773 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-function-argument/8")
4774 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-function-argument/9")
4775 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-function-argument/10")
4776 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-function-argument/11")
4777 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-function-argument/12")
4778 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-function-argument/13")
4779 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-function-argument/14")
4780
4781 89/<- %esp 5/r32/ebp
4782 5d/pop-to-ebp
4783 c3/return
4784
4785 test-convert-get-on-function-argument-with-known-type:
4786
4787 55/push-ebp
4788 89/<- %ebp 4/r32/esp
4789
4790 (clear-stream _test-input-stream)
4791 (clear-stream $_test-input-buffered-file->buffer)
4792 (clear-stream _test-output-stream)
4793 (clear-stream $_test-output-buffered-file->buffer)
4794
4795 (write _test-input-stream "type t {\n")
4796 (write _test-input-stream " x: int\n")
4797 (write _test-input-stream " y: int\n")
4798 (write _test-input-stream "}\n")
4799 (write _test-input-stream "fn foo a: t {\n")
4800 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
4801 (write _test-input-stream "}\n")
4802
4803 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4804 (flush _test-output-buffered-file)
4805 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4811
4812 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-function-argument-with-known-type/0")
4813 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-function-argument-with-known-type/1")
4814 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-function-argument-with-known-type/2")
4815 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-function-argument-with-known-type/3")
4816 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-function-argument-with-known-type/4")
4817 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-function-argument-with-known-type/5")
4818
4819 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-function-argument-with-known-type/6")
4820
4821 (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")
4822
4823 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-function-argument-with-known-type/8")
4824 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-function-argument-with-known-type/9")
4825 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-function-argument-with-known-type/10")
4826 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-function-argument-with-known-type/11")
4827 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-function-argument-with-known-type/12")
4828 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-function-argument-with-known-type/13")
4829 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-function-argument-with-known-type/14")
4830
4831 89/<- %esp 5/r32/ebp
4832 5d/pop-to-ebp
4833 c3/return
4834
4835 test-add-with-too-many-inouts:
4836
4837 55/push-ebp
4838 89/<- %ebp 4/r32/esp
4839
4840 (clear-stream _test-input-stream)
4841 (clear-stream $_test-input-buffered-file->buffer)
4842 (clear-stream _test-output-stream)
4843 (clear-stream $_test-output-buffered-file->buffer)
4844 (clear-stream _test-error-stream)
4845 (clear-stream $_test-error-buffered-file->buffer)
4846
4847 68/push 0/imm32
4848 68/push 0/imm32
4849 89/<- %edx 4/r32/esp
4850 (tailor-exit-descriptor %edx 0x10)
4851
4852 (write _test-input-stream "fn foo {\n")
4853 (write _test-input-stream " var a: int\n")
4854 (write _test-input-stream " var b/ecx: int <- add a, 0\n")
4855 (write _test-input-stream "}\n")
4856
4857 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
4858
4859
4860 89/<- %edx 4/r32/esp
4861 (flush _test-output-buffered-file)
4862 (flush _test-error-buffered-file)
4863 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
4869
4870 (check-stream-equal _test-output-stream "" "F - test-add-with-too-many-inouts: output should be empty")
4871 (check-next-stream-line-equal _test-error-stream "fn foo: stmt add: too many inouts; most primitives support at most two arguments, across inouts and outputs" "F - test-add-with-too-many-inouts: error message")
4872
4873 (check-ints-equal *(edx+4) 2 "F - test-add-with-too-many-inouts: exit status")
4874
4875 81 0/subop/add %esp 8/imm32
4876
4877 5d/pop-to-ebp
4878 c3/return
4879
4880 test-add-with-too-many-inouts-2:
4881
4882 55/push-ebp
4883 89/<- %ebp 4/r32/esp
4884
4885 (clear-stream _test-input-stream)
4886 (clear-stream $_test-input-buffered-file->buffer)
4887 (clear-stream _test-output-stream)
4888 (clear-stream $_test-output-buffered-file->buffer)
4889 (clear-stream _test-error-stream)
4890 (clear-stream $_test-error-buffered-file->buffer)
4891
4892 68/push 0/imm32
4893 68/push 0/imm32
4894 89/<- %edx 4/r32/esp
4895 (tailor-exit-descriptor %edx 0x10)
4896
4897 (write _test-input-stream "fn foo {\n")
4898 (write _test-input-stream " var a: int\n")
4899 (write _test-input-stream " add-to a, 0, 1\n")
4900 (write _test-input-stream "}\n")
4901
4902 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
4903
4904
4905 89/<- %edx 4/r32/esp
4906 (flush _test-output-buffered-file)
4907 (flush _test-error-buffered-file)
4908 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
4914
4915 (check-stream-equal _test-output-stream "" "F - test-add-with-too-many-inouts-2: output should be empty")
4916 (check-next-stream-line-equal _test-error-stream "fn foo: stmt add-to: too many inouts; most primitives support at most two arguments, across inouts and outputs" "F - test-add-with-too-many-inouts-2: error message")
4917
4918 (check-ints-equal *(edx+4) 2 "F - test-add-with-too-many-inouts-2: exit status")
4919
4920 81 0/subop/add %esp 8/imm32
4921
4922 5d/pop-to-ebp
4923 c3/return
4924
4925 test-add-with-too-many-outputs:
4926
4927 55/push-ebp
4928 89/<- %ebp 4/r32/esp
4929
4930 (clear-stream _test-input-stream)
4931 (clear-stream $_test-input-buffered-file->buffer)
4932 (clear-stream _test-output-stream)
4933 (clear-stream $_test-output-buffered-file->buffer)
4934 (clear-stream _test-error-stream)
4935 (clear-stream $_test-error-buffered-file->buffer)
4936
4937 68/push 0/imm32
4938 68/push 0/imm32
4939 89/<- %edx 4/r32/esp
4940 (tailor-exit-descriptor %edx 0x10)
4941
4942 (write _test-input-stream "fn foo {\n")
4943 (write _test-input-stream " var a/eax: int <- copy 0\n")
4944 (write _test-input-stream " var b/ebx: int <- copy 0\n")
4945 (write _test-input-stream " var c/ecx: int <- copy 0\n")
4946 (write _test-input-stream " c, b <- add a\n")
4947 (write _test-input-stream "}\n")
4948
4949 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
4950
4951
4952 89/<- %edx 4/r32/esp
4953 (flush _test-output-buffered-file)
4954 (flush _test-error-buffered-file)
4955 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
4961
4962 (check-stream-equal _test-output-stream "" "F - test-add-with-too-many-outputs: output should be empty")
4963 (check-next-stream-line-equal _test-error-stream "fn foo: stmt add: too many outputs; most primitives support at most one output" "F - test-add-with-too-many-outputs: error message")
4964
4965 (check-ints-equal *(edx+4) 2 "F - test-add-with-too-many-outputs: exit status")
4966
4967 81 0/subop/add %esp 8/imm32
4968
4969 5d/pop-to-ebp
4970 c3/return
4971
4972 test-add-with-non-number:
4973
4974 55/push-ebp
4975 89/<- %ebp 4/r32/esp
4976
4977 (clear-stream _test-input-stream)
4978 (clear-stream $_test-input-buffered-file->buffer)
4979 (clear-stream _test-output-stream)
4980 (clear-stream $_test-output-buffered-file->buffer)
4981 (clear-stream _test-error-stream)
4982 (clear-stream $_test-error-buffered-file->buffer)
4983
4984 68/push 0/imm32
4985 68/push 0/imm32
4986 89/<- %edx 4/r32/esp
4987 (tailor-exit-descriptor %edx 0x10)
4988
4989 (write _test-input-stream "fn foo {\n")
4990 (write _test-input-stream " var a: int\n")
4991 (write _test-input-stream " var b/ecx: (addr int) <- add a\n")
4992 (write _test-input-stream "}\n")
4993
4994 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
4995
4996
4997 89/<- %edx 4/r32/esp
4998 (flush _test-output-buffered-file)
4999 (flush _test-error-buffered-file)
5000 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
5006
5007 (check-stream-equal _test-output-stream "" "F - test-add-with-non-number: output should be empty")
5008 (check-next-stream-line-equal _test-error-stream "fn foo: stmt add: only non-addr scalar args permitted" "F - test-add-with-non-number: error message")
5009
5010 (check-ints-equal *(edx+4) 2 "F - test-add-with-non-number: exit status")
5011
5012 81 0/subop/add %esp 8/imm32
5013
5014 5d/pop-to-ebp
5015 c3/return
5016
5017 test-add-with-addr-dereferenced:
5018
5019 55/push-ebp
5020 89/<- %ebp 4/r32/esp
5021
5022 (clear-stream _test-input-stream)
5023 (clear-stream $_test-input-buffered-file->buffer)
5024 (clear-stream _test-output-stream)
5025 (clear-stream $_test-output-buffered-file->buffer)
5026
5027 (write _test-input-stream "fn foo {\n")
5028 (write _test-input-stream " var a/eax: (addr int) <- copy 0\n")
5029 (write _test-input-stream " add-to *a, 1\n")
5030 (write _test-input-stream "}\n")
5031
5032 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5033 (flush _test-output-buffered-file)
5034
5035
5036 89/<- %esp 5/r32/ebp
5037 5d/pop-to-ebp
5038 c3/return
5039
5040 test-get-with-wrong-field:
5041
5042 55/push-ebp
5043 89/<- %ebp 4/r32/esp
5044
5045 (clear-stream _test-input-stream)
5046 (clear-stream $_test-input-buffered-file->buffer)
5047 (clear-stream _test-output-stream)
5048 (clear-stream $_test-output-buffered-file->buffer)
5049 (clear-stream _test-error-stream)
5050 (clear-stream $_test-error-buffered-file->buffer)
5051
5052 68/push 0/imm32
5053 68/push 0/imm32
5054 89/<- %edx 4/r32/esp
5055 (tailor-exit-descriptor %edx 0x10)
5056
5057 (write _test-input-stream "fn foo {\n")
5058 (write _test-input-stream " var a: t\n")
5059 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
5060 (write _test-input-stream "}\n")
5061 (write _test-input-stream "type t {\n")
5062 (write _test-input-stream " x: int\n")
5063 (write _test-input-stream "}\n")
5064
5065 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5066
5067
5068 89/<- %edx 4/r32/esp
5069 (flush _test-output-buffered-file)
5070 (flush _test-error-buffered-file)
5071 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
5077
5078 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-field: output should be empty")
5079 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: type 't' has no member called 'y'" "F - test-get-with-wrong-field: error message")
5080
5081 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-field: exit status")
5082
5083 81 0/subop/add %esp 8/imm32
5084
5085 5d/pop-to-ebp
5086 c3/return
5087
5088 test-get-with-wrong-base-type:
5089
5090 55/push-ebp
5091 89/<- %ebp 4/r32/esp
5092
5093 (clear-stream _test-input-stream)
5094 (clear-stream $_test-input-buffered-file->buffer)
5095 (clear-stream _test-output-stream)
5096 (clear-stream $_test-output-buffered-file->buffer)
5097 (clear-stream _test-error-stream)
5098 (clear-stream $_test-error-buffered-file->buffer)
5099
5100 68/push 0/imm32
5101 68/push 0/imm32
5102 89/<- %edx 4/r32/esp
5103 (tailor-exit-descriptor %edx 0x10)
5104
5105 (write _test-input-stream "fn foo {\n")
5106 (write _test-input-stream " var a: int\n")
5107 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
5108 (write _test-input-stream "}\n")
5109
5110 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5111
5112
5113 89/<- %edx 4/r32/esp
5114 (flush _test-output-buffered-file)
5115 (flush _test-error-buffered-file)
5116 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
5122
5123 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-base-type: output should be empty")
5124 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: var 'a' must have a 'type' definition" "F - test-get-with-wrong-base-type: error message")
5125
5126 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-base-type: exit status")
5127
5128 81 0/subop/add %esp 8/imm32
5129
5130 5d/pop-to-ebp
5131 c3/return
5132
5133 test-get-with-wrong-base-type-2:
5134
5135 55/push-ebp
5136 89/<- %ebp 4/r32/esp
5137
5138 (clear-stream _test-input-stream)
5139 (clear-stream $_test-input-buffered-file->buffer)
5140 (clear-stream _test-output-stream)
5141 (clear-stream $_test-output-buffered-file->buffer)
5142 (clear-stream _test-error-stream)
5143 (clear-stream $_test-error-buffered-file->buffer)
5144
5145 68/push 0/imm32
5146 68/push 0/imm32
5147 89/<- %edx 4/r32/esp
5148 (tailor-exit-descriptor %edx 0x10)
5149
5150 (write _test-input-stream "fn foo {\n")
5151 (write _test-input-stream " var a: (addr t)\n")
5152 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
5153 (write _test-input-stream "}\n")
5154 (write _test-input-stream "type t {\n")
5155 (write _test-input-stream " x: int\n")
5156 (write _test-input-stream "}\n")
5157
5158 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5159
5160
5161 89/<- %edx 4/r32/esp
5162 (flush _test-output-buffered-file)
5163 (flush _test-error-buffered-file)
5164 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
5170
5171 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-base-type-2: output should be empty")
5172 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: var 'a' is an 'addr' type, and so must live in a register" "F - test-get-with-wrong-base-type-2: error message")
5173
5174 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-base-type-2: exit status")
5175
5176 81 0/subop/add %esp 8/imm32
5177
5178 5d/pop-to-ebp
5179 c3/return
5180
5181 test-get-with-wrong-offset-type:
5182
5183 55/push-ebp
5184 89/<- %ebp 4/r32/esp
5185
5186 (clear-stream _test-input-stream)
5187 (clear-stream $_test-input-buffered-file->buffer)
5188 (clear-stream _test-output-stream)
5189 (clear-stream $_test-output-buffered-file->buffer)
5190 (clear-stream _test-error-stream)
5191 (clear-stream $_test-error-buffered-file->buffer)
5192
5193 68/push 0/imm32
5194 68/push 0/imm32
5195 89/<- %edx 4/r32/esp
5196 (tailor-exit-descriptor %edx 0x10)
5197
5198 (write _test-input-stream "fn foo {\n")
5199 (write _test-input-stream " var a: t\n")
5200 (write _test-input-stream " var b: int\n")
5201 (write _test-input-stream " var c/ecx: (addr int) <- get a, b\n")
5202 (write _test-input-stream "}\n")
5203 (write _test-input-stream "type t {\n")
5204 (write _test-input-stream " x: int\n")
5205 (write _test-input-stream "}\n")
5206
5207 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5208
5209
5210 89/<- %edx 4/r32/esp
5211 (flush _test-output-buffered-file)
5212 (flush _test-error-buffered-file)
5213 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
5219
5220 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-offset-type: output should be empty")
5221 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: type 't' has no member called 'b'" "F - test-get-with-wrong-offset-type: error message")
5222
5223 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-offset-type: exit status")
5224
5225 81 0/subop/add %esp 8/imm32
5226
5227 5d/pop-to-ebp
5228 c3/return
5229
5230 test-get-with-wrong-output-type:
5231
5232 55/push-ebp
5233 89/<- %ebp 4/r32/esp
5234
5235 (clear-stream _test-input-stream)
5236 (clear-stream $_test-input-buffered-file->buffer)
5237 (clear-stream _test-output-stream)
5238 (clear-stream $_test-output-buffered-file->buffer)
5239 (clear-stream _test-error-stream)
5240 (clear-stream $_test-error-buffered-file->buffer)
5241
5242 68/push 0/imm32
5243 68/push 0/imm32
5244 89/<- %edx 4/r32/esp
5245 (tailor-exit-descriptor %edx 0x10)
5246
5247 (write _test-input-stream "fn foo {\n")
5248 (write _test-input-stream " var a: t\n")
5249 (write _test-input-stream " var c: (addr int)\n")
5250 (write _test-input-stream " c <- get a, x\n")
5251 (write _test-input-stream "}\n")
5252 (write _test-input-stream "type t {\n")
5253 (write _test-input-stream " x: int\n")
5254 (write _test-input-stream "}\n")
5255
5256 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5257
5258
5259 89/<- %edx 4/r32/esp
5260 (flush _test-output-buffered-file)
5261 (flush _test-error-buffered-file)
5262 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
5268
5269 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type: output should be empty")
5270 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: output 'c' is not in a register" "F - test-get-with-wrong-output-type: error message")
5271
5272 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type: exit status")
5273
5274 81 0/subop/add %esp 8/imm32
5275
5276 5d/pop-to-ebp
5277 c3/return
5278
5279 test-get-with-wrong-output-type-2:
5280
5281 55/push-ebp
5282 89/<- %ebp 4/r32/esp
5283
5284 (clear-stream _test-input-stream)
5285 (clear-stream $_test-input-buffered-file->buffer)
5286 (clear-stream _test-output-stream)
5287 (clear-stream $_test-output-buffered-file->buffer)
5288 (clear-stream _test-error-stream)
5289 (clear-stream $_test-error-buffered-file->buffer)
5290
5291 68/push 0/imm32
5292 68/push 0/imm32
5293 89/<- %edx 4/r32/esp
5294 (tailor-exit-descriptor %edx 0x10)
5295
5296 (write _test-input-stream "fn foo {\n")
5297 (write _test-input-stream " var a: t\n")
5298 (write _test-input-stream " var c/ecx: int <- get a, x\n")
5299 (write _test-input-stream "}\n")
5300 (write _test-input-stream "type t {\n")
5301 (write _test-input-stream " x: int\n")
5302 (write _test-input-stream "}\n")
5303
5304 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5305
5306
5307 89/<- %edx 4/r32/esp
5308 (flush _test-output-buffered-file)
5309 (flush _test-error-buffered-file)
5310 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
5316
5317 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type-2: output should be empty")
5318 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: output must be an address" "F - test-get-with-wrong-output-type-2: error message")
5319
5320 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type-2: exit status")
5321
5322 81 0/subop/add %esp 8/imm32
5323
5324 5d/pop-to-ebp
5325 c3/return
5326
5327 test-get-with-wrong-output-type-3:
5328
5329 55/push-ebp
5330 89/<- %ebp 4/r32/esp
5331
5332 (clear-stream _test-input-stream)
5333 (clear-stream $_test-input-buffered-file->buffer)
5334 (clear-stream _test-output-stream)
5335 (clear-stream $_test-output-buffered-file->buffer)
5336 (clear-stream _test-error-stream)
5337 (clear-stream $_test-error-buffered-file->buffer)
5338
5339 68/push 0/imm32
5340 68/push 0/imm32
5341 89/<- %edx 4/r32/esp
5342 (tailor-exit-descriptor %edx 0x10)
5343
5344 (write _test-input-stream "fn foo {\n")
5345 (write _test-input-stream " var a: t\n")
5346 (write _test-input-stream " var c/ecx: (array int) <- get a, x\n")
5347 (write _test-input-stream "}\n")
5348 (write _test-input-stream "type t {\n")
5349 (write _test-input-stream " x: int\n")
5350 (write _test-input-stream "}\n")
5351
5352 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5353
5354
5355 89/<- %edx 4/r32/esp
5356 (flush _test-output-buffered-file)
5357 (flush _test-error-buffered-file)
5358 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
5364
5365 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type-3: output should be empty")
5366 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: output must be an address" "F - test-get-with-wrong-output-type-3: error message")
5367
5368 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type-3: exit status")
5369
5370 81 0/subop/add %esp 8/imm32
5371
5372 5d/pop-to-ebp
5373 c3/return
5374
5375 test-get-with-wrong-output-type-4:
5376
5377 55/push-ebp
5378 89/<- %ebp 4/r32/esp
5379
5380 (clear-stream _test-input-stream)
5381 (clear-stream $_test-input-buffered-file->buffer)
5382 (clear-stream _test-output-stream)
5383 (clear-stream $_test-output-buffered-file->buffer)
5384 (clear-stream _test-error-stream)
5385 (clear-stream $_test-error-buffered-file->buffer)
5386
5387 68/push 0/imm32
5388 68/push 0/imm32
5389 89/<- %edx 4/r32/esp
5390 (tailor-exit-descriptor %edx 0x10)
5391
5392 (write _test-input-stream "fn foo {\n")
5393 (write _test-input-stream " var a: t\n")
5394 (write _test-input-stream " var c/ecx: (addr boolean) <- get a, x\n")
5395 (write _test-input-stream "}\n")
5396 (write _test-input-stream "type t {\n")
5397 (write _test-input-stream " x: int\n")
5398 (write _test-input-stream "}\n")
5399
5400 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5401
5402
5403 89/<- %edx 4/r32/esp
5404 (flush _test-output-buffered-file)
5405 (flush _test-error-buffered-file)
5406 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
5412
5413 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type-4: output should be empty")
5414 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: wrong output type for member 'x' of type 't'" "F - test-get-with-wrong-output-type-4: error message")
5415
5416 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type-4: exit status")
5417
5418 81 0/subop/add %esp 8/imm32
5419
5420 5d/pop-to-ebp
5421 c3/return
5422
5423 test-get-with-wrong-output-type-5:
5424
5425 55/push-ebp
5426 89/<- %ebp 4/r32/esp
5427
5428 (clear-stream _test-input-stream)
5429 (clear-stream $_test-input-buffered-file->buffer)
5430 (clear-stream _test-output-stream)
5431 (clear-stream $_test-output-buffered-file->buffer)
5432
5433 (write _test-input-stream "fn foo {\n")
5434 (write _test-input-stream " var a: t\n")
5435 (write _test-input-stream " var c/ecx: (addr handle int) <- get a, x\n")
5436 (write _test-input-stream "}\n")
5437 (write _test-input-stream "type t {\n")
5438 (write _test-input-stream " x: (handle int)\n")
5439 (write _test-input-stream "}\n")
5440
5441 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5442 (flush _test-output-buffered-file)
5443
5444
5445 89/<- %esp 5/r32/ebp
5446 5d/pop-to-ebp
5447 c3/return
5448
5449 test-get-with-too-few-inouts:
5450
5451 55/push-ebp
5452 89/<- %ebp 4/r32/esp
5453
5454 (clear-stream _test-input-stream)
5455 (clear-stream $_test-input-buffered-file->buffer)
5456 (clear-stream _test-output-stream)
5457 (clear-stream $_test-output-buffered-file->buffer)
5458 (clear-stream _test-error-stream)
5459 (clear-stream $_test-error-buffered-file->buffer)
5460
5461 68/push 0/imm32
5462 68/push 0/imm32
5463 89/<- %edx 4/r32/esp
5464 (tailor-exit-descriptor %edx 0x10)
5465
5466 (write _test-input-stream "fn foo {\n")
5467 (write _test-input-stream " var a: t\n")
5468 (write _test-input-stream " var c/ecx: (addr int) <- get a\n")
5469 (write _test-input-stream "}\n")
5470 (write _test-input-stream "type t {\n")
5471 (write _test-input-stream " x: int\n")
5472 (write _test-input-stream "}\n")
5473
5474 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5475
5476
5477 89/<- %edx 4/r32/esp
5478 (flush _test-output-buffered-file)
5479 (flush _test-error-buffered-file)
5480 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
5486
5487 (check-stream-equal _test-output-stream "" "F - test-get-with-too-few-inouts: output should be empty")
5488 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: too few inouts (2 required)" "F - test-get-with-too-few-inouts: error message")
5489
5490 (check-ints-equal *(edx+4) 2 "F - test-get-with-too-few-inouts: exit status")
5491
5492 81 0/subop/add %esp 8/imm32
5493
5494 5d/pop-to-ebp
5495 c3/return
5496
5497 test-get-with-too-many-inouts:
5498
5499 55/push-ebp
5500 89/<- %ebp 4/r32/esp
5501
5502 (clear-stream _test-input-stream)
5503 (clear-stream $_test-input-buffered-file->buffer)
5504 (clear-stream _test-output-stream)
5505 (clear-stream $_test-output-buffered-file->buffer)
5506 (clear-stream _test-error-stream)
5507 (clear-stream $_test-error-buffered-file->buffer)
5508
5509 68/push 0/imm32
5510 68/push 0/imm32
5511 89/<- %edx 4/r32/esp
5512 (tailor-exit-descriptor %edx 0x10)
5513
5514 (write _test-input-stream "fn foo {\n")
5515 (write _test-input-stream " var a: t\n")
5516 (write _test-input-stream " var c/ecx: (addr int) <- get a, x, 0\n")
5517 (write _test-input-stream "}\n")
5518 (write _test-input-stream "type t {\n")
5519 (write _test-input-stream " x: int\n")
5520 (write _test-input-stream "}\n")
5521
5522 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5523
5524
5525 89/<- %edx 4/r32/esp
5526 (flush _test-output-buffered-file)
5527 (flush _test-error-buffered-file)
5528 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
5534
5535 (check-stream-equal _test-output-stream "" "F - test-get-with-too-many-inouts: output should be empty")
5536 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: too many inouts (2 required)" "F - test-get-with-too-many-inouts: error message")
5537
5538 (check-ints-equal *(edx+4) 2 "F - test-get-with-too-many-inouts: exit status")
5539
5540 81 0/subop/add %esp 8/imm32
5541
5542 5d/pop-to-ebp
5543 c3/return
5544
5545 test-get-with-no-output:
5546
5547 55/push-ebp
5548 89/<- %ebp 4/r32/esp
5549
5550 (clear-stream _test-input-stream)
5551 (clear-stream $_test-input-buffered-file->buffer)
5552 (clear-stream _test-output-stream)
5553 (clear-stream $_test-output-buffered-file->buffer)
5554 (clear-stream _test-error-stream)
5555 (clear-stream $_test-error-buffered-file->buffer)
5556
5557 68/push 0/imm32
5558 68/push 0/imm32
5559 89/<- %edx 4/r32/esp
5560 (tailor-exit-descriptor %edx 0x10)
5561
5562 (write _test-input-stream "fn foo {\n")
5563 (write _test-input-stream " var a: t\n")
5564 (write _test-input-stream " get a, x\n")
5565 (write _test-input-stream "}\n")
5566 (write _test-input-stream "type t {\n")
5567 (write _test-input-stream " x: int\n")
5568 (write _test-input-stream "}\n")
5569
5570 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5571
5572
5573 89/<- %edx 4/r32/esp
5574 (flush _test-output-buffered-file)
5575 (flush _test-error-buffered-file)
5576 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
5582
5583 (check-stream-equal _test-output-stream "" "F - test-get-with-no-output: output should be empty")
5584 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: must have an output" "F - test-get-with-no-output: error message")
5585
5586 (check-ints-equal *(edx+4) 2 "F - test-get-with-no-output: exit status")
5587
5588 81 0/subop/add %esp 8/imm32
5589
5590 5d/pop-to-ebp
5591 c3/return
5592
5593 test-get-with-too-many-outputs:
5594
5595 55/push-ebp
5596 89/<- %ebp 4/r32/esp
5597
5598 (clear-stream _test-input-stream)
5599 (clear-stream $_test-input-buffered-file->buffer)
5600 (clear-stream _test-output-stream)
5601 (clear-stream $_test-output-buffered-file->buffer)
5602 (clear-stream _test-error-stream)
5603 (clear-stream $_test-error-buffered-file->buffer)
5604
5605 68/push 0/imm32
5606 68/push 0/imm32
5607 89/<- %edx 4/r32/esp
5608 (tailor-exit-descriptor %edx 0x10)
5609
5610 (write _test-input-stream "fn foo {\n")
5611 (write _test-input-stream " var a: t\n")
5612 (write _test-input-stream " var b: int\n")
5613 (write _test-input-stream " var c/eax: (addr int) <- copy 0\n")
5614 (write _test-input-stream " c, b <- get a, x\n")
5615 (write _test-input-stream "}\n")
5616 (write _test-input-stream "type t {\n")
5617 (write _test-input-stream " x: int\n")
5618 (write _test-input-stream "}\n")
5619
5620 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5621
5622
5623 89/<- %edx 4/r32/esp
5624 (flush _test-output-buffered-file)
5625 (flush _test-error-buffered-file)
5626 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
5632
5633 (check-stream-equal _test-output-stream "" "F - test-get-with-too-many-outputs: output should be empty")
5634 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: too many outputs (1 required)" "F - test-get-with-too-many-outputs: error message")
5635
5636 (check-ints-equal *(edx+4) 2 "F - test-get-with-too-many-outputs: exit status")
5637
5638 81 0/subop/add %esp 8/imm32
5639
5640 5d/pop-to-ebp
5641 c3/return
5642
5643 test-convert-array-of-user-defined-types:
5644
5645 55/push-ebp
5646 89/<- %ebp 4/r32/esp
5647
5648 (clear-stream _test-input-stream)
5649 (clear-stream $_test-input-buffered-file->buffer)
5650 (clear-stream _test-output-stream)
5651 (clear-stream $_test-output-buffered-file->buffer)
5652
5653 (write _test-input-stream "type t {\n")
5654 (write _test-input-stream " x: int\n")
5655 (write _test-input-stream " y: int\n")
5656 (write _test-input-stream "}\n")
5657 (write _test-input-stream "fn foo {\n")
5658 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
5659 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
5660 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
5661 (write _test-input-stream "}\n")
5662
5663 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5664 (flush _test-output-buffered-file)
5665 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5671
5672 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-array-of-user-defined-types/0")
5673 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-array-of-user-defined-types/1")
5674 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-array-of-user-defined-types/2")
5675 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-array-of-user-defined-types/3")
5676 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-array-of-user-defined-types/4")
5677 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-array-of-user-defined-types/5")
5678 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-array-of-user-defined-types/6")
5679 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-array-of-user-defined-types/7")
5680 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-array-of-user-defined-types/8")
5681 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-array-of-user-defined-types/9")
5682 (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")
5683 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-array-of-user-defined-types/13")
5684 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-array-of-user-defined-types/14")
5685 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-array-of-user-defined-types/15")
5686 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-array-of-user-defined-types/16")
5687 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-array-of-user-defined-types/17")
5688 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-array-of-user-defined-types/18")
5689 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-array-of-user-defined-types/19")
5690 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-array-of-user-defined-types/20")
5691
5692 89/<- %esp 5/r32/ebp
5693 5d/pop-to-ebp
5694 c3/return
5695
5696 test-convert-length-of-array-of-user-defined-types-to-eax:
5697
5698 55/push-ebp
5699 89/<- %ebp 4/r32/esp
5700
5701 (clear-stream _test-input-stream)
5702 (clear-stream $_test-input-buffered-file->buffer)
5703 (clear-stream _test-output-stream)
5704 (clear-stream $_test-output-buffered-file->buffer)
5705
5706 (write _test-input-stream "type t {\n")
5707 (write _test-input-stream " x: int\n")
5708 (write _test-input-stream " y: int\n")
5709 (write _test-input-stream " z: int\n")
5710 (write _test-input-stream "}\n")
5711 (write _test-input-stream "fn foo {\n")
5712 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
5713 (write _test-input-stream " var x/eax: (addr t) <- length arr\n")
5714 (write _test-input-stream "}\n")
5715
5716 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5717 (flush _test-output-buffered-file)
5718 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5724
5725 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/0")
5726 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-eax/1")
5727 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-eax/2")
5728 (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")
5729 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-eax/4")
5730 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/5")
5731
5732 (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")
5733 (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")
5734
5735 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/8")
5736 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/9")
5737 (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")
5738 (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")
5739 (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")
5740 (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")
5741 (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")
5742 (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")
5743
5744 (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")
5745
5746 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-eax/17")
5747 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/18")
5748 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-eax/19")
5749 (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")
5750 (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")
5751 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-eax/22")
5752
5753 89/<- %esp 5/r32/ebp
5754 5d/pop-to-ebp
5755 c3/return
5756
5757 test-convert-length-of-array-of-user-defined-types-to-ecx:
5758
5759 55/push-ebp
5760 89/<- %ebp 4/r32/esp
5761
5762 (clear-stream _test-input-stream)
5763 (clear-stream $_test-input-buffered-file->buffer)
5764 (clear-stream _test-output-stream)
5765 (clear-stream $_test-output-buffered-file->buffer)
5766
5767 (write _test-input-stream "type t {\n")
5768 (write _test-input-stream " x: int\n")
5769 (write _test-input-stream " y: int\n")
5770 (write _test-input-stream " z: int\n")
5771 (write _test-input-stream "}\n")
5772 (write _test-input-stream "fn foo {\n")
5773 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
5774 (write _test-input-stream " var x/ecx: (addr t) <- length arr\n")
5775 (write _test-input-stream "}\n")
5776
5777 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5778 (flush _test-output-buffered-file)
5779 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5785
5786 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/0")
5787 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/1")
5788 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/2")
5789 (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")
5790 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/4")
5791 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/5")
5792
5793 (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")
5794 (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")
5795
5796 (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")
5797
5798 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/9")
5799 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/10")
5800 (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")
5801 (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")
5802 (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")
5803 (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")
5804 (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")
5805 (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")
5806 (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")
5807
5808 (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")
5809
5810 (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")
5811
5812 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/20")
5813 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/21")
5814 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/22")
5815 (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")
5816 (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")
5817 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/25")
5818
5819 89/<- %esp 5/r32/ebp
5820 5d/pop-to-ebp
5821 c3/return
5822
5823 test-convert-length-of-array-of-user-defined-types-to-edx:
5824
5825 55/push-ebp
5826 89/<- %ebp 4/r32/esp
5827
5828 (clear-stream _test-input-stream)
5829 (clear-stream $_test-input-buffered-file->buffer)
5830 (clear-stream _test-output-stream)
5831 (clear-stream $_test-output-buffered-file->buffer)
5832
5833 (write _test-input-stream "type t {\n")
5834 (write _test-input-stream " x: int\n")
5835 (write _test-input-stream " y: int\n")
5836 (write _test-input-stream " z: int\n")
5837 (write _test-input-stream "}\n")
5838 (write _test-input-stream "fn foo {\n")
5839 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
5840 (write _test-input-stream " var x/edx: (addr t) <- length arr\n")
5841 (write _test-input-stream "}\n")
5842
5843 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5844 (flush _test-output-buffered-file)
5845 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5851
5852 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/0")
5853 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-edx/1")
5854 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-edx/2")
5855 (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")
5856 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-edx/4")
5857 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/5")
5858
5859 (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")
5860 (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")
5861
5862 (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")
5863
5864 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types-to-edx/9")
5865 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types-to-edx/10")
5866 (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")
5867 (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")
5868 (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")
5869 (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")
5870 (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")
5871 (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")
5872 (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")
5873
5874 (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")
5875
5876 (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")
5877
5878 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-edx/20")
5879 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/21")
5880 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-edx/22")
5881 (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")
5882 (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")
5883 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-edx/25")
5884
5885 89/<- %esp 5/r32/ebp
5886 5d/pop-to-ebp
5887 c3/return
5888
5889 test-convert-length-of-array-of-user-defined-types:
5890
5891 55/push-ebp
5892 89/<- %ebp 4/r32/esp
5893
5894 (clear-stream _test-input-stream)
5895 (clear-stream $_test-input-buffered-file->buffer)
5896 (clear-stream _test-output-stream)
5897 (clear-stream $_test-output-buffered-file->buffer)
5898
5899 (write _test-input-stream "type t {\n")
5900 (write _test-input-stream " x: int\n")
5901 (write _test-input-stream " y: int\n")
5902 (write _test-input-stream " z: int\n")
5903 (write _test-input-stream "}\n")
5904 (write _test-input-stream "fn foo {\n")
5905 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
5906 (write _test-input-stream " var x/ebx: (addr t) <- length arr\n")
5907 (write _test-input-stream "}\n")
5908
5909 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5910 (flush _test-output-buffered-file)
5911 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5917
5918 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types/0")
5919 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types/1")
5920 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types/2")
5921 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-of-user-defined-types/3")
5922 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types/4")
5923 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types/5")
5924 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-of-user-defined-types/6")
5925 (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")
5926 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-length-of-array-of-user-defined-types/8")
5927 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types/9")
5928 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types/10")
5929 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types/11")
5930 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array-of-user-defined-types/12")
5931 (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")
5932 (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")
5933 (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")
5934 (check-next-stream-line-equal _test-output-stream " 89/<- %ebx 0/r32/eax" "F - test-convert-length-of-array-of-user-defined-types/16")
5935 (check-next-stream-line-equal _test-output-stream " 5a/pop-to-edx" "F - test-convert-length-of-array-of-user-defined-types/17")
5936 (check-next-stream-line-equal _test-output-stream " 59/pop-to-ecx" "F - test-convert-length-of-array-of-user-defined-types/18")
5937 (check-next-stream-line-equal _test-output-stream " 58/pop-to-eax" "F - test-convert-length-of-array-of-user-defined-types/19")
5938 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ebx" "F - test-convert-length-of-array-of-user-defined-types/20")
5939 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-of-user-defined-types/21")
5940 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types/22")
5941 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types/23")
5942 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types/24")
5943 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-of-user-defined-types/25")
5944 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-of-user-defined-types/26")
5945 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types/27")
5946
5947 89/<- %esp 5/r32/ebp
5948 5d/pop-to-ebp
5949 c3/return
5950
5951
5952
5953
5954
5955 == data
5956
5957
5958 Next-block-index:
5959 1/imm32
5960
5961 Curr-block-depth:
5962 1/imm32
5963
5964 == code
5965
5966 parse-mu:
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005 55/push-ebp
6006 89/<- %ebp 4/r32/esp
6007
6008 68/push _Program-signatures/imm32
6009
6010 50/push-eax
6011 51/push-ecx
6012 52/push-edx
6013 53/push-ebx
6014 56/push-esi
6015 57/push-edi
6016
6017 81 5/subop/subtract %esp 0x200/imm32
6018 68/push 0x200/imm32/size
6019 68/push 0/imm32/read
6020 68/push 0/imm32/write
6021 89/<- %ecx 4/r32/esp
6022
6023 68/push 0/imm32/end
6024 68/push 0/imm32/start
6025 89/<- %edx 4/r32/esp
6026
6027 bf/copy-to-edi _Program-functions/imm32
6028
6029 81 5/subop/subtract %esp 0xc00/imm32
6030 68/push 0xc00/imm32/size
6031 68/push 0/imm32/top
6032 89/<- %ebx 4/r32/esp
6033 {
6034 $parse-mu:line-loop:
6035 (clear-stream %ecx)
6036 (read-line-buffered *(ebp+8) %ecx)
6037
6038 81 7/subop/compare *ecx 0/imm32
6039 0f 84/jump-if-= break/disp32
6040 +-- 6 lines: #? # dump line ------------------------------------------------------------------------------------------------------------------------------------------------------
6046 (next-mu-token %ecx %edx)
6047
6048 (slice-empty? %edx)
6049 3d/compare-eax-and 0/imm32/false
6050 0f 85/jump-if-!= loop/disp32
6051
6052
6053 8b/-> *edx 0/r32/eax
6054 8a/copy-byte *eax 0/r32/AL
6055 81 4/subop/and %eax 0xff/imm32
6056
6057 3d/compare-eax-and 0x23/imm32/hash
6058 0f 84/jump-if-= loop/disp32
6059
6060 {
6061 $parse-mu:fn:
6062 (slice-equal? %edx "fn")
6063 3d/compare-eax-and 0/imm32/false
6064 0f 84/jump-if-= break/disp32
6065
6066 68/push 0/imm32
6067 68/push 0/imm32
6068 89/<- %esi 4/r32/esp
6069
6070 (allocate Heap *Function-size %esi)
6071
6072 (lookup *esi *(esi+4))
6073
6074 (clear-stack %ebx)
6075
6076 (populate-mu-function-header %ecx %eax %ebx *(ebp+0xc) *(ebp+0x10))
6077 (populate-mu-function-body *(ebp+8) %eax %ebx *(ebp+0xc) *(ebp+0x10))
6078
6079 8b/-> *esi 0/r32/eax
6080 89/<- *edi 0/r32/eax
6081 8b/-> *(esi+4) 0/r32/eax
6082 89/<- *(edi+4) 0/r32/eax
6083
6084
6085 (lookup *esi *(esi+4))
6086
6087 8d/copy-address *(eax+0x20) 7/r32/edi
6088
6089 81 0/subop/add %esp 8/imm32
6090
6091 e9/jump $parse-mu:line-loop/disp32
6092 }
6093
6094
6095 {
6096 $parse-mu:sig:
6097 (slice-equal? %edx "sig")
6098 3d/compare-eax-and 0/imm32/false
6099 0f 84/jump-if-= break/disp32
6100
6101 57/push-edi
6102 $bb:
6103 8b/-> *(ebp-4) 7/r32/edi
6104
6105 68/push 0/imm32
6106 68/push 0/imm32
6107 89/<- %esi 4/r32/esp
6108
6109 (allocate Heap *Function-size %esi)
6110
6111 (lookup *esi *(esi+4))
6112
6113 (populate-mu-function-signature %ecx %eax *(ebp+0xc) *(ebp+0x10))
6114
6115 8b/-> *esi 0/r32/eax
6116 89/<- *edi 0/r32/eax
6117 8b/-> *(esi+4) 0/r32/eax
6118 89/<- *(edi+4) 0/r32/eax
6119
6120
6121 (lookup *esi *(esi+4))
6122
6123 8d/copy-address *(eax+0x20) 7/r32/edi
6124
6125 81 0/subop/add %esp 8/imm32
6126
6127 89/<- *(ebp-4) 7/r32/edi
6128
6129 5f/pop-to-edi
6130
6131 e9/jump $parse-mu:line-loop/disp32
6132 }
6133
6134 {
6135 $parse-mu:type:
6136 (slice-equal? %edx "type")
6137 3d/compare-eax-and 0/imm32
6138 0f 84/jump-if-= break/disp32
6139 (next-mu-token %ecx %edx)
6140
6141 (pos-or-insert-slice Type-id %edx)
6142
6143 51/push-ecx
6144
6145 68/push 0/imm32
6146 68/push 0/imm32
6147 89/<- %ecx 4/r32/esp
6148 (find-or-create-typeinfo %eax %ecx)
6149
6150 (lookup *ecx *(ecx+4))
6151
6152
6153 (populate-mu-type *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10))
6154
6155
6156 81 0/subop/add %esp 8/imm32
6157
6158 59/pop-to-ecx
6159 e9/jump $parse-mu:line-loop/disp32
6160 }
6161
6162 e9/jump $parse-mu:error1/disp32
6163 }
6164 $parse-mu:end:
6165
6166 81 0/subop/add %esp 0x20c/imm32
6167 81 0/subop/add %esp 0xc08/imm32
6168 81 0/subop/add %esp 8/imm32
6169
6170 5f/pop-to-edi
6171 5e/pop-to-esi
6172 5b/pop-to-ebx
6173 5a/pop-to-edx
6174 59/pop-to-ecx
6175 58/pop-to-eax
6176
6177 81 0/subop/add %esp 4/imm32
6178
6179 89/<- %esp 5/r32/ebp
6180 5d/pop-to-ebp
6181 c3/return
6182
6183 $parse-mu:error1:
6184
6185 (write-buffered *(ebp+0xc) "unexpected top-level command: ")
6186 (write-slice-buffered *(ebp+0xc) %edx)
6187 (write-buffered *(ebp+0xc) "\n")
6188 (flush *(ebp+0xc))
6189 (stop *(ebp+0x10) 1)
6190
6191
6192 $parse-mu:error2:
6193
6194 (write-int32-hex-buffered *(ebp+0xc) *ebx)
6195 (write-buffered *(ebp+0xc) " vars not reclaimed after fn '")
6196 (write-slice-buffered *(ebp+0xc) *eax)
6197 (write-buffered *(ebp+0xc) "'\n")
6198 (flush *(ebp+0xc))
6199 (stop *(ebp+0x10) 1)
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216 populate-mu-function-header:
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244 55/push-ebp
6245 89/<- %ebp 4/r32/esp
6246
6247 50/push-eax
6248 51/push-ecx
6249 52/push-edx
6250 53/push-ebx
6251 57/push-edi
6252
6253 8b/-> *(ebp+0xc) 7/r32/edi
6254
6255 68/push 0/imm32/end
6256 68/push 0/imm32/start
6257 89/<- %ecx 4/r32/esp
6258
6259 68/push 0/imm32
6260 68/push 0/imm32
6261 89/<- %ebx 4/r32/esp
6262
6263 (next-mu-token *(ebp+8) %ecx)
6264
6265
6266 (slice-equal? %ecx "{")
6267 3d/compare-eax-and 0/imm32/false
6268 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
6269
6270 (slice-equal? %ecx "->")
6271 3d/compare-eax-and 0/imm32/false
6272 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
6273
6274 (slice-equal? %ecx "}")
6275 3d/compare-eax-and 0/imm32/false
6276 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
6277
6278 (slice-to-string Heap %ecx %edi)
6279
6280 {
6281 $populate-mu-function-header:check-for-inout:
6282 (next-mu-token *(ebp+8) %ecx)
6283
6284 (slice-equal? %ecx "{")
6285 3d/compare-eax-and 0/imm32/false
6286 0f 85/jump-if-!= $populate-mu-function-header:done/disp32
6287
6288 (slice-equal? %ecx "->")
6289 3d/compare-eax-and 0/imm32/false
6290 0f 85/jump-if-!= break/disp32
6291
6292 (slice-equal? %ecx "}")
6293 3d/compare-eax-and 0/imm32/false
6294 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
6295
6296 (parse-var-with-type %ecx *(ebp+8) %ebx *(ebp+0x14) *(ebp+0x18))
6297
6298
6299 (lookup *ebx *(ebx+4))
6300 81 7/subop/compare *(eax+0x18) 0/imm32
6301 0f 85/jump-if-!= $populate-mu-function-header:error2/disp32
6302
6303
6304
6305 8d/copy-address *(edi+8) 0/r32/eax
6306 (append-list Heap *ebx *(ebx+4) *(edi+8) *(edi+0xc) %eax)
6307
6308 (push *(ebp+0x10) *ebx)
6309 (push *(ebp+0x10) *(ebx+4))
6310 (push *(ebp+0x10) 0)
6311
6312 e9/jump loop/disp32
6313 }
6314
6315 {
6316 $populate-mu-function-header:check-for-out:
6317 (next-mu-token *(ebp+8) %ecx)
6318
6319 (slice-equal? %ecx "{")
6320 3d/compare-eax-and 0/imm32/false
6321 0f 85/jump-if-!= break/disp32
6322
6323 (slice-equal? %ecx "->")
6324 3d/compare-eax-and 0/imm32/false
6325 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
6326
6327 (slice-equal? %ecx "}")
6328 3d/compare-eax-and 0/imm32/false
6329 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
6330
6331 (parse-var-with-type %ecx *(ebp+8) %ebx *(ebp+0x14) *(ebp+0x18))
6332
6333
6334 (lookup *ebx *(ebx+4))
6335 81 7/subop/compare *(eax+0x18) 0/imm32
6336 0f 84/jump-if-= $populate-mu-function-header:error3/disp32
6337
6338 8d/copy-address *(edi+0x10) 0/r32/eax
6339 (append-list Heap *ebx *(ebx+4) *(edi+0x10) *(edi+0x14) %eax)
6340
6341 e9/jump loop/disp32
6342 }
6343 $populate-mu-function-header:done:
6344 (check-no-tokens-left *(ebp+8))
6345 $populate-mu-function-header:end:
6346
6347 81 0/subop/add %esp 0x10/imm32
6348
6349 5f/pop-to-edi
6350 5b/pop-to-ebx
6351 5a/pop-to-edx
6352 59/pop-to-ecx
6353 58/pop-to-eax
6354
6355 89/<- %esp 5/r32/ebp
6356 5d/pop-to-ebp
6357 c3/return
6358
6359 $populate-mu-function-header:error1:
6360
6361 (write-buffered *(ebp+0x14) "function header not in form 'fn <name> [inouts] [-> outputs] {' -- '")
6362 (flush *(ebp+0x14))
6363 (rewind-stream *(ebp+8))
6364 (write-stream-data *(ebp+0x14) *(ebp+8))
6365 (write-buffered *(ebp+0x14) "'\n")
6366 (flush *(ebp+0x14))
6367 (stop *(ebp+0x18) 1)
6368
6369
6370 $populate-mu-function-header:error2:
6371
6372 (write-buffered *(ebp+0x14) "fn ")
6373 50/push-eax
6374 (lookup *edi *(edi+4))
6375 (write-buffered *(ebp+0x14) %eax)
6376 58/pop-to-eax
6377 (write-buffered *(ebp+0x14) ": function inout '")
6378 (lookup *eax *(eax+4))
6379 (write-buffered *(ebp+0x10) %eax)
6380 (write-buffered *(ebp+0x14) "' cannot be in a register")
6381 (flush *(ebp+0x14))
6382 (stop *(ebp+0x18) 1)
6383
6384
6385 $populate-mu-function-header:error3:
6386
6387 (write-buffered *(ebp+0x14) "fn ")
6388 50/push-eax
6389 (lookup *edi *(edi+4))
6390 (write-buffered *(ebp+0x14) %eax)
6391 58/pop-to-eax
6392 (write-buffered *(ebp+0x14) ": function output '")
6393 (lookup *ebx *(ebx+4))
6394 (lookup *eax *(eax+4))
6395 (write-buffered *(ebp+0x14) %eax)
6396 (write-buffered *(ebp+0x14) "' must be in a register, in instruction '")
6397 (rewind-stream *(ebp+8))
6398 (write-stream-data *(ebp+0x14) *(ebp+8))
6399 (write-buffered *(ebp+0x14) "'\n")
6400 (flush *(ebp+0x14))
6401 (stop *(ebp+0x18) 1)
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413 populate-mu-function-signature:
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439 55/push-ebp
6440 89/<- %ebp 4/r32/esp
6441
6442 50/push-eax
6443 51/push-ecx
6444 52/push-edx
6445 53/push-ebx
6446 57/push-edi
6447
6448 8b/-> *(ebp+0xc) 7/r32/edi
6449
6450 68/push 0/imm32/end
6451 68/push 0/imm32/start
6452 89/<- %ecx 4/r32/esp
6453
6454 68/push 0/imm32
6455 68/push 0/imm32
6456 89/<- %ebx 4/r32/esp
6457
6458 (next-mu-token *(ebp+8) %ecx)
6459
6460
6461 (slice-equal? %ecx "{")
6462 3d/compare-eax-and 0/imm32/false
6463 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
6464
6465 (slice-equal? %ecx "->")
6466 3d/compare-eax-and 0/imm32/false
6467 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
6468
6469 (slice-equal? %ecx "}")
6470 3d/compare-eax-and 0/imm32/false
6471 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
6472
6473 (slice-to-string Heap %ecx %edi)
6474
6475 {
6476 $populate-mu-function-signature:check-for-inout:
6477 (next-mu-token *(ebp+8) %ecx)
6478 (slice-empty? %ecx)
6479 3d/compare-eax-and 0/imm32/false
6480 0f 85/jump-if-!= break/disp32
6481
6482 (slice-equal? %ecx "->")
6483 3d/compare-eax-and 0/imm32/false
6484 0f 85/jump-if-!= break/disp32
6485
6486 (slice-equal? %ecx "{")
6487 3d/compare-eax-and 0/imm32/false
6488 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
6489
6490 (slice-equal? %ecx "}")
6491 3d/compare-eax-and 0/imm32/false
6492 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
6493
6494 (parse-var-with-type %ecx *(ebp+8) %ebx *(ebp+0x10) *(ebp+0x14))
6495
6496
6497 (lookup *ebx *(ebx+4))
6498 81 7/subop/compare *(eax+0x18) 0/imm32
6499 0f 85/jump-if-!= $populate-mu-function-signature:error2/disp32
6500
6501
6502
6503 8d/copy-address *(edi+8) 0/r32/eax
6504 (append-list Heap *ebx *(ebx+4) *(edi+8) *(edi+0xc) %eax)
6505
6506 e9/jump loop/disp32
6507 }
6508
6509 {
6510 $populate-mu-function-signature:check-for-out:
6511 (next-mu-token *(ebp+8) %ecx)
6512 (slice-empty? %ecx)
6513 3d/compare-eax-and 0/imm32/false
6514 0f 85/jump-if-!= break/disp32
6515
6516 (slice-equal? %ecx "{")
6517 3d/compare-eax-and 0/imm32/false
6518 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
6519
6520 (slice-equal? %ecx "->")
6521 3d/compare-eax-and 0/imm32/false
6522 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
6523
6524 (slice-equal? %ecx "}")
6525 3d/compare-eax-and 0/imm32/false
6526 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
6527
6528 (parse-var-with-type %ecx *(ebp+8) %ebx *(ebp+0x10) *(ebp+0x14))
6529
6530
6531 (lookup *ebx *(ebx+4))
6532 81 7/subop/compare *(eax+0x18) 0/imm32
6533 0f 84/jump-if-= $populate-mu-function-signature:error3/disp32
6534
6535 8d/copy-address *(edi+0x10) 0/r32/eax
6536 (append-list Heap *ebx *(ebx+4) *(edi+0x10) *(edi+0x14) %eax)
6537
6538 e9/jump loop/disp32
6539 }
6540 $populate-mu-function-signature:done:
6541 (check-no-tokens-left *(ebp+8))
6542 $populate-mu-function-signature:end:
6543
6544 81 0/subop/add %esp 0x10/imm32
6545
6546 5f/pop-to-edi
6547 5b/pop-to-ebx
6548 5a/pop-to-edx
6549 59/pop-to-ecx
6550 58/pop-to-eax
6551
6552 89/<- %esp 5/r32/ebp
6553 5d/pop-to-ebp
6554 c3/return
6555
6556 $populate-mu-function-signature:error1:
6557
6558 (write-buffered *(ebp+0x10) "function signature not in form 'fn <name> [inouts] [-> outputs] {' -- '")
6559 (flush *(ebp+0x10))
6560 (rewind-stream *(ebp+8))
6561 (write-stream-data *(ebp+0x10) *(ebp+8))
6562 (write-buffered *(ebp+0x10) "'\n")
6563 (flush *(ebp+0x10))
6564 (stop *(ebp+0x14) 1)
6565
6566
6567 $populate-mu-function-signature:error2:
6568
6569 (write-buffered *(ebp+0x10) "fn ")
6570 50/push-eax
6571 (lookup *edi *(edi+4))
6572 (write-buffered *(ebp+0x10) %eax)
6573 58/pop-to-eax
6574 (write-buffered *(ebp+0x10) ": function inout '")
6575 (lookup *eax *(eax+4))
6576 (write-buffered *(ebp+0x10) %eax)
6577 (write-buffered *(ebp+0x10) "' cannot be in a register")
6578 (flush *(ebp+0x10))
6579 (stop *(ebp+0x14) 1)
6580
6581
6582 $populate-mu-function-signature:error3:
6583
6584 (write-buffered *(ebp+0x10) "fn ")
6585 50/push-eax
6586 (lookup *edi *(edi+4))
6587 (write-buffered *(ebp+0x10) %eax)
6588 58/pop-to-eax
6589 (write-buffered *(ebp+0x10) ": function output '")
6590 (lookup *ebx *(ebx+4))
6591 (lookup *eax *(eax+4))
6592 (write-buffered *(ebp+0x10) %eax)
6593 (write-buffered *(ebp+0x10) "' must be in a register, in instruction '")
6594 (rewind-stream *(ebp+8))
6595 (write-stream-data *(ebp+0x10) *(ebp+8))
6596 (write-buffered *(ebp+0x10) "'\n")
6597 (flush *(ebp+0x10))
6598 (stop *(ebp+0x14) 1)
6599
6600
6601 test-function-header-with-arg:
6602
6603 55/push-ebp
6604 89/<- %ebp 4/r32/esp
6605
6606 (clear-stream _test-input-stream)
6607 (write _test-input-stream "foo n: int {\n")
6608
6609 2b/subtract *Function-size 4/r32/esp
6610 89/<- %ecx 4/r32/esp
6611 (zero-out %ecx *Function-size)
6612
6613 81 5/subop/subtract %esp 0xc0/imm32
6614 68/push 0xc0/imm32/size
6615 68/push 0/imm32/top
6616 89/<- %ebx 4/r32/esp
6617
6618 (populate-mu-function-header _test-input-stream %ecx %ebx Stderr 0)
6619
6620 (lookup *ecx *(ecx+4))
6621 (check-strings-equal %eax "foo" "F - test-function-header-with-arg/name")
6622
6623 (lookup *(ecx+8) *(ecx+0xc))
6624 (lookup *eax *(eax+4))
6625 89/<- %edx 0/r32/eax
6626
6627 (lookup *edx *(edx+4))
6628 (check-strings-equal %eax "n" "F - test-function-header-with-arg/inout:0")
6629
6630 (lookup *(edx+8) *(edx+0xc))
6631 (check-ints-equal *eax 1 "F - test-function-header-with-arg/inout:0/type:0")
6632 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-arg/inout:0/type:1")
6633 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-arg/inout:0/type:2")
6634
6635 89/<- %esp 5/r32/ebp
6636 5d/pop-to-ebp
6637 c3/return
6638
6639 test-function-header-with-multiple-args:
6640
6641 55/push-ebp
6642 89/<- %ebp 4/r32/esp
6643
6644 (clear-stream _test-input-stream)
6645 (write _test-input-stream "foo a: int, b: int c: int {\n")
6646
6647 2b/subtract *Function-size 4/r32/esp
6648 89/<- %ecx 4/r32/esp
6649 (zero-out %ecx *Function-size)
6650
6651 81 5/subop/subtract %esp 0xc0/imm32
6652 68/push 0xc0/imm32/size
6653 68/push 0/imm32/top
6654 89/<- %ebx 4/r32/esp
6655
6656 (populate-mu-function-header _test-input-stream %ecx %ebx Stderr 0)
6657
6658 (lookup *ecx *(ecx+4))
6659 (check-strings-equal %eax "foo" "F - test-function-header-with-multiple-args/name")
6660
6661 (lookup *(ecx+8) *(ecx+0xc))
6662 89/<- %edx 0/r32/eax
6663 $test-function-header-with-multiple-args:inout0:
6664
6665 (lookup *edx *(edx+4))
6666 89/<- %ebx 0/r32/eax
6667
6668 (lookup *ebx *(ebx+4))
6669 (check-strings-equal %eax "a" "F - test-function-header-with-multiple-args/inout:0")
6670
6671 (lookup *(ebx+8) *(ebx+0xc))
6672 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:0/type:0")
6673 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:0/type:1")
6674 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:0/type:2")
6675 $test-function-header-with-multiple-args:inout1:
6676
6677 (lookup *(edx+8) *(edx+0xc))
6678 89/<- %edx 0/r32/eax
6679
6680 (lookup *edx *(edx+4))
6681 89/<- %ebx 0/r32/eax
6682
6683 (lookup *ebx *(ebx+4))
6684 (check-strings-equal %eax "b" "F - test-function-header-with-multiple-args/inout:1")
6685
6686 (lookup *(ebx+8) *(ebx+0xc))
6687 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:1/type:0")
6688 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:1/type:1")
6689 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:1/type:2")
6690 $test-function-header-with-multiple-args:inout2:
6691
6692 (lookup *(edx+8) *(edx+0xc))
6693 89/<- %edx 0/r32/eax
6694
6695 (lookup *edx *(edx+4))
6696 89/<- %ebx 0/r32/eax
6697
6698 (lookup *ebx *(ebx+4))
6699 (check-strings-equal %eax "c" "F - test-function-header-with-multiple-args/inout:2")
6700
6701 (lookup *(ebx+8) *(ebx+0xc))
6702 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:2/type:0")
6703 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:2/type:1")
6704 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:2/type:2")
6705
6706 89/<- %esp 5/r32/ebp
6707 5d/pop-to-ebp
6708 c3/return
6709
6710 test-function-header-with-multiple-args-and-outputs:
6711
6712 55/push-ebp
6713 89/<- %ebp 4/r32/esp
6714
6715 (clear-stream _test-input-stream)
6716 (write _test-input-stream "foo a: int, b: int, c: int -> x/ecx: int y/edx: int {\n")
6717
6718 2b/subtract *Function-size 4/r32/esp
6719 89/<- %ecx 4/r32/esp
6720 (zero-out %ecx *Function-size)
6721
6722 81 5/subop/subtract %esp 0xc0/imm32
6723 68/push 0xc0/imm32/size
6724 68/push 0/imm32/top
6725 89/<- %ebx 4/r32/esp
6726
6727 (populate-mu-function-header _test-input-stream %ecx %ebx Stderr 0)
6728
6729 (lookup *ecx *(ecx+4))
6730 (check-strings-equal %eax "foo" "F - test-function-header-with-multiple-args-and-outputs/name")
6731
6732 (lookup *(ecx+8) *(ecx+0xc))
6733 89/<- %edx 0/r32/eax
6734 $test-function-header-with-multiple-args-and-outputs:inout0:
6735
6736 (lookup *edx *(edx+4))
6737 89/<- %ebx 0/r32/eax
6738
6739 (lookup *ebx *(ebx+4))
6740 (check-strings-equal %eax "a" "F - test-function-header-with-multiple-args-and-outputs/inout:0")
6741
6742 (lookup *(ebx+8) *(ebx+0xc))
6743 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:0")
6744 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:1")
6745 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:2")
6746 $test-function-header-with-multiple-args-and-outputs:inout1:
6747
6748 (lookup *(edx+8) *(edx+0xc))
6749 89/<- %edx 0/r32/eax
6750
6751 (lookup *edx *(edx+4))
6752 89/<- %ebx 0/r32/eax
6753
6754 (lookup *ebx *(ebx+4))
6755 (check-strings-equal %eax "b" "F - test-function-header-with-multiple-args-and-outputs/inout:1")
6756
6757 (lookup *(ebx+8) *(ebx+0xc))
6758 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:0")
6759 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:1")
6760 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:2")
6761 $test-function-header-with-multiple-args-and-outputs:inout2:
6762
6763 (lookup *(edx+8) *(edx+0xc))
6764 89/<- %edx 0/r32/eax
6765
6766 (lookup *edx *(edx+4))
6767 89/<- %ebx 0/r32/eax
6768
6769 (lookup *ebx *(ebx+4))
6770 (check-strings-equal %eax "c" "F - test-function-header-with-multiple-args-and-outputs/inout:2")
6771
6772 (lookup *(ebx+8) *(ebx+0xc))
6773 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:0")
6774 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:1")
6775 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:2")
6776 $test-function-header-with-multiple-args-and-outputs:out0:
6777
6778 (lookup *(ecx+0x10) *(ecx+0x14))
6779 89/<- %edx 0/r32/eax
6780
6781 (lookup *edx *(edx+4))
6782 89/<- %ebx 0/r32/eax
6783
6784 (lookup *ebx *(ebx+4))
6785 (check-strings-equal %eax "x" "F - test-function-header-with-multiple-args-and-outputs/output:0")
6786
6787 (lookup *(ebx+0x18) *(ebx+0x1c))
6788 (check-strings-equal %eax "ecx" "F - test-function-header-with-multiple-args-and-outputs/output:0/register")
6789
6790 (lookup *(ebx+8) *(ebx+0xc))
6791 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:0")
6792 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:1")
6793 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:2")
6794 $test-function-header-with-multiple-args-and-outputs:out1:
6795
6796 (lookup *(edx+8) *(edx+0xc))
6797 89/<- %edx 0/r32/eax
6798
6799 (lookup *edx *(edx+4))
6800 89/<- %ebx 0/r32/eax
6801
6802 (lookup *ebx *(ebx+4))
6803 (check-strings-equal %eax "y" "F - test-function-header-with-multiple-args-and-outputs/output:1")
6804
6805 (lookup *(ebx+0x18) *(ebx+0x1c))
6806 (check-strings-equal %eax "edx" "F - test-function-header-with-multiple-args-and-outputs/output:1/register")
6807
6808 (lookup *(ebx+8) *(ebx+0xc))
6809 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:0")
6810 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:1")
6811 (check-ints-equal *(eax+0c) 0 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:2")
6812
6813 89/<- %esp 5/r32/ebp
6814 5d/pop-to-ebp
6815 c3/return
6816
6817
6818
6819
6820
6821
6822
6823
6824 parse-var-with-type:
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841 55/push-ebp
6842 89/<- %ebp 4/r32/esp
6843
6844 50/push-eax
6845 51/push-ecx
6846 52/push-edx
6847 53/push-ebx
6848 56/push-esi
6849 57/push-edi
6850
6851 8b/-> *(ebp+8) 6/r32/esi
6852
6853 8b/-> *(esi+4) 1/r32/ecx
6854 49/decrement-ecx
6855 8a/copy-byte *ecx 1/r32/CL
6856 81 4/subop/and %ecx 0xff/imm32
6857 81 7/subop/compare %ecx 0x3a/imm32/colon
6858 0f 85/jump-if-!= $parse-var-with-type:abort/disp32
6859
6860 ff 1/subop/decrement *(esi+4)
6861
6862 68/push 0/imm32/end
6863 68/push 0/imm32/start
6864 89/<- %ecx 4/r32/esp
6865 $parse-var-with-type:parse-name:
6866 (next-token-from-slice *esi *(esi+4) 0x2f %ecx)
6867 $parse-var-with-type:create-var:
6868
6869 (new-var-from-slice Heap %ecx *(ebp+0x10))
6870
6871 $parse-var-with-type:save-register:
6872
6873 8b/-> *(ebp+0x10) 7/r32/edi
6874 (lookup *edi *(edi+4))
6875 89/<- %edi 0/r32/eax
6876
6877 (next-token-from-slice *(ecx+4) *(esi+4) 0x2f %ecx)
6878
6879 {
6880 $parse-var-with-type:write-register:
6881 (slice-empty? %ecx)
6882 3d/compare-eax-and 0/imm32/false
6883 75/jump-if-!= break/disp8
6884
6885 8d/copy-address *(edi+0x18) 0/r32/eax
6886 (slice-to-string Heap %ecx %eax)
6887 }
6888 $parse-var-with-type:save-type:
6889 8d/copy-address *(edi+8) 0/r32/eax
6890 (parse-type Heap *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
6891 $parse-var-with-type:end:
6892
6893 81 0/subop/add %esp 8/imm32
6894
6895 5f/pop-to-edi
6896 5e/pop-to-esi
6897 5b/pop-to-ebx
6898 5a/pop-to-edx
6899 59/pop-to-ecx
6900 58/pop-to-eax
6901
6902 89/<- %esp 5/r32/ebp
6903 5d/pop-to-ebp
6904 c3/return
6905
6906 $parse-var-with-type:abort:
6907
6908 (write-buffered *(ebp+0x14) "var should have form 'name: type' in '")
6909 (flush *(ebp+0x14))
6910 (rewind-stream *(ebp+0xc))
6911 (write-stream-data *(ebp+0x14) *(ebp+0xc))
6912 (write-buffered *(ebp+0x14) "'\n")
6913 (flush *(ebp+0x14))
6914 (stop *(ebp+0x18) 1)
6915
6916
6917 parse-type:
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936 55/push-ebp
6937 89/<- %ebp 4/r32/esp
6938
6939 50/push-eax
6940 51/push-ecx
6941 52/push-edx
6942
6943 (zero-out *(ebp+0x10) *Handle-size)
6944
6945 68/push 0/imm32
6946 68/push 0/imm32
6947 89/<- %ecx 4/r32/esp
6948
6949 (next-mu-token *(ebp+0xc) %ecx)
6950
6951
6952
6953
6954
6955 (slice-equal? %ecx "")
6956 3d/compare-eax-and 0/imm32/false
6957 0f 85/jump-if-!= $parse-type:abort/disp32
6958
6959 (slice-equal? %ecx "{")
6960 3d/compare-eax-and 0/imm32/false
6961 0f 85/jump-if-!= $parse-type:abort/disp32
6962
6963 (slice-equal? %ecx "}")
6964 3d/compare-eax-and 0/imm32/false
6965 0f 85/jump-if-!= $parse-type:abort/disp32
6966
6967 (slice-equal? %ecx "->")
6968 3d/compare-eax-and 0/imm32/false
6969 0f 85/jump-if-!= $parse-type:abort/disp32
6970
6971 (slice-equal? %ecx ")")
6972 3d/compare-eax-and 0/imm32/false
6973 0f 85/jump-if-!= $parse-type:end/disp32
6974
6975 (allocate *(ebp+8) *Type-tree-size *(ebp+0x10))
6976
6977 8b/-> *(ebp+0x10) 2/r32/edx
6978 (lookup *edx *(edx+4))
6979 89/<- %edx 0/r32/eax
6980 {
6981
6982 (slice-equal? %ecx "(")
6983 3d/compare-eax-and 0/imm32/false
6984 75/jump-if-!= break/disp8
6985
6986 {
6987 $parse-type:check-for-int:
6988 (is-hex-int? %ecx)
6989 3d/compare-eax-and 0/imm32/false
6990 74/jump-if-= break/disp8
6991 $parse-type:int:
6992 (parse-hex-int-from-slice %ecx)
6993 c7 0/subop/copy *(edx+4) 9/imm32/type-id-array-capacity
6994 89/<- *(edx+8) 0/r32/eax
6995 e9/jump $parse-type:end/disp32
6996 }
6997 $parse-type:atom:
6998
6999 c7 0/subop/copy *edx 1/imm32/true
7000
7001 (pos-or-insert-slice Type-id %ecx)
7002 89/<- *(edx+4) 0/r32/eax
7003 e9/jump $parse-type:end/disp32
7004 }
7005 $parse-type:non-atom:
7006
7007
7008 8d/copy-address *(edx+4) 0/r32/eax
7009 (parse-type *(ebp+8) *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
7010
7011 8d/copy-address *(edx+0xc) 0/r32/eax
7012 (parse-type-tree *(ebp+8) *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
7013 $parse-type:end:
7014
7015 81 0/subop/add %esp 8/imm32
7016
7017 5a/pop-to-edx
7018 59/pop-to-ecx
7019 58/pop-to-eax
7020
7021 89/<- %esp 5/r32/ebp
7022 5d/pop-to-ebp
7023 c3/return
7024
7025 $parse-type:abort:
7026
7027 (write-buffered *(ebp+0x14) "unexpected token when parsing type: '")
7028 (write-slice-buffered *(ebp+0x14) %ecx)
7029 (write-buffered *(ebp+0x14) "'\n")
7030 (flush *(ebp+0x14))
7031 (stop *(ebp+0x18) 1)
7032
7033
7034 parse-type-tree:
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044 55/push-ebp
7045 89/<- %ebp 4/r32/esp
7046
7047 50/push-eax
7048 51/push-ecx
7049 52/push-edx
7050
7051 (zero-out *(ebp+0x10) *Handle-size)
7052
7053 68/push 0/imm32
7054 68/push 0/imm32
7055 89/<- %ecx 4/r32/esp
7056
7057 (parse-type *(ebp+8) *(ebp+0xc) %ecx *(ebp+0x14) *(ebp+0x18))
7058
7059 81 7/subop/compare *ecx 0/imm32
7060 74/jump-if-= $parse-type-tree:end/disp8
7061
7062 (allocate *(ebp+8) *Type-tree-size *(ebp+0x10))
7063
7064 8b/-> *(ebp+0x10) 2/r32/edx
7065 (lookup *edx *(edx+4))
7066 89/<- %edx 0/r32/eax
7067
7068 8b/-> *ecx 0/r32/eax
7069 89/<- *(edx+4) 0/r32/eax
7070 8b/-> *(ecx+4) 0/r32/eax
7071 89/<- *(edx+8) 0/r32/eax
7072
7073 8d/copy-address *(edx+0xc) 0/r32/eax
7074 (parse-type-tree *(ebp+8) *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
7075 $parse-type-tree:end:
7076
7077 81 0/subop/add %esp 8/imm32
7078
7079 5a/pop-to-edx
7080 59/pop-to-ecx
7081 58/pop-to-eax
7082
7083 89/<- %esp 5/r32/ebp
7084 5d/pop-to-ebp
7085 c3/return
7086
7087 next-mu-token:
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132 55/push-ebp
7133 89/<- %ebp 4/r32/esp
7134
7135 50/push-eax
7136 51/push-ecx
7137 56/push-esi
7138 57/push-edi
7139
7140 8b/-> *(ebp+8) 6/r32/esi
7141
7142 8b/-> *(ebp+0xc) 7/r32/edi
7143 $next-mu-token:start:
7144 (skip-chars-matching-whitespace %esi)
7145 $next-mu-token:check0:
7146
7147
7148 8b/-> *(esi+4) 1/r32/ecx
7149
7150 3b/compare<- *esi 1/r32/ecx
7151 c7 0/subop/copy *edi 0/imm32
7152 c7 0/subop/copy *(edi+4) 0/imm32
7153 0f 8d/jump-if->= $next-mu-token:end/disp32
7154
7155 8d/copy-address *(esi+ecx+0xc) 0/r32/eax
7156 89/<- *edi 0/r32/eax
7157
7158 31/xor-with %eax 0/r32/eax
7159 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
7160 {
7161 $next-mu-token:check-for-comma:
7162
7163 3d/compare-eax-and 0x2c/imm32/comma
7164 75/jump-if-!= break/disp8
7165
7166 ff 0/subop/increment *(esi+4)
7167
7168 e9/jump $next-mu-token:start/disp32
7169 }
7170 {
7171 $next-mu-token:check-for-comment:
7172
7173 3d/compare-eax-and 0x23/imm32/pound
7174 75/jump-if-!= break/disp8
7175
7176 e9/jump $next-mu-token:done/disp32
7177 }
7178 {
7179 $next-mu-token:check-for-string-literal:
7180
7181 3d/compare-eax-and 0x22/imm32/dquote
7182 75/jump-if-!= break/disp8
7183 (skip-string %esi)
7184
7185 e9/jump $next-mu-token:done/disp32
7186 }
7187 {
7188 $next-mu-token:check-for-open-paren:
7189
7190 3d/compare-eax-and 0x28/imm32/open-paren
7191 75/jump-if-!= break/disp8
7192
7193 ff 0/subop/increment *(esi+4)
7194
7195 e9/jump $next-mu-token:done/disp32
7196 }
7197 {
7198 $next-mu-token:check-for-close-paren:
7199
7200 3d/compare-eax-and 0x29/imm32/close-paren
7201 75/jump-if-!= break/disp8
7202
7203 ff 0/subop/increment *(esi+4)
7204
7205 e9/jump $next-mu-token:done/disp32
7206 }
7207 {
7208 $next-mu-token:regular-word-without-metadata:
7209
7210
7211 8b/-> *(esi+4) 1/r32/ecx
7212
7213 3b/compare<- *esi 1/r32/ecx
7214 7d/jump-if->= break/disp8
7215
7216 31/xor-with %eax 0/r32/eax
7217 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
7218
7219 3d/compare-eax-and 0x20/imm32/space
7220 74/jump-if-= break/disp8
7221
7222 3d/compare-eax-and 0xd/imm32/carriage-return
7223 74/jump-if-= break/disp8
7224
7225 3d/compare-eax-and 0xa/imm32/newline
7226 74/jump-if-= break/disp8
7227
7228 3d/compare-eax-and 0x28/imm32/open-paren
7229 0f 84/jump-if-= break/disp32
7230
7231 3d/compare-eax-and 0x29/imm32/close-paren
7232 0f 84/jump-if-= break/disp32
7233
7234 3d/compare-eax-and 0x2c/imm32/comma
7235 0f 84/jump-if-= break/disp32
7236
7237 ff 0/subop/increment *(esi+4)
7238
7239 e9/jump loop/disp32
7240 }
7241 $next-mu-token:done:
7242
7243 8b/-> *(esi+4) 1/r32/ecx
7244 8d/copy-address *(esi+ecx+0xc) 0/r32/eax
7245 89/<- *(edi+4) 0/r32/eax
7246 $next-mu-token:end:
7247
7248 5f/pop-to-edi
7249 5e/pop-to-esi
7250 59/pop-to-ecx
7251 58/pop-to-eax
7252
7253 89/<- %esp 5/r32/ebp
7254 5d/pop-to-ebp
7255 c3/return
7256
7257 pos-or-insert-slice:
7258
7259 55/push-ebp
7260 89/<- %ebp 4/r32/esp
7261
7262 (pos-slice *(ebp+8) *(ebp+0xc))
7263 3d/compare-eax-and -1/imm32
7264 75/jump-if-!= $pos-or-insert-slice:end/disp8
7265 $pos-or-insert-slice:insert:
7266
7267 68/push 0/imm32
7268 68/push 0/imm32
7269 89/<- %eax 4/r32/esp
7270 (slice-to-string Heap *(ebp+0xc) %eax)
7271
7272 (lookup *eax *(eax+4))
7273 (write-int *(ebp+8) %eax)
7274 (pos-slice *(ebp+8) *(ebp+0xc))
7275 $pos-or-insert-slice:end:
7276
7277 81 0/subop/add %esp 8/imm32
7278
7279 89/<- %esp 5/r32/ebp
7280 5d/pop-to-ebp
7281 c3/return
7282
7283
7284
7285 pos-slice:
7286
7287 55/push-ebp
7288 89/<- %ebp 4/r32/esp
7289
7290 51/push-ecx
7291 52/push-edx
7292 53/push-ebx
7293 56/push-esi
7294
7295
7296
7297
7298
7299 8b/-> *(ebp+8) 6/r32/esi
7300
7301 b9/copy-to-ecx 0/imm32
7302
7303 8d/copy-address *(esi+0xc) 2/r32/edx
7304
7305 8b/-> *esi 3/r32/ebx
7306 8d/copy-address *(esi+ebx+0xc) 3/r32/ebx
7307 {
7308
7309
7310
7311
7312
7313 39/compare %edx 3/r32/ebx
7314 b8/copy-to-eax -1/imm32
7315 73/jump-if-addr>= $pos-slice:end/disp8
7316
7317 (slice-equal? *(ebp+0xc) *edx)
7318 3d/compare-eax-and 0/imm32/false
7319 75/jump-if-!= break/disp8
7320
7321 41/increment-ecx
7322
7323 81 0/subop/add %edx 4/imm32
7324
7325 eb/jump loop/disp8
7326 }
7327
7328 89/<- %eax 1/r32/ecx
7329 $pos-slice:end:
7330
7331
7332
7333
7334 5e/pop-to-esi
7335 5b/pop-to-ebx
7336 5a/pop-to-edx
7337 59/pop-to-ecx
7338
7339 89/<- %esp 5/r32/ebp
7340 5d/pop-to-ebp
7341 c3/return
7342
7343 test-parse-var-with-type:
7344
7345 55/push-ebp
7346 89/<- %ebp 4/r32/esp
7347
7348 b8/copy-to-eax "x:"/imm32
7349 8b/-> *eax 1/r32/ecx
7350 8d/copy-address *(eax+ecx+4) 1/r32/ecx
7351 05/add-to-eax 4/imm32
7352
7353 51/push-ecx
7354 50/push-eax
7355 89/<- %ecx 4/r32/esp
7356
7357 (clear-stream _test-input-stream)
7358 (write _test-input-stream "int")
7359
7360 68/push 0/imm32
7361 68/push 0/imm32
7362 89/<- %edx 4/r32/esp
7363
7364 (parse-var-with-type %ecx _test-input-stream %edx Stderr 0)
7365
7366 (lookup *edx *(edx+4))
7367 89/<- %edx 0/r32/eax
7368
7369 (lookup *edx *(edx+4))
7370 (check-strings-equal %eax "x" "F - test-parse-var-with-type/name")
7371
7372 (lookup *(edx+8) *(edx+0xc))
7373 (check-ints-equal *eax 1 "F - test-parse-var-with-type/type:0")
7374 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-type/type:1")
7375 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-type/type:2")
7376
7377 89/<- %esp 5/r32/ebp
7378 5d/pop-to-ebp
7379 c3/return
7380
7381 test-parse-var-with-type-and-register:
7382
7383 55/push-ebp
7384 89/<- %ebp 4/r32/esp
7385
7386 b8/copy-to-eax "x/eax:"/imm32
7387 8b/-> *eax 1/r32/ecx
7388 8d/copy-address *(eax+ecx+4) 1/r32/ecx
7389 05/add-to-eax 4/imm32
7390
7391 51/push-ecx
7392 50/push-eax
7393 89/<- %ecx 4/r32/esp
7394
7395 (clear-stream _test-input-stream)
7396 (write _test-input-stream "int")
7397
7398 68/push 0/imm32
7399 68/push 0/imm32
7400 89/<- %edx 4/r32/esp
7401
7402 (parse-var-with-type %ecx _test-input-stream %edx Stderr 0)
7403
7404 (lookup *edx *(edx+4))
7405 89/<- %edx 0/r32/eax
7406
7407 (lookup *edx *(edx+4))
7408 (check-strings-equal %eax "x" "F - test-parse-var-with-type-and-register/name")
7409
7410 (lookup *(edx+0x18) *(edx+0x1c))
7411 (check-strings-equal %eax "eax" "F - test-parse-var-with-type-and-register/register")
7412
7413 (lookup *(edx+8) *(edx+0xc))
7414 (check-ints-equal *eax 1 "F - test-parse-var-with-type-and-register/type:0")
7415 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-type-and-register/type:1")
7416 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-type-and-register/type:2")
7417
7418 89/<- %esp 5/r32/ebp
7419 5d/pop-to-ebp
7420 c3/return
7421
7422 test-parse-var-with-trailing-characters:
7423
7424 55/push-ebp
7425 89/<- %ebp 4/r32/esp
7426
7427 b8/copy-to-eax "x:"/imm32
7428 8b/-> *eax 1/r32/ecx
7429 8d/copy-address *(eax+ecx+4) 1/r32/ecx
7430 05/add-to-eax 4/imm32
7431
7432 51/push-ecx
7433 50/push-eax
7434 89/<- %ecx 4/r32/esp
7435
7436 (clear-stream _test-input-stream)
7437 (write _test-input-stream "int,")
7438
7439 68/push 0/imm32
7440 68/push 0/imm32
7441 89/<- %edx 4/r32/esp
7442
7443 (parse-var-with-type %ecx _test-input-stream %edx Stderr 0)
7444
7445 (lookup *edx *(edx+4))
7446 89/<- %edx 0/r32/eax
7447
7448 (lookup *edx *(edx+4))
7449 (check-strings-equal %eax "x" "F - test-parse-var-with-trailing-characters/name")
7450
7451 (check-ints-equal *(edx+0x18) 0 "F - test-parse-var-with-trailing-characters/register")
7452
7453 (lookup *(edx+8) *(edx+0xc))
7454 (check-ints-equal *eax 1 "F - test-parse-var-with-trailing-characters/type:0")
7455 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-trailing-characters/type:1")
7456 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-trailing-characters/type:1")
7457
7458 89/<- %esp 5/r32/ebp
7459 5d/pop-to-ebp
7460 c3/return
7461
7462 test-parse-var-with-register-and-trailing-characters:
7463
7464 55/push-ebp
7465 89/<- %ebp 4/r32/esp
7466
7467 b8/copy-to-eax "x/eax:"/imm32
7468 8b/-> *eax 1/r32/ecx
7469 8d/copy-address *(eax+ecx+4) 1/r32/ecx
7470 05/add-to-eax 4/imm32
7471
7472 51/push-ecx
7473 50/push-eax
7474 89/<- %ecx 4/r32/esp
7475
7476 (clear-stream _test-input-stream)
7477 (write _test-input-stream "int,")
7478
7479 68/push 0/imm32
7480 68/push 0/imm32
7481 89/<- %edx 4/r32/esp
7482
7483 (parse-var-with-type %ecx _test-input-stream %edx Stderr 0)
7484
7485 (lookup *edx *(edx+4))
7486 89/<- %edx 0/r32/eax
7487
7488 (lookup *edx *(edx+4))
7489 (check-strings-equal %eax "x" "F - test-parse-var-with-register-and-trailing-characters/name")
7490
7491 (lookup *(edx+0x18) *(edx+0x1c))
7492 (check-strings-equal %eax "eax" "F - test-parse-var-with-register-and-trailing-characters/register")
7493
7494 (lookup *(edx+8) *(edx+0xc))
7495 (check-ints-equal *eax 1 "F - test-parse-var-with-register-and-trailing-characters/type:0")
7496 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-register-and-trailing-characters/type:1")
7497 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-register-and-trailing-characters/type:2")
7498
7499 89/<- %esp 5/r32/ebp
7500 5d/pop-to-ebp
7501 c3/return
7502
7503 test-parse-var-with-compound-type:
7504
7505 55/push-ebp
7506 89/<- %ebp 4/r32/esp
7507
7508 b8/copy-to-eax "x:"/imm32
7509 8b/-> *eax 1/r32/ecx
7510 8d/copy-address *(eax+ecx+4) 1/r32/ecx
7511 05/add-to-eax 4/imm32
7512
7513 51/push-ecx
7514 50/push-eax
7515 89/<- %ecx 4/r32/esp
7516
7517 (clear-stream _test-input-stream)
7518 (write _test-input-stream "(addr int)")
7519
7520 68/push 0/imm32
7521 68/push 0/imm32
7522 89/<- %edx 4/r32/esp
7523
7524 (parse-var-with-type %ecx _test-input-stream %edx Stderr 0)
7525
7526 (lookup *edx *(edx+4))
7527 89/<- %edx 0/r32/eax
7528
7529 (lookup *edx *(edx+4))
7530 (check-strings-equal %eax "x" "F - test-parse-var-with-compound-type/name")
7531
7532 (check-ints-equal *(edx+0x18) 0 "F - test-parse-var-with-compound-type/register")
7533
7534
7535 (lookup *(edx+8) *(edx+0xc))
7536 89/<- %edx 0/r32/eax
7537
7538 (check-ints-equal *edx 0 "F - test-parse-var-with-compound-type/type:0")
7539
7540 (lookup *(edx+4) *(edx+8))
7541 (check-ints-equal *eax 1 "F - test-parse-var-with-compound-type/type:1")
7542 (check-ints-equal *(eax+4) 2 "F - test-parse-var-with-compound-type/type:2")
7543
7544 (lookup *(edx+0xc) *(edx+0x10))
7545 (lookup *(eax+4) *(eax+8))
7546 (check-ints-equal *eax 1 "F - test-parse-var-with-compound-type/type:3")
7547 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-compound-type/type:4")
7548
7549 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-compound-type/type:5")
7550
7551 89/<- %esp 5/r32/ebp
7552 5d/pop-to-ebp
7553 c3/return
7554
7555
7556
7557
7558 is-identifier?:
7559
7560 55/push-ebp
7561 89/<- %ebp 4/r32/esp
7562
7563 (slice-empty? *(ebp+8))
7564 3d/compare-eax-and 0/imm32/false
7565 75/jump-if-!= $is-identifier?:false/disp8
7566
7567 8b/-> *(ebp+8) 0/r32/eax
7568 8b/-> *eax 0/r32/eax
7569 8a/copy-byte *eax 0/r32/AL
7570 81 4/subop/and %eax 0xff/imm32
7571
7572 3d/compare-eax-and 0x24/imm32/$
7573 74/jump-if-= $is-identifier?:true/disp8
7574
7575 3d/compare-eax-and 0x5f/imm32/_
7576 74/jump-if-= $is-identifier?:true/disp8
7577
7578 25/and-eax-with 0x5f/imm32
7579
7580 3d/compare-eax-and 0x41/imm32/A
7581 7c/jump-if-< $is-identifier?:false/disp8
7582
7583 3d/compare-eax-and 0x5a/imm32/Z
7584 7f/jump-if-> $is-identifier?:false/disp8
7585
7586 $is-identifier?:true:
7587 b8/copy-to-eax 1/imm32/true
7588 eb/jump $is-identifier?:end/disp8
7589 $is-identifier?:false:
7590 b8/copy-to-eax 0/imm32/false
7591 $is-identifier?:end:
7592
7593 89/<- %esp 5/r32/ebp
7594 5d/pop-to-ebp
7595 c3/return
7596
7597 test-is-identifier-dollar:
7598
7599 55/push-ebp
7600 89/<- %ebp 4/r32/esp
7601
7602 b8/copy-to-eax "$a"/imm32
7603 8b/-> *eax 1/r32/ecx
7604 8d/copy-address *(eax+ecx+4) 1/r32/ecx
7605 05/add-to-eax 4/imm32
7606
7607 51/push-ecx
7608 50/push-eax
7609 89/<- %ecx 4/r32/esp
7610
7611 (is-identifier? %ecx)
7612 (check-ints-equal %eax 1 "F - test-is-identifier-dollar")
7613
7614 89/<- %esp 5/r32/ebp
7615 5d/pop-to-ebp
7616 c3/return
7617
7618 test-is-identifier-underscore:
7619
7620 55/push-ebp
7621 89/<- %ebp 4/r32/esp
7622
7623 b8/copy-to-eax "_a"/imm32
7624 8b/-> *eax 1/r32/ecx
7625 8d/copy-address *(eax+ecx+4) 1/r32/ecx
7626 05/add-to-eax 4/imm32
7627
7628 51/push-ecx
7629 50/push-eax
7630 89/<- %ecx 4/r32/esp
7631
7632 (is-identifier? %ecx)
7633 (check-ints-equal %eax 1 "F - test-is-identifier-underscore")
7634
7635 89/<- %esp 5/r32/ebp
7636 5d/pop-to-ebp
7637 c3/return
7638
7639 test-is-identifier-a:
7640
7641 55/push-ebp
7642 89/<- %ebp 4/r32/esp
7643
7644 b8/copy-to-eax "a$"/imm32
7645 8b/-> *eax 1/r32/ecx
7646 8d/copy-address *(eax+ecx+4) 1/r32/ecx
7647 05/add-to-eax 4/imm32
7648
7649 51/push-ecx
7650 50/push-eax
7651 89/<- %ecx 4/r32/esp
7652
7653 (is-identifier? %ecx)
7654 (check-ints-equal %eax 1 "F - test-is-identifier-a")
7655
7656 89/<- %esp 5/r32/ebp
7657 5d/pop-to-ebp
7658 c3/return
7659
7660 test-is-identifier-z:
7661
7662 55/push-ebp
7663 89/<- %ebp 4/r32/esp
7664
7665 b8/copy-to-eax "z$"/imm32
7666 8b/-> *eax 1/r32/ecx
7667 8d/copy-address *(eax+ecx+4) 1/r32/ecx
7668 05/add-to-eax 4/imm32
7669
7670 51/push-ecx
7671 50/push-eax
7672 89/<- %ecx 4/r32/esp
7673
7674 (is-identifier? %ecx)
7675 (check-ints-equal %eax 1 "F - test-is-identifier-z")
7676
7677 89/<- %esp 5/r32/ebp
7678 5d/pop-to-ebp
7679 c3/return
7680
7681 test-is-identifier-A:
7682
7683 55/push-ebp
7684 89/<- %ebp 4/r32/esp
7685
7686 b8/copy-to-eax "A$"/imm32
7687 8b/-> *eax 1/r32/ecx
7688 8d/copy-address *(eax+ecx+4) 1/r32/ecx
7689 05/add-to-eax 4/imm32
7690
7691 51/push-ecx
7692 50/push-eax
7693 89/<- %ecx 4/r32/esp
7694
7695 (is-identifier? %ecx)
7696 (check-ints-equal %eax 1 "F - test-is-identifier-A")
7697
7698 89/<- %esp 5/r32/ebp
7699 5d/pop-to-ebp
7700 c3/return
7701
7702 test-is-identifier-Z:
7703
7704 55/push-ebp
7705 89/<- %ebp 4/r32/esp
7706
7707 b8/copy-to-eax "Z$"/imm32
7708 8b/-> *eax 1/r32/ecx
7709 8d/copy-address *(eax+ecx+4) 1/r32/ecx
7710 05/add-to-eax 4/imm32
7711
7712 51/push-ecx
7713 50/push-eax
7714 89/<- %ecx 4/r32/esp
7715
7716 (is-identifier? %ecx)
7717 (check-ints-equal %eax 1 "F - test-is-identifier-Z")
7718
7719 89/<- %esp 5/r32/ebp
7720 5d/pop-to-ebp
7721 c3/return
7722
7723 test-is-identifier-at:
7724
7725
7726 55/push-ebp
7727 89/<- %ebp 4/r32/esp
7728
7729 b8/copy-to-eax "@a"/imm32
7730 8b/-> *eax 1/r32/ecx
7731 8d/copy-address *(eax+ecx+4) 1/r32/ecx
7732 05/add-to-eax 4/imm32
7733
7734 51/push-ecx
7735 50/push-eax
7736 89/<- %ecx 4/r32/esp
7737
7738 (is-identifier? %ecx)
7739 (check-ints-equal %eax 0 "F - test-is-identifier-@")
7740
7741 89/<- %esp 5/r32/ebp
7742 5d/pop-to-ebp
7743 c3/return
7744
7745 test-is-identifier-square-bracket:
7746
7747
7748 55/push-ebp
7749 89/<- %ebp 4/r32/esp
7750
7751 b8/copy-to-eax "[a"/imm32
7752 8b/-> *eax 1/r32/ecx
7753 8d/copy-address *(eax+ecx+4) 1/r32/ecx
7754 05/add-to-eax 4/imm32
7755
7756 51/push-ecx
7757 50/push-eax
7758 89/<- %ecx 4/r32/esp
7759
7760 (is-identifier? %ecx)
7761 (check-ints-equal %eax 0 "F - test-is-identifier-@")
7762
7763 89/<- %esp 5/r32/ebp
7764 5d/pop-to-ebp
7765 c3/return
7766
7767 test-is-identifier-backtick:
7768
7769
7770 55/push-ebp
7771 89/<- %ebp 4/r32/esp
7772
7773 b8/copy-to-eax "`a"/imm32
7774 8b/-> *eax 1/r32/ecx
7775 8d/copy-address *(eax+ecx+4) 1/r32/ecx
7776 05/add-to-eax 4/imm32
7777
7778 51/push-ecx
7779 50/push-eax
7780 89/<- %ecx 4/r32/esp
7781
7782 (is-identifier? %ecx)
7783 (check-ints-equal %eax 0 "F - test-is-identifier-backtick")
7784
7785 89/<- %esp 5/r32/ebp
7786 5d/pop-to-ebp
7787 c3/return
7788
7789 test-is-identifier-curly-brace-open:
7790
7791
7792 55/push-ebp
7793 89/<- %ebp 4/r32/esp
7794
7795 b8/copy-to-eax "{a"/imm32
7796 8b/-> *eax 1/r32/ecx
7797 8d/copy-address *(eax+ecx+4) 1/r32/ecx
7798 05/add-to-eax 4/imm32
7799
7800 51/push-ecx
7801 50/push-eax
7802 89/<- %ecx 4/r32/esp
7803
7804 (is-identifier? %ecx)
7805 (check-ints-equal %eax 0 "F - test-is-identifier-curly-brace-open")
7806
7807 89/<- %esp 5/r32/ebp
7808 5d/pop-to-ebp
7809 c3/return
7810
7811 test-is-identifier-curly-brace-close:
7812
7813 55/push-ebp
7814 89/<- %ebp 4/r32/esp
7815
7816 b8/copy-to-eax "}a"/imm32
7817 8b/-> *eax 1/r32/ecx
7818 8d/copy-address *(eax+ecx+4) 1/r32/ecx
7819 05/add-to-eax 4/imm32
7820
7821 51/push-ecx
7822 50/push-eax
7823 89/<- %ecx 4/r32/esp
7824
7825 (is-identifier? %ecx)
7826 (check-ints-equal %eax 0 "F - test-is-identifier-curly-brace-close")
7827
7828 89/<- %esp 5/r32/ebp
7829 5d/pop-to-ebp
7830 c3/return
7831
7832 test-is-identifier-hyphen:
7833
7834
7835 55/push-ebp
7836 89/<- %ebp 4/r32/esp
7837
7838 b8/copy-to-eax "-a"/imm32
7839 8b/-> *eax 1/r32/ecx
7840 8d/copy-address *(eax+ecx+4) 1/r32/ecx
7841 05/add-to-eax 4/imm32
7842
7843 51/push-ecx
7844 50/push-eax
7845 89/<- %ecx 4/r32/esp
7846
7847 (is-identifier? %ecx)
7848 (check-ints-equal %eax 0 "F - test-is-identifier-hyphen")
7849
7850 89/<- %esp 5/r32/ebp
7851 5d/pop-to-ebp
7852 c3/return
7853
7854 populate-mu-function-body:
7855
7856 55/push-ebp
7857 89/<- %ebp 4/r32/esp
7858
7859 50/push-eax
7860 56/push-esi
7861 57/push-edi
7862
7863 8b/-> *(ebp+8) 6/r32/esi
7864
7865 8b/-> *(ebp+0xc) 7/r32/edi
7866
7867 c7 0/subop/copy *Curr-block-depth 1/imm32
7868
7869 8d/copy-address *(edi+0x18) 0/r32/eax
7870 (parse-mu-block %esi *(ebp+0x10) %edi %eax *(ebp+0x14) *(ebp+0x18))
7871 $populate-mu-function-body:end:
7872
7873 5f/pop-to-edi
7874 5e/pop-to-esi
7875 58/pop-to-eax
7876
7877 89/<- %esp 5/r32/ebp
7878 5d/pop-to-ebp
7879 c3/return
7880
7881
7882 parse-mu-block:
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920 55/push-ebp
7921 89/<- %ebp 4/r32/esp
7922
7923 50/push-eax
7924 51/push-ecx
7925 52/push-edx
7926 53/push-ebx
7927 57/push-edi
7928
7929 81 5/subop/subtract %esp 0x200/imm32
7930 68/push 0x200/imm32/size
7931 68/push 0/imm32/read
7932 68/push 0/imm32/write
7933 89/<- %ecx 4/r32/esp
7934
7935 68/push 0/imm32/end
7936 68/push 0/imm32/start
7937 89/<- %edx 4/r32/esp
7938
7939 (allocate Heap *Stmt-size *(ebp+0x14))
7940
7941 8b/-> *(ebp+0x14) 7/r32/edi
7942 (lookup *edi *(edi+4))
7943 89/<- %edi 0/r32/eax
7944
7945
7946 8d/copy-address *(edi+0xc) 0/r32/eax
7947 (new-block-name *(ebp+0x10) %eax)
7948
7949 (push *(ebp+0xc) *(edi+0xc))
7950 (push *(ebp+0xc) *(edi+0x10))
7951 (push *(ebp+0xc) 0)
7952
7953 ff 0/subop/increment *Curr-block-depth
7954 {
7955 $parse-mu-block:line-loop:
7956
7957 (clear-stream %ecx)
7958 (read-line-buffered *(ebp+8) %ecx)
7959
7960
7961
7962
7963
7964
7965 81 7/subop/compare *ecx 0/imm32
7966 0f 84/jump-if-= break/disp32
7967
7968
7969
7970 (next-mu-token %ecx %edx)
7971
7972
7973
7974
7975
7976 (slice-empty? %edx)
7977 3d/compare-eax-and 0/imm32/false
7978 0f 85/jump-if-!= loop/disp32
7979
7980
7981 8b/-> *edx 0/r32/eax
7982 8a/copy-byte *eax 0/r32/AL
7983 81 4/subop/and %eax 0xff/imm32
7984
7985 3d/compare-eax-and 0x23/imm32/hash
7986 0f 84/jump-if-= loop/disp32
7987
7988 {
7989 $parse-mu-block:check-for-block:
7990 (slice-equal? %edx "{")
7991 3d/compare-eax-and 0/imm32/false
7992 74/jump-if-= break/disp8
7993 (check-no-tokens-left %ecx)
7994
7995
7996 68/push 0/imm32
7997 68/push 0/imm32
7998 89/<- %eax 4/r32/esp
7999
8000 (parse-mu-block *(ebp+8) *(ebp+0xc) *(ebp+0x10) %eax *(ebp+0x18) *(ebp+0x1c))
8001 (append-to-block Heap %edi *eax *(eax+4))
8002
8003 81 0/subop/add %esp 8/imm32
8004
8005 e9/jump $parse-mu-block:line-loop/disp32
8006 }
8007
8008 $parse-mu-block:check-for-end:
8009 (slice-equal? %edx "}")
8010 3d/compare-eax-and 0/imm32/false
8011 0f 85/jump-if-!= break/disp32
8012
8013 {
8014 $parse-mu-block:check-for-named-block:
8015
8016 8b/-> *(edx+4) 0/r32/eax
8017 48/decrement-eax
8018 8a/copy-byte *eax 0/r32/AL
8019 81 4/subop/and %eax 0xff/imm32
8020
8021 3d/compare-eax-and 0x3a/imm32/colon
8022 0f 85/jump-if-!= break/disp32
8023
8024
8025
8026 ff 1/subop/decrement *(edx+4)
8027
8028 68/push 0/imm32
8029 68/push 0/imm32
8030 89/<- %eax 4/r32/esp
8031
8032 (parse-mu-named-block %edx *(ebp+8) *(ebp+0xc) *(ebp+0x10) %eax *(ebp+0x18) *(ebp+0x1c))
8033 (append-to-block Heap %edi *eax *(eax+4))
8034
8035 81 0/subop/add %esp 8/imm32
8036
8037 e9/jump $parse-mu-block:line-loop/disp32
8038 }
8039
8040 {
8041 $parse-mu-block:check-for-var:
8042 (slice-equal? %edx "var")
8043 3d/compare-eax-and 0/imm32/false
8044 74/jump-if-= break/disp8
8045
8046 68/push 0/imm32
8047 68/push 0/imm32
8048 89/<- %eax 4/r32/esp
8049
8050 (parse-mu-var-def %ecx *(ebp+0xc) %eax *(ebp+0x10) *(ebp+0x18) *(ebp+0x1c))
8051 (append-to-block Heap %edi *eax *(eax+4))
8052
8053 81 0/subop/add %esp 8/imm32
8054
8055 e9/jump $parse-mu-block:line-loop/disp32
8056 }
8057 $parse-mu-block:regular-stmt:
8058
8059
8060 68/push 0/imm32
8061 68/push 0/imm32
8062 89/<- %eax 4/r32/esp
8063
8064 (parse-mu-stmt %ecx *(ebp+0xc) *(ebp+0x10) %eax *(ebp+0x18) *(ebp+0x1c))
8065 (append-to-block Heap %edi *eax *(eax+4))
8066
8067 81 0/subop/add %esp 8/imm32
8068
8069 e9/jump loop/disp32
8070 }
8071 (clean-up-blocks *(ebp+0xc) *Curr-block-depth *(ebp+0x10))
8072
8073 ff 1/subop/decrement *Curr-block-depth
8074
8075 (pop *(ebp+0xc))
8076 (pop *(ebp+0xc))
8077 (pop *(ebp+0xc))
8078 $parse-mu-block:end:
8079
8080 81 0/subop/add %esp 0x214/imm32
8081
8082 5f/pop-to-edi
8083 5b/pop-to-ebx
8084 5a/pop-to-edx
8085 59/pop-to-ecx
8086 58/pop-to-eax
8087
8088 89/<- %esp 5/r32/ebp
8089 5d/pop-to-ebp
8090 c3/return
8091
8092 $parse-mu-block:abort:
8093
8094 (write-buffered *(ebp+0x18) "'{' or '}' should be on its own line, but got '")
8095 (rewind-stream %ecx)
8096 (write-stream-data *(ebp+0x18) %ecx)
8097 (write-buffered *(ebp+0x18) "'\n")
8098 (flush *(ebp+0x18))
8099 (stop *(ebp+0x1c) 1)
8100
8101
8102 new-block-name:
8103
8104 55/push-ebp
8105 89/<- %ebp 4/r32/esp
8106
8107 50/push-eax
8108 51/push-ecx
8109 52/push-edx
8110
8111 8b/-> *(ebp+8) 0/r32/eax
8112 (lookup *eax *(eax+4))
8113 8b/-> *eax 0/r32/eax
8114 05/add-to-eax 0xd/imm32
8115 89/<- %ecx 0/r32/eax
8116
8117 29/subtract-from %esp 1/r32/ecx
8118 ff 6/subop/push %ecx
8119 68/push 0/imm32/read
8120 68/push 0/imm32/write
8121 89/<- %edx 4/r32/esp
8122 (clear-stream %edx)
8123
8124 8b/-> *(ebp+8) 0/r32/eax
8125 (lookup *eax *(eax+4))
8126
8127 (write %edx "$")
8128 (write %edx %eax)
8129 (write %edx ":")
8130 (write-int32-hex %edx *Next-block-index)
8131 ff 0/subop/increment *Next-block-index
8132
8133
8134 8b/-> *edx 0/r32/eax
8135
8136 8d/copy-address *(edx+0xc) 2/r32/edx
8137
8138 01/add-to %eax 2/r32/edx
8139
8140 ff 6/subop/push %eax
8141 ff 6/subop/push %edx
8142 89/<- %eax 4/r32/esp
8143
8144 (new-literal Heap %eax *(ebp+0xc))
8145
8146
8147
8148
8149
8150
8151
8152 $new-block-name:end:
8153
8154 81 0/subop/add %ecx 0xc/imm32
8155 81 0/subop/add %ecx 8/imm32
8156 01/add-to %esp 1/r32/ecx
8157
8158 5a/pop-to-edx
8159 59/pop-to-ecx
8160 58/pop-to-eax
8161
8162 89/<- %esp 5/r32/ebp
8163 5d/pop-to-ebp
8164 c3/return
8165
8166 check-no-tokens-left:
8167
8168 55/push-ebp
8169 89/<- %ebp 4/r32/esp
8170
8171 50/push-eax
8172 51/push-ecx
8173
8174 68/push 0/imm32/end
8175 68/push 0/imm32/start
8176 89/<- %ecx 4/r32/esp
8177
8178 (next-mu-token *(ebp+8) %ecx)
8179
8180 (slice-empty? %ecx)
8181 3d/compare-eax-and 0/imm32/false
8182 75/jump-if-!= $check-no-tokens-left:end/disp8
8183
8184
8185 8b/-> *edx 0/r32/eax
8186 8a/copy-byte *eax 0/r32/AL
8187 81 4/subop/and %eax 0xff/imm32
8188
8189 3d/compare-eax-and 0x23/imm32/hash
8190 74/jump-if-= $check-no-tokens-left:end/disp8
8191
8192 (write-buffered Stderr "'{' or '}' should be on its own line, but got '")
8193 (rewind-stream %ecx)
8194 (write-stream 2 %ecx)
8195 (write-buffered Stderr "'\n")
8196 (flush Stderr)
8197
8198 bb/copy-to-ebx 1/imm32
8199 e8/call syscall_exit/disp32
8200
8201 $check-no-tokens-left:end:
8202
8203 81 0/subop/add %esp 8/imm32
8204
8205 59/pop-to-ecx
8206 58/pop-to-eax
8207
8208 89/<- %esp 5/r32/ebp
8209 5d/pop-to-ebp
8210 c3/return
8211
8212 parse-mu-named-block:
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223 55/push-ebp
8224 89/<- %ebp 4/r32/esp
8225
8226 50/push-eax
8227 51/push-ecx
8228 57/push-edi
8229
8230 68/push 0/imm32
8231 68/push 0/imm32
8232 89/<- %ecx 4/r32/esp
8233
8234 (new-literal Heap *(ebp+8) %ecx)
8235
8236 (push *(ebp+0x10) *ecx)
8237 (push *(ebp+0x10) *(ecx+4))
8238 (push *(ebp+0x10) 0)
8239
8240 (parse-mu-block *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c) *(ebp+0x20))
8241
8242 (pop *(ebp+0x10))
8243 (pop *(ebp+0x10))
8244 (pop *(ebp+0x10))
8245
8246 8b/-> *(ebp+0x18) 7/r32/edi
8247 (lookup *edi *(edi+4))
8248 89/<- %edi 0/r32/eax
8249
8250 c7 0/subop/copy *edi 0/imm32/block
8251
8252 8b/-> *ecx 0/r32/eax
8253 89/<- *(edi+0xc) 0/r32/eax
8254 8b/-> *(ecx+4) 0/r32/eax
8255 89/<- *(edi+0x10) 0/r32/eax
8256 $parse-mu-named-block:end:
8257
8258 81 0/subop/add %esp 8/imm32
8259
8260 5f/pop-to-edi
8261 59/pop-to-ecx
8262 58/pop-to-eax
8263
8264 89/<- %esp 5/r32/ebp
8265 5d/pop-to-ebp
8266 c3/return
8267
8268 parse-mu-var-def:
8269
8270 55/push-ebp
8271 89/<- %ebp 4/r32/esp
8272
8273 50/push-eax
8274 51/push-ecx
8275 52/push-edx
8276 53/push-ebx
8277 57/push-edi
8278
8279 8b/-> *(ebp+0x10) 7/r32/edi
8280
8281 68/push 0/imm32/end
8282 68/push 0/imm32/start
8283 89/<- %ecx 4/r32/esp
8284
8285 68/push 0/imm32
8286 68/push 0/imm32
8287 89/<- %edx 4/r32/esp
8288
8289 (next-mu-token *(ebp+8) %ecx)
8290 (parse-var-with-type %ecx *(ebp+8) %edx *(ebp+0x18) *(ebp+0x1c))
8291
8292 (lookup *edx *(edx+4))
8293
8294 8b/-> *Curr-block-depth 3/r32/ebx
8295 89/<- *(eax+0x10) 3/r32/ebx
8296
8297 8b/-> *(eax+0x18) 0/r32/eax
8298 3d/compare-eax-and 0/imm32
8299 {
8300 75/jump-if-!= break/disp8
8301
8302
8303 (next-mu-token *(ebp+8) %ecx)
8304 (slice-empty? %ecx)
8305 3d/compare-eax-and 0/imm32/false
8306 0f 84/jump-if-= $parse-mu-var-def:error2/disp32
8307
8308 (new-var-def Heap *edx *(edx+4) %edi)
8309 e9/jump $parse-mu-var-def:update-vars/disp32
8310 }
8311
8312 {
8313 0f 84/jump-if-= break/disp32
8314
8315
8316
8317 (next-mu-token *(ebp+8) %ecx)
8318 (slice-equal? %ecx "<-")
8319 3d/compare-eax-and 0/imm32/false
8320 0f 84/jump-if-= $parse-mu-var-def:error1/disp32
8321
8322 (new-reg-var-def Heap *edx *(edx+4) %edi)
8323 (lookup *edi *(edi+4))
8324 (add-operation-and-inputs-to-stmt %eax *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
8325 }
8326 $parse-mu-var-def:update-vars:
8327
8328 (push *(ebp+0xc) *edx)
8329 (push *(ebp+0xc) *(edx+4))
8330 (push *(ebp+0xc) 0)
8331 $parse-mu-var-def:end:
8332
8333 81 0/subop/add %esp 0x10/imm32
8334
8335 5f/pop-to-edi
8336 5b/pop-to-ebx
8337 5a/pop-to-edx
8338 59/pop-to-ecx
8339 58/pop-to-eax
8340
8341 89/<- %esp 5/r32/ebp
8342 5d/pop-to-ebp
8343 c3/return
8344
8345 $parse-mu-var-def:error1:
8346 (rewind-stream *(ebp+8))
8347
8348 (write-buffered *(ebp+0x18) "register variable requires a valid instruction to initialize but got '")
8349 (flush *(ebp+0x18))
8350 (write-stream-data *(ebp+0x18) *(ebp+8))
8351 (write-buffered *(ebp+0x18) "'\n")
8352 (flush *(ebp+0x18))
8353 (stop *(ebp+0x1c) 1)
8354
8355
8356 $parse-mu-var-def:error2:
8357 (rewind-stream *(ebp+8))
8358
8359 (write-buffered *(ebp+0x18) "fn ")
8360 8b/-> *(ebp+0x14) 0/r32/eax
8361 (lookup *eax *(eax+4))
8362 (write-buffered *(ebp+0x18) %eax)
8363 (write-buffered *(ebp+0x18) ": var ")
8364
8365 (lookup *edx *(edx+4))
8366 (lookup *eax *(eax+4))
8367 (write-buffered *(ebp+0x18) %eax)
8368 (write-buffered *(ebp+0x18) ": variables on the stack can't take an initializer\n")
8369 (flush *(ebp+0x18))
8370 (stop *(ebp+0x1c) 1)
8371
8372
8373 test-parse-mu-var-def:
8374
8375
8376 55/push-ebp
8377 89/<- %ebp 4/r32/esp
8378
8379 (clear-stream _test-input-stream)
8380 (write _test-input-stream "n: int\n")
8381 c7 0/subop/copy *Curr-block-depth 1/imm32
8382
8383 68/push 0/imm32
8384 68/push 0/imm32
8385 89/<- %esi 4/r32/esp
8386
8387 81 5/subop/subtract %esp 0xc0/imm32
8388 68/push 0xc0/imm32/size
8389 68/push 0/imm32/top
8390 89/<- %ecx 4/r32/esp
8391 (clear-stack %ecx)
8392
8393 (parse-mu-var-def _test-input-stream %ecx %esi 0 Stderr 0)
8394
8395 (lookup *esi *(esi+4))
8396 89/<- %esi 0/r32/eax
8397
8398 (check-ints-equal *esi 2 "F - test-parse-mu-var-def/tag")
8399
8400 (lookup *(esi+4) *(esi+8))
8401 89/<- %ecx 0/r32/eax
8402
8403 (lookup *ecx *(ecx+4))
8404 (check-strings-equal %eax "n" "F - test-parse-mu-var-def/var-name")
8405
8406 (check-ints-equal *(ecx+0x18) 0 "F - test-parse-mu-var-def/var-register")
8407
8408 (check-ints-equal *(ecx+0x10) 1 "F - test-parse-mu-var-def/output-block-depth")
8409
8410 (lookup *(ecx+8) *(ecx+0xc))
8411 (check-ints-equal *eax 1 "F - test-parse-mu-var-def/var-type:0")
8412 (check-ints-equal *(eax+4) 1 "F - test-parse-mu-var-def/var-type:1")
8413 (check-ints-equal *(eax+0xc) 0 "F - test-parse-mu-var-def/var-type:2")
8414
8415 89/<- %esp 5/r32/ebp
8416 5d/pop-to-ebp
8417 c3/return
8418
8419 test-parse-mu-reg-var-def:
8420
8421
8422 55/push-ebp
8423 89/<- %ebp 4/r32/esp
8424
8425 (clear-stream _test-input-stream)
8426 (write _test-input-stream "n/eax: int <- copy 0\n")
8427 c7 0/subop/copy *Curr-block-depth 1/imm32
8428
8429 68/push 0/imm32
8430 68/push 0/imm32
8431 89/<- %esi 4/r32/esp
8432
8433 81 5/subop/subtract %esp 0xc0/imm32
8434 68/push 0xc0/imm32/size
8435 68/push 0/imm32/top
8436 89/<- %ecx 4/r32/esp
8437 (clear-stack %ecx)
8438
8439 (parse-mu-var-def _test-input-stream %ecx %esi 0 Stderr 0)
8440
8441 (lookup *esi *(esi+4))
8442 89/<- %esi 0/r32/eax
8443
8444 (check-ints-equal *esi 3 "F - test-parse-mu-reg-var-def/tag")
8445
8446
8447 (lookup *(esi+0x14) *(esi+0x18))
8448
8449 (check-ints-equal *(eax+8) 0 "F - test-parse-mu-reg-var-def/single-output")
8450
8451 (lookup *eax *(eax+4))
8452
8453 89/<- %ecx 0/r32/eax
8454
8455 (lookup *ecx *(ecx+4))
8456 (check-strings-equal %eax "n" "F - test-parse-mu-reg-var-def/output-name")
8457
8458 (lookup *(ecx+0x18) *(ecx+0x1c))
8459 (check-strings-equal %eax "eax" "F - test-parse-mu-reg-var-def/output-register")
8460
8461 (check-ints-equal *(ecx+0x10) 1 "F - test-parse-mu-reg-var-def/output-block-depth")
8462
8463 (lookup *(ecx+8) *(ecx+0xc))
8464 (check-ints-equal *eax 1 "F - test-parse-mu-reg-var-def/output-type:0")
8465 (check-ints-equal *(eax+4) 1 "F - test-parse-mu-reg-var-def/output-type:1")
8466 (check-ints-equal *(eax+0xc) 0 "F - test-parse-mu-reg-var-def/output-type:2")
8467
8468 89/<- %esp 5/r32/ebp
8469 5d/pop-to-ebp
8470 c3/return
8471
8472 parse-mu-stmt:
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497 55/push-ebp
8498 89/<- %ebp 4/r32/esp
8499
8500 50/push-eax
8501 51/push-ecx
8502 52/push-edx
8503 53/push-ebx
8504 57/push-edi
8505
8506 68/push 0/imm32/end
8507 68/push 0/imm32/start
8508 89/<- %ecx 4/r32/esp
8509
8510 ba/copy-to-edx 0/imm32/false
8511
8512 68/push 0/imm32
8513 68/push 0/imm32
8514 89/<- %ebx 4/r32/esp
8515
8516 (allocate Heap *Stmt-size *(ebp+0x14))
8517
8518 8b/-> *(ebp+0x14) 7/r32/edi
8519 (lookup *edi *(edi+4))
8520 89/<- %edi 0/r32/eax
8521
8522 c7 0/subop/copy *edi 1/imm32/stmt1
8523 {
8524 (stmt-has-outputs? *(ebp+8))
8525 3d/compare-eax-and 0/imm32/false
8526 0f 84/jump-if-= break/disp32
8527 {
8528 $parse-mu-stmt:read-outputs:
8529
8530 (next-mu-token *(ebp+8) %ecx)
8531
8532 (slice-empty? %ecx)
8533 3d/compare-eax-and 0/imm32/false
8534 0f 85/jump-if-!= break/disp32
8535
8536 (slice-equal? %ecx "<-")
8537 3d/compare-eax-and 0/imm32/false
8538 0f 85/jump-if-!= break/disp32
8539
8540 ba/copy-to-edx 0/imm32/false
8541
8542 8b/-> *ecx 0/r32/eax
8543 8a/copy-byte *eax 0/r32/AL
8544 81 4/subop/and %eax 0xff/imm32
8545 3d/compare-eax-and 0x2a/imm32/asterisk
8546 {
8547 75/jump-if-!= break/disp8
8548 ff 0/subop/increment *ecx
8549 ba/copy-to-edx 1/imm32/true
8550 }
8551
8552 (is-identifier? %ecx)
8553 3d/compare-eax-and 0/imm32/false
8554 0f 84/jump-if-= $parse-mu-stmt:abort/disp32
8555
8556 (lookup-var-or-find-in-fn-outputs %ecx *(ebp+0xc) *(ebp+0x10) %ebx *(ebp+0x18) *(ebp+0x1c))
8557 8d/copy-address *(edi+0x14) 0/r32/eax
8558 (append-stmt-var Heap *ebx *(ebx+4) *(edi+0x14) *(edi+0x18) %edx %eax)
8559
8560 e9/jump loop/disp32
8561 }
8562 }
8563 (add-operation-and-inputs-to-stmt %edi *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x18) *(ebp+0x1c))
8564 $parse-mu-stmt:define-outputs:
8565
8566 (lookup *(edi+0x14) *(edi+0x18))
8567 89/<- %edi 0/r32/eax
8568 {
8569 $parse-mu-stmt:define-outputs-loop:
8570
8571 81 7/subop/compare %edi 0/imm32
8572 74/jump-if-= break/disp8
8573
8574 (maybe-define-var *edi *(edi+4) *(ebp+0xc))
8575
8576
8577 (lookup *(edi+8) *(edi+0xc))
8578 89/<- %edi 0/r32/eax
8579
8580 eb/jump loop/disp8
8581 }
8582 $parse-mu-stmt:end:
8583
8584 81 0/subop/add %esp 0x10/imm32
8585
8586 5f/pop-to-edi
8587 5b/pop-to-ebx
8588 5a/pop-to-edx
8589 59/pop-to-ecx
8590 58/pop-to-eax
8591
8592 89/<- %esp 5/r32/ebp
8593 5d/pop-to-ebp
8594 c3/return
8595
8596 $parse-mu-stmt:abort:
8597
8598 (write-buffered *(ebp+0x18) "invalid identifier '")
8599 (write-slice-buffered *(ebp+0x18) %ecx)
8600 (write-buffered *(ebp+0x18) "'\n")
8601 (flush *(ebp+0x18))
8602 (stop *(ebp+0x1c) 1)
8603
8604
8605 add-operation-and-inputs-to-stmt:
8606
8607
8608
8609
8610
8611
8612
8613
8614 55/push-ebp
8615 89/<- %ebp 4/r32/esp
8616
8617 50/push-eax
8618 51/push-ecx
8619 52/push-edx
8620 53/push-ebx
8621 56/push-esi
8622 57/push-edi
8623
8624 8b/-> *(ebp+8) 7/r32/edi
8625
8626 68/push 0/imm32/end
8627 68/push 0/imm32/start
8628 89/<- %ecx 4/r32/esp
8629
8630 ba/copy-to-edx 0/imm32/false
8631
8632 68/push 0/imm32
8633 68/push 0/imm32
8634 89/<- %esi 4/r32/esp
8635 $add-operation-and-inputs-to-stmt:read-operation:
8636 (next-mu-token *(ebp+0xc) %ecx)
8637 8d/copy-address *(edi+4) 0/r32/eax
8638 (slice-to-string Heap %ecx %eax)
8639
8640 (slice-equal? %ecx "get")
8641 89/<- %ebx 0/r32/eax
8642 {
8643 $add-operation-and-inputs-to-stmt:read-inouts:
8644
8645 (next-mu-token *(ebp+0xc) %ecx)
8646
8647 (slice-empty? %ecx)
8648 3d/compare-eax-and 0/imm32/false
8649 0f 85/jump-if-!= break/disp32
8650
8651 (slice-equal? %ecx "<-")
8652 3d/compare-eax-and 0/imm32/false
8653 0f 85/jump-if-!= $add-operation-and-inputs-to-stmt:abort/disp32
8654
8655 {
8656 81 7/subop/compare %ebx 0/imm32/false
8657 74/jump-if-= break/disp8
8658 (lookup *(edi+0xc) *(edi+0x10))
8659 3d/compare-eax-and 0/imm32
8660 74/jump-if-= break/disp8
8661 (lookup-or-create-constant %eax %ecx %esi)
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672 e9/jump $add-operation-and-inputs-to-stmt:save-var/disp32
8673 }
8674
8675 ba/copy-to-edx 0/imm32/false
8676
8677 8b/-> *ecx 0/r32/eax
8678 8a/copy-byte *eax 0/r32/AL
8679 81 4/subop/and %eax 0xff/imm32
8680 3d/compare-eax-and 0x2a/imm32/asterisk
8681 {
8682 75/jump-if-!= break/disp8
8683 $add-operation-and-inputs-to-stmt:inout-is-deref:
8684 ff 0/subop/increment *ecx
8685 ba/copy-to-edx 1/imm32/true
8686 }
8687 (lookup-var-or-literal %ecx *(ebp+0x10) %esi *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
8688 $add-operation-and-inputs-to-stmt:save-var:
8689 8d/copy-address *(edi+0xc) 0/r32/eax
8690 (append-stmt-var Heap *esi *(esi+4) *(edi+0xc) *(edi+0x10) %edx %eax)
8691
8692 e9/jump loop/disp32
8693 }
8694 $add-operation-and-inputs-to-stmt:end:
8695
8696 81 0/subop/add %esp 0x10/imm32
8697
8698 5f/pop-to-edi
8699 5e/pop-to-esi
8700 5b/pop-to-ebx
8701 5a/pop-to-edx
8702 59/pop-to-ecx
8703 58/pop-to-eax
8704
8705 89/<- %esp 5/r32/ebp
8706 5d/pop-to-ebp
8707 c3/return
8708
8709 $add-operation-and-inputs-to-stmt:abort:
8710
8711 (write-buffered *(ebp+0x18) "fn ")
8712 8b/-> *(ebp+0x14) 0/r32/eax
8713 (lookup *eax *(eax+4))
8714 (write-buffered *(ebp+0x18) %eax)
8715 (rewind-stream *(ebp+0xc))
8716 (write-buffered *(ebp+0x18) ": invalid identifier in '")
8717 (write-stream-data *(ebp+0x18) *(ebp+0xc))
8718 (write-buffered *(ebp+0x18) "'\n")
8719 (flush *(ebp+0x18))
8720 (stop *(ebp+0x1c) 1)
8721
8722
8723 stmt-has-outputs?:
8724
8725 55/push-ebp
8726 89/<- %ebp 4/r32/esp
8727
8728 51/push-ecx
8729
8730 68/push 0/imm32/end
8731 68/push 0/imm32/start
8732 89/<- %ecx 4/r32/esp
8733
8734 b8/copy-to-eax 0/imm32/false
8735 (rewind-stream *(ebp+8))
8736 {
8737 (next-mu-token *(ebp+8) %ecx)
8738
8739 (slice-empty? %ecx)
8740 3d/compare-eax-and 0/imm32/false
8741 b8/copy-to-eax 0/imm32/false/result
8742 0f 85/jump-if-!= break/disp32
8743
8744
8745 8b/-> *ecx 0/r32/eax
8746 8a/copy-byte *eax 0/r32/AL
8747 81 4/subop/and %eax 0xff/imm32
8748
8749 3d/compare-eax-and 0x23/imm32/hash
8750 b8/copy-to-eax 0/imm32/false/result
8751 0f 84/jump-if-= break/disp32
8752
8753 (slice-equal? %ecx "<-")
8754 3d/compare-eax-and 0/imm32/false
8755 74/jump-if-= loop/disp8
8756 b8/copy-to-eax 1/imm32/true
8757 }
8758 $stmt-has-outputs:end:
8759 (rewind-stream *(ebp+8))
8760
8761 81 0/subop/add %esp 8/imm32
8762
8763 59/pop-to-ecx
8764
8765 89/<- %esp 5/r32/ebp
8766 5d/pop-to-ebp
8767 c3/return
8768
8769
8770
8771 lookup-var-or-literal:
8772
8773 55/push-ebp
8774 89/<- %ebp 4/r32/esp
8775
8776 50/push-eax
8777 51/push-ecx
8778 56/push-esi
8779
8780 8b/-> *(ebp+8) 6/r32/esi
8781
8782 (slice-empty? %esi)
8783 3d/compare-eax-and 0/imm32/false
8784 0f 85/jump-if-!= $lookup-var-or-literal:abort/disp32
8785
8786 8b/-> *esi 1/r32/ecx
8787 8a/copy-byte *ecx 1/r32/CL
8788 81 4/subop/and %ecx 0xff/imm32
8789
8790 {
8791 (is-decimal-digit? %ecx)
8792 3d/compare-eax-and 0/imm32/false
8793 74/jump-if-= break/disp8
8794 $lookup-var-or-literal:literal:
8795 (new-literal-integer Heap %esi *(ebp+0x10) *(ebp+0x18) *(ebp+0x1c))
8796 eb/jump $lookup-var-or-literal:end/disp8
8797 }
8798
8799 {
8800 81 7/subop/compare %ecx 0x22/imm32/dquote
8801 75/jump-if-!= break/disp8
8802 $lookup-var-or-literal:literal-string:
8803 (new-literal Heap %esi *(ebp+0x10))
8804 eb/jump $lookup-var-or-literal:end/disp8
8805 }
8806
8807 {
8808 $lookup-var-or-literal:var:
8809 (lookup-var %esi *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
8810 }
8811 $lookup-var-or-literal:end:
8812
8813 5e/pop-to-esi
8814 59/pop-to-ecx
8815 58/pop-to-eax
8816
8817 89/<- %esp 5/r32/ebp
8818 5d/pop-to-ebp
8819 c3/return
8820
8821 $lookup-var-or-literal:abort:
8822 (write-buffered *(ebp+0x18) "fn ")
8823 8b/-> *(ebp+0x14) 0/r32/eax
8824 (lookup *eax *(eax+4))
8825 (write-buffered *(ebp+0x18) %eax)
8826 (write-buffered *(ebp+0x18) ": empty variable!")
8827 (flush *(ebp+0x18))
8828 (stop *(ebp+0x1c) 1)
8829
8830
8831
8832 lookup-var:
8833
8834 55/push-ebp
8835 89/<- %ebp 4/r32/esp
8836
8837 50/push-eax
8838
8839 (lookup-var-helper *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
8840
8841 8b/-> *(ebp+0x10) 0/r32/eax
8842 81 7/subop/compare *eax 0/imm32
8843 74/jump-if-= $lookup-var:abort/disp8
8844 $lookup-var:end:
8845
8846 58/pop-to-eax
8847
8848 89/<- %esp 5/r32/ebp
8849 5d/pop-to-ebp
8850 c3/return
8851
8852 $lookup-var:abort:
8853 (write-buffered *(ebp+0x18) "fn ")
8854 8b/-> *(ebp+0x14) 0/r32/eax
8855 (lookup *eax *(eax+4))
8856 (write-buffered *(ebp+0x18) %eax)
8857 (write-buffered *(ebp+0x18) ": unknown variable '")
8858 (write-slice-buffered *(ebp+0x18) *(ebp+8))
8859 (write-buffered *(ebp+0x18) "'\n")
8860 (flush *(ebp+0x18))
8861 (stop *(ebp+0x1c) 1)
8862
8863
8864
8865
8866 lookup-var-helper:
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877 55/push-ebp
8878 89/<- %ebp 4/r32/esp
8879
8880 50/push-eax
8881 51/push-ecx
8882 52/push-edx
8883 53/push-ebx
8884 56/push-esi
8885 57/push-edi
8886
8887 (zero-out *(ebp+0x10) *Handle-size)
8888
8889 8b/-> *(ebp+0xc) 6/r32/esi
8890
8891 8b/-> *esi 3/r32/ebx
8892
8893 3b/compare<- *(esi+4) 0/r32/eax
8894 0f 8f/jump-if-> $lookup-var-helper:error1/disp32
8895
8896 8d/copy-address *(esi+8) 2/r32/edx
8897
8898 8d/copy-address *(esi+ebx-4) 3/r32/ebx
8899
8900 68/push 0/imm32
8901 68/push 0/imm32
8902 68/push 0/imm32
8903 68/push 0/imm32
8904 68/push 0/imm32
8905 68/push 0/imm32
8906 68/push 0/imm32
8907 68/push 0/imm32
8908 89/<- %edi 4/r32/esp
8909 {
8910 $lookup-var-helper:loop:
8911
8912 39/compare %ebx 2/r32/edx
8913 0f 82/jump-if-addr< break/disp32
8914
8915 (lookup *ebx *(ebx+4))
8916 89/<- %ecx 0/r32/eax
8917
8918 (lookup *ecx *(ecx+4))
8919
8920 (slice-equal? *(ebp+8) %eax)
8921 3d/compare-eax-and 0/imm32/false
8922 {
8923 74/jump-if-= break/disp8
8924 $lookup-var-helper:found:
8925
8926 (lookup *(ecx+0x18) *(ecx+0x1c))
8927 3d/compare-eax-and 0/imm32
8928 {
8929 74/jump-if-= break/disp8
8930 $lookup-var-helper:found-register:
8931
8932 (get Mu-registers %eax 0xc "Mu-registers")
8933 8b/-> *eax 0/r32/eax
8934
8935 8b/-> *(edi+eax<<2) 0/r32/eax
8936 3d/compare-eax-and 0/imm32
8937 0f 85/jump-if-!= $lookup-var-helper:error2/disp32
8938 }
8939 $lookup-var-helper:return:
8940
8941 8b/-> *(ebp+0x10) 6/r32/esi
8942
8943 8b/-> *ebx 0/r32/eax
8944 89/<- *esi 0/r32/eax
8945 8b/-> *(ebx+4) 0/r32/eax
8946 89/<- *(esi+4) 0/r32/eax
8947
8948 eb/jump $lookup-var-helper:end/disp8
8949 }
8950
8951
8952 (lookup *(ecx+0x18) *(ecx+0x1c))
8953
8954 3d/compare-eax-and 0/imm32
8955 74/jump-if-= $lookup-var-helper:continue/disp8
8956
8957 (get Mu-registers %eax 0xc "Mu-registers")
8958 8b/-> *eax 0/r32/eax
8959
8960 81 7/subop/compare *(edi+eax<<2) 0/imm32
8961 75/jump-if-!= $lookup-var-helper:continue/disp8
8962 89/<- *(edi+eax<<2) 1/r32/ecx
8963 $lookup-var-helper:continue:
8964
8965 81 5/subop/subtract %ebx 0xc/imm32
8966 e9/jump loop/disp32
8967 }
8968 $lookup-var-helper:end:
8969
8970 81 0/subop/add %esp 0x20/imm32
8971
8972 5f/pop-to-edi
8973 5e/pop-to-esi
8974 5b/pop-to-ebx
8975 5a/pop-to-edx
8976 59/pop-to-ecx
8977 58/pop-to-eax
8978
8979 89/<- %esp 5/r32/ebp
8980 5d/pop-to-ebp
8981 c3/return
8982
8983 $lookup-var-helper:error1:
8984 (write-buffered *(ebp+0x18) "fn ")
8985 8b/-> *(ebp+0x14) 0/r32/eax
8986 (lookup *eax *(eax+4))
8987 (write-buffered *(ebp+0x18) %eax)
8988 (write-buffered *(ebp+0x18) ": malformed stack when looking up '")
8989 (write-slice-buffered *(ebp+0x18) *(ebp+8))
8990 (write-buffered *(ebp+0x18) "'\n")
8991 (flush *(ebp+0x18))
8992 (stop *(ebp+0x1c) 1)
8993
8994
8995 $lookup-var-helper:error2:
8996
8997 (write-buffered *(ebp+0x18) "fn ")
8998 50/push-eax
8999 8b/-> *(ebp+0x14) 0/r32/eax
9000 (lookup *eax *(eax+4))
9001 (write-buffered *(ebp+0x18) %eax)
9002 58/pop-eax
9003 (write-buffered *(ebp+0x18) ": register ")
9004 50/push-eax
9005 (lookup *(eax+0x18) *(eax+0x1c))
9006 (write-buffered *(ebp+0x18) %eax)
9007 58/pop-to-eax
9008 (write-buffered *(ebp+0x18) " reads var '")
9009 (write-slice-buffered *(ebp+0x18) *(ebp+8))
9010 (write-buffered *(ebp+0x18) "' after writing var '")
9011 (lookup *eax *(eax+4))
9012 (write-buffered *(ebp+0x18) %eax)
9013 (write-buffered *(ebp+0x18) "'\n")
9014 (flush *(ebp+0x18))
9015 (stop *(ebp+0x1c) 1)
9016
9017
9018 dump-vars:
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028 55/push-ebp
9029 89/<- %ebp 4/r32/esp
9030
9031 52/push-edx
9032 53/push-ebx
9033 56/push-esi
9034
9035 8b/-> *(ebp+8) 6/r32/esi
9036
9037 8b/-> *esi 3/r32/ebx
9038
9039 8d/copy-address *(esi+8) 2/r32/edx
9040
9041 8d/copy-address *(esi+ebx-4) 3/r32/ebx
9042 {
9043 $dump-vars:loop:
9044
9045 39/compare %ebx 2/r32/edx
9046 0f 82/jump-if-addr< break/disp32
9047
9048 (write-buffered Stderr " var@")
9049 (dump-var 2 %ebx)
9050
9051 81 5/subop/subtract %ebx 0xc/imm32
9052 e9/jump loop/disp32
9053 }
9054 $dump-vars:end:
9055
9056 5e/pop-to-esi
9057 5b/pop-to-ebx
9058 5a/pop-to-edx
9059
9060 89/<- %esp 5/r32/ebp
9061 5d/pop-to-ebp
9062 c3/return
9063
9064 == data
9065
9066 Mu-registers:
9067
9068 0x48/imm32/write
9069 0/imm32/read
9070 0x48/imm32/length
9071
9072
9073 0x11/imm32/alloc-id $Mu-register-eax/imm32 0/imm32
9074 0x11/imm32/alloc-id $Mu-register-ecx/imm32 1/imm32
9075 0x11/imm32/alloc-id $Mu-register-edx/imm32 2/imm32
9076 0x11/imm32/alloc-id $Mu-register-ebx/imm32 3/imm32
9077 0x11/imm32/alloc-id $Mu-register-esi/imm32 6/imm32
9078 0x11/imm32/alloc-id $Mu-register-edi/imm32 7/imm32
9079
9080 $Mu-register-eax:
9081 0x11/imm32/alloc-id
9082 3/imm32/size
9083 0x65/e 0x61/a 0x78/x
9084
9085 $Mu-register-ecx:
9086 0x11/imm32/alloc-id
9087 3/imm32/size
9088 0x65/e 0x63/c 0x78/x
9089
9090 $Mu-register-edx:
9091 0x11/imm32/alloc-id
9092 3/imm32/size
9093 0x65/e 0x64/d 0x78/x
9094
9095 $Mu-register-ebx:
9096 0x11/imm32/alloc-id
9097 3/imm32/size
9098 0x65/e 0x62/b 0x78/x
9099
9100 $Mu-register-esi:
9101 0x11/imm32/alloc-id
9102 3/imm32/size
9103 0x65/e 0x73/s 0x69/i
9104
9105 $Mu-register-edi:
9106 0x11/imm32/alloc-id
9107 3/imm32/size
9108 0x65/e 0x64/d 0x69/i
9109
9110 == code
9111
9112
9113 lookup-var-or-find-in-fn-outputs:
9114
9115 55/push-ebp
9116 89/<- %ebp 4/r32/esp
9117
9118 50/push-eax
9119
9120 (lookup-var-helper *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x10) *(ebp+0x18) *(ebp+0x1c))
9121 {
9122
9123 8b/-> *(ebp+0x14) 0/r32/eax
9124 81 7/subop/compare *eax 0/imm32
9125 75/jump-if-!= break/disp8
9126
9127 (find-in-function-outputs *(ebp+0x10) *(ebp+8) *(ebp+0x14))
9128 8b/-> *(ebp+0x14) 0/r32/eax
9129 81 7/subop/compare *eax 0/imm32
9130
9131 0f 84/jump-if-= $lookup-or-define-var:abort/disp32
9132 }
9133 $lookup-or-define-var:end:
9134
9135 58/pop-to-eax
9136
9137 89/<- %esp 5/r32/ebp
9138 5d/pop-to-ebp
9139 c3/return
9140
9141 $lookup-or-define-var:abort:
9142 (write-buffered *(ebp+0x18) "unknown variable '")
9143 (write-slice-buffered *(ebp+0x18) *(ebp+8))
9144 (write-buffered *(ebp+0x18) "'\n")
9145 (flush *(ebp+0x18))
9146 (stop *(ebp+0x1c) 1)
9147
9148
9149 find-in-function-outputs:
9150
9151 55/push-ebp
9152 89/<- %ebp 4/r32/esp
9153
9154 50/push-eax
9155 51/push-ecx
9156
9157 8b/-> *(ebp+8) 1/r32/ecx
9158 (lookup *(ecx+0x10) *(ecx+0x14))
9159 89/<- %ecx 0/r32/eax
9160
9161 {
9162 81 7/subop/compare %ecx 0/imm32
9163 74/jump-if-= break/disp8
9164
9165 (lookup *ecx *(ecx+4))
9166
9167 (lookup *eax *(eax+4))
9168
9169 (slice-equal? *(ebp+0xc) %eax)
9170 3d/compare-eax-and 0/imm32/false
9171 {
9172 74/jump-if-= break/disp8
9173
9174 57/push-edi
9175 8b/-> *(ebp+0x10) 7/r32/edi
9176
9177 8b/-> *ecx 0/r32/eax
9178 89/<- *edi 0/r32/eax
9179 8b/-> *(ecx+4) 0/r32/eax
9180 89/<- *(edi+4) 0/r32/eax
9181
9182 5f/pop-to-edi
9183 eb/jump $find-in-function-outputs:end/disp8
9184 }
9185
9186 (lookup *(ecx+8) *(ecx+0xc))
9187 89/<- %ecx 0/r32/eax
9188
9189 eb/jump loop/disp8
9190 }
9191 b8/copy-to-eax 0/imm32
9192 $find-in-function-outputs:end:
9193
9194 59/pop-to-ecx
9195 58/pop-to-eax
9196
9197 89/<- %esp 5/r32/ebp
9198 5d/pop-to-ebp
9199 c3/return
9200
9201
9202 maybe-define-var:
9203
9204 55/push-ebp
9205 89/<- %ebp 4/r32/esp
9206
9207 50/push-eax
9208
9209 (lookup *(ebp+8) *(ebp+0xc))
9210
9211 (binding-exists? %eax *(ebp+0x10))
9212 3d/compare-eax-and 0/imm32/false
9213 75/jump-if-!= $maybe-define-var:end/disp8
9214
9215 (push *(ebp+0x10) *(ebp+8))
9216 (push *(ebp+0x10) *(ebp+0xc))
9217 (push *(ebp+0x10) 0)
9218 $maybe-define-var:end:
9219
9220 58/pop-to-eax
9221
9222 89/<- %esp 5/r32/ebp
9223 5d/pop-to-ebp
9224 c3/return
9225
9226
9227 binding-exists?:
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239 55/push-ebp
9240 89/<- %ebp 4/r32/esp
9241
9242 51/push-ecx
9243 52/push-edx
9244 56/push-esi
9245
9246 8b/-> *(ebp+8) 0/r32/eax
9247 (lookup *eax *(eax+4))
9248 89/<- %ecx 0/r32/eax
9249
9250 8b/-> *(ebp+0xc) 6/r32/esi
9251
9252 8b/-> *esi 0/r32/eax
9253
9254 8d/copy-address *(esi+8) 2/r32/edx
9255
9256 8d/copy-address *(esi+eax-4) 6/r32/esi
9257 {
9258 $binding-exists?:loop:
9259
9260 39/compare %esi 2/r32/edx
9261 0f 82/jump-if-addr< break/disp32
9262
9263 (lookup *esi *(esi+4))
9264
9265 (lookup *eax *(eax+4))
9266
9267 (string-equal? %ecx %eax)
9268 3d/compare-eax-and 0/imm32/false
9269 75/jump-if-!= $binding-exists?:end/disp8
9270
9271 81 5/subop/subtract %esi 0xc/imm32
9272 e9/jump loop/disp32
9273 }
9274 b8/copy-to-eax 0/imm32/false
9275 $binding-exists?:end:
9276
9277 5e/pop-to-esi
9278 5a/pop-to-edx
9279 59/pop-to-ecx
9280
9281 89/<- %esp 5/r32/ebp
9282 5d/pop-to-ebp
9283 c3/return
9284
9285 test-parse-mu-stmt:
9286
9287 55/push-ebp
9288 89/<- %ebp 4/r32/esp
9289
9290 (clear-stream _test-input-stream)
9291 (write _test-input-stream "increment n\n")
9292
9293 81 5/subop/subtract %esp 0xc0/imm32
9294 68/push 0xc0/imm32/size
9295 68/push 0/imm32/top
9296 89/<- %ecx 4/r32/esp
9297 (clear-stack %ecx)
9298
9299 68/push 0/imm32
9300 68/push 0/imm32
9301 89/<- %edx 4/r32/esp
9302
9303 68/push 0/imm32
9304 68/push 0/imm32
9305 89/<- %eax 4/r32/esp
9306
9307 (copy-array Heap "n" %eax)
9308 (new-var Heap *eax *(eax+4) %edx)
9309
9310 (push %ecx *edx)
9311 (push %ecx *(edx+4))
9312 (push %ecx 0)
9313
9314 68/push 0/imm32
9315 68/push 0/imm32
9316 89/<- %eax 4/r32/esp
9317
9318 (parse-mu-stmt _test-input-stream %ecx 0 %eax Stderr 0)
9319
9320 (lookup *eax *(eax+4))
9321 89/<- %edx 0/r32/eax
9322
9323 (check-ints-equal *edx 1 "F - test-parse-mu-stmt/tag")
9324
9325 (lookup *(edx+4) *(edx+8))
9326 (check-strings-equal %eax "increment" "F - test-parse-mu-stmt/name")
9327
9328
9329 (lookup *(edx+0xc) *(edx+0x10))
9330
9331 (lookup *eax *(eax+4))
9332
9333 (lookup *eax *(eax+4))
9334
9335 (check-strings-equal %eax "n" "F - test-parse-mu-stmt/inout:0")
9336
9337 89/<- %esp 5/r32/ebp
9338 5d/pop-to-ebp
9339 c3/return
9340
9341 test-parse-mu-stmt-with-comma:
9342
9343 55/push-ebp
9344 89/<- %ebp 4/r32/esp
9345
9346 (clear-stream _test-input-stream)
9347 (write _test-input-stream "copy-to n, 3\n")
9348
9349 81 5/subop/subtract %esp 0xc0/imm32
9350 68/push 0xc0/imm32/size
9351 68/push 0/imm32/top
9352 89/<- %ecx 4/r32/esp
9353 (clear-stack %ecx)
9354
9355 68/push 0/imm32
9356 68/push 0/imm32
9357 89/<- %edx 4/r32/esp
9358
9359 68/push 0/imm32
9360 68/push 0/imm32
9361 89/<- %eax 4/r32/esp
9362
9363 (copy-array Heap "n" %eax)
9364 (new-var Heap *eax *(eax+4) %edx)
9365
9366 (push %ecx *edx)
9367 (push %ecx *(edx+4))
9368 (push %ecx 0)
9369
9370 68/push 0/imm32
9371 68/push 0/imm32
9372 89/<- %eax 4/r32/esp
9373
9374 (parse-mu-stmt _test-input-stream %ecx 0 %eax Stderr 0)
9375
9376 (lookup *eax *(eax+4))
9377 89/<- %edx 0/r32/eax
9378
9379 (check-ints-equal *edx 1 "F - test-parse-mu-stmt-with-comma/tag")
9380
9381 (lookup *(edx+4) *(edx+8))
9382 (check-strings-equal %eax "copy-to" "F - test-parse-mu-stmt-with-comma/name")
9383
9384
9385 (lookup *(edx+0xc) *(edx+0x10))
9386
9387 (lookup *eax *(eax+4))
9388
9389 (lookup *eax *(eax+4))
9390
9391 (check-strings-equal %eax "n" "F - test-parse-mu-stmt-with-comma/inout:0")
9392
9393 89/<- %esp 5/r32/ebp
9394 5d/pop-to-ebp
9395 c3/return
9396
9397 new-var:
9398
9399 55/push-ebp
9400 89/<- %ebp 4/r32/esp
9401
9402 50/push-eax
9403 51/push-ecx
9404
9405 8b/-> *(ebp+0x14) 1/r32/ecx
9406
9407 (allocate *(ebp+8) *Var-size %ecx)
9408
9409 (lookup *ecx *(ecx+4))
9410
9411 8b/-> *(ebp+0xc) 1/r32/ecx
9412 89/<- *eax 1/r32/ecx
9413 8b/-> *(ebp+0x10) 1/r32/ecx
9414 89/<- *(eax+4) 1/r32/ecx
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424 $new-var:end:
9425
9426 59/pop-to-ecx
9427 58/pop-to-eax
9428
9429 89/<- %esp 5/r32/ebp
9430 5d/pop-to-ebp
9431 c3/return
9432
9433 new-literal-integer:
9434
9435 55/push-ebp
9436 89/<- %ebp 4/r32/esp
9437
9438 50/push-eax
9439 51/push-ecx
9440
9441 (is-hex-int? *(ebp+0xc))
9442 3d/compare-eax-and 0/imm32/false
9443 0f 84/jump-if-= $new-literal-integer:abort/disp32
9444
9445 (new-var-from-slice *(ebp+8) *(ebp+0xc) *(ebp+0x10))
9446
9447 8b/-> *(ebp+0x10) 0/r32/eax
9448 (lookup *eax *(eax+4))
9449 89/<- %ecx 0/r32/eax
9450
9451 8b/-> *Curr-block-depth 0/r32/eax
9452 89/<- *(ecx+0x10) 0/r32/eax
9453
9454 8d/copy-address *(ecx+8) 0/r32/eax
9455 (allocate *(ebp+8) *Type-tree-size %eax)
9456 (lookup *(ecx+8) *(ecx+0xc))
9457 c7 0/subop/copy *eax 1/imm32/true
9458
9459 $new-literal-integer:end:
9460
9461 81 0/subop/add %esp 8/imm32
9462
9463 59/pop-to-ecx
9464 58/pop-to-eax
9465
9466 89/<- %esp 5/r32/ebp
9467 5d/pop-to-ebp
9468 c3/return
9469
9470 $new-literal-integer:abort:
9471 (write-buffered *(ebp+0x18) "fn ")
9472 8b/-> *(ebp+0x14) 0/r32/eax
9473 (lookup *eax *(eax+4))
9474 (write-buffered *(ebp+0x18) %eax)
9475 (write-buffered *(ebp+0x18) ": variable cannot begin with a digit '")
9476 (write-slice-buffered *(ebp+0x18) *(ebp+0xc))
9477 (write-buffered *(ebp+0x18) "'\n")
9478 (flush *(ebp+0x18))
9479 (stop *(ebp+0x1c) 1)
9480
9481
9482 new-literal:
9483
9484 55/push-ebp
9485 89/<- %ebp 4/r32/esp
9486
9487 50/push-eax
9488 51/push-ecx
9489
9490 68/push 0/imm32
9491 68/push 0/imm32
9492 89/<- %ecx 4/r32/esp
9493
9494 (slice-to-string Heap *(ebp+0xc) %ecx)
9495
9496 (new-var *(ebp+8) *ecx *(ecx+4) *(ebp+0x10))
9497
9498 8b/-> *(ebp+0x10) 1/r32/ecx
9499 (lookup *ecx *(ecx+4))
9500 89/<- %ecx 0/r32/eax
9501
9502 8b/-> *Curr-block-depth 0/r32/eax
9503 89/<- *(ecx+0x10) 0/r32/eax
9504
9505 8d/copy-address *(ecx+8) 0/r32/eax
9506 (allocate *(ebp+8) *Type-tree-size %eax)
9507 (lookup *(ecx+8) *(ecx+0xc))
9508
9509 c7 0/subop/copy *eax 1/imm32/true
9510 $new-literal:end:
9511
9512 81 0/subop/add %esp 8/imm32
9513
9514 59/pop-to-ecx
9515 58/pop-to-eax
9516
9517 89/<- %esp 5/r32/ebp
9518 5d/pop-to-ebp
9519 c3/return
9520
9521 new-var-from-slice:
9522
9523 55/push-ebp
9524 89/<- %ebp 4/r32/esp
9525
9526 51/push-ecx
9527
9528 68/push 0/imm32
9529 68/push 0/imm32
9530 89/<- %ecx 4/r32/esp
9531
9532 (slice-to-string Heap *(ebp+0xc) %ecx)
9533
9534 (new-var *(ebp+8) *ecx *(ecx+4) *(ebp+0x10))
9535 $new-var-from-slice:end:
9536
9537 81 0/subop/add %esp 8/imm32
9538
9539 59/pop-to-ecx
9540
9541 89/<- %esp 5/r32/ebp
9542 5d/pop-to-ebp
9543 c3/return
9544
9545 new-var-def:
9546
9547 55/push-ebp
9548 89/<- %ebp 4/r32/esp
9549
9550 50/push-eax
9551 51/push-ecx
9552
9553 (allocate *(ebp+8) *Stmt-size *(ebp+0x14))
9554
9555 8b/-> *(ebp+0x14) 0/r32/eax
9556 (lookup *eax *(eax+4))
9557
9558 c7 0/subop/copy *eax 2/imm32/tag/var-on-stack
9559
9560 8b/-> *(ebp+0xc) 1/r32/ecx
9561 89/<- *(eax+4) 1/r32/ecx
9562 8b/-> *(ebp+0x10) 1/r32/ecx
9563 89/<- *(eax+8) 1/r32/ecx
9564 $new-var-def:end:
9565
9566 59/pop-to-ecx
9567 58/pop-to-eax
9568
9569 89/<- %esp 5/r32/ebp
9570 5d/pop-to-ebp
9571 c3/return
9572
9573 new-reg-var-def:
9574
9575 55/push-ebp
9576 89/<- %ebp 4/r32/esp
9577
9578 50/push-eax
9579
9580 8b/-> *(ebp+0x14) 0/r32/eax
9581
9582 (allocate *(ebp+8) *Stmt-size %eax)
9583
9584 (lookup *eax *(eax+4))
9585
9586 c7 0/subop/copy *eax 3/imm32/tag/var-in-register
9587
9588 8d/copy-address *(eax+0x14) 0/r32/eax
9589 (append-stmt-var Heap *(ebp+0xc) *(ebp+0x10) 0 0 0 %eax)
9590 $new-reg-var-def:end:
9591
9592 58/pop-to-eax
9593
9594 89/<- %esp 5/r32/ebp
9595 5d/pop-to-ebp
9596 c3/return
9597
9598 append-list:
9599
9600 55/push-ebp
9601 89/<- %ebp 4/r32/esp
9602
9603 50/push-eax
9604 51/push-ecx
9605 57/push-edi
9606
9607 8b/-> *(ebp+0x1c) 7/r32/edi
9608
9609 (allocate *(ebp+8) *List-size %edi)
9610
9611 (lookup *edi *(edi+4))
9612 89/<- %edi 0/r32/eax
9613
9614 8b/-> *(ebp+0xc) 0/r32/eax
9615 89/<- *edi 0/r32/eax
9616 8b/-> *(ebp+0x10) 0/r32/eax
9617 89/<- *(edi+4) 0/r32/eax
9618
9619 81 7/subop/compare *(ebp+0x14) 0/imm32
9620 74/jump-if-= $append-list:end/disp8
9621
9622 $append-list:non-empty-list:
9623
9624 (lookup *(ebp+0x14) *(ebp+0x18))
9625
9626 {
9627 81 7/subop/compare *(eax+8) 0/imm32
9628 74/jump-if-= break/disp8
9629
9630 (lookup *(eax+8) *(eax+0xc))
9631
9632 eb/jump loop/disp8
9633 }
9634
9635 8b/-> *(ebp+0x1c) 7/r32/edi
9636
9637 8b/-> *edi 1/r32/ecx
9638 89/<- *(eax+8) 1/r32/ecx
9639 8b/-> *(edi+4) 1/r32/ecx
9640 89/<- *(eax+0xc) 1/r32/ecx
9641
9642 8b/-> *(ebp+0x14) 1/r32/ecx
9643 89/<- *edi 1/r32/ecx
9644 8b/-> *(ebp+0x18) 1/r32/ecx
9645 89/<- *(edi+4) 1/r32/ecx
9646 $append-list:end:
9647
9648 5f/pop-to-edi
9649 59/pop-to-ecx
9650 58/pop-to-eax
9651
9652 89/<- %esp 5/r32/ebp
9653 5d/pop-to-ebp
9654 c3/return
9655
9656 append-stmt-var:
9657
9658 55/push-ebp
9659 89/<- %ebp 4/r32/esp
9660
9661 50/push-eax
9662 51/push-ecx
9663 57/push-edi
9664
9665 8b/-> *(ebp+0x20) 7/r32/edi
9666
9667 (allocate *(ebp+8) *Stmt-var-size %edi)
9668
9669 (lookup *edi *(edi+4))
9670 89/<- %ecx 0/r32/eax
9671
9672 8b/-> *(ebp+0xc) 0/r32/eax
9673 89/<- *ecx 0/r32/eax
9674 8b/-> *(ebp+0x10) 0/r32/eax
9675 89/<- *(ecx+4) 0/r32/eax
9676
9677 8b/-> *(ebp+0x1c) 0/r32/eax
9678 89/<- *(ecx+0x10) 0/r32/eax
9679
9680 81 7/subop/compare *(ebp+0x14) 0/imm32/null
9681 74/jump-if-= $append-stmt-var:end/disp8
9682
9683
9684 (lookup *(ebp+0x14) *(ebp+0x18))
9685
9686 {
9687 81 7/subop/compare *(eax+8) 0/imm32
9688 74/jump-if-= break/disp8
9689
9690 (lookup *(eax+8) *(eax+0xc))
9691
9692 eb/jump loop/disp8
9693 }
9694
9695 8b/-> *edi 1/r32/ecx
9696 89/<- *(eax+8) 1/r32/ecx
9697 8b/-> *(edi+4) 1/r32/ecx
9698 89/<- *(eax+0xc) 1/r32/ecx
9699
9700 8b/-> *(ebp+0x14) 1/r32/ecx
9701 89/<- *edi 1/r32/ecx
9702 8b/-> *(ebp+0x18) 1/r32/ecx
9703 89/<- *(edi+4) 1/r32/ecx
9704 $append-stmt-var:end:
9705
9706 5f/pop-to-edi
9707 59/pop-to-ecx
9708 58/pop-to-eax
9709
9710 89/<- %esp 5/r32/ebp
9711 5d/pop-to-ebp
9712 c3/return
9713
9714 append-to-block:
9715
9716 55/push-ebp
9717 89/<- %ebp 4/r32/esp
9718
9719 50/push-eax
9720 56/push-esi
9721
9722 8b/-> *(ebp+0xc) 6/r32/esi
9723
9724 8d/copy-address *(esi+4) 0/r32/eax
9725 (append-list *(ebp+8) *(ebp+0x10) *(ebp+0x14) *(esi+4) *(esi+8) %eax)
9726 $append-to-block:end:
9727
9728 5e/pop-to-esi
9729 58/pop-to-eax
9730
9731 89/<- %esp 5/r32/ebp
9732 5d/pop-to-ebp
9733 c3/return
9734
9735
9736
9737
9738
9739
9740
9741 lookup-or-create-constant:
9742
9743 55/push-ebp
9744 89/<- %ebp 4/r32/esp
9745
9746 50/push-eax
9747 56/push-esi
9748
9749 (container-type *(ebp+8))
9750 89/<- %esi 0/r32/eax
9751
9752 68/push 0/imm32
9753 68/push 0/imm32
9754 89/<- %eax 4/r32/esp
9755 (find-or-create-typeinfo %esi %eax)
9756
9757 (lookup *eax *(eax+4))
9758
9759
9760
9761
9762
9763 (find-or-create-typeinfo-output-var %eax *(ebp+0xc) *(ebp+0x10))
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777 $lookup-or-create-constant:end:
9778
9779 81 0/subop/add %esp 8/imm32
9780
9781 5e/pop-to-esi
9782 58/pop-to-eax
9783
9784 89/<- %esp 5/r32/ebp
9785 5d/pop-to-ebp
9786 c3/return
9787
9788
9789
9790
9791
9792 container-type:
9793
9794 55/push-ebp
9795 89/<- %ebp 4/r32/esp
9796
9797 8b/-> *(ebp+8) 0/r32/eax
9798 (lookup *eax *(eax+4))
9799 (lookup *(eax+8) *(eax+0xc))
9800 {
9801 81 7/subop/compare *(eax+8) 0/imm32
9802 74/jump-if-= break/disp8
9803 (lookup *(eax+0xc) *(eax+0x10))
9804 (lookup *(eax+4) *(eax+8))
9805 }
9806 8b/-> *(eax+4) 0/r32/eax
9807 $container-type:end:
9808
9809 89/<- %esp 5/r32/ebp
9810 5d/pop-to-ebp
9811 c3/return
9812
9813 is-container?:
9814
9815 55/push-ebp
9816 89/<- %ebp 4/r32/esp
9817
9818 8b/-> *(ebp+8) 0/r32/eax
9819 c1/shift 4/subop/left %eax 2/imm8
9820 3b/compare 0/r32/eax *Primitive-type-ids
9821 0f 9d/set-if->= %al
9822 81 4/subop/and %eax 0xff/imm32
9823 $is-container?:end:
9824
9825 89/<- %esp 5/r32/ebp
9826 5d/pop-to-ebp
9827 c3/return
9828
9829 find-or-create-typeinfo:
9830
9831 55/push-ebp
9832 89/<- %ebp 4/r32/esp
9833
9834 50/push-eax
9835 51/push-ecx
9836 52/push-edx
9837 57/push-edi
9838
9839 8b/-> *(ebp+0xc) 7/r32/edi
9840
9841 68/push 0/imm32
9842 68/push 0/imm32
9843 89/<- %ecx 4/r32/esp
9844
9845 (find-typeinfo *(ebp+8) %edi)
9846 {
9847
9848 81 7/subop/compare *edi 0/imm32
9849 0f 85/jump-if-!= break/disp32
9850 $find-or-create-typeinfo:create:
9851
9852 (allocate Heap *Typeinfo-size %edi)
9853
9854 (lookup *edi *(edi+4))
9855
9856
9857
9858
9859
9860
9861
9862 8b/-> *(ebp+8) 2/r32/edx
9863 89/<- *eax 2/r32/edx
9864
9865
9866 (new-stream Heap 0x40 *Typeinfo-fields-row-size %ecx)
9867
9868 8b/-> *ecx 2/r32/edx
9869 89/<- *(eax+4) 2/r32/edx
9870 8b/-> *(ecx+4) 2/r32/edx
9871 89/<- *(eax+8) 2/r32/edx
9872
9873 8b/-> *_Program-types 1/r32/ecx
9874 89/<- *(eax+0x10) 1/r32/ecx
9875 8b/-> *_Program-types->payload 1/r32/ecx
9876 89/<- *(eax+0x14) 1/r32/ecx
9877
9878 8b/-> *edi 1/r32/ecx
9879 89/<- *_Program-types 1/r32/ecx
9880 8b/-> *(edi+4) 1/r32/ecx
9881 89/<- *_Program-types->payload 1/r32/ecx
9882 }
9883 $find-or-create-typeinfo:end:
9884
9885 81 0/subop/add %esp 8/imm32
9886
9887 5f/pop-to-edi
9888 5a/pop-to-edx
9889 59/pop-to-ecx
9890 58/pop-to-eax
9891
9892 89/<- %esp 5/r32/ebp
9893 5d/pop-to-ebp
9894 c3/return
9895
9896 find-typeinfo:
9897
9898 55/push-ebp
9899 89/<- %ebp 4/r32/esp
9900
9901 50/push-eax
9902 51/push-ecx
9903 52/push-edx
9904 57/push-edi
9905
9906 8b/-> *(ebp+8) 1/r32/ecx
9907
9908 8b/-> *(ebp+0xc) 7/r32/edi
9909
9910 8b/-> *_Program-types 0/r32/eax
9911 89/<- *edi 0/r32/eax
9912 8b/-> *_Program-types->payload 0/r32/eax
9913 89/<- *(edi+4) 0/r32/eax
9914 {
9915 $find-typeinfo:loop:
9916
9917 81 7/subop/compare *edi 0/imm32
9918 74/jump-if-= break/disp8
9919 $find-typeinfo:check:
9920
9921 (lookup *edi *(edi+4))
9922
9923 39/compare *eax 1/r32/ecx
9924 74/jump-if-= break/disp8
9925 $find-typeinfo:continue:
9926
9927 8b/-> *(eax+0x10) 2/r32/edx
9928 89/<- *edi 2/r32/edx
9929 8b/-> *(eax+0x14) 2/r32/edx
9930 89/<- *(edi+4) 2/r32/edx
9931
9932 eb/jump loop/disp8
9933 }
9934 $find-typeinfo:end:
9935
9936 5f/pop-to-edi
9937 5a/pop-to-edx
9938 59/pop-to-ecx
9939 58/pop-to-eax
9940
9941 89/<- %esp 5/r32/ebp
9942 5d/pop-to-ebp
9943 c3/return
9944
9945 find-or-create-typeinfo-output-var:
9946
9947 55/push-ebp
9948 89/<- %ebp 4/r32/esp
9949
9950 50/push-eax
9951 52/push-edx
9952 57/push-edi
9953
9954 68/push 0/imm32
9955 68/push 0/imm32
9956 89/<- %edi 4/r32/esp
9957
9958 (find-or-create-typeinfo-fields *(ebp+8) *(ebp+0xc) %edi)
9959
9960 (lookup *edi *(edi+4))
9961 89/<- %edi 0/r32/eax
9962
9963 {
9964 81 7/subop/compare *(edi+0xc) 0/imm32
9965 0f 85/jump-if-!= break/disp32
9966
9967
9968 68/push 0/imm32
9969 68/push 0/imm32
9970 89/<- %eax 4/r32/esp
9971 (slice-to-string Heap *(ebp+0xc) %eax)
9972
9973 8d/copy-address *(edi+0xc) 2/r32/edx
9974 (new-var Heap *eax *(eax+4) %edx)
9975
9976 81 0/subop/add %esp 8/imm32
9977
9978 (lookup *(edi+0xc) *(edi+0x10))
9979 89/<- %edx 0/r32/eax
9980
9981 8d/copy-address *(edx+8) 0/r32/eax
9982 (allocate Heap *Type-tree-size %eax)
9983 (lookup *(edx+8) *(edx+0xc))
9984 c7 0/subop/copy *eax 1/imm32/true
9985 c7 0/subop/copy *(eax+4) 6/imm32/constant
9986 c7 0/subop/copy *(eax+8) 0/imm32
9987 c7 0/subop/copy *(eax+0xc) 0/imm32
9988 c7 0/subop/copy *(eax+0x10) 0/imm32
9989
9990 c7 0/subop/copy *(edx+0x14) -1/imm32/uninitialized
9991 }
9992
9993 8b/-> *(ebp+0x10) 2/r32/edx
9994 8b/-> *(edi+0xc) 0/r32/eax
9995 89/<- *edx 0/r32/eax
9996 8b/-> *(edi+0x10) 0/r32/eax
9997 89/<- *(edx+4) 0/r32/eax
9998 $find-or-create-typeinfo-output-var:end:
9999
10000 81 0/subop/add %esp 8/imm32
10001
10002 5f/pop-to-edi
10003 5a/pop-to-edx
10004 58/pop-to-eax
10005
10006 89/<- %esp 5/r32/ebp
10007 5d/pop-to-ebp
10008 c3/return
10009
10010 find-or-create-typeinfo-fields:
10011
10012 55/push-ebp
10013 89/<- %ebp 4/r32/esp
10014
10015 50/push-eax
10016 56/push-esi
10017 57/push-edi
10018
10019 8b/-> *(ebp+8) 0/r32/eax
10020 (lookup *(eax+4) *(eax+8))
10021
10022 8b/-> *(ebp+0x10) 7/r32/edi
10023
10024 (get-or-insert-slice %eax *(ebp+0xc) *Typeinfo-fields-row-size Heap)
10025 89/<- %esi 0/r32/eax
10026
10027 {
10028 81 7/subop/compare *esi 0/imm32
10029 75/jump-if-!= break/disp8
10030 (allocate Heap *Typeinfo-entry-size %esi)
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046 }
10047
10048
10049 8b/-> *esi 0/r32/eax
10050 89/<- *edi 0/r32/eax
10051 8b/-> *(esi+4) 0/r32/eax
10052 89/<- *(edi+4) 0/r32/eax
10053 $find-or-create-typeinfo-fields:end:
10054
10055 5f/pop-to-edi
10056 5e/pop-to-esi
10057 58/pop-to-eax
10058
10059 89/<- %esp 5/r32/ebp
10060 5d/pop-to-ebp
10061 c3/return
10062
10063 populate-mu-type:
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089 55/push-ebp
10090 89/<- %ebp 4/r32/esp
10091
10092 68/push 0/imm32
10093
10094 50/push-eax
10095 51/push-ecx
10096 52/push-edx
10097 53/push-ebx
10098 56/push-esi
10099 57/push-edi
10100
10101 8b/-> *(ebp+0xc) 7/r32/edi
10102
10103 81 5/subop/subtract %esp 0x200/imm32
10104 68/push 0x200/imm32/size
10105 68/push 0/imm32/read
10106 68/push 0/imm32/write
10107 89/<- %ecx 4/r32/esp
10108
10109 68/push 0/imm32/end
10110 68/push 0/imm32/start
10111 89/<- %edx 4/r32/esp
10112
10113 68/push 0/imm32
10114 68/push 0/imm32
10115 89/<- %esi 4/r32/esp
10116
10117 68/push 0/imm32
10118 68/push 0/imm32
10119 89/<- %ebx 4/r32/esp
10120 {
10121 $populate-mu-type:line-loop:
10122 (clear-stream %ecx)
10123 (read-line-buffered *(ebp+8) %ecx)
10124
10125 81 7/subop/compare *ecx 0/imm32
10126 0f 84/jump-if-= $populate-mu-type:abort/disp32
10127 +-- 6 lines: #? # dump line ------------------------------------------------------------------------------------------------------------------------------------------------------
10133 (next-mu-token %ecx %edx)
10134
10135 (slice-empty? %edx)
10136 3d/compare-eax-and 0/imm32
10137 0f 85/jump-if-!= loop/disp32
10138
10139 (slice-equal? %edx "}")
10140 3d/compare-eax-and 0/imm32
10141 0f 85/jump-if-!= break/disp32
10142 $populate-mu-type:parse-element:
10143
10144
10145
10146
10147 (parse-var-with-type %edx %ecx %esi *(ebp+0x10) *(ebp+0x14))
10148
10149 51/push-ecx
10150 $populate-mu-type:create-typeinfo-fields:
10151
10152 (find-or-create-typeinfo-fields %edi %edx %ebx)
10153
10154 (lookup *ebx *(ebx+4))
10155 8b/-> *(ebp-4) 1/r32/ecx
10156
10157
10158
10159
10160
10161
10162 89/<- *(eax+8) 1/r32/ecx
10163
10164 ff 0/subop/increment *(ebp-4)
10165 $populate-mu-type:set-input-type:
10166
10167 8b/-> *esi 1/r32/ecx
10168 89/<- *eax 1/r32/ecx
10169 8b/-> *(esi+4) 1/r32/ecx
10170 89/<- *(eax+4) 1/r32/ecx
10171 59/pop-to-ecx
10172 {
10173 $populate-mu-type:create-output-type:
10174
10175 81 7/subop/compare *(eax+0xc) 0/imm32
10176 75/jump-if-!= break/disp8
10177 8d/copy-address *(eax+0xc) 0/r32/eax
10178 (new-literal Heap %edx %eax)
10179 }
10180 e9/jump loop/disp32
10181 }
10182 $populate-mu-type:invalidate-total-size-in-bytes:
10183
10184
10185
10186 c7 0/subop/copy *(edi+0xc) -2/imm32/uninitialized
10187 $populate-mu-type:end:
10188
10189 81 0/subop/add %esp 0x224/imm32
10190
10191 5f/pop-to-edi
10192 5e/pop-to-esi
10193 5b/pop-to-ebx
10194 5a/pop-to-edx
10195 59/pop-to-ecx
10196 58/pop-to-eax
10197
10198 81 0/subop/add %esp 4/imm32
10199
10200 89/<- %esp 5/r32/ebp
10201 5d/pop-to-ebp
10202 c3/return
10203
10204 $populate-mu-type:abort:
10205
10206 (write-buffered *(ebp+0x10) "incomplete type definition '")
10207 (type-name *edi)
10208 (write-buffered *(ebp+0x10) %eax)
10209 (write-buffered *(ebp+0x10) "\n")
10210 (flush *(ebp+0x10))
10211 (stop *(ebp+0x14) 1)
10212
10213
10214 type-name:
10215
10216 55/push-ebp
10217 89/<- %ebp 4/r32/esp
10218
10219 (index Type-id *(ebp+8))
10220 $type-name:end:
10221
10222 89/<- %esp 5/r32/ebp
10223 5d/pop-to-ebp
10224 c3/return
10225
10226 index:
10227
10228 55/push-ebp
10229 89/<- %ebp 4/r32/esp
10230
10231 56/push-esi
10232
10233
10234 8b/-> *(ebp+8) 6/r32/esi
10235
10236 8b/-> *(ebp+0xc) 0/r32/eax
10237
10238 8b/-> *(esi+eax+0xc) 0/r32/eax
10239 $index:end:
10240
10241 5e/pop-to-esi
10242
10243 89/<- %esp 5/r32/ebp
10244 5d/pop-to-ebp
10245 c3/return
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256 populate-mu-type-sizes:
10257
10258 55/push-ebp
10259 89/<- %ebp 4/r32/esp
10260 $populate-mu-type-sizes:total-sizes:
10261
10262 (lookup *_Program-types *_Program-types->payload)
10263 {
10264
10265 3d/compare-eax-and 0/imm32/null
10266 74/jump-if-= break/disp8
10267 (populate-mu-type-sizes-in-type %eax *(ebp+8) *(ebp+0xc))
10268
10269 (lookup *(eax+0x10) *(eax+0x14))
10270 eb/jump loop/disp8
10271 }
10272 $populate-mu-type-sizes:offsets:
10273
10274 (lookup *_Program-types *_Program-types->payload)
10275 {
10276
10277 3d/compare-eax-and 0/imm32/null
10278 74/jump-if-= break/disp8
10279 (populate-mu-type-offsets %eax *(ebp+8) *(ebp+0xc))
10280
10281 (lookup *(eax+0x10) *(eax+0x14))
10282 eb/jump loop/disp8
10283 }
10284 $populate-mu-type-sizes:end:
10285
10286 89/<- %esp 5/r32/ebp
10287 5d/pop-to-ebp
10288 c3/return
10289
10290
10291
10292
10293 populate-mu-type-sizes-in-type:
10294
10295 55/push-ebp
10296 89/<- %ebp 4/r32/esp
10297
10298 50/push-eax
10299 51/push-ecx
10300 52/push-edx
10301 56/push-esi
10302 57/push-edi
10303
10304 8b/-> *(ebp+8) 6/r32/esi
10305
10306 81 7/subop/compare *(esi+0xc) 0/imm32
10307 0f 8d/jump-if->= $populate-mu-type-sizes-in-type:end/disp32
10308
10309 81 7/subop/compare *(esi+0xc) -1/imm32/being-computed
10310 0f 84/jump-if-= $populate-mu-type-sizes-in-type:abort/disp32
10311
10312 c7 0/subop/copy *(esi+0xc) -1/imm32/being-computed
10313
10314 bf/copy-to-edi 0/imm32
10315
10316
10317 (lookup *(esi+4) *(esi+8))
10318 89/<- %ecx 0/r32/eax
10319
10320 8b/-> *ecx 2/r32/edx
10321
10322 8d/copy-address *(ecx+0xc) 1/r32/ecx
10323
10324 8d/copy-address *(ecx+edx) 2/r32/edx
10325 {
10326 $populate-mu-type-sizes-in-type:loop:
10327
10328 39/compare %ecx 2/r32/edx
10329 73/jump-if-addr>= break/disp8
10330
10331 (lookup *(ecx+8) *(ecx+0xc))
10332
10333 81 7/subop/compare *eax 0/imm32
10334 74/jump-if-= $populate-mu-type-sizes-in-type:end/disp8
10335
10336 (lookup *eax *(eax+4))
10337 (compute-size-of-var %eax)
10338
10339 01/add-to %edi 0/r32/eax
10340
10341 81 0/subop/add %ecx 0x10/imm32
10342
10343 eb/jump loop/disp8
10344 }
10345
10346 89/<- *(esi+0xc) 7/r32/edi
10347 $populate-mu-type-sizes-in-type:end:
10348
10349 5f/pop-to-edi
10350 5e/pop-to-esi
10351 5a/pop-to-edx
10352 59/pop-to-ecx
10353 58/pop-to-eax
10354
10355 89/<- %esp 5/r32/ebp
10356 5d/pop-to-ebp
10357 c3/return
10358
10359 $populate-mu-type-sizes-in-type:abort:
10360 (write-buffered *(ebp+0xc) "cycle in type definitions\n")
10361 (flush *(ebp+0xc))
10362 (stop *(ebp+0x10) 1)
10363
10364
10365
10366
10367 compute-size-of-var:
10368
10369 55/push-ebp
10370 89/<- %ebp 4/r32/esp
10371
10372 51/push-ecx
10373
10374 8b/-> *(ebp+8) 1/r32/ecx
10375 (lookup *(ecx+8) *(ecx+0xc))
10376 89/<- %ecx 0/r32/eax
10377
10378 {
10379 81 7/subop/compare *ecx 0/imm32/false
10380 75/jump-if-!= break/disp8
10381 (lookup *(ecx+4) *(ecx+8))
10382 89/<- %ecx 0/r32/eax
10383 }
10384
10385 (compute-size-of-type-id *(ecx+4))
10386 $compute-size-of-var:end:
10387
10388 59/pop-to-ecx
10389
10390 89/<- %esp 5/r32/ebp
10391 5d/pop-to-ebp
10392 c3/return
10393
10394 compute-size-of-type-id:
10395
10396 55/push-ebp
10397 89/<- %ebp 4/r32/esp
10398
10399 51/push-ecx
10400
10401 68/push 0/imm32
10402 68/push 0/imm32
10403 89/<- %ecx 4/r32/esp
10404
10405 8b/-> *(ebp+8) 0/r32/eax
10406
10407 3d/compare-eax-and 0/imm32/literal
10408 0f 84/jump-if-= $compute-size-of-type-id:end/disp32
10409
10410 3d/compare-eax-and 8/imm32/byte
10411 {
10412 75/jump-if-!= break/disp8
10413 b8/copy-to-eax 4/imm32
10414 eb/jump $compute-size-of-type-id:end/disp8
10415 }
10416
10417 3d/compare-eax-and 4/imm32/handle
10418 {
10419 75/jump-if-!= break/disp8
10420 b8/copy-to-eax 8/imm32
10421 eb/jump $compute-size-of-type-id:end/disp8
10422 }
10423
10424
10425 (find-typeinfo %eax %ecx)
10426 {
10427 81 7/subop/compare *ecx 0/imm32
10428 74/jump-if-= break/disp8
10429 $compute-size-of-type-id:user-defined:
10430 (populate-mu-type-sizes %eax)
10431 8b/-> *(eax+0xc) 0/r32/eax
10432 eb/jump $compute-size-of-type-id:end/disp8
10433 }
10434
10435 b8/copy-to-eax 4/imm32
10436 $compute-size-of-type-id:end:
10437
10438 81 0/subop/add %esp 8/imm32
10439
10440 59/pop-to-ecx
10441
10442 89/<- %esp 5/r32/ebp
10443 5d/pop-to-ebp
10444 c3/return
10445
10446
10447
10448
10449 populate-mu-type-offsets:
10450
10451 55/push-ebp
10452 89/<- %ebp 4/r32/esp
10453
10454 50/push-eax
10455 51/push-ecx
10456 52/push-edx
10457 53/push-ebx
10458 56/push-esi
10459 57/push-edi
10460
10461
10462 bf/copy-to-edi 0/imm32
10463
10464 8b/-> *(ebp+8) 1/r32/ecx
10465 (lookup *(ecx+4) *(ecx+8))
10466 89/<- %ecx 0/r32/eax
10467
10468 8b/-> *ecx 2/r32/edx
10469 c1 5/subop/shift-right-logical %edx 4/imm8
10470
10471 bb/copy-to-ebx 0/imm32
10472 {
10473 $populate-mu-type-offsets:loop:
10474 39/compare %ebx 2/r32/edx
10475 0f 8d/jump-if->= break/disp32
10476
10477
10478
10479
10480
10481
10482
10483 (locate-typeinfo-entry-with-index %ecx %ebx *(ebp+0xc) *(ebp+0x10))
10484 89/<- %esi 0/r32/eax
10485
10486 81 7/subop/compare %esi 0/imm32
10487 74/jump-if-= $populate-mu-type-offsets:end/disp8
10488
10489 81 7/subop/compare *esi 0/imm32
10490 74/jump-if-= $populate-mu-type-offsets:end/disp8
10491
10492
10493 (lookup *(esi+0xc) *(esi+0x10))
10494 89/<- *(eax+0x14) 7/r32/edi
10495
10496 (lookup *esi *(esi+4))
10497 (size-of %eax)
10498 01/add-to %edi 0/r32/eax
10499
10500 43/increment-ebx
10501 e9/jump loop/disp32
10502 }
10503 $populate-mu-type-offsets:end:
10504
10505 5f/pop-to-edi
10506 5e/pop-to-esi
10507 5b/pop-to-ebx
10508 5a/pop-to-edx
10509 59/pop-to-ecx
10510 58/pop-to-eax
10511
10512 89/<- %esp 5/r32/ebp
10513 5d/pop-to-ebp
10514 c3/return
10515
10516 locate-typeinfo-entry-with-index:
10517
10518 55/push-ebp
10519 89/<- %ebp 4/r32/esp
10520
10521 51/push-ecx
10522 52/push-edx
10523 53/push-ebx
10524 56/push-esi
10525 57/push-edi
10526
10527 8b/-> *(ebp+8) 6/r32/esi
10528
10529 8d/copy-address *(esi+0xc) 1/r32/ecx
10530
10531 8b/-> *esi 2/r32/edx
10532 8d/copy-address *(ecx+edx) 2/r32/edx
10533 {
10534 $locate-typeinfo-entry-with-index:loop:
10535 39/compare %ecx 2/r32/edx
10536 73/jump-if-addr>= break/disp8
10537
10538 (lookup *(ecx+8) *(ecx+0xc))
10539
10540 8b/-> *(eax+8) 3/r32/ebx
10541
10542
10543
10544
10545
10546
10547 39/compare *(ebp+0xc) 3/r32/ebx
10548 74/jump-if-= $locate-typeinfo-entry-with-index:end/disp8
10549
10550 81 0/subop/add %ecx 0x10/imm32
10551
10552 eb/jump loop/disp8
10553 }
10554
10555 b8/copy-to-eax 0/imm32
10556 $locate-typeinfo-entry-with-index:end:
10557
10558
10559
10560
10561
10562 5f/pop-to-edi
10563 5e/pop-to-esi
10564 5b/pop-to-ebx
10565 5a/pop-to-edx
10566 59/pop-to-ecx
10567
10568 89/<- %esp 5/r32/ebp
10569 5d/pop-to-ebp
10570 c3/return
10571
10572 dump-typeinfos:
10573
10574 55/push-ebp
10575 89/<- %ebp 4/r32/esp
10576
10577 50/push-eax
10578
10579 (write-buffered Stderr *(ebp+8))
10580 (flush Stderr)
10581
10582 (lookup *_Program-types *_Program-types->payload)
10583 {
10584
10585 3d/compare-eax-and 0/imm32
10586 74/jump-if-= break/disp8
10587 (write-buffered Stderr "---\n")
10588 (flush Stderr)
10589 (dump-typeinfo %eax)
10590
10591 (lookup *(eax+0x10) *(eax+0x14))
10592 eb/jump loop/disp8
10593 }
10594 $dump-typeinfos:end:
10595
10596 58/pop-to-eax
10597
10598 89/<- %esp 5/r32/ebp
10599 5d/pop-to-ebp
10600 c3/return
10601
10602 dump-typeinfo:
10603
10604 55/push-ebp
10605 89/<- %ebp 4/r32/esp
10606
10607 50/push-eax
10608 51/push-ecx
10609 52/push-edx
10610 53/push-ebx
10611 56/push-esi
10612 57/push-edi
10613
10614 8b/-> *(ebp+8) 6/r32/esi
10615
10616 (lookup *(esi+4) *(esi+8))
10617 89/<- %ecx 0/r32/eax
10618 (write-buffered Stderr "id:")
10619 (write-int32-hex-buffered Stderr *esi)
10620 (write-buffered Stderr "\n")
10621 (write-buffered Stderr "fields @ ")
10622 (write-int32-hex-buffered Stderr %ecx)
10623 (write-buffered Stderr Newline)
10624 (flush Stderr)
10625 (write-buffered Stderr " write: ")
10626 (write-int32-hex-buffered Stderr *ecx)
10627 (write-buffered Stderr Newline)
10628 (flush Stderr)
10629 (write-buffered Stderr " read: ")
10630 (write-int32-hex-buffered Stderr *(ecx+4))
10631 (write-buffered Stderr Newline)
10632 (flush Stderr)
10633 (write-buffered Stderr " size: ")
10634 (write-int32-hex-buffered Stderr *(ecx+8))
10635 (write-buffered Stderr Newline)
10636 (flush Stderr)
10637
10638 8b/-> *ecx 2/r32/edx
10639
10640 8d/copy-address *(ecx+0xc) 1/r32/ecx
10641
10642 8d/copy-address *(ecx+edx) 2/r32/edx
10643 {
10644 $dump-typeinfo:loop:
10645
10646 39/compare %ecx 2/r32/edx
10647 0f 83/jump-if-addr>= break/disp32
10648 (write-buffered Stderr " row:\n")
10649 (write-buffered Stderr " key: ")
10650 (write-int32-hex-buffered Stderr *ecx)
10651 (write-buffered Stderr ",")
10652 (write-int32-hex-buffered Stderr *(ecx+4))
10653 (write-buffered Stderr " = '")
10654 (lookup *ecx *(ecx+4))
10655 (write-buffered Stderr %eax)
10656 (write-buffered Stderr "' @ ")
10657 (write-int32-hex-buffered Stderr %eax)
10658 (write-buffered Stderr Newline)
10659 (flush Stderr)
10660 (write-buffered Stderr " value: ")
10661 (write-int32-hex-buffered Stderr *(ecx+8))
10662 (write-buffered Stderr ",")
10663 (write-int32-hex-buffered Stderr *(ecx+0xc))
10664 (write-buffered Stderr " = typeinfo-entry@")
10665 (lookup *(ecx+8) *(ecx+0xc))
10666 (write-int32-hex-buffered Stderr %eax)
10667 (write-buffered Stderr Newline)
10668 (flush Stderr)
10669 (write-buffered Stderr " input var@")
10670 (dump-var 5 %eax)
10671 (lookup *(ecx+8) *(ecx+0xc))
10672 (write-buffered Stderr " index: ")
10673 (write-int32-hex-buffered Stderr *(eax+8))
10674 (write-buffered Stderr Newline)
10675 (flush Stderr)
10676 (write-buffered Stderr " output var@")
10677 8d/copy-address *(eax+0xc) 0/r32/eax
10678 (dump-var 5 %eax)
10679 (flush Stderr)
10680
10681 81 0/subop/add %ecx 0x10/imm32
10682
10683 e9/jump loop/disp32
10684 }
10685 $dump-typeinfo:end:
10686
10687 5f/pop-to-edi
10688 5e/pop-to-esi
10689 5b/pop-to-ebx
10690 5a/pop-to-edx
10691 59/pop-to-ecx
10692 58/pop-to-eax
10693
10694 89/<- %esp 5/r32/ebp
10695 5d/pop-to-ebp
10696 c3/return
10697
10698 dump-var:
10699
10700 55/push-ebp
10701 89/<- %ebp 4/r32/esp
10702
10703 50/push-eax
10704 53/push-ebx
10705
10706 8b/-> *(ebp+0xc) 0/r32/eax
10707
10708 (write-int32-hex-buffered Stderr *eax)
10709 (write-buffered Stderr ",")
10710 (write-int32-hex-buffered Stderr *(eax+4))
10711 (write-buffered Stderr "->")
10712 (lookup *eax *(eax+4))
10713 (write-int32-hex-buffered Stderr %eax)
10714 (write-buffered Stderr Newline)
10715 (flush Stderr)
10716 {
10717 3d/compare-eax-and 0/imm32
10718 0f 84/jump-if-= break/disp32
10719 (emit-indent Stderr *(ebp+8))
10720 (write-buffered Stderr "name: ")
10721 89/<- %ebx 0/r32/eax
10722 (write-int32-hex-buffered Stderr *ebx)
10723 (write-buffered Stderr ",")
10724 (write-int32-hex-buffered Stderr *(ebx+4))
10725 (write-buffered Stderr "->")
10726 (lookup *ebx *(ebx+4))
10727 (write-int32-hex-buffered Stderr %eax)
10728 {
10729 3d/compare-eax-and 0/imm32
10730 74/jump-if-= break/disp8
10731 (write-buffered Stderr Space)
10732 (write-buffered Stderr %eax)
10733 }
10734 (write-buffered Stderr Newline)
10735 (flush Stderr)
10736 (emit-indent Stderr *(ebp+8))
10737 (write-buffered Stderr "block depth: ")
10738 (write-int32-hex-buffered Stderr *(ebx+0x10))
10739 (write-buffered Stderr Newline)
10740 (flush Stderr)
10741 (emit-indent Stderr *(ebp+8))
10742 (write-buffered Stderr "stack offset: ")
10743 (write-int32-hex-buffered Stderr *(ebx+0x14))
10744 (write-buffered Stderr Newline)
10745 (flush Stderr)
10746 (emit-indent Stderr *(ebp+8))
10747 (write-buffered Stderr "reg: ")
10748 (write-int32-hex-buffered Stderr *(ebx+0x18))
10749 (write-buffered Stderr ",")
10750 (write-int32-hex-buffered Stderr *(ebx+0x1c))
10751 (write-buffered Stderr "->")
10752 (flush Stderr)
10753 (lookup *(ebx+0x18) *(ebx+0x1c))
10754 (write-int32-hex-buffered Stderr %eax)
10755 {
10756 3d/compare-eax-and 0/imm32
10757 74/jump-if-= break/disp8
10758 (write-buffered Stderr Space)
10759 (write-buffered Stderr %eax)
10760 }
10761 (write-buffered Stderr Newline)
10762 (flush Stderr)
10763 }
10764 $dump-var:end:
10765
10766 5b/pop-to-ebx
10767 58/pop-to-eax
10768
10769 89/<- %esp 5/r32/ebp
10770 5d/pop-to-ebp
10771 c3/return
10772
10773
10774
10775
10776
10777 check-mu-types:
10778
10779 55/push-ebp
10780 89/<- %ebp 4/r32/esp
10781
10782 50/push-eax
10783
10784 (lookup *_Program-functions *_Program-functions->payload)
10785 {
10786 $check-mu-types:loop:
10787
10788 3d/compare-eax-and 0/imm32
10789 0f 84/jump-if-= break/disp32
10790 +-- 8 lines: #? # dump curr->name ------------------------------------------------------------------------------------------------------------------------------------------------
10798 (check-mu-function %eax *(ebp+8) *(ebp+0xc))
10799
10800 (lookup *(eax+0x20) *(eax+0x24))
10801 e9/jump loop/disp32
10802 }
10803 $check-mu-types:end:
10804
10805 58/pop-to-eax
10806
10807 89/<- %esp 5/r32/ebp
10808 5d/pop-to-ebp
10809 c3/return
10810
10811 check-mu-function:
10812
10813 55/push-ebp
10814 89/<- %ebp 4/r32/esp
10815
10816 50/push-eax
10817
10818 8b/-> *(ebp+8) 0/r32/eax
10819
10820
10821 (lookup *(eax+0x18) *(eax+0x1c))
10822 (check-mu-block %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10))
10823 $check-mu-function:end:
10824
10825 58/pop-to-eax
10826
10827 89/<- %esp 5/r32/ebp
10828 5d/pop-to-ebp
10829 c3/return
10830
10831 check-mu-block:
10832
10833 55/push-ebp
10834 89/<- %ebp 4/r32/esp
10835
10836 50/push-eax
10837
10838 8b/-> *(ebp+8) 0/r32/eax
10839
10840 (lookup *(eax+4) *(eax+8))
10841
10842 {
10843 $check-mu-block:check-empty:
10844 3d/compare-eax-and 0/imm32
10845 0f 84/jump-if-= break/disp32
10846
10847 (check-mu-stmt-list %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
10848 }
10849 $check-mu-block:end:
10850
10851 58/pop-to-eax
10852
10853 89/<- %esp 5/r32/ebp
10854 5d/pop-to-ebp
10855 c3/return
10856
10857 check-mu-stmt-list:
10858
10859 55/push-ebp
10860 89/<- %ebp 4/r32/esp
10861
10862 50/push-eax
10863 56/push-esi
10864
10865 8b/-> *(ebp+8) 6/r32/esi
10866 {
10867 $check-mu-stmt-list:loop:
10868 81 7/subop/compare %esi 0/imm32
10869 0f 84/jump-if-= break/disp32
10870
10871 (lookup *esi *(esi+4))
10872 {
10873 $check-mu-stmt-list:check-for-block:
10874 81 7/subop/compare *eax 0/imm32/block
10875 75/jump-if-!= break/disp8
10876 $check-mu-stmt-list:block:
10877 (check-mu-block %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
10878 eb/jump $check-mu-stmt-list:continue/disp8
10879 }
10880 {
10881 $check-mu-stmt-list:check-for-stmt1:
10882 81 7/subop/compare *eax 1/imm32/stmt1
10883 0f 85/jump-if-!= break/disp32
10884 $check-mu-stmt-list:stmt1:
10885 (check-mu-stmt %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
10886 eb/jump $check-mu-stmt-list:continue/disp8
10887 }
10888 {
10889 $check-mu-stmt-list:check-for-reg-var-def:
10890 81 7/subop/compare *eax 3/imm32/reg-var-def
10891 0f 85/jump-if-!= break/disp32
10892 $check-mu-stmt-list:reg-var-def:
10893 (check-mu-stmt %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
10894 eb/jump $check-mu-stmt-list:continue/disp8
10895 }
10896 $check-mu-stmt-list:continue:
10897
10898 (lookup *(esi+8) *(esi+0xc))
10899 89/<- %esi 0/r32/eax
10900 e9/jump loop/disp32
10901 }
10902 $check-mu-stmt-list:end:
10903
10904 5e/pop-to-esi
10905 58/pop-to-eax
10906
10907 89/<- %esp 5/r32/ebp
10908 5d/pop-to-ebp
10909 c3/return
10910
10911 check-mu-stmt:
10912
10913 55/push-ebp
10914 89/<- %ebp 4/r32/esp
10915
10916 50/push-eax
10917
10918 (has-primitive-name? *(ebp+8))
10919 3d/compare-eax-and 0/imm32/false
10920 {
10921 74/jump-if-= break/disp8
10922 (check-mu-primitive *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
10923 e9/jump $check-mu-stmt:end/disp32
10924 }
10925
10926
10927 (lookup *_Program-functions *_Program-functions->payload)
10928 (find-matching-function %eax *(ebp+8))
10929 3d/compare-eax-and 0/imm32
10930 {
10931 74/jump-if-= break/disp8
10932 (check-mu-call *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
10933 eb/jump $check-mu-stmt:end/disp8
10934 }
10935
10936 (lookup *_Program-signatures *_Program-signatures->payload)
10937 (find-matching-function %eax *(ebp+8))
10938 3d/compare-eax-and 0/imm32
10939 {
10940 74/jump-if-= break/disp8
10941 (check-mu-call *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
10942 eb/jump $check-mu-stmt:end/disp8
10943 }
10944
10945 e9/jump $check-mu-stmt:unknown-call/disp32
10946 $check-mu-stmt:end:
10947
10948 58/pop-to-eax
10949
10950 89/<- %esp 5/r32/ebp
10951 5d/pop-to-ebp
10952 c3/return
10953
10954 $check-mu-stmt:unknown-call:
10955 (write-buffered *(ebp+0x10) "unknown function '")
10956 8b/-> *(ebp+8) 0/r32/eax
10957 (lookup *(eax+4) *(eax+8))
10958 (write-buffered *(ebp+0x10) %eax)
10959 (write-buffered *(ebp+0x10) "'\n")
10960 (flush *(ebp+0x10))
10961 (stop *(ebp+0x14) 1)
10962
10963
10964 has-primitive-name?:
10965
10966 55/push-ebp
10967 89/<- %ebp 4/r32/esp
10968
10969 51/push-ecx
10970 56/push-esi
10971
10972 8b/-> *(ebp+8) 6/r32/esi
10973 (lookup *(esi+4) *(esi+8))
10974 89/<- %esi 0/r32/eax
10975
10976 (string-equal? %esi "get")
10977 3d/compare-eax-and 0/imm32/false
10978 0f 85/jump-if-!= $has-primitive-name?:end/disp32
10979
10980 (string-equal? %esi "index")
10981 3d/compare-eax-and 0/imm32/false
10982 0f 85/jump-if-!= $has-primitive-name?:end/disp32
10983
10984 (string-equal? %esi "length")
10985 3d/compare-eax-and 0/imm32/false
10986 0f 85/jump-if-!= $has-primitive-name?:end/disp32
10987
10988 (string-equal? %esi "compute-offset")
10989 3d/compare-eax-and 0/imm32/false
10990 75/jump-if-!= $has-primitive-name?:end/disp8
10991
10992 (string-equal? %esi "lookup")
10993 3d/compare-eax-and 0/imm32/false
10994 75/jump-if-!= $has-primitive-name?:end/disp8
10995
10996 b9/copy-to-ecx Primitives/imm32
10997 {
10998 $has-primitive-name?:loop:
10999
11000 81 7/subop/compare %ecx 0/imm32
11001 74/jump-if-= break/disp8
11002
11003 (lookup *ecx *(ecx+4))
11004 (string-equal? %esi %eax)
11005 3d/compare-eax-and 0/imm32/false
11006 75/jump-if-!= $has-primitive-name?:end/disp8
11007 $has-primitive-name?:next-primitive:
11008
11009 (lookup *(ecx+0x34) *(ecx+0x38))
11010 89/<- %ecx 0/r32/eax
11011
11012 e9/jump loop/disp32
11013 }
11014
11015 b8/copy-to-eax 0/imm32
11016 $has-primitive-name?:end:
11017
11018 5e/pop-to-esi
11019 59/pop-to-ecx
11020
11021 89/<- %esp 5/r32/ebp
11022 5d/pop-to-ebp
11023 c3/return
11024
11025 check-mu-primitive:
11026
11027 55/push-ebp
11028 89/<- %ebp 4/r32/esp
11029
11030 50/push-eax
11031 51/push-ecx
11032
11033 8b/-> *(ebp+8) 0/r32/eax
11034 (lookup *(eax+4) *(eax+8))
11035 89/<- %ecx 0/r32/eax
11036
11037 {
11038 (string-equal? %ecx "copy")
11039 3d/compare-eax-and 0/imm32/false
11040 74/jump-if-= break/disp8
11041 (check-mu-copy-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
11042 e9/jump $check-mu-primitive:end/disp32
11043 }
11044
11045 {
11046 (string-equal? %ecx "copy-to")
11047 3d/compare-eax-and 0/imm32/false
11048 74/jump-if-= break/disp8
11049 (check-mu-copy-to-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
11050 e9/jump $check-mu-primitive:end/disp32
11051 }
11052
11053 {
11054 (string-equal? %ecx "compare")
11055 3d/compare-eax-and 0/imm32/false
11056 74/jump-if-= break/disp8
11057 (check-mu-compare-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
11058 e9/jump $check-mu-primitive:end/disp32
11059 }
11060
11061 {
11062 (string-equal? %ecx "address")
11063 3d/compare-eax-and 0/imm32/false
11064 74/jump-if-= break/disp8
11065 (check-mu-address-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
11066 e9/jump $check-mu-primitive:end/disp32
11067 }
11068
11069 {
11070 (string-equal? %ecx "get")
11071 3d/compare-eax-and 0/imm32/false
11072 74/jump-if-= break/disp8
11073 (check-mu-get-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
11074 e9/jump $check-mu-primitive:end/disp32
11075 }
11076
11077 {
11078 (string-equal? %ecx "index")
11079 3d/compare-eax-and 0/imm32/false
11080 74/jump-if-= break/disp8
11081 (check-mu-index-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
11082 e9/jump $check-mu-primitive:end/disp32
11083 }
11084
11085 {
11086 (string-equal? %ecx "length")
11087 3d/compare-eax-and 0/imm32/false
11088 74/jump-if-= break/disp8
11089 (check-mu-length-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
11090 e9/jump $check-mu-primitive:end/disp32
11091 }
11092
11093 {
11094 (string-equal? %ecx "compute-offset")
11095 3d/compare-eax-and 0/imm32/false
11096 74/jump-if-= break/disp8
11097 (check-mu-compute-offset-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
11098 e9/jump $check-mu-primitive:end/disp32
11099 }
11100
11101 {
11102 (string-equal? %ecx "lookup")
11103 3d/compare-eax-and 0/imm32/false
11104 74/jump-if-= break/disp8
11105 (check-mu-lookup-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
11106 e9/jump $check-mu-primitive:end/disp32
11107 }
11108
11109 (check-mu-numberlike-primitive *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
11110 $check-mu-primitive:end:
11111
11112 59/pop-to-ecx
11113 58/pop-to-eax
11114
11115 89/<- %esp 5/r32/ebp
11116 5d/pop-to-ebp
11117 c3/return
11118
11119
11120 check-mu-numberlike-primitive:
11121
11122 55/push-ebp
11123 89/<- %ebp 4/r32/esp
11124
11125 50/push-eax
11126 51/push-ecx
11127 56/push-esi
11128
11129 8b/-> *(ebp+8) 6/r32/esi
11130
11131 b9/copy-to-ecx 2/imm32
11132
11133
11134 (lookup *(esi+0x14) *(esi+0x18))
11135 {
11136 3d/compare-eax-and 0/imm32
11137 74/jump-if-= break/disp8
11138 $check-mu-numberlike-primitive:output:
11139 (check-mu-numberlike-output %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
11140 (lookup *(eax+8) *(eax+0xc))
11141 3d/compare-eax-and 0/imm32
11142 0f 85/jump-if-!= $check-mu-numberlike-primitive:error-too-many-outputs/disp32
11143
11144
11145 49/decrement-ecx
11146 }
11147
11148 (lookup *(esi+0xc) *(esi+0x10))
11149 {
11150 3d/compare-eax-and 0/imm32
11151 0f 84/jump-if-= $check-mu-numberlike-primitive:end/disp32
11152 $check-mu-numberlike-primitive:first-inout:
11153 (check-mu-numberlike-arg %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
11154
11155 49/decrement-ecx
11156 }
11157
11158 (lookup *(eax+8) *(eax+0xc))
11159 {
11160 3d/compare-eax-and 0/imm32
11161 74/jump-if-= $check-mu-numberlike-primitive:end/disp8
11162 $check-mu-numberlike-primitive:second-inout:
11163
11164 81 7/subop/compare %ecx 0/imm32
11165 0f 84/jump-if-= $check-mu-numberlike-primitive:error-too-many-inouts/disp32
11166 $check-mu-numberlike-primitive:second-inout-permitted:
11167 (check-mu-numberlike-arg %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
11168 }
11169 $check-mu-numberlike-primitive:third-inout:
11170
11171 81 7/subop/compare *(eax+8) 0/imm32
11172 0f 85/jump-if-!= $check-mu-numberlike-primitive:error-too-many-inouts/disp32
11173 $check-mu-numberlike-primitive:end:
11174
11175 5e/pop-to-esi
11176 59/pop-to-ecx
11177 58/pop-to-eax
11178
11179 89/<- %esp 5/r32/ebp
11180 5d/pop-to-ebp
11181 c3/return
11182
11183 $check-mu-numberlike-primitive:error-too-many-inouts:
11184 (write-buffered *(ebp+0x10) "fn ")
11185 8b/-> *(ebp+0xc) 0/r32/eax
11186 (lookup *eax *(eax+4))
11187 (write-buffered *(ebp+0x10) %eax)
11188 (write-buffered *(ebp+0x10) ": stmt ")
11189 (lookup *(esi+4) *(esi+8))
11190 (write-buffered *(ebp+0x10) %eax)
11191 (write-buffered *(ebp+0x10) ": too many inouts; most primitives support at most two arguments, across inouts and outputs\n")
11192 (flush *(ebp+0x10))
11193 (stop *(ebp+0x14) 1)
11194
11195
11196 $check-mu-numberlike-primitive:error-too-many-outputs:
11197 (write-buffered *(ebp+0x10) "fn ")
11198 8b/-> *(ebp+0xc) 0/r32/eax
11199 (lookup *eax *(eax+4))
11200 (write-buffered *(ebp+0x10) %eax)
11201 (write-buffered *(ebp+0x10) ": stmt ")
11202 (lookup *(esi+4) *(esi+8))
11203 (write-buffered *(ebp+0x10) %eax)
11204 (write-buffered *(ebp+0x10) ": too many outputs; most primitives support at most one output\n")
11205 (flush *(ebp+0x10))
11206 (stop *(ebp+0x14) 1)
11207
11208
11209 check-mu-numberlike-arg:
11210
11211 55/push-ebp
11212 89/<- %ebp 4/r32/esp
11213
11214 50/push-eax
11215 56/push-esi
11216
11217 8b/-> *(ebp+8) 0/r32/eax
11218 (lookup *eax *(eax+4))
11219 (lookup *(eax+8) *(eax+0xc))
11220 89/<- %esi 0/r32/eax
11221 $check-mu-numberlike-arg:check-literal:
11222
11223 (is-simple-mu-type? %esi 0)
11224 3d/compare-eax-and 0/imm32/false
11225 75/jump-if-!= $check-mu-numberlike-arg:end/disp8
11226 $check-mu-numberlike-arg:check-addr:
11227
11228 {
11229 (is-mu-addr-type? %esi)
11230 3d/compare-eax-and 0/imm32/false
11231 74/jump-if-= break/disp8
11232 8b/-> *(ebp+8) 0/r32/eax
11233 8b/-> *(eax+0x10) 0/r32/eax
11234 3d/compare-eax-and 0/imm32/false
11235 75/jump-if-!= $check-mu-numberlike-arg:end/disp8
11236 }
11237 $check-mu-numberlike-arg:output-checks:
11238 (check-mu-numberlike-output *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18))
11239 $check-mu-numberlike-arg:end:
11240
11241 5e/pop-to-esi
11242 58/pop-to-eax
11243
11244 89/<- %esp 5/r32/ebp
11245 5d/pop-to-ebp
11246 c3/return
11247
11248 check-mu-numberlike-output:
11249
11250 55/push-ebp
11251 89/<- %ebp 4/r32/esp
11252
11253 50/push-eax
11254 56/push-esi
11255
11256 8b/-> *(ebp+8) 0/r32/eax
11257 (lookup *eax *(eax+4))
11258 (lookup *(eax+8) *(eax+0xc))
11259 89/<- %esi 0/r32/eax
11260 $check-mu-numberlike-output:check-int:
11261
11262 (is-simple-mu-type? %esi 1)
11263 3d/compare-eax-and 0/imm32/false
11264 75/jump-if-!= $check-mu-numberlike-output:end/disp8
11265 $check-mu-numberlike-output:check-boolean:
11266
11267 (is-simple-mu-type? %esi 5)
11268 3d/compare-eax-and 0/imm32/false
11269 75/jump-if-!= $check-mu-numberlike-output:end/disp8
11270 $check-mu-numberlike-output:check-byte:
11271
11272 (is-simple-mu-type? %esi 8)
11273 3d/compare-eax-and 0/imm32/false
11274 75/jump-if-!= $check-mu-numberlike-output:end/disp8
11275 e9/jump $check-mu-numberlike-output:fail/disp32
11276 $check-mu-numberlike-output:end:
11277
11278 5e/pop-to-esi
11279 58/pop-to-eax
11280
11281 89/<- %esp 5/r32/ebp
11282 5d/pop-to-ebp
11283 c3/return
11284
11285 $check-mu-numberlike-output:fail:
11286
11287 (write-buffered *(ebp+0x14) "fn ")
11288 8b/-> *(ebp+0x10) 0/r32/eax
11289 (lookup *eax *(eax+4))
11290 (write-buffered *(ebp+0x14) %eax)
11291 (write-buffered *(ebp+0x14) ": stmt ")
11292 8b/-> *(ebp+0xc) 0/r32/eax
11293 (lookup *(eax+4) *(eax+8))
11294 (write-buffered *(ebp+0x14) %eax)
11295 (write-buffered *(ebp+0x14) ": only non-addr scalar args permitted\n")
11296 (flush *(ebp+0x14))
11297 (stop *(ebp+0x18) 1)
11298
11299
11300 check-mu-copy-stmt:
11301
11302 55/push-ebp
11303 89/<- %ebp 4/r32/esp
11304
11305 $check-mu-copy-stmt:end:
11306
11307
11308 89/<- %esp 5/r32/ebp
11309 5d/pop-to-ebp
11310 c3/return
11311
11312 check-mu-copy-to-stmt:
11313
11314 55/push-ebp
11315 89/<- %ebp 4/r32/esp
11316
11317 $check-mu-copy-to-stmt:end:
11318
11319
11320 89/<- %esp 5/r32/ebp
11321 5d/pop-to-ebp
11322 c3/return
11323
11324 check-mu-compare-stmt:
11325
11326 55/push-ebp
11327 89/<- %ebp 4/r32/esp
11328
11329 $check-mu-compare-stmt:end:
11330
11331
11332 89/<- %esp 5/r32/ebp
11333 5d/pop-to-ebp
11334 c3/return
11335
11336 check-mu-address-stmt:
11337
11338 55/push-ebp
11339 89/<- %ebp 4/r32/esp
11340
11341 $check-mu-address-stmt:end:
11342
11343
11344 89/<- %esp 5/r32/ebp
11345 5d/pop-to-ebp
11346 c3/return
11347
11348 check-mu-get-stmt:
11349
11350 55/push-ebp
11351 89/<- %ebp 4/r32/esp
11352
11353 50/push-eax
11354 51/push-ecx
11355 52/push-edx
11356 53/push-ebx
11357 56/push-esi
11358 57/push-edi
11359
11360 8b/-> *(ebp+8) 6/r32/esi
11361
11362
11363 (lookup *(esi+0xc) *(esi+0x10))
11364 3d/compare-eax-and 0/imm32/false
11365 0f 84/jump-if-= $check-mu-get-stmt:error-too-few-inouts/disp32
11366 (lookup *eax *(eax+4))
11367 89/<- %ecx 0/r32/eax
11368 $check-mu-get-stmt:check-base:
11369
11370
11371
11372 (lookup *(ecx+8) *(ecx+0xc))
11373 89/<- %ebx 0/r32/eax
11374 {
11375 81 7/subop/compare *ebx 0/imm32/false
11376 0f 85/jump-if-!= break/disp32
11377 $check-mu-get-stmt:base-is-compound:
11378
11379 (lookup *(ebx+4) *(ebx+8))
11380 (is-simple-mu-type? %eax 2)
11381 3d/compare-eax-and 0/imm32/false
11382 74/jump-if-= break/disp8
11383 $check-mu-get-stmt:base-is-addr:
11384
11385 81 7/subop/compare *(ecx+0x18) 0/imm32
11386 0f 84/jump-if-= $check-mu-get-stmt:error-base-type-addr-but-not-register/disp32
11387 $check-mu-get-stmt:base-is-addr-in-register:
11388
11389 (lookup *(ebx+0xc) *(ebx+0x10))
11390 81 7/subop/compare *(eax+0xc) 0/imm32
11391 0f 85/jump-if-!= $check-mu-get-stmt:error-bad-base/disp32
11392 $check-mu-get-stmt:base-is-addr-to-atom-in-register:
11393 (lookup *(eax+4) *(eax+8))
11394 89/<- %ebx 0/r32/eax
11395 }
11396 $check-mu-get-stmt:check-base-typeinfo:
11397
11398
11399 8b/-> *(ebx+4) 3/r32/ebx
11400 (is-container? %ebx)
11401 3d/compare-eax-and 0/imm32/false
11402 0f 84/jump-if-= $check-mu-get-stmt:error-bad-base/disp32
11403
11404
11405 68/push 0/imm32
11406 68/push 0/imm32
11407 89/<- %ecx 4/r32/esp
11408
11409 (find-typeinfo %ebx %ecx)
11410 (lookup *ecx *(ecx+4))
11411
11412 81 0/subop/add %esp 8/imm32
11413
11414 89/<- %edx 0/r32/eax
11415
11416 (lookup *(esi+0xc) *(esi+0x10))
11417 (lookup *(eax+8) *(eax+0xc))
11418 89/<- %ecx 0/r32/eax
11419
11420 3d/compare-eax-and 0/imm32/false
11421 0f 84/jump-if-= $check-mu-get-stmt:error-too-few-inouts/disp32
11422
11423 (lookup *ecx *(ecx+4))
11424 89/<- %ecx 0/r32/eax
11425
11426 81 7/subop/compare *(ecx+0x14) -1/imm32/uninitialized
11427 0f 84/jump-if-= $check-mu-get-stmt:error-bad-field/disp32
11428
11429 (lookup *(esi+0xc) *(esi+0x10))
11430 (lookup *(eax+8) *(eax+0xc))
11431 (lookup *(eax+8) *(eax+0xc))
11432 3d/compare-eax-and 0/imm32/false
11433 0f 85/jump-if-!= $check-mu-get-stmt:error-too-many-inouts/disp32
11434
11435 (lookup *(esi+0x14) *(esi+0x18))
11436
11437 3d/compare-eax-and 0/imm32/false
11438 0f 84/jump-if-= $check-mu-get-stmt:error-too-few-outputs/disp32
11439 (lookup *eax *(eax+4))
11440 89/<- %edi 0/r32/eax
11441 $check-mu-get-stmt:check-output-type:
11442
11443
11444 (lookup *(edi+0x18) *(edi+0x1c))
11445 3d/compare-eax-and 0/imm32
11446 0f 84/jump-if-= $check-mu-get-stmt:error-output-not-in-register/disp32
11447
11448 (lookup *(edi+8) *(edi+0xc))
11449 81 7/subop/compare *eax 0/imm32/false
11450 0f 85/jump-if-!= $check-mu-get-stmt:error-output-type-not-address/disp32
11451
11452 (lookup *(eax+4) *(eax+8))
11453 (is-simple-mu-type? %eax 2)
11454 3d/compare-eax-and 0/imm32/false
11455 0f 84/jump-if-= $check-mu-get-stmt:error-output-type-not-address/disp32
11456 $check-mu-get-stmt:check-output-type-match:
11457
11458 (lookup *(edi+8) *(edi+0xc))
11459 (lookup *(eax+0xc) *(eax+0x10))
11460
11461 81 7/subop/compare *(eax+0xc) 0/imm32/null
11462 {
11463 75/jump-if-!= break/disp8
11464 (lookup *(eax+4) *(eax+8))
11465 }
11466 89/<- %edi 0/r32/eax
11467
11468 (lookup *ecx *(ecx+4))
11469 89/<- %ecx 0/r32/eax
11470
11471 (lookup *(edx+4) *(edx+8))
11472 (get %eax %ecx 0x10)
11473
11474 (lookup *eax *(eax+4))
11475 (lookup *eax *(eax+4))
11476 (lookup *(eax+8) *(eax+0xc))
11477
11478 (type-equal? %edi %eax)
11479 3d/compare-eax-and 0/imm32/false
11480 0f 84/jump-if-= $check-mu-get-stmt:error-bad-output-type/disp32
11481
11482 (lookup *(esi+0x14) *(esi+0x18))
11483 (lookup *(eax+8) *(eax+0xc))
11484 3d/compare-eax-and 0/imm32/false
11485 0f 85/jump-if-!= $check-mu-get-stmt:error-too-many-outputs/disp32
11486 $check-mu-get-stmt:end:
11487
11488 5f/pop-to-edi
11489 5e/pop-to-esi
11490 5b/pop-to-ebx
11491 5a/pop-to-edx
11492 59/pop-to-ecx
11493 58/pop-to-eax
11494
11495 89/<- %esp 5/r32/ebp
11496 5d/pop-to-ebp
11497 c3/return
11498
11499 $check-mu-get-stmt:error-too-few-inouts:
11500 (write-buffered *(ebp+0x10) "fn ")
11501 8b/-> *(ebp+0xc) 0/r32/eax
11502 (lookup *eax *(eax+4))
11503 (write-buffered *(ebp+0x10) %eax)
11504 (write-buffered *(ebp+0x10) ": stmt get: too few inouts (2 required)\n")
11505 (flush *(ebp+0x10))
11506 (stop *(ebp+0x14) 1)
11507
11508
11509 $check-mu-get-stmt:error-too-many-inouts:
11510 (write-buffered *(ebp+0x10) "fn ")
11511 8b/-> *(ebp+0xc) 0/r32/eax
11512 (lookup *eax *(eax+4))
11513 (write-buffered *(ebp+0x10) %eax)
11514 (write-buffered *(ebp+0x10) ": stmt get: too many inouts (2 required)\n")
11515 (flush *(ebp+0x10))
11516 (stop *(ebp+0x14) 1)
11517
11518
11519 $check-mu-get-stmt:error-too-few-outputs:
11520 (write-buffered *(ebp+0x10) "fn ")
11521 8b/-> *(ebp+0xc) 0/r32/eax
11522 (lookup *eax *(eax+4))
11523 (write-buffered *(ebp+0x10) %eax)
11524 (write-buffered *(ebp+0x10) ": stmt get: must have an output\n")
11525 (flush *(ebp+0x10))
11526 (stop *(ebp+0x14) 1)
11527
11528
11529 $check-mu-get-stmt:error-too-many-outputs:
11530 (write-buffered *(ebp+0x10) "fn ")
11531 8b/-> *(ebp+0xc) 0/r32/eax
11532 (lookup *eax *(eax+4))
11533 (write-buffered *(ebp+0x10) %eax)
11534 (write-buffered *(ebp+0x10) ": stmt get: too many outputs (1 required)\n")
11535 (flush *(ebp+0x10))
11536 (stop *(ebp+0x14) 1)
11537
11538
11539 $check-mu-get-stmt:error-bad-base:
11540
11541 (write-buffered *(ebp+0x10) "fn ")
11542 8b/-> *(ebp+0xc) 0/r32/eax
11543 (lookup *eax *(eax+4))
11544 (write-buffered *(ebp+0x10) %eax)
11545 (write-buffered *(ebp+0x10) ": stmt get: var '")
11546 (lookup *(esi+0xc) *(esi+0x10))
11547 (lookup *eax *(eax+4))
11548 (lookup *eax *(eax+4))
11549 (write-buffered *(ebp+0x10) %eax)
11550 (write-buffered *(ebp+0x10) "' must have a 'type' definition\n")
11551 (flush *(ebp+0x10))
11552 (stop *(ebp+0x14) 1)
11553
11554
11555 $check-mu-get-stmt:error-base-type-addr-but-not-register:
11556 (write-buffered *(ebp+0x10) "fn ")
11557 8b/-> *(ebp+0xc) 0/r32/eax
11558 (lookup *eax *(eax+4))
11559 (write-buffered *(ebp+0x10) %eax)
11560 (write-buffered *(ebp+0x10) ": stmt get: var '")
11561 (lookup *(esi+0xc) *(esi+0x10))
11562 (lookup *eax *(eax+4))
11563 (lookup *eax *(eax+4))
11564 (write-buffered *(ebp+0x10) %eax)
11565 (write-buffered *(ebp+0x10) "' is an 'addr' type, and so must live in a register\n")
11566 (flush *(ebp+0x10))
11567 (stop *(ebp+0x14) 1)
11568
11569
11570 $check-mu-get-stmt:error-bad-field:
11571
11572 (write-buffered *(ebp+0x10) "fn ")
11573 8b/-> *(ebp+0xc) 0/r32/eax
11574 (lookup *eax *(eax+4))
11575 (write-buffered *(ebp+0x10) %eax)
11576 (write-buffered *(ebp+0x10) ": stmt get: type '")
11577
11578 bf/copy-to-edi Type-id/imm32
11579 (write-buffered *(ebp+0x10) *(edi+ebx<<2+0xc))
11580
11581 (write-buffered *(ebp+0x10) "' has no member called '")
11582 (lookup *ecx *(ecx+4))
11583 (write-buffered *(ebp+0x10) %eax)
11584 (write-buffered *(ebp+0x10) "'\n")
11585 (flush *(ebp+0x10))
11586 (stop *(ebp+0x14) 1)
11587
11588
11589 $check-mu-get-stmt:error-output-not-in-register:
11590 (write-buffered *(ebp+0x10) "fn ")
11591 8b/-> *(ebp+0xc) 0/r32/eax
11592 (lookup *eax *(eax+4))
11593 (write-buffered *(ebp+0x10) %eax)
11594 (write-buffered *(ebp+0x10) ": stmt get: output '")
11595 (lookup *edi *(edi+4))
11596 (write-buffered *(ebp+0x10) %eax)
11597 (write-buffered *(ebp+0x10) "' is not in a register\n")
11598 (flush *(ebp+0x10))
11599 (stop *(ebp+0x14) 1)
11600
11601
11602 $check-mu-get-stmt:error-output-type-not-address:
11603 (write-buffered *(ebp+0x10) "fn ")
11604 8b/-> *(ebp+0xc) 0/r32/eax
11605 (lookup *eax *(eax+4))
11606 (write-buffered *(ebp+0x10) %eax)
11607 (write-buffered *(ebp+0x10) ": stmt get: output must be an address\n")
11608 (flush *(ebp+0x10))
11609 (stop *(ebp+0x14) 1)
11610
11611
11612 $check-mu-get-stmt:error-bad-output-type:
11613 (write-buffered *(ebp+0x10) "fn ")
11614 8b/-> *(ebp+0xc) 0/r32/eax
11615 (lookup *eax *(eax+4))
11616 (write-buffered *(ebp+0x10) %eax)
11617 (write-buffered *(ebp+0x10) ": stmt get: wrong output type for member '")
11618 (write-buffered *(ebp+0x10) %ecx)
11619 (write-buffered *(ebp+0x10) "' of type '")
11620 bf/copy-to-edi Type-id/imm32
11621 (write-buffered *(ebp+0x10) *(edi+ebx<<2+0xc))
11622 (write-buffered *(ebp+0x10) "'\n")
11623 (flush *(ebp+0x10))
11624 (stop *(ebp+0x14) 1)
11625
11626
11627 check-mu-index-stmt:
11628
11629 55/push-ebp
11630 89/<- %ebp 4/r32/esp
11631
11632 $check-mu-index-stmt:end:
11633
11634
11635 89/<- %esp 5/r32/ebp
11636 5d/pop-to-ebp
11637 c3/return
11638
11639 check-mu-length-stmt:
11640
11641 55/push-ebp
11642 89/<- %ebp 4/r32/esp
11643
11644 $check-mu-length-stmt:end:
11645
11646
11647 89/<- %esp 5/r32/ebp
11648 5d/pop-to-ebp
11649 c3/return
11650
11651 check-mu-compute-offset-stmt:
11652
11653 55/push-ebp
11654 89/<- %ebp 4/r32/esp
11655
11656 $check-mu-compute-offset-stmt:end:
11657
11658
11659 89/<- %esp 5/r32/ebp
11660 5d/pop-to-ebp
11661 c3/return
11662
11663 check-mu-lookup-stmt:
11664
11665 55/push-ebp
11666 89/<- %ebp 4/r32/esp
11667
11668 $check-mu-lookup-stmt:end:
11669
11670
11671 89/<- %esp 5/r32/ebp
11672 5d/pop-to-ebp
11673 c3/return
11674
11675 check-mu-call:
11676
11677 55/push-ebp
11678 89/<- %ebp 4/r32/esp
11679
11680 50/push-eax
11681 51/push-ecx
11682 52/push-edx
11683 53/push-ebx
11684 56/push-esi
11685 57/push-edi
11686
11687 8b/-> *(ebp+8) 6/r32/esi
11688
11689 8b/-> *(ebp+0xc) 7/r32/edi
11690
11691 (lookup *(esi+0xc) *(esi+0x10))
11692 89/<- %ecx 0/r32/eax
11693
11694 (lookup *(edi+8) *(edi+0xc))
11695 89/<- %edx 0/r32/eax
11696 {
11697 $check-mu-call:check-for-inouts:
11698
11699 81 7/subop/compare %ecx 0/imm32
11700 0f 84/jump-if-= break/disp32
11701
11702 81 7/subop/compare %edx 0/imm32
11703 0f 84/jump-if-= break/disp32
11704 $check-mu-call:check-inout-type:
11705
11706 (lookup *ecx *(ecx+4))
11707
11708 (lookup *(eax+8) *(eax+0xc))
11709 89/<- %ebx 0/r32/eax
11710
11711 81 7/subop/compare *(ecx+0x10) 0/imm32/false
11712 {
11713 74/jump-if-= break/disp8
11714 (lookup *(ebx+0xc) *(ebx+0x10))
11715 89/<- %ebx 0/r32/eax
11716
11717 81 7/subop/compare *(ebx+0xc) 0/imm32
11718 75/jump-if-!= break/disp8
11719 (lookup *(ebx+4) *(ebx+8))
11720 89/<- %ebx 0/r32/eax
11721 }
11722
11723 (lookup *edx *(edx+4))
11724
11725 (lookup *(eax+8) *(eax+0xc))
11726
11727 (type-match? %eax %ebx)
11728 3d/compare-eax-and 0/imm32/false
11729 {
11730 0f 85/jump-if-!= break/disp32
11731 (write-buffered *(ebp+0x14) "fn ")
11732 8b/-> *(ebp+0x10) 0/r32/eax
11733 (lookup *eax *(eax+4))
11734 (write-buffered *(ebp+0x14) %eax)
11735 (write-buffered *(ebp+0x14) ": call ")
11736 (lookup *edi *(edi+4))
11737 (write-buffered *(ebp+0x14) %eax)
11738 (write-buffered *(ebp+0x14) ": type for inout '")
11739 (lookup *ecx *(ecx+4))
11740 (lookup *eax *(eax+4))
11741 (write-buffered *(ebp+0x14) %eax)
11742 (write-buffered *(ebp+0x14) "' is not right\n")
11743 (flush *(ebp+0x14))
11744 (stop *(ebp+0x18) 1)
11745 }
11746 $check-mu-call:continue-to-next-inout:
11747
11748 (lookup *(ecx+8) *(ecx+0xc))
11749 89/<- %ecx 0/r32/eax
11750
11751 (lookup *(edx+8) *(edx+0xc))
11752 89/<- %edx 0/r32/eax
11753
11754 e9/jump loop/disp32
11755 }
11756 $check-mu-call:check-inout-count:
11757
11758 39/compare %ecx 2/r32/edx
11759 {
11760 0f 84/jump-if-= break/disp32
11761
11762
11763 {
11764 81 7/subop/compare %ecx 0/imm32
11765 0f 84/jump-if-= break/disp32
11766 (write-buffered *(ebp+0x14) "fn ")
11767 8b/-> *(ebp+0x10) 0/r32/eax
11768 (lookup *eax *(eax+4))
11769 (write-buffered *(ebp+0x14) %eax)
11770 (write-buffered *(ebp+0x14) ": call ")
11771 (lookup *edi *(edi+4))
11772 (write-buffered *(ebp+0x14) %eax)
11773 (write-buffered *(ebp+0x14) ": too many inouts\n")
11774 (flush *(ebp+0x14))
11775 (stop *(ebp+0x18) 1)
11776 }
11777
11778 {
11779 81 7/subop/compare %edx 0/imm32
11780 0f 84/jump-if-= break/disp32
11781 (write-buffered *(ebp+0x14) "fn ")
11782 8b/-> *(ebp+0x10) 0/r32/eax
11783 (lookup *eax *(eax+4))
11784 (write-buffered *(ebp+0x14) %eax)
11785 (write-buffered *(ebp+0x14) ": call ")
11786 (lookup *edi *(edi+4))
11787 (write-buffered *(ebp+0x14) %eax)
11788 (write-buffered *(ebp+0x14) ": too few inouts\n")
11789 (flush *(ebp+0x14))
11790 (stop *(ebp+0x18) 1)
11791 }
11792 }
11793 $check-mu-call:check-outputs:
11794
11795 (lookup *(esi+0x14) *(esi+0x18))
11796 89/<- %ecx 0/r32/eax
11797
11798 (lookup *(edi+0x10) *(edi+0x14))
11799 89/<- %edx 0/r32/eax
11800 {
11801 $check-mu-call:check-for-outputs:
11802
11803 81 7/subop/compare %ecx 0/imm32
11804 0f 84/jump-if-= break/disp32
11805
11806 81 7/subop/compare %edx 0/imm32
11807 0f 84/jump-if-= break/disp32
11808 $check-mu-call:check-output-type:
11809
11810 (lookup *ecx *(ecx+4))
11811
11812 (lookup *(eax+8) *(eax+0xc))
11813 89/<- %ebx 0/r32/eax
11814
11815 81 7/subop/compare *(ecx+0x10) 0/imm32/false
11816 {
11817 74/jump-if-= break/disp8
11818 (lookup *(ebx+0xc) *(ebx+0x10))
11819 89/<- %ebx 0/r32/eax
11820 }
11821
11822 (lookup *edx *(edx+4))
11823
11824 (lookup *(eax+8) *(eax+0xc))
11825
11826 (type-equal? %eax %ebx)
11827 3d/compare-eax-and 0/imm32/false
11828 {
11829 0f 85/jump-if-!= break/disp32
11830 (write-buffered *(ebp+0x14) "fn ")
11831 8b/-> *(ebp+0x10) 0/r32/eax
11832 (lookup *eax *(eax+4))
11833 (write-buffered *(ebp+0x14) %eax)
11834 (write-buffered *(ebp+0x14) ": call ")
11835 (lookup *edi *(edi+4))
11836 (write-buffered *(ebp+0x14) %eax)
11837 (write-buffered *(ebp+0x14) ": type for output '")
11838 (lookup *ecx *(ecx+4))
11839 (lookup *eax *(eax+4))
11840 (write-buffered *(ebp+0x14) %eax)
11841 (write-buffered *(ebp+0x14) "' is not right\n")
11842 (flush *(ebp+0x14))
11843 (stop *(ebp+0x18) 1)
11844 }
11845 $check-mu-call:check-output-register:
11846
11847 (lookup *ecx *(ecx+4))
11848
11849 (lookup *(eax+18) *(eax+0x1c))
11850 89/<- %ebx 0/r32/eax
11851
11852 (lookup *edx *(edx+4))
11853
11854 (lookup *(eax+18) *(eax+0x1c))
11855
11856 (string-equal? %eax %ebx)
11857 3d/compare-eax-and 0/imm32/false
11858 {
11859 0f 85/jump-if-!= break/disp32
11860 (write-buffered *(ebp+0x14) "fn ")
11861 8b/-> *(ebp+0x10) 0/r32/eax
11862 (lookup *eax *(eax+4))
11863 (write-buffered *(ebp+0x14) %eax)
11864 (write-buffered *(ebp+0x14) ": call ")
11865 (lookup *edi *(edi+4))
11866 (write-buffered *(ebp+0x14) %eax)
11867 (write-buffered *(ebp+0x14) ": register for output '")
11868 (lookup *ecx *(ecx+4))
11869 (lookup *eax *(eax+4))
11870 (write-buffered *(ebp+0x14) %eax)
11871 (write-buffered *(ebp+0x14) "' is not right\n")
11872 (flush *(ebp+0x14))
11873 (stop *(ebp+0x18) 1)
11874 }
11875 $check-mu-call:continue-to-next-output:
11876
11877 (lookup *(ecx+8) *(ecx+0xc))
11878 89/<- %ecx 0/r32/eax
11879
11880 (lookup *(edx+8) *(edx+0xc))
11881 89/<- %edx 0/r32/eax
11882
11883 e9/jump loop/disp32
11884 }
11885 $check-mu-call:check-output-count:
11886
11887 39/compare %ecx 2/r32/edx
11888 {
11889 0f 84/jump-if-= break/disp32
11890
11891
11892 {
11893 81 7/subop/compare %ecx 0/imm32
11894 0f 84/jump-if-= break/disp32
11895 (write-buffered *(ebp+0x14) "fn ")
11896 8b/-> *(ebp+0x10) 0/r32/eax
11897 (lookup *eax *(eax+4))
11898 (write-buffered *(ebp+0x14) %eax)
11899 (write-buffered *(ebp+0x14) ": call ")
11900 (lookup *edi *(edi+4))
11901 (write-buffered *(ebp+0x14) %eax)
11902 (write-buffered *(ebp+0x14) ": too many outputs\n")
11903 (flush *(ebp+0x14))
11904 (stop *(ebp+0x18) 1)
11905 }
11906
11907 {
11908 81 7/subop/compare %edx 0/imm32
11909 0f 84/jump-if-= break/disp32
11910 (write-buffered *(ebp+0x14) "fn ")
11911 8b/-> *(ebp+0x10) 0/r32/eax
11912 (lookup *eax *(eax+4))
11913 (write-buffered *(ebp+0x14) %eax)
11914 (write-buffered *(ebp+0x14) ": call ")
11915 (lookup *edi *(edi+4))
11916 (write-buffered *(ebp+0x14) %eax)
11917 (write-buffered *(ebp+0x14) ": too few outputs\n")
11918 (flush *(ebp+0x14))
11919 (stop *(ebp+0x18) 1)
11920 }
11921 }
11922 $check-mu-call:end:
11923
11924 5f/pop-to-edi
11925 5e/pop-to-esi
11926 5b/pop-to-ebx
11927 5a/pop-to-edx
11928 59/pop-to-ecx
11929 58/pop-to-eax
11930
11931 89/<- %esp 5/r32/ebp
11932 5d/pop-to-ebp
11933 c3/return
11934
11935
11936 type-match?:
11937
11938 55/push-ebp
11939 89/<- %ebp 4/r32/esp
11940
11941 (is-simple-mu-type? *(ebp+0xc) 0)
11942 3d/compare-eax-and 0/imm32/false
11943 b8/copy-to-eax 1/imm32/true
11944 75/jump-if-!= $type-match?:end/disp8
11945 $type-match?:baseline:
11946
11947 (type-equal? *(ebp+8) *(ebp+0xc))
11948 $type-match?:end:
11949
11950 89/<- %esp 5/r32/ebp
11951 5d/pop-to-ebp
11952 c3/return
11953
11954 size-of:
11955
11956 55/push-ebp
11957 89/<- %ebp 4/r32/esp
11958
11959 51/push-ecx
11960
11961 8b/-> *(ebp+8) 1/r32/ecx
11962
11963
11964
11965
11966
11967
11968
11969 (lookup *(ecx+8) *(ecx+0xc))
11970 89/<- %ecx 0/r32/eax
11971
11972 {
11973 (is-mu-array? %ecx)
11974 3d/compare-eax-and 0/imm32/false
11975 74/jump-if-= break/disp8
11976 (size-of-array %ecx)
11977 eb/jump $size-of:end/disp8
11978 }
11979
11980 {
11981 81 7/subop/compare *ecx 0/imm32/false
11982 75/jump-if-!= break/disp8
11983 (lookup *(ecx+4) *(ecx+8))
11984 89/<- %ecx 0/r32/eax
11985 }
11986
11987 (size-of-type-id *(ecx+4))
11988 $size-of:end:
11989
11990 59/pop-to-ecx
11991
11992 89/<- %esp 5/r32/ebp
11993 5d/pop-to-ebp
11994 c3/return
11995
11996 size-of-deref:
11997
11998 55/push-ebp
11999 89/<- %ebp 4/r32/esp
12000
12001 51/push-ecx
12002
12003 8b/-> *(ebp+8) 1/r32/ecx
12004 (lookup *(ecx+8) *(ecx+0xc))
12005 89/<- %ecx 0/r32/eax
12006
12007
12008 (lookup *(ecx+0xc) *(ecx+0x10))
12009 89/<- %ecx 0/r32/eax
12010
12011 {
12012 (is-mu-array? %ecx)
12013 3d/compare-eax-and 0/imm32/false
12014 74/jump-if-= break/disp8
12015 (size-of-array %ecx)
12016 eb/jump $size-of:end/disp8
12017 }
12018
12019 {
12020 81 7/subop/compare *ecx 0/imm32/false
12021 75/jump-if-!= break/disp8
12022 (lookup *(ecx+4) *(ecx+8))
12023 89/<- %ecx 0/r32/eax
12024 }
12025
12026 (size-of-type-id *(ecx+4))
12027 $size-of-deref:end:
12028
12029 59/pop-to-ecx
12030
12031 89/<- %esp 5/r32/ebp
12032 5d/pop-to-ebp
12033 c3/return
12034
12035 is-mu-array?:
12036
12037 55/push-ebp
12038 89/<- %ebp 4/r32/esp
12039
12040 51/push-ecx
12041
12042 8b/-> *(ebp+8) 1/r32/ecx
12043
12044 81 7/subop/compare *ecx 0/imm32/false
12045 75/jump-if-!= $is-mu-array?:return-false/disp8
12046
12047 (lookup *(ecx+4) *(ecx+8))
12048 81 7/subop/compare *eax 0/imm32/false
12049 74/jump-if-= $is-mu-array?:return-false/disp8
12050
12051 81 7/subop/compare *(eax+4) 3/imm32/array-type-id
12052 0f 94/set-if-= %al
12053 81 4/subop/and %eax 0xff/imm32
12054 eb/jump $is-mu-array?:end/disp8
12055 $is-mu-array?:return-false:
12056 b8/copy-to-eax 0/imm32/false
12057 $is-mu-array?:end:
12058
12059 59/pop-to-ecx
12060
12061 89/<- %esp 5/r32/ebp
12062 5d/pop-to-ebp
12063 c3/return
12064
12065 size-of-array:
12066
12067 55/push-ebp
12068 89/<- %ebp 4/r32/esp
12069
12070 51/push-ecx
12071 52/push-edx
12072
12073 8b/-> *(ebp+8) 1/r32/ecx
12074
12075 (lookup *(ecx+0xc) *(ecx+0x10))
12076 89/<- %ecx 0/r32/eax
12077
12078 (lookup *(ecx+4) *(ecx+8))
12079 8b/-> *(eax+4) 2/r32/edx
12080
12081
12082 (lookup *(ecx+0xc) *(ecx+0x10))
12083 (lookup *(eax+4) *(eax+8))
12084 8b/-> *(eax+8) 1/r32/ecx
12085
12086 (size-of-type-id-as-array-element %edx)
12087 f7 4/subop/multiply-into-eax %ecx
12088 05/add-to-eax 4/imm32
12089 $size-of-array:end:
12090
12091 5a/pop-to-edx
12092 59/pop-to-ecx
12093
12094 89/<- %esp 5/r32/ebp
12095 5d/pop-to-ebp
12096 c3/return
12097
12098 size-of-type-id:
12099
12100 55/push-ebp
12101 89/<- %ebp 4/r32/esp
12102
12103 51/push-ecx
12104
12105 68/push 0/imm32
12106 68/push 0/imm32
12107 89/<- %ecx 4/r32/esp
12108
12109 8b/-> *(ebp+8) 0/r32/eax
12110
12111 3d/compare-eax-and 0/imm32
12112 0f 84/jump-if-= $size-of-type-id:end/disp32
12113
12114 3d/compare-eax-and 8/imm32/byte
12115 {
12116 75/jump-if-!= break/disp8
12117 b8/copy-to-eax 4/imm32
12118 eb/jump $size-of-type-id:end/disp8
12119 }
12120
12121 3d/compare-eax-and 4/imm32/handle
12122 {
12123 75/jump-if-!= break/disp8
12124 b8/copy-to-eax 8/imm32
12125 eb/jump $size-of-type-id:end/disp8
12126 }
12127
12128
12129 (find-typeinfo %eax %ecx)
12130 {
12131 81 7/subop/compare *ecx 0/imm32
12132 74/jump-if-= break/disp8
12133 $size-of-type-id:user-defined:
12134 (lookup *ecx *(ecx+4))
12135 8b/-> *(eax+0xc) 0/r32/eax
12136 eb/jump $size-of-type-id:end/disp8
12137 }
12138
12139 b8/copy-to-eax 4/imm32
12140 $size-of-type-id:end:
12141
12142 81 0/subop/add %esp 8/imm32
12143
12144 59/pop-to-ecx
12145
12146 89/<- %esp 5/r32/ebp
12147 5d/pop-to-ebp
12148 c3/return
12149
12150 type-equal?:
12151
12152 55/push-ebp
12153 89/<- %ebp 4/r32/esp
12154
12155 51/push-ecx
12156 52/push-edx
12157 53/push-ebx
12158
12159 8b/-> *(ebp+8) 1/r32/ecx
12160
12161 8b/-> *(ebp+0xc) 2/r32/edx
12162 $type-equal?:compare-addr:
12163
12164 8b/-> %ecx 0/r32/eax
12165 39/compare %edx 0/r32/eax
12166 b8/copy-to-eax 1/imm32/true
12167 0f 84/jump-if-= $type-equal?:end/disp32
12168 $type-equal?:compare-atom-state:
12169
12170 8b/-> *ecx 3/r32/ebx
12171 39/compare *edx 3/r32/ebx
12172 b8/copy-to-eax 0/imm32/false
12173 0f 85/jump-if-!= $type-equal?:end/disp32
12174
12175 {
12176 $type-equal?:check-atom:
12177 81 7/subop/compare %ebx 0/imm32/false
12178 74/jump-if-= break/disp8
12179 $type-equal?:is-atom:
12180 8b/-> *(ecx+4) 0/r32/eax
12181 39/compare *(edx+4) 0/r32/eax
12182 0f 94/set-if-= %al
12183 81 4/subop/and %eax 0xff/imm32
12184 e9/jump $type-equal?:end/disp32
12185 }
12186 $type-equal?:check-left:
12187
12188 (lookup *(ecx+4) *(ecx+8))
12189 89/<- %ebx 0/r32/eax
12190 (lookup *(edx+4) *(edx+8))
12191 (type-equal? %eax %ebx)
12192 3d/compare-eax-and 0/imm32/false
12193 74/jump-if-= $type-equal?:end/disp8
12194 $type-equal?:check-right:
12195
12196 (lookup *(ecx+0xc) *(ecx+0x10))
12197 89/<- %ebx 0/r32/eax
12198 (lookup *(edx+0xc) *(edx+0x10))
12199 (type-equal? %eax %ebx)
12200 $type-equal?:end:
12201
12202 5b/pop-to-ebx
12203 5a/pop-to-edx
12204 59/pop-to-ecx
12205
12206 89/<- %esp 5/r32/ebp
12207 5d/pop-to-ebp
12208 c3/return
12209
12210
12211
12212
12213
12214 == data
12215
12216
12217 Curr-local-stack-offset:
12218 0/imm32
12219
12220 == code
12221
12222 emit-subx:
12223
12224 55/push-ebp
12225 89/<- %ebp 4/r32/esp
12226
12227 50/push-eax
12228
12229 (lookup *_Program-functions *_Program-functions->payload)
12230 {
12231
12232 3d/compare-eax-and 0/imm32
12233 0f 84/jump-if-= break/disp32
12234 (emit-subx-function *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10))
12235
12236 (lookup *(eax+0x20) *(eax+0x24))
12237 e9/jump loop/disp32
12238 }
12239 $emit-subx:end:
12240
12241 58/pop-to-eax
12242
12243 89/<- %esp 5/r32/ebp
12244 5d/pop-to-ebp
12245 c3/return
12246
12247 emit-subx-function:
12248
12249 55/push-ebp
12250 89/<- %ebp 4/r32/esp
12251
12252 (populate-mu-type-offsets-in-inouts *(ebp+0xc))
12253
12254 50/push-eax
12255 51/push-ecx
12256 52/push-edx
12257
12258 c7 0/subop/copy *Curr-block-depth 1/imm32
12259 c7 0/subop/copy *Curr-local-stack-offset 0/imm32
12260
12261 8b/-> *(ebp+0xc) 1/r32/ecx
12262
12263 81 5/subop/subtract %esp 0xc00/imm32
12264 68/push 0xc00/imm32/size
12265 68/push 0/imm32/top
12266 89/<- %edx 4/r32/esp
12267
12268 (lookup *ecx *(ecx+4))
12269
12270 (write-buffered *(ebp+8) %eax)
12271 (write-buffered *(ebp+8) ":\n")
12272 (emit-subx-prologue *(ebp+8))
12273
12274 (lookup *(ecx+0x18) *(ecx+0x1c))
12275
12276 (emit-subx-block *(ebp+8) %eax %edx *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
12277 (emit-subx-epilogue *(ebp+8))
12278
12279
12280 $emit-subx-function:end:
12281
12282 81 0/subop/add %esp 0xc08/imm32
12283
12284 5a/pop-to-edx
12285 59/pop-to-ecx
12286 58/pop-to-eax
12287
12288 89/<- %esp 5/r32/ebp
12289 5d/pop-to-ebp
12290 c3/return
12291
12292 populate-mu-type-offsets-in-inouts:
12293
12294 55/push-ebp
12295 89/<- %ebp 4/r32/esp
12296
12297 50/push-eax
12298 51/push-ecx
12299 52/push-edx
12300 53/push-ebx
12301 57/push-edi
12302
12303 ba/copy-to-edx 8/imm32
12304
12305 8b/-> *(ebp+8) 1/r32/ecx
12306 (lookup *(ecx+8) *(ecx+0xc))
12307 89/<- %ecx 0/r32/eax
12308 {
12309 $populate-mu-type-offsets-in-inouts:loop:
12310 81 7/subop/compare %ecx 0/imm32
12311 74/jump-if-= break/disp8
12312
12313 (lookup *ecx *(ecx+4))
12314 89/<- %ebx 0/r32/eax
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325 89/<- *(ebx+0x14) 2/r32/edx
12326
12327 (size-of %ebx)
12328 01/add-to %edx 0/r32/eax
12329
12330 (lookup *(ecx+8) *(ecx+0xc))
12331 89/<- %ecx 0/r32/eax
12332
12333 eb/jump loop/disp8
12334 }
12335 $populate-mu-type-offsets-in-inouts:end:
12336
12337 5f/pop-to-edi
12338 5b/pop-to-ebx
12339 5a/pop-to-edx
12340 59/pop-to-ecx
12341 58/pop-to-eax
12342
12343 89/<- %esp 5/r32/ebp
12344 5d/pop-to-ebp
12345 c3/return
12346
12347 emit-subx-stmt-list:
12348
12349 55/push-ebp
12350 89/<- %ebp 4/r32/esp
12351
12352 50/push-eax
12353 51/push-ecx
12354 53/push-ebx
12355 56/push-esi
12356
12357 8b/-> *(ebp+0xc) 6/r32/esi
12358
12359 {
12360 $emit-subx-stmt-list:loop:
12361 81 7/subop/compare %esi 0/imm32
12362 0f 84/jump-if-= break/disp32
12363
12364 (lookup *esi *(esi+4))
12365 89/<- %ecx 0/r32/eax
12366 {
12367 $emit-subx-stmt-list:check-for-block:
12368 81 7/subop/compare *ecx 0/imm32/block
12369 75/jump-if-!= break/disp8
12370 $emit-subx-stmt-list:block:
12371 (emit-subx-block *(ebp+8) %ecx *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
12372 }
12373 {
12374 $emit-subx-stmt-list:check-for-stmt:
12375 81 7/subop/compare *ecx 1/imm32/stmt1
12376 0f 85/jump-if-!= break/disp32
12377 $emit-subx-stmt-list:stmt1:
12378 {
12379 (is-mu-branch? %ecx)
12380 3d/compare-eax-and 0/imm32/false
12381 0f 84/jump-if-= break/disp32
12382 $emit-subx-stmt-list:branch-stmt:
12383 +-- 27 lines: # unconditional loops -----------------------------------------------------------------------------------------------------------------------------------------------------
12410 +-- 16 lines: # unconditional breaks ----------------------------------------------------------------------------------------------------------------------------------------------------
12426 +-- 38 lines: # simple conditional branches without a target ----------------------------------------------------------------------------------------------------------------------------
12464 +-- 19 lines: # conditional branches with an explicit target ----------------------------------------------------------------------------------------------------------------------------
12483 }
12484 $emit-subx-stmt-list:1-to-1:
12485 (emit-subx-stmt *(ebp+8) %ecx Primitives *(ebp+0x18) *(ebp+0x1c))
12486 e9/jump $emit-subx-stmt-list:continue/disp32
12487 }
12488 {
12489 $emit-subx-stmt-list:check-for-var-def:
12490 81 7/subop/compare *ecx 2/imm32/var-def
12491 75/jump-if-!= break/disp8
12492 $emit-subx-stmt-list:var-def:
12493 (emit-subx-var-def *(ebp+8) %ecx)
12494 (push *(ebp+0x10) *(ecx+4))
12495 (push *(ebp+0x10) *(ecx+8))
12496 (push *(ebp+0x10) 0)
12497
12498 eb/jump $emit-subx-stmt-list:continue/disp8
12499 }
12500 {
12501 $emit-subx-stmt-list:check-for-reg-var-def:
12502 81 7/subop/compare *ecx 3/imm32/reg-var-def
12503 0f 85/jump-if-!= break/disp32
12504 $emit-subx-stmt-list:reg-var-def:
12505
12506 (push-output-and-maybe-emit-spill *(ebp+8) %ecx *(ebp+0x10) %esi *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
12507
12508 (emit-subx-stmt *(ebp+8) %ecx Primitives *(ebp+0x18) *(ebp+0x1c))
12509
12510 eb/jump $emit-subx-stmt-list:continue/disp8
12511 }
12512 $emit-subx-stmt-list:continue:
12513
12514 (lookup *(esi+8) *(esi+0xc))
12515 89/<- %esi 0/r32/eax
12516 e9/jump loop/disp32
12517 }
12518 $emit-subx-stmt-list:emit-cleanup:
12519 (emit-cleanup-code-until-depth *(ebp+8) *(ebp+0x10) *Curr-block-depth)
12520 $emit-subx-stmt-list:clean-up:
12521 (clean-up-blocks *(ebp+0x10) *Curr-block-depth *(ebp+0x14))
12522 $emit-subx-stmt-list:end:
12523
12524 5e/pop-to-esi
12525 5b/pop-to-ebx
12526 59/pop-to-ecx
12527 58/pop-to-eax
12528
12529 89/<- %esp 5/r32/ebp
12530 5d/pop-to-ebp
12531 c3/return
12532
12533
12534 push-output-and-maybe-emit-spill:
12535
12536 55/push-ebp
12537 89/<- %ebp 4/r32/esp
12538
12539 50/push-eax
12540 51/push-ecx
12541 52/push-edx
12542
12543 8b/-> *(ebp+0xc) 1/r32/ecx
12544
12545 (lookup *(ecx+0x14) *(ecx+0x18))
12546
12547
12548 (lookup *eax *(eax+4))
12549 89/<- %ecx 0/r32/eax
12550
12551 8b/-> *Curr-block-depth 0/r32/eax
12552 89/<- *(ecx+0x10) 0/r32/eax
12553
12554
12555
12556
12557
12558
12559
12560
12561 81 7/subop/compare *(ecx+0x18) 0/imm32
12562 0f 84/jump-if-= $push-output-and-maybe-emit-spill:abort/disp32
12563
12564 (not-yet-spilled-this-block? %ecx *(ebp+0x10))
12565 89/<- %edx 0/r32/eax
12566 3d/compare-eax-and 0/imm32/false
12567 0f 84/jump-if-= $push-output-and-maybe-emit-spill:push/disp32
12568 (will-not-write-some-register? %ecx *(ebp+0x14) *(ebp+0x18))
12569 89/<- %edx 0/r32/eax
12570
12571 3d/compare-eax-and 0/imm32/false
12572 0f 84/jump-if-= $push-output-and-maybe-emit-spill:push/disp32
12573
12574
12575 81 5/subop/subtract *Curr-local-stack-offset 4/imm32
12576
12577 (emit-indent *(ebp+8) *Curr-block-depth)
12578 (write-buffered *(ebp+8) "ff 6/subop/push %")
12579 (lookup *(ecx+0x18) *(ecx+0x1c))
12580 (write-buffered *(ebp+8) %eax)
12581 (write-buffered *(ebp+8) Newline)
12582 $push-output-and-maybe-emit-spill:push:
12583 8b/-> *(ebp+0xc) 1/r32/ecx
12584 (lookup *(ecx+0x14) *(ecx+0x18))
12585
12586 (push *(ebp+0x10) *eax)
12587 (push *(ebp+0x10) *(eax+4))
12588 (push *(ebp+0x10) %edx)
12589 $push-output-and-maybe-emit-spill:end:
12590
12591 5a/pop-to-edx
12592 59/pop-to-ecx
12593 58/pop-to-eax
12594
12595 89/<- %esp 5/r32/ebp
12596 5d/pop-to-ebp
12597 c3/return
12598
12599 $push-output-and-maybe-emit-spill:abort:
12600
12601 (write-buffered *(ebp+0x1c) "var '")
12602 (write-buffered *(ebp+0x1c) *eax)
12603 (write-buffered *(ebp+0x1c) "' initialized from an instruction must live in a register\n")
12604 (flush *(ebp+0x1c))
12605 (stop *(ebp+0x20) 1)
12606
12607
12608 emit-subx-cleanup-and-unconditional-nonlocal-branch:
12609
12610 55/push-ebp
12611 89/<- %ebp 4/r32/esp
12612
12613 50/push-eax
12614 51/push-ecx
12615
12616 8b/-> *(ebp+0xc) 1/r32/ecx
12617
12618 (lookup *(ecx+0xc) *(ecx+0x10))
12619 (lookup *eax *(eax+4))
12620 (lookup *eax *(eax+4))
12621
12622 (emit-cleanup-code-until-target *(ebp+8) *(ebp+0x10) %eax)
12623
12624 (emit-indent *(ebp+8) *Curr-block-depth)
12625 (write-buffered *(ebp+8) "e9/jump ")
12626 (write-buffered *(ebp+8) %eax)
12627 (lookup *(ecx+4) *(ecx+8))
12628 (string-starts-with? %eax "break")
12629 3d/compare-eax-and 0/imm32/false
12630 {
12631 74/jump-if-= break/disp8
12632 (write-buffered *(ebp+8) ":break/disp32\n")
12633 }
12634 3d/compare-eax-and 0/imm32/false
12635 {
12636 75/jump-if-!= break/disp8
12637 (write-buffered *(ebp+8) ":loop/disp32\n")
12638 }
12639 $emit-subx-cleanup-and-unconditional-nonlocal-branch:end:
12640
12641 59/pop-to-ecx
12642 58/pop-to-eax
12643
12644 89/<- %esp 5/r32/ebp
12645 5d/pop-to-ebp
12646 c3/return
12647
12648 is-mu-branch?:
12649
12650 55/push-ebp
12651 89/<- %ebp 4/r32/esp
12652
12653 51/push-ecx
12654
12655 8b/-> *(ebp+8) 1/r32/ecx
12656 (lookup *(ecx+4) *(ecx+8))
12657 89/<- %ecx 0/r32/eax
12658
12659 (string-starts-with? %ecx "loop")
12660 3d/compare-eax-and 0/imm32/false
12661 75/jump-if-not-equal $is-mu-branch?:end/disp8
12662
12663 (string-starts-with? %ecx "break")
12664 $is-mu-branch?:end:
12665
12666 59/pop-to-ecx
12667
12668 89/<- %esp 5/r32/ebp
12669 5d/pop-to-ebp
12670 c3/return
12671
12672 emit-reverse-break:
12673
12674 55/push-ebp
12675 89/<- %ebp 4/r32/esp
12676
12677 50/push-eax
12678
12679 8b/-> *(ebp+0xc) 0/r32/eax
12680
12681 (lookup *(eax+4) *(eax+8))
12682 (get Reverse-branch %eax 0x10 "reverse-branch: ")
12683 (emit-indent *(ebp+8) *Curr-block-depth)
12684 (lookup *eax *(eax+4))
12685 (write-buffered *(ebp+8) %eax)
12686 (write-buffered *(ebp+8) " break/disp32\n")
12687 $emit-reverse-break:end:
12688
12689 58/pop-to-eax
12690
12691 89/<- %esp 5/r32/ebp
12692 5d/pop-to-ebp
12693 c3/return
12694
12695 == data
12696
12697
12698 Reverse-branch:
12699
12700 0x140/imm32/write
12701 0/imm32/read
12702 0x140/imm32/size
12703
12704 0x11/imm32/alloc-id _string-break-if-=/imm32 0x11/imm32/alloc-id _string_0f_85_jump_label/imm32
12705 0x11/imm32/alloc-id _string-loop-if-=/imm32 0x11/imm32/alloc-id _string_0f_85_jump_label/imm32
12706 0x11/imm32/alloc-id _string-break-if-!=/imm32 0x11/imm32/alloc-id _string_0f_84_jump_label/imm32
12707 0x11/imm32/alloc-id _string-loop-if-!=/imm32 0x11/imm32/alloc-id _string_0f_84_jump_label/imm32
12708 0x11/imm32/alloc-id _string-break-if-</imm32 0x11/imm32/alloc-id _string_0f_8d_jump_label/imm32
12709 0x11/imm32/alloc-id _string-loop-if-</imm32 0x11/imm32/alloc-id _string_0f_8d_jump_label/imm32
12710 0x11/imm32/alloc-id _string-break-if->/imm32 0x11/imm32/alloc-id _string_0f_8e_jump_label/imm32
12711 0x11/imm32/alloc-id _string-loop-if->/imm32 0x11/imm32/alloc-id _string_0f_8e_jump_label/imm32
12712 0x11/imm32/alloc-id _string-break-if-<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
12713 0x11/imm32/alloc-id _string-loop-if-<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
12714 0x11/imm32/alloc-id _string-break-if->=/imm32 0x11/imm32/alloc-id _string_0f_8c_jump_label/imm32
12715 0x11/imm32/alloc-id _string-loop-if->=/imm32 0x11/imm32/alloc-id _string_0f_8c_jump_label/imm32
12716 0x11/imm32/alloc-id _string-break-if-addr</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
12717 0x11/imm32/alloc-id _string-loop-if-addr</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
12718 0x11/imm32/alloc-id _string-break-if-addr>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
12719 0x11/imm32/alloc-id _string-loop-if-addr>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
12720 0x11/imm32/alloc-id _string-break-if-addr<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
12721 0x11/imm32/alloc-id _string-loop-if-addr<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
12722 0x11/imm32/alloc-id _string-break-if-addr>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
12723 0x11/imm32/alloc-id _string-loop-if-addr>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
12724
12725 == code
12726
12727 emit-unconditional-jump-to-depth:
12728
12729 55/push-ebp
12730 89/<- %ebp 4/r32/esp
12731
12732 50/push-eax
12733 51/push-ecx
12734 52/push-edx
12735 53/push-ebx
12736 56/push-esi
12737
12738 8b/-> *(ebp+0xc) 1/r32/ecx
12739
12740 8b/-> *ecx 0/r32/eax
12741
12742 8d/copy-address *(ecx+eax-4) 6/r32/esi
12743
12744 8d/copy-address *(ecx+8) 1/r32/ecx
12745
12746 8b/-> *(ebp+0x10) 2/r32/edx
12747 {
12748 $emit-unconditional-jump-to-depth:loop:
12749
12750 39/compare %esi 1/r32/ecx
12751 0f 82/jump-if-addr< break/disp32
12752
12753 (lookup *esi *(esi+4))
12754 89/<- %ebx 0/r32/eax
12755
12756 39/compare *(ebx+0x10) 2/r32/edx
12757 0f 8c/jump-if-< break/disp32
12758 {
12759 $emit-unconditional-jump-to-depth:check:
12760
12761 39/compare *(ebx+0x10) 2/r32/edx
12762 0f 85/jump-if-!= break/disp32
12763 $emit-unconditional-jump-to-depth:depth-found:
12764
12765 (size-of %ebx)
12766 3d/compare-eax-and 0/imm32
12767 0f 85/jump-if-!= break/disp32
12768 $emit-unconditional-jump-to-depth:label-found:
12769
12770 (emit-indent *(ebp+8) *Curr-block-depth)
12771 (write-buffered *(ebp+8) "e9/jump ")
12772 (lookup *ebx *(ebx+4))
12773 (write-buffered *(ebp+8) %eax)
12774 (write-buffered *(ebp+8) ":")
12775 (write-buffered *(ebp+8) *(ebp+0x14))
12776 (write-buffered *(ebp+8) "/disp32\n")
12777 eb/jump $emit-unconditional-jump-to-depth:end/disp8
12778 }
12779
12780 81 5/subop/subtract %esi 0xc/imm32
12781 e9/jump loop/disp32
12782 }
12783
12784 $emit-unconditional-jump-to-depth:end:
12785
12786 5e/pop-to-esi
12787 5b/pop-to-ebx
12788 5a/pop-to-edx
12789 59/pop-to-ecx
12790 58/pop-to-eax
12791
12792 89/<- %esp 5/r32/ebp
12793 5d/pop-to-ebp
12794 c3/return
12795
12796
12797
12798 emit-cleanup-code-until-depth:
12799
12800 55/push-ebp
12801 89/<- %ebp 4/r32/esp
12802
12803 50/push-eax
12804 51/push-ecx
12805 52/push-edx
12806 53/push-ebx
12807 56/push-esi
12808
12809
12810
12811 8b/-> *(ebp+0xc) 1/r32/ecx
12812
12813 8b/-> *ecx 6/r32/esi
12814
12815 8d/copy-address *(ecx+esi-4) 6/r32/esi
12816
12817 81 0/subop/add %ecx 8/imm32
12818
12819 8b/-> *(ebp+0x10) 2/r32/edx
12820 {
12821 $emit-cleanup-code-until-depth:loop:
12822
12823 39/compare %esi 1/r32/ecx
12824 0f 82/jump-if-addr< break/disp32
12825
12826 (lookup *esi *(esi+4))
12827 89/<- %ebx 0/r32/eax
12828
12829
12830
12831
12832
12833
12834 39/compare *(ebx+0x10) 2/r32/edx
12835 0f 8c/jump-if-< break/disp32
12836
12837 81 7/subop/compare *(ebx+0x18) 0/imm32
12838 {
12839 0f 84/jump-if-= break/disp32
12840 {
12841 $emit-cleanup-code-until-depth:check-for-previous-spill:
12842 8b/-> *(esi+8) 0/r32/eax
12843 3d/compare-eax-and 0/imm32/false
12844 74/jump-if-= break/disp8
12845 $emit-cleanup-code-until-depth:reclaim-var-in-register:
12846 (emit-indent *(ebp+8) *Curr-block-depth)
12847 (write-buffered *(ebp+8) "8f 0/subop/pop %")
12848 (lookup *(ebx+0x18) *(ebx+0x1c))
12849 (write-buffered *(ebp+8) %eax)
12850 (write-buffered *(ebp+8) Newline)
12851 }
12852 eb/jump $emit-cleanup-code-until-depth:continue/disp8
12853 }
12854
12855 {
12856 75/jump-if-!= break/disp8
12857 $emit-cleanup-code-until-depth:var-on-stack:
12858 (size-of %ebx)
12859
12860 3d/compare-eax-and 0/imm32
12861 74/jump-if-= break/disp8
12862 $emit-cleanup-code-until-depth:reclaim-var-on-stack:
12863 (emit-indent *(ebp+8) *Curr-block-depth)
12864 (write-buffered *(ebp+8) "81 0/subop/add %esp ")
12865 (write-int32-hex-buffered *(ebp+8) %eax)
12866 (write-buffered *(ebp+8) "/imm32\n")
12867 }
12868 $emit-cleanup-code-until-depth:continue:
12869
12870 81 5/subop/subtract %esi 0xc/imm32
12871 e9/jump loop/disp32
12872 }
12873 $emit-cleanup-code-until-depth:end:
12874
12875 5e/pop-to-esi
12876 5b/pop-to-ebx
12877 5a/pop-to-edx
12878 59/pop-to-ecx
12879 58/pop-to-eax
12880
12881 89/<- %esp 5/r32/ebp
12882 5d/pop-to-ebp
12883 c3/return
12884
12885
12886
12887 emit-cleanup-code-until-target:
12888
12889 55/push-ebp
12890 89/<- %ebp 4/r32/esp
12891
12892 50/push-eax
12893 51/push-ecx
12894 52/push-edx
12895 53/push-ebx
12896
12897 8b/-> *(ebp+0xc) 1/r32/ecx
12898
12899 8b/-> *ecx 0/r32/eax
12900
12901 8d/copy-address *(ecx+eax-4) 2/r32/edx
12902
12903 81 0/subop/add %ecx 8/imm32
12904 {
12905 $emit-cleanup-code-until-target:loop:
12906
12907 39/compare %edx 1/r32/ecx
12908 0f 82/jump-if-addr< break/disp32
12909
12910 (lookup *edx *(edx+4))
12911 89/<- %ebx 0/r32/eax
12912
12913 (lookup *ebx *(ebx+4))
12914 (string-equal? %eax *(ebp+0x10))
12915 3d/compare-eax-and 0/imm32/false
12916 0f 85/jump-if-!= break/disp32
12917
12918 81 7/subop/compare *(ebx+0x18) 0/imm32
12919 {
12920 0f 84/jump-if-= break/disp32
12921 {
12922 $emit-cleanup-code-until-target:check-for-previous-spill:
12923 8b/-> *(edx+8) 0/r32/eax
12924 3d/compare-eax-and 0/imm32/false
12925 74/jump-if-= break/disp8
12926 $emit-cleanup-code-until-target:reclaim-var-in-register:
12927 (emit-indent *(ebp+8) *Curr-block-depth)
12928 (write-buffered *(ebp+8) "8f 0/subop/pop %")
12929 (lookup *(ebx+0x18) *(ebx+0x1c))
12930 (write-buffered *(ebp+8) %eax)
12931 (write-buffered *(ebp+8) Newline)
12932 }
12933 eb/jump $emit-cleanup-code-until-target:continue/disp8
12934 }
12935
12936 {
12937 75/jump-if-!= break/disp8
12938 $emit-cleanup-code-until-target:reclaim-var-on-stack:
12939 (size-of %ebx)
12940
12941 3d/compare-eax-and 0/imm32
12942 74/jump-if-= break/disp8
12943
12944 (emit-indent *(ebp+8) *Curr-block-depth)
12945 (write-buffered *(ebp+8) "81 0/subop/add %esp ")
12946 (write-int32-hex-buffered *(ebp+8) %eax)
12947 (write-buffered *(ebp+8) "/imm32\n")
12948 }
12949 $emit-cleanup-code-until-target:continue:
12950
12951 81 5/subop/subtract %edx 0xc/imm32
12952 e9/jump loop/disp32
12953 }
12954 $emit-cleanup-code-until-target:end:
12955
12956 5b/pop-to-ebx
12957 5a/pop-to-edx
12958 59/pop-to-ecx
12959 58/pop-to-eax
12960
12961 89/<- %esp 5/r32/ebp
12962 5d/pop-to-ebp
12963 c3/return
12964
12965
12966
12967
12968 not-yet-spilled-this-block?:
12969
12970 55/push-ebp
12971 89/<- %ebp 4/r32/esp
12972
12973 51/push-ecx
12974 52/push-edx
12975 53/push-ebx
12976 56/push-esi
12977 57/push-edi
12978
12979 8b/-> *(ebp+0xc) 1/r32/ecx
12980
12981 8b/-> *ecx 0/r32/eax
12982
12983 8d/copy-address *(ecx+eax-4) 2/r32/edx
12984
12985 8d/copy-address *(ecx+8) 1/r32/ecx
12986
12987 8b/-> *(ebp+8) 3/r32/ebx
12988 8b/-> *(ebx+0x10) 3/r32/ebx
12989
12990 8b/-> *(ebp+8) 6/r32/esi
12991 (lookup *(esi+0x18) *(esi+0x1c))
12992 89/<- %esi 0/r32/eax
12993 {
12994 $not-yet-spilled-this-block?:loop:
12995
12996 39/compare %edx 1/r32/ecx
12997 0f 82/jump-if-addr< break/disp32
12998
12999 (lookup *edx *(edx+4))
13000 89/<- %edi 0/r32/eax
13001
13002 39/compare *(edi+0x10) 3/r32/ebx
13003 0f 8c/jump-if-< break/disp32
13004
13005 (lookup *(edi+0x18) *(edi+0x1c))
13006 89/<- %edi 0/r32/eax
13007
13008 {
13009 $not-yet-spilled-this-block?:check-reg:
13010 81 7/subop/compare %edi 0/imm32
13011 0f 84/jump-if-= break/disp32
13012
13013 (string-equal? %esi %edi)
13014 3d/compare-eax-and 0/imm32/false
13015 74/jump-if-= break/disp8
13016 $not-yet-spilled-this-block?:return-false:
13017 b8/copy-to-eax 0/imm32/false
13018 eb/jump $not-yet-spilled-this-block?:end/disp8
13019 }
13020 $not-yet-spilled-this-block?:continue:
13021
13022 81 5/subop/subtract %edx 0xc/imm32
13023 e9/jump loop/disp32
13024 }
13025 $not-yet-spilled-this-block?:return-true:
13026
13027 b8/copy-to-eax 1/imm32/true
13028 $not-yet-spilled-this-block?:end:
13029
13030 5f/pop-to-edi
13031 5e/pop-to-esi
13032 5b/pop-to-ebx
13033 5a/pop-to-edx
13034 59/pop-to-ecx
13035
13036 89/<- %esp 5/r32/ebp
13037 5d/pop-to-ebp
13038 c3/return
13039
13040
13041 will-not-write-some-register?:
13042
13043 55/push-ebp
13044 89/<- %ebp 4/r32/esp
13045
13046 8b/-> *(ebp+8) 0/r32/eax
13047
13048 (lookup *(eax+0x18) *(eax+0x1c))
13049
13050 (find-register *(ebp+0x10) %eax)
13051
13052 {
13053 3d/compare-eax-and 0/imm32
13054 75/jump-if-!= break/disp8
13055 b8/copy-to-eax 1/imm32/true
13056 eb/jump $will-not-write-some-register?:end/disp8
13057 }
13058
13059 (assigns-in-stmts? *(ebp+0xc) %eax)
13060 3d/compare-eax-and 0/imm32/false
13061
13062 0f 94/set-if-= %al
13063 $will-not-write-some-register?:end:
13064
13065 89/<- %esp 5/r32/ebp
13066 5d/pop-to-ebp
13067 c3/return
13068
13069
13070
13071 find-register:
13072
13073 55/push-ebp
13074 89/<- %ebp 4/r32/esp
13075
13076 51/push-ecx
13077
13078 8b/-> *(ebp+8) 1/r32/ecx
13079 (lookup *(ecx+0x10) *(ecx+0x14))
13080 89/<- %ecx 0/r32/eax
13081 {
13082 $find-register:loop:
13083
13084 81 7/subop/compare %ecx 0/imm32
13085 74/jump-if-= break/disp8
13086
13087 (lookup *ecx *(ecx+4))
13088 (lookup *(eax+0x18) *(eax+0x1c))
13089
13090 $find-register:compare:
13091 (string-equal? *(ebp+0xc) %eax)
13092 {
13093 3d/compare-eax-and 0/imm32/false
13094 74/jump-if-= break/disp8
13095 $find-register:found:
13096 (lookup *ecx *(ecx+4))
13097 eb/jump $find-register:end/disp8
13098 }
13099
13100 (lookup *(ecx+8) *(ecx+0xc))
13101 89/<- %ecx 0/r32/eax
13102
13103 eb/jump loop/disp8
13104 }
13105 $find-register:end:
13106
13107 59/pop-to-ecx
13108
13109 89/<- %esp 5/r32/ebp
13110 5d/pop-to-ebp
13111 c3/return
13112
13113 assigns-in-stmts?:
13114
13115 55/push-ebp
13116 89/<- %ebp 4/r32/esp
13117
13118 51/push-ecx
13119
13120 8b/-> *(ebp+8) 1/r32/ecx
13121 {
13122
13123 81 7/subop/compare %ecx 0/imm32
13124 74/jump-if-= break/disp8
13125
13126 (lookup *ecx *(ecx+4))
13127 (assigns-in-stmt? %eax *(ebp+0xc))
13128 3d/compare-eax-and 0/imm32/false
13129 75/jump-if-!= break/disp8
13130
13131 (lookup *(ecx+8) *(ecx+0xc))
13132 89/<- %ecx 0/r32/eax
13133
13134 eb/jump loop/disp8
13135 }
13136 $assigns-in-stmts?:end:
13137
13138 59/pop-to-ecx
13139
13140 89/<- %esp 5/r32/ebp
13141 5d/pop-to-ebp
13142 c3/return
13143
13144 assigns-in-stmt?:
13145
13146 55/push-ebp
13147 89/<- %ebp 4/r32/esp
13148
13149 51/push-ecx
13150
13151 8b/-> *(ebp+8) 1/r32/ecx
13152
13153 {
13154 81 7/subop/compare *ecx 1/imm32/stmt1
13155 75/jump-if-!= break/disp8
13156 (lookup *(ecx+0x14) *(ecx+0x18))
13157 (assigns-in-stmt-vars? %eax *(ebp+0xc))
13158 eb/jump $assigns-in-stmt?:end/disp8
13159 }
13160
13161 {
13162 81 7/subop/compare *ecx 0/imm32/block
13163 75/jump-if-!= break/disp8
13164 (lookup *(ecx+4) *(ecx+8))
13165 (assigns-in-stmts? %eax *(ebp+0xc))
13166 eb/jump $assigns-in-stmt?:end/disp8
13167 }
13168
13169 b8/copy 0/imm32/false
13170 $assigns-in-stmt?:end:
13171
13172 59/pop-to-ecx
13173
13174 89/<- %esp 5/r32/ebp
13175 5d/pop-to-ebp
13176 c3/return
13177
13178 assigns-in-stmt-vars?:
13179
13180 55/push-ebp
13181 89/<- %ebp 4/r32/esp
13182
13183 51/push-ecx
13184
13185 8b/-> *(ebp+8) 1/r32/ecx
13186 {
13187
13188 81 7/subop/compare %ecx 0/imm32
13189 74/jump-if-= break/disp8
13190
13191 (lookup *ecx *(ecx+4))
13192
13193 {
13194 39/compare *(ebp+0xc) 0/r32/eax
13195 75/jump-if-!= break/disp8
13196 81 7/subop/compare *(ecx+0x10) 0/imm32/false
13197 75/jump-if-!= break/disp8
13198 b8/copy-to-eax 1/imm32/true
13199 eb/jump $assigns-in-stmt-vars?:end/disp8
13200 }
13201
13202 (lookup *(ecx+8) *(ecx+0xc))
13203 89/<- %ecx 0/r32/eax
13204
13205 eb/jump loop/disp8
13206 }
13207 $assigns-in-stmt-vars?:end:
13208
13209 59/pop-to-ecx
13210
13211 89/<- %esp 5/r32/ebp
13212 5d/pop-to-ebp
13213 c3/return
13214
13215
13216
13217
13218
13219 same-register-spilled-before?:
13220
13221 55/push-ebp
13222 89/<- %ebp 4/r32/esp
13223
13224 51/push-ecx
13225 52/push-edx
13226 53/push-ebx
13227 56/push-esi
13228 57/push-edi
13229
13230 8b/-> *(ebp+8) 1/r32/ecx
13231
13232 (lookup *(ecx+0x18) *(ecx+0x1c))
13233 89/<- %edx 0/r32/eax
13234
13235 8b/-> *(ecx+0x10) 3/r32/ebx
13236
13237 8b/-> *(ebp+0xc) 1/r32/ecx
13238 81 0/subop/add %ecx 8/imm32
13239
13240
13241
13242 8b/-> *(ebp+0x10) 6/r32/esi
13243
13244 81 5/subop/subtract %esi 8/imm32
13245 {
13246 $same-register-spilled-before?:loop:
13247
13248 39/compare %esi 1/r32/ecx
13249 0f 82/jump-if-addr< break/disp32
13250
13251 (lookup *esi *(esi+4))
13252
13253 39/compare *(eax+0x10) 3/r32/ebx
13254 0f 8c/jump-if-< break/disp32
13255
13256 81 7/subop/compare *(eax+0x18) 0/imm32
13257 74/jump-if-= $same-register-spilled-before?:continue/disp8
13258
13259 (lookup *(eax+0x18) *(eax+0x1c))
13260 (string-equal? %eax %edx)
13261 3d/compare-eax-and 0/imm32/false
13262 b8/copy-to-eax 1/imm32/true
13263 75/jump-if-!= $same-register-spilled-before?:end/disp8
13264 $same-register-spilled-before?:continue:
13265
13266 81 5/subop/subtract %esi 8/imm32
13267 e9/jump loop/disp32
13268 }
13269 $same-register-spilled-before?:false:
13270 b8/copy-to-eax 0/imm32/false
13271 $same-register-spilled-before?:end:
13272
13273 5f/pop-to-edi
13274 5e/pop-to-esi
13275 5b/pop-to-ebx
13276 5a/pop-to-edx
13277 59/pop-to-ecx
13278
13279 89/<- %esp 5/r32/ebp
13280 5d/pop-to-ebp
13281 c3/return
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296 clean-up-blocks:
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320 55/push-ebp
13321 89/<- %ebp 4/r32/esp
13322
13323 50/push-eax
13324 52/push-edx
13325 53/push-ebx
13326 56/push-esi
13327 57/push-edi
13328
13329 8b/-> *(ebp+8) 3/r32/ebx
13330
13331 8b/-> *(ebp+0xc) 2/r32/edx
13332 $clean-up-blocks:phase1:
13333
13334 8b/-> *ebx 7/r32/edi
13335 {
13336 $clean-up-blocks:loop1:
13337
13338 81 7/subop/compare %edi 0/imm32
13339 7e/jump-if-<= break/disp8
13340
13341 8d/copy-address *(ebx+edi-4) 0/r32/eax
13342 (lookup *eax *(eax+4))
13343
13344 39/compare *(eax+0x10) 2/r32/edx
13345 {
13346 7d/jump-if->= break/disp8
13347
13348 (in-function-outputs? *(ebp+0x10) %eax)
13349 3d/compare-eax-and 0/imm32/false
13350 74/jump-if-= $clean-up-blocks:phase2/disp8
13351 }
13352 $clean-up-blocks:loop1-continue:
13353
13354 81 5/subop/subtract %edi 0xc/imm32
13355
13356 eb/jump loop/disp8
13357 }
13358 $clean-up-blocks:phase2:
13359
13360 89/<- %esi 7/r32/edi
13361 {
13362 $clean-up-blocks:loop2:
13363
13364 3b/compare 6/r32/esi *ebx
13365 7d/jump-if->= break/disp8
13366
13367 8d/copy-address *(ebx+esi+8) 0/r32/eax
13368 (lookup *eax *(eax+4))
13369
13370 (in-function-outputs? *(ebp+0x10) %eax)
13371 3d/compare-eax-and 0/imm32/false
13372 74/jump-if-= $clean-up-blocks:loop2-continue/disp8
13373
13374
13375 {
13376 39/compare %esi 7/r32/edi
13377 7e/jump-if-<= break/disp8
13378 56/push-esi
13379 57/push-edi
13380
13381 8d/copy-address *(ebx+esi+8) 6/r32/esi
13382
13383 8d/copy-address *(ebx+edi+8) 7/r32/edi
13384
13385 8b/-> *esi 0/r32/eax
13386 89/<- *edi 0/r32/eax
13387 8b/-> *(esi+4) 0/r32/eax
13388 89/<- *(edi+4) 0/r32/eax
13389 8b/-> *(esi+8) 0/r32/eax
13390 89/<- *(edi+8) 0/r32/eax
13391 5f/pop-to-edi
13392 5e/pop-to-esi
13393 }
13394
13395 81 0/subop/add %edi 0xc/imm32
13396 $clean-up-blocks:loop2-continue:
13397
13398 81 0/subop/add %esi 0xc/imm32
13399
13400 eb/jump loop/disp8
13401 }
13402 89/<- *ebx 7/r32/edi
13403 $clean-up-blocks:end:
13404
13405 5f/pop-to-edi
13406 5e/pop-to-esi
13407 5b/pop-to-ebx
13408 5a/pop-to-edx
13409 58/pop-to-eax
13410
13411 89/<- %esp 5/r32/ebp
13412 5d/pop-to-ebp
13413 c3/return
13414
13415 in-function-outputs?:
13416
13417 55/push-ebp
13418 89/<- %ebp 4/r32/esp
13419
13420 51/push-ecx
13421
13422 8b/-> *(ebp+8) 1/r32/ecx
13423 (lookup *(ecx+0x10) *(ecx+0x14))
13424 89/<- %ecx 0/r32/eax
13425
13426 {
13427 81 7/subop/compare %ecx 0/imm32
13428 74/jump-if-= break/disp8
13429
13430 (lookup *ecx *(ecx+4))
13431
13432 39/compare *(ebp+0xc) 0/r32/eax
13433 b8/copy-to-eax 1/imm32/true
13434 74/jump-if-= $in-function-outputs?:end/disp8
13435
13436 (lookup *(ecx+8) *(ecx+0xc))
13437 89/<- %ecx 0/r32/eax
13438
13439 eb/jump loop/disp8
13440 }
13441 b8/copy-to-eax 0/imm32
13442 $in-function-outputs?:end:
13443
13444 59/pop-to-ecx
13445
13446 89/<- %esp 5/r32/ebp
13447 5d/pop-to-ebp
13448 c3/return
13449
13450 emit-subx-var-def:
13451
13452 55/push-ebp
13453 89/<- %ebp 4/r32/esp
13454
13455 50/push-eax
13456 51/push-ecx
13457 52/push-edx
13458
13459 8b/-> *(ebp+0xc) 0/r32/eax
13460
13461 (lookup *(eax+4) *(eax+8))
13462 89/<- %ecx 0/r32/eax
13463
13464 8b/-> *Curr-block-depth 0/r32/eax
13465 89/<- *(ecx+0x10) 0/r32/eax
13466
13467 (size-of %ecx)
13468 89/<- %edx 0/r32/eax
13469
13470 29/subtract-from *Curr-local-stack-offset 2/r32/edx
13471
13472 8b/-> *Curr-local-stack-offset 0/r32/eax
13473 89/<- *(ecx+0x14) 0/r32/eax
13474
13475 {
13476 (lookup *(ecx+8) *(ecx+0xc))
13477 (is-mu-array? %eax)
13478 3d/compare-eax-and 0/imm32/false
13479 0f 84/jump-if-= break/disp32
13480
13481 81 5/subop/subtract %edx 4/imm32
13482 (emit-indent *(ebp+8) *Curr-block-depth)
13483 (write-buffered *(ebp+8) "(push-n-zero-bytes ")
13484 (write-int32-hex-buffered *(ebp+8) %edx)
13485 (write-buffered *(ebp+8) ")\n")
13486 (emit-indent *(ebp+8) *Curr-block-depth)
13487 (write-buffered *(ebp+8) "68/push ")
13488 (write-int32-hex-buffered *(ebp+8) %edx)
13489 (write-buffered *(ebp+8) "/imm32\n")
13490 eb/jump $emit-subx-var-def:end/disp8
13491 }
13492
13493 {
13494 81 7/subop/compare %edx 0/imm32
13495 7e/jump-if-<= break/disp8
13496 (emit-indent *(ebp+8) *Curr-block-depth)
13497 (write-buffered *(ebp+8) "68/push 0/imm32\n")
13498
13499 81 5/subop/subtract %edx 4/imm32
13500
13501 eb/jump loop/disp8
13502 }
13503 $emit-subx-var-def:end:
13504
13505 5a/pop-to-edx
13506 59/pop-to-ecx
13507 58/pop-to-eax
13508
13509 89/<- %esp 5/r32/ebp
13510 5d/pop-to-ebp
13511 c3/return
13512
13513 emit-subx-stmt:
13514
13515 55/push-ebp
13516 89/<- %ebp 4/r32/esp
13517
13518 50/push-eax
13519 51/push-ecx
13520
13521
13522 8b/-> *(ebp+0xc) 1/r32/ecx
13523 (lookup *(ecx+4) *(ecx+8))
13524 89/<- %ecx 0/r32/eax
13525
13526 {
13527
13528 (string-equal? %ecx "length")
13529 3d/compare-eax-and 0/imm32
13530 0f 84/jump-if-= break/disp32
13531 (translate-mu-length-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
13532 e9/jump $emit-subx-stmt:end/disp32
13533 }
13534
13535 {
13536
13537 (string-equal? %ecx "index")
13538 3d/compare-eax-and 0/imm32
13539 0f 84/jump-if-= break/disp32
13540 (translate-mu-index-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
13541 e9/jump $emit-subx-stmt:end/disp32
13542 }
13543
13544 {
13545
13546 (string-equal? %ecx "compute-offset")
13547 3d/compare-eax-and 0/imm32
13548 0f 84/jump-if-= break/disp32
13549 (translate-mu-compute-index-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
13550 e9/jump $emit-subx-stmt:end/disp32
13551 }
13552
13553 {
13554
13555 (string-equal? %ecx "get")
13556 3d/compare-eax-and 0/imm32
13557 0f 84/jump-if-= break/disp32
13558 (translate-mu-get-stmt *(ebp+8) *(ebp+0xc))
13559 e9/jump $emit-subx-stmt:end/disp32
13560 }
13561
13562 {
13563 $emit-subx-stmt:check-for-primitive:
13564
13565 (find-matching-primitive *(ebp+0x10) *(ebp+0xc))
13566 3d/compare-eax-and 0/imm32
13567 74/jump-if-= break/disp8
13568 $emit-subx-stmt:primitive:
13569 (emit-subx-primitive *(ebp+8) *(ebp+0xc) %eax)
13570 e9/jump $emit-subx-stmt:end/disp32
13571 }
13572
13573
13574 $emit-subx-stmt:call:
13575 (emit-call *(ebp+8) *(ebp+0xc))
13576 $emit-subx-stmt:end:
13577
13578 59/pop-to-ecx
13579 58/pop-to-eax
13580
13581 89/<- %esp 5/r32/ebp
13582 5d/pop-to-ebp
13583 c3/return
13584
13585 translate-mu-length-stmt:
13586
13587 55/push-ebp
13588 89/<- %ebp 4/r32/esp
13589
13590 50/push-eax
13591 51/push-ecx
13592 52/push-edx
13593 53/push-ebx
13594 56/push-esi
13595
13596 8b/-> *(ebp+0xc) 6/r32/esi
13597
13598 (lookup *(esi+0xc) *(esi+0x10))
13599 (lookup *eax *(eax+4))
13600 89/<- %ebx 0/r32/eax
13601
13602 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
13603 89/<- %ecx 0/r32/eax
13604
13605 (lookup *(esi+0x14) *(esi+0x18))
13606 (lookup *eax *(eax+4))
13607 (lookup *(eax+0x18) *(eax+0x1c))
13608 89/<- %edx 0/r32/eax
13609
13610 {
13611 81 7/subop/compare %ecx 1/imm32
13612 75/jump-if-!= break/disp8
13613 $translate-mu-length-stmt:size-1:
13614 (emit-save-size-to *(ebp+8) %ebx %edx)
13615 e9/jump $translate-mu-length-stmt:end/disp32
13616 }
13617
13618 {
13619 (power-of-2? %ecx *(ebp+0x10) *(ebp+0x14))
13620 3d/compare-eax-and 0/imm32/false
13621 74/jump-if-= break/disp8
13622 81 7/subop/compare %ecx 0xff/imm32
13623 7f/jump-if-> break/disp8
13624 $translate-mu-length-stmt:size-power-of-2:
13625 (emit-save-size-to *(ebp+8) %ebx %edx)
13626 (emit-divide-by-shift-right *(ebp+8) %edx %ecx)
13627 e9/jump $translate-mu-length-stmt:end/disp32
13628 }
13629
13630
13631 {
13632 $translate-mu-length-stmt:complex:
13633 (string-equal? %edx "eax")
13634 3d/compare-eax-and 0/imm32/false
13635 75/break-if-!= break/disp8
13636 (emit-indent *(ebp+8) *Curr-block-depth)
13637 (write-buffered *(ebp+8) "50/push-eax\n")
13638 }
13639 {
13640 (string-equal? %edx "ecx")
13641 3d/compare-eax-and 0/imm32/false
13642 75/break-if-!= break/disp8
13643 (emit-indent *(ebp+8) *Curr-block-depth)
13644 (write-buffered *(ebp+8) "51/push-ecx\n")
13645 }
13646 {
13647 (string-equal? %edx "edx")
13648 3d/compare-eax-and 0/imm32/false
13649 75/break-if-!= break/disp8
13650 (emit-indent *(ebp+8) *Curr-block-depth)
13651 (write-buffered *(ebp+8) "52/push-edx\n")
13652 }
13653
13654 (emit-save-size-to *(ebp+8) %ebx "eax")
13655 (emit-indent *(ebp+8) *Curr-block-depth)
13656 (write-buffered *(ebp+8) "31/xor %edx 2/r32/edx\n")
13657 (emit-indent *(ebp+8) *Curr-block-depth)
13658 (write-buffered *(ebp+8) "b9/copy-to-ecx ")
13659 (write-int32-hex-buffered *(ebp+8) %ecx)
13660 (write-buffered *(ebp+8) "/imm32\n")
13661 (emit-indent *(ebp+8) *Curr-block-depth)
13662 (write-buffered *(ebp+8) "f7 7/subop/idiv-eax-edx-by %ecx\n")
13663 {
13664 (string-equal? %edx "eax")
13665 3d/compare-eax-and 0/imm32/false
13666 75/break-if-!= break/disp8
13667 (emit-indent *(ebp+8) *Curr-block-depth)
13668 (write-buffered *(ebp+8) "89/<- %")
13669 (write-buffered *(ebp+8) %edx)
13670 (write-buffered *(ebp+8) " 0/r32/eax\n")
13671 }
13672
13673 {
13674 (string-equal? %edx "edx")
13675 3d/compare-eax-and 0/imm32/false
13676 75/break-if-!= break/disp8
13677 (emit-indent *(ebp+8) *Curr-block-depth)
13678 (write-buffered *(ebp+8) "5a/pop-to-edx\n")
13679 }
13680 {
13681 (string-equal? %edx "ecx")
13682 3d/compare-eax-and 0/imm32/false
13683 75/break-if-!= break/disp8
13684 (emit-indent *(ebp+8) *Curr-block-depth)
13685 (write-buffered *(ebp+8) "59/pop-to-ecx\n")
13686 }
13687 {
13688 (string-equal? %edx "eax")
13689 3d/compare-eax-and 0/imm32/false
13690 75/break-if-!= break/disp8
13691 (emit-indent *(ebp+8) *Curr-block-depth)
13692 (write-buffered *(ebp+8) "58/pop-to-eax\n")
13693 }
13694 $translate-mu-length-stmt:end:
13695
13696 5e/pop-to-esi
13697 5b/pop-to-ebx
13698 5a/pop-to-edx
13699 59/pop-to-ecx
13700 58/pop-to-eax
13701
13702 89/<- %esp 5/r32/ebp
13703 5d/pop-to-ebp
13704 c3/return
13705
13706 array-element-size:
13707
13708 55/push-ebp
13709 89/<- %ebp 4/r32/esp
13710
13711 (array-element-type-id *(ebp+8) *(ebp+0xc) *(ebp+0x10))
13712 (size-of-type-id-as-array-element %eax)
13713 $array-element-size:end:
13714
13715 89/<- %esp 5/r32/ebp
13716 5d/pop-to-ebp
13717 c3/return
13718
13719 size-of-type-id-as-array-element:
13720
13721 55/push-ebp
13722 89/<- %ebp 4/r32/esp
13723
13724 8b/-> *(ebp+8) 0/r32/eax
13725
13726 3d/compare-eax-and 8/imm32/byte
13727 {
13728 75/jump-if-!= break/disp8
13729 b8/copy-to-eax 1/imm32
13730 eb/jump $array-element-size:end/disp8
13731 }
13732
13733 (size-of-type-id %eax)
13734 $size-of-type-id-as-array-element:end:
13735
13736 89/<- %esp 5/r32/ebp
13737 5d/pop-to-ebp
13738 c3/return
13739
13740 emit-save-size-to:
13741
13742 55/push-ebp
13743 89/<- %ebp 4/r32/esp
13744
13745 50/push-eax
13746 53/push-ebx
13747
13748 8b/-> *(ebp+0xc) 3/r32/ebx
13749 (emit-indent *(ebp+8) *Curr-block-depth)
13750 (write-buffered *(ebp+8) "8b/-> *")
13751
13752 {
13753 81 7/subop/compare *(ebx+0x18)) 0/imm32
13754 74/jump-if-= break/disp8
13755 $emit-save-size-to:emit-base-from-register:
13756 (lookup *(ebx+0x18) *(ebx+0x1c))
13757 (write-buffered *(ebp+8) %eax)
13758 eb/jump $emit-save-size-to:emit-output/disp8
13759 }
13760
13761 {
13762 81 7/subop/compare *(ebx+0x14)) 0/imm32
13763 74/jump-if-= break/disp8
13764 $emit-save-size-to:emit-base-from-stack:
13765 (write-buffered *(ebp+8) "(ebp+")
13766 (write-int32-hex-buffered *(ebp+8) *(ebx+0x14))
13767 (write-buffered *(ebp+8) ")")
13768 }
13769 $emit-save-size-to:emit-output:
13770 (write-buffered *(ebp+8) " ")
13771 (get Mu-registers *(ebp+0x10) 0xc "Mu-registers")
13772 (write-int32-hex-buffered *(ebp+8) *eax)
13773 (write-buffered *(ebp+8) "/r32\n")
13774 $emit-save-size-to:end:
13775
13776 5b/pop-to-ebx
13777 58/pop-to-eax
13778
13779 89/<- %esp 5/r32/ebp
13780 5d/pop-to-ebp
13781 c3/return
13782
13783 emit-divide-by-shift-right:
13784
13785 55/push-ebp
13786 89/<- %ebp 4/r32/esp
13787
13788 50/push-eax
13789
13790 (emit-indent *(ebp+8) *Curr-block-depth)
13791 (write-buffered *(ebp+8) "c1/shift 5/subop/>> %")
13792 (write-buffered *(ebp+8) *(ebp+0xc))
13793 (write-buffered *(ebp+8) Space)
13794 (num-shift-rights *(ebp+0x10))
13795 (write-int32-hex-buffered *(ebp+8) %eax)
13796 (write-buffered *(ebp+8) "/imm8\n")
13797 $emit-divide-by-shift-right:end:
13798
13799 58/pop-to-eax
13800
13801 89/<- %esp 5/r32/ebp
13802 5d/pop-to-ebp
13803 c3/return
13804
13805 translate-mu-index-stmt:
13806
13807 55/push-ebp
13808 89/<- %ebp 4/r32/esp
13809
13810 51/push-ecx
13811
13812 8b/-> *(ebp+0xc) 1/r32/ecx
13813
13814 (lookup *(ecx+0xc) *(ecx+0x10))
13815 (lookup *eax *(eax+4))
13816 89/<- %ecx 0/r32/eax
13817
13818 {
13819 81 7/subop/compare *(ecx+0x18) 0/imm32
13820 74/jump-if-= break/disp8
13821
13822 (translate-mu-index-stmt-with-array-in-register *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
13823 eb/jump $translate-mu-index-stmt:end/disp8
13824 }
13825
13826 {
13827 81 7/subop/compare *(ecx+0x14) 0/imm32
13828 74/jump-if-= break/disp8
13829
13830 (translate-mu-index-stmt-with-array-on-stack *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
13831 eb/jump $translate-mu-index-stmt:end/disp8
13832 }
13833 $translate-mu-index-stmt:end:
13834
13835 59/pop-to-ecx
13836
13837 89/<- %esp 5/r32/ebp
13838 5d/pop-to-ebp
13839 c3/return
13840
13841 $translate-mu-index-stmt-with-array:error1:
13842 (write-buffered *(ebp+0x10) "couldn't translate an index instruction. second (index) input must either lie in a register or be a literal\n")
13843 (flush *(ebp+0x10))
13844 (stop *(ebp+0x14) 1)
13845
13846
13847 $translate-mu-index-stmt-with-array:error2:
13848 (write-buffered *(ebp+0x10) "couldn't translate an index instruction. second (index) input when in a register must be an int or offset\n")
13849 (flush *(ebp+0x10))
13850 (stop *(ebp+0x14) 1)
13851
13852
13853 translate-mu-index-stmt-with-array-in-register:
13854
13855 55/push-ebp
13856 89/<- %ebp 4/r32/esp
13857
13858 50/push-eax
13859 51/push-ecx
13860 52/push-edx
13861 53/push-ebx
13862
13863 (emit-indent *(ebp+8) *Curr-block-depth)
13864 (write-buffered *(ebp+8) "8d/copy-address *(")
13865
13866 $translate-mu-index-stmt-with-array-in-register:emit-base:
13867
13868 8b/-> *(ebp+0xc) 1/r32/ecx
13869
13870 (lookup *(ecx+0xc) *(ecx+0x10))
13871 (lookup *eax *(eax+4))
13872 89/<- %ebx 0/r32/eax
13873
13874 (lookup *(ebx+0x18) *(ebx+0x1c))
13875 (write-buffered *(ebp+8) %eax)
13876 (write-buffered *(ebp+8) " + ")
13877
13878 (lookup *(ecx+0xc) *(ecx+0x10))
13879 (lookup *(eax+8) *(eax+0xc))
13880 (lookup *eax *(eax+4))
13881 89/<- %edx 0/r32/eax
13882
13883 81 7/subop/compare *(edx+0x18) 0/imm32
13884 {
13885 0f 84/jump-if-= break/disp32
13886 $translate-mu-index-stmt-with-array-in-register:emit-register-index:
13887
13888 (lookup *(edx+8) *(edx+0xc))
13889 (is-simple-mu-type? %eax 1)
13890 3d/compare-eax-and 0/imm32/false
13891 {
13892 0f 84/jump-if-= break/disp32
13893 $translate-mu-index-stmt-with-array-in-register:emit-int-register-index:
13894
13895
13896 (lookup *(edx+0x18) *(edx+0x1c))
13897 (write-buffered *(ebp+8) %eax)
13898 (write-buffered *(ebp+8) "<<")
13899
13900
13901 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
13902 (num-shift-rights %eax)
13903 (write-int32-hex-buffered *(ebp+8) %eax)
13904 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-register-index-done/disp32
13905 }
13906
13907 (lookup *(edx+8) *(edx+0xc))
13908 81 7/subop/compare *eax 0/imm32/false
13909 0f 85/jump-if-!= $translate-mu-index-stmt-with-array:error2/disp32
13910
13911 (lookup *(eax+4) *(eax+8))
13912 (is-simple-mu-type? %eax 7)
13913 3d/compare-eax-and 0/imm32/false
13914 {
13915 0f 84/jump-if-= break/disp32
13916
13917 $translate-mu-index-stmt-with-array-in-register:emit-offset-register-index:
13918 (lookup *(edx+0x18) *(edx+0x1c))
13919 (write-buffered *(ebp+8) %eax)
13920 }
13921 $translate-mu-index-stmt-with-array-in-register:emit-register-index-done:
13922 (write-buffered *(ebp+8) " + 4) ")
13923 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-output/disp32
13924 }
13925
13926 (lookup *(edx+8) *(edx+0xc))
13927 (is-simple-mu-type? %eax 0)
13928 3d/compare-eax-and 0/imm32/false
13929 {
13930 0f 84/jump-if-= break/disp32
13931 $translate-mu-index-stmt-with-array-in-register:emit-literal-index:
13932
13933 (lookup *edx *(edx+4))
13934 (parse-hex-int %eax)
13935 89/<- %edx 0/r32/eax
13936
13937 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
13938 f7 4/subop/multiply-into-eax %edx
13939
13940 05/add-to-eax 4/imm32
13941
13942
13943 (write-int32-hex-buffered *(ebp+8) %eax)
13944 (write-buffered *(ebp+8) ") ")
13945 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-output/disp32
13946 }
13947
13948 e9/jump $translate-mu-index-stmt-with-array:error1/disp32
13949 $translate-mu-index-stmt-with-array-in-register:emit-output:
13950
13951 8b/-> *(ebp+0xc) 1/r32/ecx
13952 (lookup *(ecx+0x14) *(ecx+0x18))
13953 (lookup *eax *(eax+4))
13954 (lookup *(eax+0x18) *(eax+0x1c))
13955 (get Mu-registers %eax 0xc "Mu-registers")
13956 (write-int32-hex-buffered *(ebp+8) *eax)
13957 (write-buffered *(ebp+8) "/r32\n")
13958 $translate-mu-index-stmt-with-array-in-register:end:
13959
13960 5b/pop-to-ebx
13961 5a/pop-to-edx
13962 59/pop-to-ecx
13963 58/pop-to-eax
13964
13965 89/<- %esp 5/r32/ebp
13966 5d/pop-to-ebp
13967 c3/return
13968
13969 translate-mu-index-stmt-with-array-on-stack:
13970
13971 55/push-ebp
13972 89/<- %ebp 4/r32/esp
13973
13974 50/push-eax
13975 51/push-ecx
13976 52/push-edx
13977 53/push-ebx
13978
13979 (emit-indent *(ebp+8) *Curr-block-depth)
13980 (write-buffered *(ebp+8) "8d/copy-address *(ebp + ")
13981
13982 8b/-> *(ebp+0xc) 0/r32/eax
13983 (lookup *(eax+0xc) *(eax+0x10))
13984 89/<- %edx 0/r32/eax
13985
13986 (lookup *eax *(eax+4))
13987 89/<- %ecx 0/r32/eax
13988
13989 (lookup *(edx+8) *(edx+0xc))
13990
13991 (lookup *eax *(eax+4))
13992 89/<- %edx 0/r32/eax
13993
13994 81 7/subop/compare *(edx+0x18) 0/imm32
13995 {
13996 0f 84/jump-if-= break/disp32
13997 $translate-mu-index-stmt-with-array-on-stack:emit-register-index:
13998
13999 (lookup *(edx+8) *(edx+0xc))
14000 (is-simple-mu-type? %eax 1)
14001 3d/compare-eax-and 0/imm32/false
14002 {
14003 0f 84/jump-if-= break/disp32
14004 $translate-mu-index-stmt-with-array-on-stack:emit-int-register-index:
14005
14006
14007 (lookup *(edx+0x18) *(edx+0x1c))
14008 (write-buffered *(ebp+8) %eax)
14009 (write-buffered *(ebp+8) "<<")
14010
14011
14012 (array-element-size %ecx *(ebp+0x10) *(ebp+0x14))
14013 (num-shift-rights %eax)
14014 (write-int32-hex-buffered *(ebp+8) %eax)
14015
14016 (write-buffered *(ebp+8) " + ")
14017
14018 8b/-> *(ecx+0x14) 0/r32/eax
14019 05/add-to-eax 4/imm32
14020 (write-int32-hex-buffered *(ebp+8) %eax)
14021 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-register-index-done/disp32
14022 }
14023
14024 (lookup *(edx+8) *(edx+0xc))
14025 81 7/subop/compare *eax 0/imm32/false
14026 0f 85/jump-if-!= $translate-mu-index-stmt-with-array:error2/disp32
14027
14028 (lookup *(eax+4) *(eax+8))
14029 (is-simple-mu-type? %eax 7)
14030 3d/compare-eax-and 0/imm32/false
14031 {
14032 0f 84/jump-if-= break/disp32
14033
14034 $translate-mu-index-stmt-with-array-on-stack:emit-offset-register-index:
14035 (lookup *(edx+0x18) *(edx+0x1c))
14036 (write-buffered *(ebp+8) %eax)
14037 }
14038 $translate-mu-index-stmt-with-array-on-stack:emit-register-index-done:
14039 (write-buffered *(ebp+8) ") ")
14040 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-output/disp32
14041 }
14042
14043 (lookup *(edx+8) *(edx+0xc))
14044 (is-simple-mu-type? %eax 0)
14045 3d/compare-eax-and 0/imm32/false
14046 {
14047 0f 84/jump-if-= break/disp32
14048 $translate-mu-index-stmt-with-array-on-stack:emit-literal-index:
14049
14050 (lookup *edx *(edx+4))
14051 (parse-hex-int %eax)
14052 89/<- %edx 0/r32/eax
14053
14054 (array-element-size %ecx *(ebp+0x10) *(ebp+0x14))
14055 f7 4/subop/multiply-into-eax %edx
14056
14057 03/add *(ecx+0x14) 0/r32/eax
14058
14059 05/add-to-eax 4/imm32
14060
14061
14062 (write-int32-hex-buffered *(ebp+8) %eax)
14063 (write-buffered *(ebp+8) ") ")
14064 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-output/disp32
14065 }
14066
14067 e9/jump $translate-mu-index-stmt-with-array:error1/disp32
14068 $translate-mu-index-stmt-with-array-on-stack:emit-output:
14069
14070 8b/-> *(ebp+0xc) 0/r32/eax
14071 (lookup *(eax+0x14) *(eax+0x18))
14072 (lookup *eax *(eax+4))
14073 (lookup *(eax+0x18) *(eax+0x1c))
14074 (get Mu-registers %eax 0xc "Mu-registers")
14075 (write-int32-hex-buffered *(ebp+8) *eax)
14076 (write-buffered *(ebp+8) "/r32\n")
14077 $translate-mu-index-stmt-with-array-on-stack:end:
14078
14079 5b/pop-to-ebx
14080 5a/pop-to-edx
14081 59/pop-to-ecx
14082 58/pop-to-eax
14083
14084 89/<- %esp 5/r32/ebp
14085 5d/pop-to-ebp
14086 c3/return
14087
14088 translate-mu-compute-index-stmt:
14089
14090 55/push-ebp
14091 89/<- %ebp 4/r32/esp
14092
14093 50/push-eax
14094 51/push-ecx
14095 52/push-edx
14096 53/push-ebx
14097
14098 (emit-indent *(ebp+8) *Curr-block-depth)
14099 (write-buffered *(ebp+8) "69/multiply")
14100
14101 8b/-> *(ebp+0xc) 1/r32/ecx
14102
14103 (lookup *(ecx+0xc) *(ecx+0x10))
14104 89/<- %ebx 0/r32/eax
14105 $translate-mu-compute-index-stmt:emit-index:
14106 (lookup *(ebx+8) *(ebx+0xc))
14107 (emit-subx-var-as-rm32 *(ebp+8) %eax)
14108 (write-buffered *(ebp+8) Space)
14109 $translate-mu-compute-index-stmt:emit-elem-size:
14110
14111 (lookup *ebx *(ebx+4))
14112 89/<- %ebx 0/r32/eax
14113
14114 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
14115 (write-int32-hex-buffered *(ebp+8) %eax)
14116 (write-buffered *(ebp+8) "/imm32 ")
14117 $translate-mu-compute-index-stmt:emit-output:
14118
14119 (lookup *(ecx+0x14) *(ecx+0x18))
14120 (lookup *eax *(eax+4))
14121 (lookup *(eax+0x18) *(eax+0x1c))
14122 (get Mu-registers %eax 0xc "Mu-registers")
14123 (write-int32-hex-buffered *(ebp+8) *eax)
14124 (write-buffered *(ebp+8) "/r32\n")
14125 $translate-mu-compute-index-stmt:end:
14126
14127 5b/pop-to-ebx
14128 5a/pop-to-edx
14129 59/pop-to-ecx
14130 58/pop-to-eax
14131
14132 89/<- %esp 5/r32/ebp
14133 5d/pop-to-ebp
14134 c3/return
14135
14136 translate-mu-get-stmt:
14137
14138 55/push-ebp
14139 89/<- %ebp 4/r32/esp
14140
14141 50/push-eax
14142 51/push-ecx
14143 52/push-edx
14144
14145 (emit-indent *(ebp+8) *Curr-block-depth)
14146 (write-buffered *(ebp+8) "8d/copy-address ")
14147
14148 8b/-> *(ebp+0xc) 1/r32/ecx
14149
14150 (mu-get-offset %ecx)
14151 89/<- %edx 0/r32/eax
14152
14153 (lookup *(ecx+0xc) *(ecx+0x10))
14154 (lookup *eax *(eax+4))
14155
14156 81 7/subop/compare *(eax+0x18) 0/imm32
14157 {
14158 0f 84/jump-if-= break/disp32
14159 $translate-mu-get-stmt:emit-register-input:
14160
14161 (write-buffered *(ebp+8) "*(")
14162 (lookup *(eax+0x18) *(eax+0x1c))
14163 (write-buffered *(ebp+8) %eax)
14164 (write-buffered *(ebp+8) " + ")
14165 (write-int32-hex-buffered *(ebp+8) %edx)
14166 (write-buffered *(ebp+8) ") ")
14167 e9/jump $translate-mu-get-stmt:emit-output/disp32
14168 }
14169
14170 {
14171 $translate-mu-get-stmt:emit-stack-input:
14172
14173 (write-buffered *(ebp+8) "*(ebp+")
14174 03/add *(eax+0x14) 2/r32/edx
14175 (write-int32-hex-buffered *(ebp+8) %edx)
14176 (write-buffered *(ebp+8) ") ")
14177 eb/jump $translate-mu-get-stmt:emit-output/disp8
14178 }
14179 $translate-mu-get-stmt:emit-output:
14180
14181 (lookup *(ecx+0x14) *(ecx+0x18))
14182 (lookup *eax *(eax+4))
14183
14184 (lookup *(eax+0x18) *(eax+0x1c))
14185 (get Mu-registers %eax 0xc "Mu-registers")
14186 (write-int32-hex-buffered *(ebp+8) *eax)
14187 (write-buffered *(ebp+8) "/r32\n")
14188 $translate-mu-get-stmt:end:
14189
14190 5a/pop-to-edx
14191 59/pop-to-ecx
14192 58/pop-to-eax
14193
14194 89/<- %esp 5/r32/ebp
14195 5d/pop-to-ebp
14196 c3/return
14197
14198 array-element-type-id:
14199
14200
14201 55/push-ebp
14202 89/<- %ebp 4/r32/esp
14203
14204 8b/-> *(ebp+8) 0/r32/eax
14205
14206 (lookup *(eax+8) *(eax+0xc))
14207
14208 3d/compare-eax-with 0/imm32
14209 0f 84/jump-if-== $array-element-type-id:error0/disp32
14210
14211 81 7/subop/compare *eax 0/imm32/false
14212 0f 85/jump-if-!= $array-element-type-id:error1/disp32
14213
14214 {
14215 50/push-eax
14216 (lookup *(eax+4) *(eax+8))
14217 (is-simple-mu-type? %eax 2)
14218 3d/compare-eax-with 0/imm32/false
14219 58/pop-to-eax
14220 74/jump-if-= break/disp8
14221 $array-element-type-id:skip-addr:
14222 (lookup *(eax+0xc) *(eax+0x10))
14223 }
14224
14225 3d/compare-eax-with 0/imm32
14226 0f 84/jump-if-= $array-element-type-id:error2/disp32
14227
14228 81 7/subop/compare *eax 0/imm32/false
14229 0f 85/jump-if-!= $array-element-type-id:error2/disp32
14230
14231 {
14232 50/push-eax
14233 (lookup *(eax+4) *(eax+8))
14234 (is-simple-mu-type? %eax 3)
14235 3d/compare-eax-with 0/imm32/false
14236 58/pop-to-eax
14237 $array-element-type-id:no-array:
14238 0f 84/jump-if-= $array-element-type-id:error2/disp32
14239 }
14240 $array-element-type-id:skip-array:
14241
14242 (lookup *(eax+0xc) *(eax+0x10))
14243
14244 3d/compare-eax-with 0/imm32
14245 0f 84/jump-if-= $array-element-type-id:error2/disp32
14246
14247 81 7/subop/compare *eax 0/imm32/false
14248 0f 85/jump-if-!= $array-element-type-id:error2/disp32
14249
14250 (lookup *(eax+4) *(eax+8))
14251 8b/-> *(eax+4) 0/r32/eax
14252 $array-element-type-id:end:
14253
14254 89/<- %esp 5/r32/ebp
14255 5d/pop-to-ebp
14256 c3/return
14257
14258 $array-element-type-id:error0:
14259 (write-buffered *(ebp+0xc) "array-element-type-id: var '")
14260 50/push-eax
14261 8b/-> *(ebp+8) 0/r32/eax
14262 (lookup *eax *(eax+4))
14263 (write-buffered *(ebp+0xc) %eax)
14264 58/pop-to-eax
14265 (write-buffered *(ebp+0xc) "' has no type\n")
14266 (flush *(ebp+0xc))
14267 (stop *(ebp+0x10) 1)
14268
14269
14270 $array-element-type-id:error1:
14271 (write-buffered *(ebp+0xc) "array-element-type-id: var '")
14272 50/push-eax
14273 8b/-> *(ebp+8) 0/r32/eax
14274 (lookup *eax *(eax+4))
14275 (write-buffered *(ebp+0xc) %eax)
14276 58/pop-to-eax
14277 (write-buffered *(ebp+0xc) "' has atomic type ")
14278 (write-int32-hex-buffered *(ebp+0xc) *(eax+4))
14279 (write-buffered *(ebp+0xc) Newline)
14280 (flush *(ebp+0xc))
14281 (stop *(ebp+0x10) 1)
14282
14283
14284 $array-element-type-id:error2:
14285 (write-buffered *(ebp+0xc) "array-element-type-id: var '")
14286 50/push-eax
14287 8b/-> *(ebp+8) 0/r32/eax
14288 (lookup *eax *(eax+4))
14289 (write-buffered *(ebp+0xc) %eax)
14290 58/pop-to-eax
14291 (write-buffered *(ebp+0xc) "' has non-array type\n")
14292 (flush *(ebp+0xc))
14293 (stop *(ebp+0x10) 1)
14294
14295
14296 power-of-2?:
14297
14298
14299 55/push-ebp
14300 89/<- %ebp 4/r32/esp
14301
14302 8b/-> *(ebp+8) 0/r32/eax
14303
14304 3d/compare-eax-with 0/imm32
14305 0f 8c/jump-if-< $power-of-2?:abort/disp32
14306
14307 48/decrement-eax
14308
14309 23/and-> *(ebp+8) 0/r32/eax
14310
14311 3d/compare-eax-and 0/imm32
14312 0f 94/set-byte-if-= %al
14313 81 4/subop/and %eax 0xff/imm32
14314 $power-of-2?:end:
14315
14316 89/<- %esp 5/r32/ebp
14317 5d/pop-to-ebp
14318 c3/return
14319
14320 $power-of-2?:abort:
14321 (write-buffered *(ebp+0xc) "power-of-2?: negative number\n")
14322 (flush *(ebp+0xc))
14323 (stop *(ebp+0x10) 1)
14324
14325
14326 num-shift-rights:
14327
14328
14329 55/push-ebp
14330 89/<- %ebp 4/r32/esp
14331
14332 51/push-ecx
14333
14334 8b/-> *(ebp+8) 1/r32/ecx
14335
14336 b8/copy-to-eax 0/imm32
14337 {
14338
14339 81 7/subop/compare %ecx 1/imm32
14340 7e/jump-if-<= break/disp8
14341 40/increment-eax
14342 c1/shift 5/subop/arithmetic-right %ecx 1/imm8
14343 eb/jump loop/disp8
14344 }
14345 $num-shift-rights:end:
14346
14347 59/pop-to-ecx
14348
14349 89/<- %esp 5/r32/ebp
14350 5d/pop-to-ebp
14351 c3/return
14352
14353 mu-get-offset:
14354
14355 55/push-ebp
14356 89/<- %ebp 4/r32/esp
14357
14358 8b/-> *(ebp+8) 0/r32/eax
14359 (lookup *(eax+0xc) *(eax+0x10))
14360 (lookup *(eax+8) *(eax+0xc))
14361
14362 (lookup *eax *(eax+4))
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373 8b/-> *(eax+0x14) 0/r32/eax
14374
14375
14376
14377
14378 $emit-get-offset:end:
14379
14380 89/<- %esp 5/r32/ebp
14381 5d/pop-to-ebp
14382 c3/return
14383
14384 emit-subx-block:
14385
14386 55/push-ebp
14387 89/<- %ebp 4/r32/esp
14388
14389 50/push-eax
14390 51/push-ecx
14391 56/push-esi
14392
14393 8b/-> *(ebp+0xc) 6/r32/esi
14394
14395 (lookup *(esi+0xc) *(esi+0x10))
14396 8b/-> *Curr-block-depth 1/r32/ecx
14397 89/<- *(eax+0x10) 1/r32/ecx
14398
14399 (lookup *(esi+4) *(esi+8))
14400
14401 {
14402 $emit-subx-block:check-empty:
14403 3d/compare-eax-and 0/imm32
14404 0f 84/jump-if-= break/disp32
14405 (emit-indent *(ebp+8) *Curr-block-depth)
14406 (write-buffered *(ebp+8) "{\n")
14407
14408 (lookup *(esi+0xc) *(esi+0x10))
14409 89/<- %ecx 0/r32/eax
14410
14411 (lookup *ecx *(ecx+4))
14412 (write-buffered *(ebp+8) %eax)
14413 (write-buffered *(ebp+8) ":loop:\n")
14414 ff 0/subop/increment *Curr-block-depth
14415 (push *(ebp+0x10) *(esi+0xc))
14416 (push *(ebp+0x10) *(esi+0x10))
14417 (push *(ebp+0x10) 0)
14418
14419 (lookup *(esi+4) *(esi+8))
14420 (emit-subx-stmt-list *(ebp+8) %eax *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
14421 (pop *(ebp+0x10))
14422 (pop *(ebp+0x10))
14423 (pop *(ebp+0x10))
14424 ff 1/subop/decrement *Curr-block-depth
14425 (emit-indent *(ebp+8) *Curr-block-depth)
14426 (write-buffered *(ebp+8) "}\n")
14427 (lookup *ecx *(ecx+4))
14428 (write-buffered *(ebp+8) %eax)
14429 (write-buffered *(ebp+8) ":break:\n")
14430 }
14431 $emit-subx-block:end:
14432
14433 5e/pop-to-esi
14434 59/pop-to-ecx
14435 58/pop-to-eax
14436
14437 89/<- %esp 5/r32/ebp
14438 5d/pop-to-ebp
14439 c3/return
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490 == data
14491 Primitives:
14492
14493 _Primitive-increment-eax:
14494
14495 0x11/imm32/alloc-id:fake
14496 _string-increment/imm32/name
14497 0/imm32/no-inouts
14498 0/imm32/no-inouts
14499 0x11/imm32/alloc-id:fake
14500 Single-int-var-in-eax/imm32/outputs
14501 0x11/imm32/alloc-id:fake
14502 _string_40_increment_eax/imm32/subx-name
14503 0/imm32/no-rm32
14504 0/imm32/no-r32
14505 0/imm32/no-imm32
14506 0/imm32/no-disp32
14507 0/imm32/output-is-write-only
14508 0x11/imm32/alloc-id:fake
14509 _Primitive-increment-ecx/imm32/next
14510 _Primitive-increment-ecx:
14511 0x11/imm32/alloc-id:fake:payload
14512
14513 0x11/imm32/alloc-id:fake
14514 _string-increment/imm32/name
14515 0/imm32/no-inouts
14516 0/imm32/no-inouts
14517 0x11/imm32/alloc-id:fake
14518 Single-int-var-in-ecx/imm32/outputs
14519 0x11/imm32/alloc-id:fake
14520 _string_41_increment_ecx/imm32/subx-name
14521 0/imm32/no-rm32
14522 0/imm32/no-r32
14523 0/imm32/no-imm32
14524 0/imm32/no-disp32
14525 0/imm32/output-is-write-only
14526 0x11/imm32/alloc-id:fake
14527 _Primitive-increment-edx/imm32/next
14528 _Primitive-increment-edx:
14529 0x11/imm32/alloc-id:fake:payload
14530
14531 0x11/imm32/alloc-id:fake
14532 _string-increment/imm32/name
14533 0/imm32/no-inouts
14534 0/imm32/no-inouts
14535 0x11/imm32/alloc-id:fake
14536 Single-int-var-in-edx/imm32/outputs
14537 0x11/imm32/alloc-id:fake
14538 _string_42_increment_edx/imm32/subx-name
14539 0/imm32/no-rm32
14540 0/imm32/no-r32
14541 0/imm32/no-imm32
14542 0/imm32/no-disp32
14543 0/imm32/output-is-write-only
14544 0x11/imm32/alloc-id:fake
14545 _Primitive-increment-ebx/imm32/next
14546 _Primitive-increment-ebx:
14547 0x11/imm32/alloc-id:fake:payload
14548
14549 0x11/imm32/alloc-id:fake
14550 _string-increment/imm32/name
14551 0/imm32/no-inouts
14552 0/imm32/no-inouts
14553 0x11/imm32/alloc-id:fake
14554 Single-int-var-in-ebx/imm32/outputs
14555 0x11/imm32/alloc-id:fake
14556 _string_43_increment_ebx/imm32/subx-name
14557 0/imm32/no-rm32
14558 0/imm32/no-r32
14559 0/imm32/no-imm32
14560 0/imm32/no-disp32
14561 0/imm32/output-is-write-only
14562 0x11/imm32/alloc-id:fake
14563 _Primitive-increment-esi/imm32/next
14564 _Primitive-increment-esi:
14565 0x11/imm32/alloc-id:fake:payload
14566
14567 0x11/imm32/alloc-id:fake
14568 _string-increment/imm32/name
14569 0/imm32/no-inouts
14570 0/imm32/no-inouts
14571 0x11/imm32/alloc-id:fake
14572 Single-int-var-in-esi/imm32/outputs
14573 0x11/imm32/alloc-id:fake
14574 _string_46_increment_esi/imm32/subx-name
14575 0/imm32/no-rm32
14576 0/imm32/no-r32
14577 0/imm32/no-imm32
14578 0/imm32/no-disp32
14579 0/imm32/output-is-write-only
14580 0x11/imm32/alloc-id:fake
14581 _Primitive-increment-edi/imm32/next
14582 _Primitive-increment-edi:
14583 0x11/imm32/alloc-id:fake:payload
14584
14585 0x11/imm32/alloc-id:fake
14586 _string-increment/imm32/name
14587 0/imm32/no-inouts
14588 0/imm32/no-inouts
14589 0x11/imm32/alloc-id:fake
14590 Single-int-var-in-edi/imm32/outputs
14591 0x11/imm32/alloc-id:fake
14592 _string_47_increment_edi/imm32/subx-name
14593 0/imm32/no-rm32
14594 0/imm32/no-r32
14595 0/imm32/no-imm32
14596 0/imm32/no-disp32
14597 0/imm32/output-is-write-only
14598 0x11/imm32/alloc-id:fake
14599 _Primitive-decrement-eax/imm32/next
14600 _Primitive-decrement-eax:
14601 0x11/imm32/alloc-id:fake:payload
14602
14603 0x11/imm32/alloc-id:fake
14604 _string-decrement/imm32/name
14605 0/imm32/no-inouts
14606 0/imm32/no-inouts
14607 0x11/imm32/alloc-id:fake
14608 Single-int-var-in-eax/imm32/outputs
14609 0x11/imm32/alloc-id:fake
14610 _string_48_decrement_eax/imm32/subx-name
14611 0/imm32/no-rm32
14612 0/imm32/no-r32
14613 0/imm32/no-imm32
14614 0/imm32/no-disp32
14615 0/imm32/output-is-write-only
14616 0x11/imm32/alloc-id:fake
14617 _Primitive-decrement-ecx/imm32/next
14618 _Primitive-decrement-ecx:
14619 0x11/imm32/alloc-id:fake:payload
14620
14621 0x11/imm32/alloc-id:fake
14622 _string-decrement/imm32/name
14623 0/imm32/no-inouts
14624 0/imm32/no-inouts
14625 0x11/imm32/alloc-id:fake
14626 Single-int-var-in-ecx/imm32/outputs
14627 0x11/imm32/alloc-id:fake
14628 _string_49_decrement_ecx/imm32/subx-name
14629 0/imm32/no-rm32
14630 0/imm32/no-r32
14631 0/imm32/no-imm32
14632 0/imm32/no-disp32
14633 0/imm32/output-is-write-only
14634 0x11/imm32/alloc-id:fake
14635 _Primitive-decrement-edx/imm32/next
14636 _Primitive-decrement-edx:
14637 0x11/imm32/alloc-id:fake:payload
14638
14639 0x11/imm32/alloc-id:fake
14640 _string-decrement/imm32/name
14641 0/imm32/no-inouts
14642 0/imm32/no-inouts
14643 0x11/imm32/alloc-id:fake
14644 Single-int-var-in-edx/imm32/outputs
14645 0x11/imm32/alloc-id:fake
14646 _string_4a_decrement_edx/imm32/subx-name
14647 0/imm32/no-rm32
14648 0/imm32/no-r32
14649 0/imm32/no-imm32
14650 0/imm32/no-disp32
14651 0/imm32/output-is-write-only
14652 0x11/imm32/alloc-id:fake
14653 _Primitive-decrement-ebx/imm32/next
14654 _Primitive-decrement-ebx:
14655 0x11/imm32/alloc-id:fake:payload
14656
14657 0x11/imm32/alloc-id:fake
14658 _string-decrement/imm32/name
14659 0/imm32/no-inouts
14660 0/imm32/no-inouts
14661 0x11/imm32/alloc-id:fake
14662 Single-int-var-in-ebx/imm32/outputs
14663 0x11/imm32/alloc-id:fake
14664 _string_4b_decrement_ebx/imm32/subx-name
14665 0/imm32/no-rm32
14666 0/imm32/no-r32
14667 0/imm32/no-imm32
14668 0/imm32/no-disp32
14669 0/imm32/output-is-write-only
14670 0x11/imm32/alloc-id:fake
14671 _Primitive-decrement-esi/imm32/next
14672 _Primitive-decrement-esi:
14673 0x11/imm32/alloc-id:fake:payload
14674
14675 0x11/imm32/alloc-id:fake
14676 _string-decrement/imm32/name
14677 0/imm32/no-inouts
14678 0/imm32/no-inouts
14679 0x11/imm32/alloc-id:fake
14680 Single-int-var-in-esi/imm32/outputs
14681 0x11/imm32/alloc-id:fake
14682 _string_4e_decrement_esi/imm32/subx-name
14683 0/imm32/no-rm32
14684 0/imm32/no-r32
14685 0/imm32/no-imm32
14686 0/imm32/no-disp32
14687 0/imm32/output-is-write-only
14688 0x11/imm32/alloc-id:fake
14689 _Primitive-decrement-edi/imm32/next
14690 _Primitive-decrement-edi:
14691 0x11/imm32/alloc-id:fake:payload
14692
14693 0x11/imm32/alloc-id:fake
14694 _string-decrement/imm32/name
14695 0/imm32/no-inouts
14696 0/imm32/no-inouts
14697 0x11/imm32/alloc-id:fake
14698 Single-int-var-in-edi/imm32/outputs
14699 0x11/imm32/alloc-id:fake
14700 _string_4f_decrement_edi/imm32/subx-name
14701 0/imm32/no-rm32
14702 0/imm32/no-r32
14703 0/imm32/no-imm32
14704 0/imm32/no-disp32
14705 0/imm32/output-is-write-only
14706 0x11/imm32/alloc-id:fake
14707 _Primitive-increment-mem/imm32/next
14708 _Primitive-increment-mem:
14709 0x11/imm32/alloc-id:fake:payload
14710
14711 0x11/imm32/alloc-id:fake
14712 _string-increment/imm32/name
14713 0x11/imm32/alloc-id:fake
14714 Single-int-var-in-mem/imm32/inouts
14715 0/imm32/no-outputs
14716 0/imm32/no-outputs
14717 0x11/imm32/alloc-id:fake
14718 _string_ff_subop_increment/imm32/subx-name
14719 1/imm32/rm32-is-first-inout
14720 0/imm32/no-r32
14721 0/imm32/no-imm32
14722 0/imm32/no-disp32
14723 0/imm32/output-is-write-only
14724 0x11/imm32/alloc-id:fake
14725 _Primitive-increment-reg/imm32/next
14726 _Primitive-increment-reg:
14727 0x11/imm32/alloc-id:fake:payload
14728
14729 0x11/imm32/alloc-id:fake
14730 _string-increment/imm32/name
14731 0/imm32/no-inouts
14732 0/imm32/no-inouts
14733 0x11/imm32/alloc-id:fake
14734 Single-int-var-in-some-register/imm32/outputs
14735 0x11/imm32/alloc-id:fake
14736 _string_ff_subop_increment/imm32/subx-name
14737 3/imm32/rm32-is-first-output
14738 0/imm32/no-r32
14739 0/imm32/no-imm32
14740 0/imm32/no-disp32
14741 0/imm32/output-is-write-only
14742 0x11/imm32/alloc-id:fake
14743 _Primitive-decrement-mem/imm32/next
14744 _Primitive-decrement-mem:
14745 0x11/imm32/alloc-id:fake:payload
14746
14747 0x11/imm32/alloc-id:fake
14748 _string-decrement/imm32/name
14749 0x11/imm32/alloc-id:fake
14750 Single-int-var-in-mem/imm32/inouts
14751 0/imm32/no-outputs
14752 0/imm32/no-outputs
14753 0x11/imm32/alloc-id:fake
14754 _string_ff_subop_decrement/imm32/subx-name
14755 1/imm32/rm32-is-first-inout
14756 0/imm32/no-r32
14757 0/imm32/no-imm32
14758 0/imm32/no-disp32
14759 0/imm32/output-is-write-only
14760 0x11/imm32/alloc-id:fake
14761 _Primitive-decrement-reg/imm32/next
14762 _Primitive-decrement-reg:
14763 0x11/imm32/alloc-id:fake:payload
14764
14765 0x11/imm32/alloc-id:fake
14766 _string-decrement/imm32/name
14767 0/imm32/no-inouts
14768 0/imm32/no-inouts
14769 0x11/imm32/alloc-id:fake
14770 Single-int-var-in-some-register/imm32/outputs
14771 0x11/imm32/alloc-id:fake
14772 _string_ff_subop_decrement/imm32/subx-name
14773 3/imm32/rm32-is-first-output
14774 0/imm32/no-r32
14775 0/imm32/no-imm32
14776 0/imm32/no-disp32
14777 0/imm32/output-is-write-only
14778 0x11/imm32/alloc-id:fake
14779 _Primitive-add-to-eax/imm32/next
14780
14781 _Primitive-add-to-eax:
14782 0x11/imm32/alloc-id:fake:payload
14783
14784 0x11/imm32/alloc-id:fake
14785 _string-add/imm32/name
14786 0x11/imm32/alloc-id:fake
14787 Single-lit-var/imm32/inouts
14788 0x11/imm32/alloc-id:fake
14789 Single-int-var-in-eax/imm32/outputs
14790 0x11/imm32/alloc-id:fake
14791 _string_05_add_to_eax/imm32/subx-name
14792 0/imm32/no-rm32
14793 0/imm32/no-r32
14794 1/imm32/imm32-is-first-inout
14795 0/imm32/no-disp32
14796 0/imm32/output-is-write-only
14797 0x11/imm32/alloc-id:fake
14798 _Primitive-add-reg-to-reg/imm32/next
14799 _Primitive-add-reg-to-reg:
14800 0x11/imm32/alloc-id:fake:payload
14801
14802 0x11/imm32/alloc-id:fake
14803 _string-add/imm32/name
14804 0x11/imm32/alloc-id:fake
14805 Single-int-var-in-some-register/imm32/inouts
14806 0x11/imm32/alloc-id:fake
14807 Single-int-var-in-some-register/imm32/outputs
14808 0x11/imm32/alloc-id:fake
14809 _string_01_add_to/imm32/subx-name
14810 3/imm32/rm32-is-first-output
14811 1/imm32/r32-is-first-inout
14812 0/imm32/no-imm32
14813 0/imm32/no-disp32
14814 0/imm32/output-is-write-only
14815 0x11/imm32/alloc-id:fake
14816 _Primitive-add-reg-to-mem/imm32/next
14817 _Primitive-add-reg-to-mem:
14818 0x11/imm32/alloc-id:fake:payload
14819
14820 0x11/imm32/alloc-id:fake
14821 _string-add-to/imm32/name
14822 0x11/imm32/alloc-id:fake
14823 Two-args-int-stack-int-reg/imm32/inouts
14824 0/imm32/no-outputs
14825 0/imm32/no-outputs
14826 0x11/imm32/alloc-id:fake
14827 _string_01_add_to/imm32/subx-name
14828 1/imm32/rm32-is-first-inout
14829 2/imm32/r32-is-second-inout
14830 0/imm32/no-imm32
14831 0/imm32/no-disp32
14832 0/imm32/output-is-write-only
14833 0x11/imm32/alloc-id:fake
14834 _Primitive-add-mem-to-reg/imm32/next
14835 _Primitive-add-mem-to-reg:
14836 0x11/imm32/alloc-id:fake:payload
14837
14838 0x11/imm32/alloc-id:fake
14839 _string-add/imm32/name
14840 0x11/imm32/alloc-id:fake
14841 Single-int-var-in-mem/imm32/inouts
14842 0x11/imm32/alloc-id:fake
14843 Single-int-var-in-some-register/imm32/outputs
14844 0x11/imm32/alloc-id:fake
14845 _string_03_add/imm32/subx-name
14846 1/imm32/rm32-is-first-inout
14847 3/imm32/r32-is-first-output
14848 0/imm32/no-imm32
14849 0/imm32/no-disp32
14850 0/imm32/output-is-write-only
14851 0x11/imm32/alloc-id:fake
14852 _Primitive-add-lit-to-reg/imm32/next
14853 _Primitive-add-lit-to-reg:
14854 0x11/imm32/alloc-id:fake:payload
14855
14856 0x11/imm32/alloc-id:fake
14857 _string-add/imm32/name
14858 0x11/imm32/alloc-id:fake
14859 Single-lit-var/imm32/inouts
14860 0x11/imm32/alloc-id:fake
14861 Single-int-var-in-some-register/imm32/outputs
14862 0x11/imm32/alloc-id:fake
14863 _string_81_subop_add/imm32/subx-name
14864 3/imm32/rm32-is-first-output
14865 0/imm32/no-r32
14866 1/imm32/imm32-is-first-inout
14867 0/imm32/no-disp32
14868 0/imm32/output-is-write-only
14869 0x11/imm32/alloc-id:fake
14870 _Primitive-add-lit-to-mem/imm32/next
14871 _Primitive-add-lit-to-mem:
14872 0x11/imm32/alloc-id:fake:payload
14873
14874 0x11/imm32/alloc-id:fake
14875 _string-add-to/imm32/name
14876 0x11/imm32/alloc-id:fake
14877 Int-var-and-literal/imm32/inouts
14878 0/imm32/no-outputs
14879 0/imm32/no-outputs
14880 0x11/imm32/alloc-id:fake
14881 _string_81_subop_add/imm32/subx-name
14882 1/imm32/rm32-is-first-inout
14883 0/imm32/no-r32
14884 2/imm32/imm32-is-second-inout
14885 0/imm32/no-disp32
14886 0/imm32/output-is-write-only
14887 0x11/imm32/alloc-id:fake
14888 _Primitive-subtract-from-eax/imm32/next
14889
14890 _Primitive-subtract-from-eax:
14891 0x11/imm32/alloc-id:fake:payload
14892
14893 0x11/imm32/alloc-id:fake
14894 _string-subtract/imm32/name
14895 0x11/imm32/alloc-id:fake
14896 Single-lit-var/imm32/inouts
14897 0x11/imm32/alloc-id:fake
14898 Single-int-var-in-eax/imm32/outputs
14899 0x11/imm32/alloc-id:fake
14900 _string_2d_subtract_from_eax/imm32/subx-name
14901 0/imm32/no-rm32
14902 0/imm32/no-r32
14903 1/imm32/imm32-is-first-inout
14904 0/imm32/no-disp32
14905 0/imm32/output-is-write-only
14906 0x11/imm32/alloc-id:fake
14907 _Primitive-subtract-reg-from-reg/imm32/next
14908 _Primitive-subtract-reg-from-reg:
14909 0x11/imm32/alloc-id:fake:payload
14910
14911 0x11/imm32/alloc-id:fake
14912 _string-subtract/imm32/name
14913 0x11/imm32/alloc-id:fake
14914 Single-int-var-in-some-register/imm32/inouts
14915 0x11/imm32/alloc-id:fake
14916 Single-int-var-in-some-register/imm32/outputs
14917 0x11/imm32/alloc-id:fake
14918 _string_29_subtract_from/imm32/subx-name
14919 3/imm32/rm32-is-first-output
14920 1/imm32/r32-is-first-inout
14921 0/imm32/no-imm32
14922 0/imm32/no-disp32
14923 0/imm32/output-is-write-only
14924 0x11/imm32/alloc-id:fake
14925 _Primitive-subtract-reg-from-mem/imm32/next
14926 _Primitive-subtract-reg-from-mem:
14927 0x11/imm32/alloc-id:fake:payload
14928
14929 0x11/imm32/alloc-id:fake
14930 _string-subtract-from/imm32/name
14931 0x11/imm32/alloc-id:fake
14932 Two-args-int-stack-int-reg/imm32/inouts
14933 0/imm32/no-outputs
14934 0/imm32/no-outputs
14935 0x11/imm32/alloc-id:fake
14936 _string_29_subtract_from/imm32/subx-name
14937 1/imm32/rm32-is-first-inout
14938 2/imm32/r32-is-second-inout
14939 0/imm32/no-imm32
14940 0/imm32/no-disp32
14941 0/imm32/output-is-write-only
14942 0x11/imm32/alloc-id:fake
14943 _Primitive-subtract-mem-from-reg/imm32/next
14944 _Primitive-subtract-mem-from-reg:
14945 0x11/imm32/alloc-id:fake:payload
14946
14947 0x11/imm32/alloc-id:fake
14948 _string-subtract/imm32/name
14949 0x11/imm32/alloc-id:fake
14950 Single-int-var-in-mem/imm32/inouts
14951 0x11/imm32/alloc-id:fake
14952 Single-int-var-in-some-register/imm32/outputs
14953 0x11/imm32/alloc-id:fake
14954 _string_2b_subtract/imm32/subx-name
14955 1/imm32/rm32-is-first-inout
14956 3/imm32/r32-is-first-output
14957 0/imm32/no-imm32
14958 0/imm32/no-disp32
14959 0/imm32/output-is-write-only
14960 0x11/imm32/alloc-id:fake
14961 _Primitive-subtract-lit-from-reg/imm32/next
14962 _Primitive-subtract-lit-from-reg:
14963 0x11/imm32/alloc-id:fake:payload
14964
14965 0x11/imm32/alloc-id:fake
14966 _string-subtract/imm32/name
14967 0x11/imm32/alloc-id:fake
14968 Single-lit-var/imm32/inouts
14969 0x11/imm32/alloc-id:fake
14970 Single-int-var-in-some-register/imm32/outputs
14971 0x11/imm32/alloc-id:fake
14972 _string_81_subop_subtract/imm32/subx-name
14973 3/imm32/rm32-is-first-output
14974 0/imm32/no-r32
14975 1/imm32/imm32-is-first-inout
14976 0/imm32/no-disp32
14977 0/imm32/output-is-write-only
14978 0x11/imm32/alloc-id:fake
14979 _Primitive-subtract-lit-from-mem/imm32/next
14980 _Primitive-subtract-lit-from-mem:
14981 0x11/imm32/alloc-id:fake:payload
14982
14983 0x11/imm32/alloc-id:fake
14984 _string-subtract-from/imm32/name
14985 0x11/imm32/alloc-id:fake
14986 Int-var-and-literal/imm32/inouts
14987 0/imm32/no-outputs
14988 0/imm32/no-outputs
14989 0x11/imm32/alloc-id:fake
14990 _string_81_subop_subtract/imm32/subx-name
14991 1/imm32/rm32-is-first-inout
14992 0/imm32/no-r32
14993 2/imm32/imm32-is-first-inout
14994 0/imm32/no-disp32
14995 0/imm32/output-is-write-only
14996 0x11/imm32/alloc-id:fake
14997 _Primitive-and-with-eax/imm32/next
14998
14999 _Primitive-and-with-eax:
15000 0x11/imm32/alloc-id:fake:payload
15001
15002 0x11/imm32/alloc-id:fake
15003 _string-and/imm32/name
15004 0x11/imm32/alloc-id:fake
15005 Single-lit-var/imm32/inouts
15006 0x11/imm32/alloc-id:fake
15007 Single-int-var-in-eax/imm32/outputs
15008 0x11/imm32/alloc-id:fake
15009 _string_25_and_with_eax/imm32/subx-name
15010 0/imm32/no-rm32
15011 0/imm32/no-r32
15012 1/imm32/imm32-is-first-inout
15013 0/imm32/no-disp32
15014 0/imm32/output-is-write-only
15015 0x11/imm32/alloc-id:fake
15016 _Primitive-and-reg-with-reg/imm32/next
15017 _Primitive-and-reg-with-reg:
15018 0x11/imm32/alloc-id:fake:payload
15019
15020 0x11/imm32/alloc-id:fake
15021 _string-and/imm32/name
15022 0x11/imm32/alloc-id:fake
15023 Single-int-var-in-some-register/imm32/inouts
15024 0x11/imm32/alloc-id:fake
15025 Single-int-var-in-some-register/imm32/outputs
15026 0x11/imm32/alloc-id:fake
15027 _string_21_and_with/imm32/subx-name
15028 3/imm32/rm32-is-first-output
15029 1/imm32/r32-is-first-inout
15030 0/imm32/no-imm32
15031 0/imm32/no-disp32
15032 0/imm32/output-is-write-only
15033 0x11/imm32/alloc-id:fake
15034 _Primitive-and-reg-with-mem/imm32/next
15035 _Primitive-and-reg-with-mem:
15036 0x11/imm32/alloc-id:fake:payload
15037
15038 0x11/imm32/alloc-id:fake
15039 _string-and-with/imm32/name
15040 0x11/imm32/alloc-id:fake
15041 Two-args-int-stack-int-reg/imm32/inouts
15042 0/imm32/no-outputs
15043 0/imm32/no-outputs
15044 0x11/imm32/alloc-id:fake
15045 _string_21_and_with/imm32/subx-name
15046 1/imm32/rm32-is-first-inout
15047 2/imm32/r32-is-second-inout
15048 0/imm32/no-imm32
15049 0/imm32/no-disp32
15050 0/imm32/output-is-write-only
15051 0x11/imm32/alloc-id:fake
15052 _Primitive-and-mem-with-reg/imm32/next
15053 _Primitive-and-mem-with-reg:
15054 0x11/imm32/alloc-id:fake:payload
15055
15056 0x11/imm32/alloc-id:fake
15057 _string-and/imm32/name
15058 0x11/imm32/alloc-id:fake
15059 Single-int-var-in-mem/imm32/inouts
15060 0x11/imm32/alloc-id:fake
15061 Single-int-var-in-some-register/imm32/outputs
15062 0x11/imm32/alloc-id:fake
15063 _string_23_and/imm32/subx-name
15064 1/imm32/rm32-is-first-inout
15065 3/imm32/r32-is-first-output
15066 0/imm32/no-imm32
15067 0/imm32/no-disp32
15068 0/imm32/output-is-write-only
15069 0x11/imm32/alloc-id:fake
15070 _Primitive-and-lit-with-reg/imm32/next
15071 _Primitive-and-lit-with-reg:
15072 0x11/imm32/alloc-id:fake:payload
15073
15074 0x11/imm32/alloc-id:fake
15075 _string-and/imm32/name
15076 0x11/imm32/alloc-id:fake
15077 Single-lit-var/imm32/inouts
15078 0x11/imm32/alloc-id:fake
15079 Single-int-var-in-some-register/imm32/outputs
15080 0x11/imm32/alloc-id:fake
15081 _string_81_subop_and/imm32/subx-name
15082 3/imm32/rm32-is-first-output
15083 0/imm32/no-r32
15084 1/imm32/imm32-is-first-inout
15085 0/imm32/no-disp32
15086 0/imm32/output-is-write-only
15087 0x11/imm32/alloc-id:fake
15088 _Primitive-and-lit-with-mem/imm32/next
15089 _Primitive-and-lit-with-mem:
15090 0x11/imm32/alloc-id:fake:payload
15091
15092 0x11/imm32/alloc-id:fake
15093 _string-and-with/imm32/name
15094 0x11/imm32/alloc-id:fake
15095 Int-var-and-literal/imm32/inouts
15096 0/imm32/no-outputs
15097 0/imm32/no-outputs
15098 0x11/imm32/alloc-id:fake
15099 _string_81_subop_and/imm32/subx-name
15100 1/imm32/rm32-is-first-inout
15101 0/imm32/no-r32
15102 2/imm32/imm32-is-first-inout
15103 0/imm32/no-disp32
15104 0/imm32/output-is-write-only
15105 0x11/imm32/alloc-id:fake
15106 _Primitive-or-with-eax/imm32/next
15107
15108 _Primitive-or-with-eax:
15109 0x11/imm32/alloc-id:fake:payload
15110
15111 0x11/imm32/alloc-id:fake
15112 _string-or/imm32/name
15113 0x11/imm32/alloc-id:fake
15114 Single-lit-var/imm32/inouts
15115 0x11/imm32/alloc-id:fake
15116 Single-int-var-in-eax/imm32/outputs
15117 0x11/imm32/alloc-id:fake
15118 _string_0d_or_with_eax/imm32/subx-name
15119 0/imm32/no-rm32
15120 0/imm32/no-r32
15121 1/imm32/imm32-is-first-inout
15122 0/imm32/no-disp32
15123 0/imm32/output-is-write-only
15124 0x11/imm32/alloc-id:fake
15125 _Primitive-or-reg-with-reg/imm32/next
15126 _Primitive-or-reg-with-reg:
15127 0x11/imm32/alloc-id:fake:payload
15128
15129 0x11/imm32/alloc-id:fake
15130 _string-or/imm32/name
15131 0x11/imm32/alloc-id:fake
15132 Single-int-var-in-some-register/imm32/inouts
15133 0x11/imm32/alloc-id:fake
15134 Single-int-var-in-some-register/imm32/outputs
15135 0x11/imm32/alloc-id:fake
15136 _string_09_or_with/imm32/subx-name
15137 3/imm32/rm32-is-first-output
15138 1/imm32/r32-is-first-inout
15139 0/imm32/no-imm32
15140 0/imm32/no-disp32
15141 0/imm32/output-is-write-only
15142 0x11/imm32/alloc-id:fake
15143 _Primitive-or-reg-with-mem/imm32/next
15144 _Primitive-or-reg-with-mem:
15145 0x11/imm32/alloc-id:fake:payload
15146
15147 0x11/imm32/alloc-id:fake
15148 _string-or-with/imm32/name
15149 0x11/imm32/alloc-id:fake
15150 Two-args-int-stack-int-reg/imm32/inouts
15151 0/imm32/no-outputs
15152 0/imm32/no-outputs
15153 0x11/imm32/alloc-id:fake
15154 _string_09_or_with/imm32/subx-name
15155 1/imm32/rm32-is-first-inout
15156 2/imm32/r32-is-second-inout
15157 0/imm32/no-imm32
15158 0/imm32/no-disp32
15159 0/imm32/output-is-write-only
15160 0x11/imm32/alloc-id:fake
15161 _Primitive-or-mem-with-reg/imm32/next
15162 _Primitive-or-mem-with-reg:
15163 0x11/imm32/alloc-id:fake:payload
15164
15165 0x11/imm32/alloc-id:fake
15166 _string-or/imm32/name
15167 0x11/imm32/alloc-id:fake
15168 Single-int-var-in-mem/imm32/inouts
15169 0x11/imm32/alloc-id:fake
15170 Single-int-var-in-some-register/imm32/outputs
15171 0x11/imm32/alloc-id:fake
15172 _string_0b_or/imm32/subx-name
15173 1/imm32/rm32-is-first-inout
15174 3/imm32/r32-is-first-output
15175 0/imm32/no-imm32
15176 0/imm32/no-disp32
15177 0/imm32/output-is-write-only
15178 0x11/imm32/alloc-id:fake
15179 _Primitive-or-lit-with-reg/imm32/next
15180 _Primitive-or-lit-with-reg:
15181 0x11/imm32/alloc-id:fake:payload
15182
15183 0x11/imm32/alloc-id:fake
15184 _string-or/imm32/name
15185 0x11/imm32/alloc-id:fake
15186 Single-lit-var/imm32/inouts
15187 0x11/imm32/alloc-id:fake
15188 Single-int-var-in-some-register/imm32/outputs
15189 0x11/imm32/alloc-id:fake
15190 _string_81_subop_or/imm32/subx-name
15191 3/imm32/rm32-is-first-output
15192 0/imm32/no-r32
15193 1/imm32/imm32-is-first-inout
15194 0/imm32/no-disp32
15195 0/imm32/output-is-write-only
15196 0x11/imm32/alloc-id:fake
15197 _Primitive-or-lit-with-mem/imm32/next
15198 _Primitive-or-lit-with-mem:
15199 0x11/imm32/alloc-id:fake:payload
15200
15201 0x11/imm32/alloc-id:fake
15202 _string-or-with/imm32/name
15203 0x11/imm32/alloc-id:fake
15204 Int-var-and-literal/imm32/inouts
15205 0/imm32/no-outputs
15206 0/imm32/no-outputs
15207 0x11/imm32/alloc-id:fake
15208 _string_81_subop_or/imm32/subx-name
15209 1/imm32/rm32-is-first-inout
15210 0/imm32/no-r32
15211 2/imm32/imm32-is-second-inout
15212 0/imm32/no-disp32
15213 0/imm32/output-is-write-only
15214 0x11/imm32/alloc-id:fake
15215 _Primitive-xor-with-eax/imm32/next
15216
15217 _Primitive-xor-with-eax:
15218 0x11/imm32/alloc-id:fake:payload
15219
15220 0x11/imm32/alloc-id:fake
15221 _string-xor/imm32/name
15222 0x11/imm32/alloc-id:fake
15223 Single-lit-var/imm32/inouts
15224 0x11/imm32/alloc-id:fake
15225 Single-int-var-in-eax/imm32/outputs
15226 0x11/imm32/alloc-id:fake
15227 _string_35_xor_with_eax/imm32/subx-name
15228 0/imm32/no-rm32
15229 0/imm32/no-r32
15230 1/imm32/imm32-is-first-inout
15231 0/imm32/no-disp32
15232 0/imm32/output-is-write-only
15233 0x11/imm32/alloc-id:fake
15234 _Primitive-xor-reg-with-reg/imm32/next
15235 _Primitive-xor-reg-with-reg:
15236 0x11/imm32/alloc-id:fake:payload
15237
15238 0x11/imm32/alloc-id:fake
15239 _string-xor/imm32/name
15240 0x11/imm32/alloc-id:fake
15241 Single-int-var-in-some-register/imm32/inouts
15242 0x11/imm32/alloc-id:fake
15243 Single-int-var-in-some-register/imm32/outputs
15244 0x11/imm32/alloc-id:fake
15245 _string_31_xor_with/imm32/subx-name
15246 3/imm32/rm32-is-first-output
15247 1/imm32/r32-is-first-inout
15248 0/imm32/no-imm32
15249 0/imm32/no-disp32
15250 0/imm32/output-is-write-only
15251 0x11/imm32/alloc-id:fake
15252 _Primitive-xor-reg-with-mem/imm32/next
15253 _Primitive-xor-reg-with-mem:
15254 0x11/imm32/alloc-id:fake:payload
15255
15256 0x11/imm32/alloc-id:fake
15257 _string-xor-with/imm32/name
15258 0x11/imm32/alloc-id:fake
15259 Two-args-int-stack-int-reg/imm32/inouts
15260 0/imm32/no-outputs
15261 0/imm32/no-outputs
15262 0x11/imm32/alloc-id:fake
15263 _string_31_xor_with/imm32/subx-name
15264 1/imm32/rm32-is-first-inout
15265 2/imm32/r32-is-second-inout
15266 0/imm32/no-imm32
15267 0/imm32/no-disp32
15268 0/imm32/output-is-write-only
15269 0x11/imm32/alloc-id:fake
15270 _Primitive-xor-mem-with-reg/imm32/next
15271 _Primitive-xor-mem-with-reg:
15272 0x11/imm32/alloc-id:fake:payload
15273
15274 0x11/imm32/alloc-id:fake
15275 _string-xor/imm32/name
15276 0x11/imm32/alloc-id:fake
15277 Single-int-var-in-mem/imm32/inouts
15278 0x11/imm32/alloc-id:fake
15279 Single-int-var-in-some-register/imm32/outputs
15280 0x11/imm32/alloc-id:fake
15281 _string_33_xor/imm32/subx-name
15282 1/imm32/rm32-is-first-inout
15283 3/imm32/r32-is-first-output
15284 0/imm32/no-imm32
15285 0/imm32/no-disp32
15286 0/imm32/output-is-write-only
15287 0x11/imm32/alloc-id:fake
15288 _Primitive-xor-lit-with-reg/imm32/next
15289 _Primitive-xor-lit-with-reg:
15290 0x11/imm32/alloc-id:fake:payload
15291
15292 0x11/imm32/alloc-id:fake
15293 _string-xor/imm32/name
15294 0x11/imm32/alloc-id:fake
15295 Single-lit-var/imm32/inouts
15296 0x11/imm32/alloc-id:fake
15297 Single-int-var-in-some-register/imm32/outputs
15298 0x11/imm32/alloc-id:fake
15299 _string_81_subop_xor/imm32/subx-name
15300 3/imm32/rm32-is-first-output
15301 0/imm32/no-r32
15302 1/imm32/imm32-is-first-inout
15303 0/imm32/no-disp32
15304 0/imm32/output-is-write-only
15305 0x11/imm32/alloc-id:fake
15306 _Primitive-xor-lit-with-mem/imm32/next
15307 _Primitive-xor-lit-with-mem:
15308 0x11/imm32/alloc-id:fake:payload
15309
15310 0x11/imm32/alloc-id:fake
15311 _string-xor-with/imm32/name
15312 0x11/imm32/alloc-id:fake
15313 Int-var-and-literal/imm32/inouts
15314 0/imm32/no-outputs
15315 0/imm32/no-outputs
15316 0x11/imm32/alloc-id:fake
15317 _string_81_subop_xor/imm32/subx-name
15318 1/imm32/rm32-is-first-inout
15319 0/imm32/no-r32
15320 2/imm32/imm32-is-first-inout
15321 0/imm32/no-disp32
15322 0/imm32/output-is-write-only
15323 0x11/imm32/alloc-id:fake
15324 _Primitive-copy-to-eax/imm32/next
15325
15326 _Primitive-copy-to-eax:
15327 0x11/imm32/alloc-id:fake:payload
15328
15329 0x11/imm32/alloc-id:fake
15330 _string-copy/imm32/name
15331 0x11/imm32/alloc-id:fake
15332 Single-lit-var/imm32/inouts
15333 0x11/imm32/alloc-id:fake
15334 Single-int-var-in-eax/imm32/outputs
15335 0x11/imm32/alloc-id:fake
15336 _string_b8_copy_to_eax/imm32/subx-name
15337 0/imm32/no-rm32
15338 0/imm32/no-r32
15339 1/imm32/imm32-is-first-inout
15340 0/imm32/no-disp32
15341 1/imm32/output-is-write-only
15342 0x11/imm32/alloc-id:fake
15343 _Primitive-copy-to-ecx/imm32/next
15344 _Primitive-copy-to-ecx:
15345 0x11/imm32/alloc-id:fake:payload
15346
15347 0x11/imm32/alloc-id:fake
15348 _string-copy/imm32/name
15349 0x11/imm32/alloc-id:fake
15350 Single-lit-var/imm32/inouts
15351 0x11/imm32/alloc-id:fake
15352 Single-int-var-in-ecx/imm32/outputs
15353 0x11/imm32/alloc-id:fake
15354 _string_b9_copy_to_ecx/imm32/subx-name
15355 0/imm32/no-rm32
15356 0/imm32/no-r32
15357 1/imm32/imm32-is-first-inout
15358 0/imm32/no-disp32
15359 1/imm32/output-is-write-only
15360 0x11/imm32/alloc-id:fake
15361 _Primitive-copy-to-edx/imm32/next
15362 _Primitive-copy-to-edx:
15363 0x11/imm32/alloc-id:fake:payload
15364
15365 0x11/imm32/alloc-id:fake
15366 _string-copy/imm32/name
15367 0x11/imm32/alloc-id:fake
15368 Single-lit-var/imm32/inouts
15369 0x11/imm32/alloc-id:fake
15370 Single-int-var-in-edx/imm32/outputs
15371 0x11/imm32/alloc-id:fake
15372 _string_ba_copy_to_edx/imm32/subx-name
15373 0/imm32/no-rm32
15374 0/imm32/no-r32
15375 1/imm32/imm32-is-first-inout
15376 0/imm32/no-disp32
15377 1/imm32/output-is-write-only
15378 0x11/imm32/alloc-id:fake
15379 _Primitive-copy-to-ebx/imm32/next
15380 _Primitive-copy-to-ebx:
15381 0x11/imm32/alloc-id:fake:payload
15382
15383 0x11/imm32/alloc-id:fake
15384 _string-copy/imm32/name
15385 0x11/imm32/alloc-id:fake
15386 Single-lit-var/imm32/inouts
15387 0x11/imm32/alloc-id:fake
15388 Single-int-var-in-ebx/imm32/outputs
15389 0x11/imm32/alloc-id:fake
15390 _string_bb_copy_to_ebx/imm32/subx-name
15391 0/imm32/no-rm32
15392 0/imm32/no-r32
15393 1/imm32/imm32-is-first-inout
15394 0/imm32/no-disp32
15395 1/imm32/output-is-write-only
15396 0x11/imm32/alloc-id:fake
15397 _Primitive-copy-to-esi/imm32/next
15398 _Primitive-copy-to-esi:
15399 0x11/imm32/alloc-id:fake:payload
15400
15401 0x11/imm32/alloc-id:fake
15402 _string-copy/imm32/name
15403 0x11/imm32/alloc-id:fake
15404 Single-lit-var/imm32/inouts
15405 0x11/imm32/alloc-id:fake
15406 Single-int-var-in-esi/imm32/outputs
15407 0x11/imm32/alloc-id:fake
15408 _string_be_copy_to_esi/imm32/subx-name
15409 0/imm32/no-rm32
15410 0/imm32/no-r32
15411 1/imm32/imm32-is-first-inout
15412 0/imm32/no-disp32
15413 1/imm32/output-is-write-only
15414 0x11/imm32/alloc-id:fake
15415 _Primitive-copy-to-edi/imm32/next
15416 _Primitive-copy-to-edi:
15417 0x11/imm32/alloc-id:fake:payload
15418
15419 0x11/imm32/alloc-id:fake
15420 _string-copy/imm32/name
15421 0x11/imm32/alloc-id:fake
15422 Single-lit-var/imm32/inouts
15423 0x11/imm32/alloc-id:fake
15424 Single-int-var-in-edi/imm32/outputs
15425 0x11/imm32/alloc-id:fake
15426 _string_bf_copy_to_edi/imm32/subx-name
15427 0/imm32/no-rm32
15428 0/imm32/no-r32
15429 1/imm32/imm32-is-first-inout
15430 0/imm32/no-disp32
15431 1/imm32/output-is-write-only
15432 0x11/imm32/alloc-id:fake
15433 _Primitive-copy-reg-to-reg/imm32/next
15434 _Primitive-copy-reg-to-reg:
15435 0x11/imm32/alloc-id:fake:payload
15436
15437 0x11/imm32/alloc-id:fake
15438 _string-copy/imm32/name
15439 0x11/imm32/alloc-id:fake
15440 Single-int-var-in-some-register/imm32/inouts
15441 0x11/imm32/alloc-id:fake
15442 Single-int-var-in-some-register/imm32/outputs
15443 0x11/imm32/alloc-id:fake
15444 _string_89_<-/imm32/subx-name
15445 3/imm32/rm32-is-first-output
15446 1/imm32/r32-is-first-inout
15447 0/imm32/no-imm32
15448 0/imm32/no-disp32
15449 1/imm32/output-is-write-only
15450 0x11/imm32/alloc-id:fake
15451 _Primitive-copy-reg-to-mem/imm32/next
15452 _Primitive-copy-reg-to-mem:
15453 0x11/imm32/alloc-id:fake:payload
15454
15455 0x11/imm32/alloc-id:fake
15456 _string-copy-to/imm32/name
15457 0x11/imm32/alloc-id:fake
15458 Two-args-int-stack-int-reg/imm32/inouts
15459 0/imm32/no-outputs
15460 0/imm32/no-outputs
15461 0x11/imm32/alloc-id:fake
15462 _string_89_<-/imm32/subx-name
15463 1/imm32/rm32-is-first-inout
15464 2/imm32/r32-is-second-inout
15465 0/imm32/no-imm32
15466 0/imm32/no-disp32
15467 1/imm32/output-is-write-only
15468 0x11/imm32/alloc-id:fake
15469 _Primitive-copy-mem-to-reg/imm32/next
15470 _Primitive-copy-mem-to-reg:
15471 0x11/imm32/alloc-id:fake:payload
15472
15473 0x11/imm32/alloc-id:fake
15474 _string-copy/imm32/name
15475 0x11/imm32/alloc-id:fake
15476 Single-int-var-in-mem/imm32/inouts
15477 0x11/imm32/alloc-id:fake
15478 Single-int-var-in-some-register/imm32/outputs
15479 0x11/imm32/alloc-id:fake
15480 _string_8b_->/imm32/subx-name
15481 1/imm32/rm32-is-first-inout
15482 3/imm32/r32-is-first-output
15483 0/imm32/no-imm32
15484 0/imm32/no-disp32
15485 1/imm32/output-is-write-only
15486 0x11/imm32/alloc-id:fake
15487 _Primitive-copy-lit-to-reg/imm32/next
15488 _Primitive-copy-lit-to-reg:
15489 0x11/imm32/alloc-id:fake:payload
15490
15491 0x11/imm32/alloc-id:fake
15492 _string-copy/imm32/name
15493 0x11/imm32/alloc-id:fake
15494 Single-lit-var/imm32/inouts
15495 0x11/imm32/alloc-id:fake
15496 Single-int-var-in-some-register/imm32/outputs
15497 0x11/imm32/alloc-id:fake
15498 _string_c7_subop_copy/imm32/subx-name
15499 3/imm32/rm32-is-first-output
15500 0/imm32/no-r32
15501 1/imm32/imm32-is-first-inout
15502 0/imm32/no-disp32
15503 1/imm32/output-is-write-only
15504 0x11/imm32/alloc-id:fake
15505 _Primitive-copy-lit-to-mem/imm32/next
15506 _Primitive-copy-lit-to-mem:
15507 0x11/imm32/alloc-id:fake:payload
15508
15509 0x11/imm32/alloc-id:fake
15510 _string-copy-to/imm32/name
15511 0x11/imm32/alloc-id:fake
15512 Int-var-and-literal/imm32/inouts
15513 0/imm32/no-outputs
15514 0/imm32/no-outputs
15515 0x11/imm32/alloc-id:fake
15516 _string_c7_subop_copy/imm32/subx-name
15517 1/imm32/rm32-is-first-inout
15518 0/imm32/no-r32
15519 2/imm32/imm32-is-first-inout
15520 0/imm32/no-disp32
15521 1/imm32/output-is-write-only
15522 0x11/imm32/alloc-id:fake
15523 _Primitive-copy-byte-from-reg/imm32/next
15524
15525 _Primitive-copy-byte-from-reg:
15526 0x11/imm32/alloc-id:fake:payload
15527
15528 0x11/imm32/alloc-id:fake
15529 _string-copy-byte/imm32/name
15530 0x11/imm32/alloc-id:fake
15531 Single-byte-var-in-some-register/imm32/inouts
15532 0x11/imm32/alloc-id:fake
15533 Single-byte-var-in-some-register/imm32/outputs
15534 0x11/imm32/alloc-id:fake
15535 _string_8a_copy_byte/imm32/subx-name
15536 1/imm32/rm32-is-first-inout
15537 3/imm32/r32-is-first-output
15538 0/imm32/no-imm32
15539 0/imm32/no-disp32
15540 1/imm32/output-is-write-only
15541 0x11/imm32/alloc-id:fake
15542 _Primitive-copy-byte-from-mem/imm32/next
15543 _Primitive-copy-byte-from-mem:
15544 0x11/imm32/alloc-id:fake:payload
15545
15546 0x11/imm32/alloc-id:fake
15547 _string-copy-byte/imm32/name
15548 0x11/imm32/alloc-id:fake
15549 Single-byte-var-in-mem/imm32/inouts
15550 0x11/imm32/alloc-id:fake
15551 Single-byte-var-in-some-register/imm32/outputs
15552 0x11/imm32/alloc-id:fake
15553 _string_8a_copy_byte/imm32/subx-name
15554 1/imm32/rm32-is-first-inout
15555 3/imm32/r32-is-first-output
15556 0/imm32/no-imm32
15557 0/imm32/no-disp32
15558 1/imm32/output-is-write-only
15559 0x11/imm32/alloc-id:fake
15560 _Primitive-copy-byte-to-mem/imm32/next
15561 _Primitive-copy-byte-to-mem:
15562 0x11/imm32/alloc-id:fake:payload
15563
15564 0x11/imm32/alloc-id:fake
15565 _string-copy-byte-to/imm32/name
15566 0x11/imm32/alloc-id:fake
15567 Two-args-byte-stack-byte-reg/imm32/inouts
15568 0/imm32/no-outputs
15569 0/imm32/no-outputs
15570 0x11/imm32/alloc-id:fake
15571 _string_88_copy_byte/imm32/subx-name
15572 1/imm32/rm32-is-first-inout
15573 2/imm32/r32-is-second-inout
15574 0/imm32/no-imm32
15575 0/imm32/no-disp32
15576 0/imm32/output-is-write-only
15577 0x11/imm32/alloc-id:fake
15578 _Primitive-address/imm32/next
15579
15580 _Primitive-address:
15581 0x11/imm32/alloc-id:fake:payload
15582
15583 0x11/imm32/alloc-id:fake
15584 _string-address/imm32/name
15585 0x11/imm32/alloc-id:fake
15586 Single-int-var-in-mem/imm32/inouts
15587 0x11/imm32/alloc-id:fake
15588 Single-addr-var-in-some-register/imm32/outputs
15589 0x11/imm32/alloc-id:fake
15590 _string_8d_copy_address/imm32/subx-name
15591 1/imm32/rm32-is-first-inout
15592 3/imm32/r32-is-first-output
15593 0/imm32/no-imm32
15594 0/imm32/no-disp32
15595 1/imm32/output-is-write-only
15596 0x11/imm32/alloc-id:fake
15597 _Primitive-compare-reg-with-reg/imm32/next
15598
15599 _Primitive-compare-reg-with-reg:
15600 0x11/imm32/alloc-id:fake:payload
15601
15602 0x11/imm32/alloc-id:fake
15603 _string-compare/imm32/name
15604 0x11/imm32/alloc-id:fake
15605 Two-int-args-in-regs/imm32/inouts
15606 0/imm32/no-outputs
15607 0/imm32/no-outputs
15608 0x11/imm32/alloc-id:fake
15609 _string_39_compare->/imm32/subx-name
15610 1/imm32/rm32-is-first-inout
15611 2/imm32/r32-is-second-inout
15612 0/imm32/no-imm32
15613 0/imm32/no-disp32
15614 0/imm32/output-is-write-only
15615 0x11/imm32/alloc-id:fake
15616 _Primitive-compare-mem-with-reg/imm32/next
15617 _Primitive-compare-mem-with-reg:
15618 0x11/imm32/alloc-id:fake:payload
15619
15620 0x11/imm32/alloc-id:fake
15621 _string-compare/imm32/name
15622 0x11/imm32/alloc-id:fake
15623 Two-args-int-stack-int-reg/imm32/inouts
15624 0/imm32/no-outputs
15625 0/imm32/no-outputs
15626 0x11/imm32/alloc-id:fake
15627 _string_39_compare->/imm32/subx-name
15628 1/imm32/rm32-is-first-inout
15629 2/imm32/r32-is-second-inout
15630 0/imm32/no-imm32
15631 0/imm32/no-disp32
15632 0/imm32/output-is-write-only
15633 0x11/imm32/alloc-id:fake
15634 _Primitive-compare-reg-with-mem/imm32/next
15635 _Primitive-compare-reg-with-mem:
15636 0x11/imm32/alloc-id:fake:payload
15637
15638 0x11/imm32/alloc-id:fake
15639 _string-compare/imm32/name
15640 0x11/imm32/alloc-id:fake
15641 Two-args-int-reg-int-stack/imm32/inouts
15642 0/imm32/no-outputs
15643 0/imm32/no-outputs
15644 0x11/imm32/alloc-id:fake
15645 _string_3b_compare<-/imm32/subx-name
15646 2/imm32/rm32-is-second-inout
15647 1/imm32/r32-is-first-inout
15648 0/imm32/no-imm32
15649 0/imm32/no-disp32
15650 0/imm32/output-is-write-only
15651 0x11/imm32/alloc-id:fake
15652 _Primitive-compare-eax-with-literal/imm32/next
15653 _Primitive-compare-eax-with-literal:
15654 0x11/imm32/alloc-id:fake:payload
15655
15656 0x11/imm32/alloc-id:fake
15657 _string-compare/imm32/name
15658 0x11/imm32/alloc-id:fake
15659 Two-args-int-eax-int-literal/imm32/inouts
15660 0/imm32/no-outputs
15661 0/imm32/no-outputs
15662 0x11/imm32/alloc-id:fake
15663 _string_3d_compare_eax_with/imm32/subx-name
15664 0/imm32/no-rm32
15665 0/imm32/no-r32
15666 2/imm32/imm32-is-second-inout
15667 0/imm32/no-disp32
15668 0/imm32/output-is-write-only
15669 0x11/imm32/alloc-id:fake
15670 _Primitive-compare-reg-with-literal/imm32/next
15671 _Primitive-compare-reg-with-literal:
15672 0x11/imm32/alloc-id:fake:payload
15673
15674 0x11/imm32/alloc-id:fake
15675 _string-compare/imm32/name
15676 0x11/imm32/alloc-id:fake
15677 Int-var-in-register-and-literal/imm32/inouts
15678 0/imm32/no-outputs
15679 0/imm32/no-outputs
15680 0x11/imm32/alloc-id:fake
15681 _string_81_subop_compare/imm32/subx-name
15682 1/imm32/rm32-is-first-inout
15683 0/imm32/no-r32
15684 2/imm32/imm32-is-second-inout
15685 0/imm32/no-disp32
15686 0/imm32/output-is-write-only
15687 0x11/imm32/alloc-id:fake
15688 _Primitive-compare-mem-with-literal/imm32/next
15689 _Primitive-compare-mem-with-literal:
15690 0x11/imm32/alloc-id:fake:payload
15691
15692 0x11/imm32/alloc-id:fake
15693 _string-compare/imm32/name
15694 0x11/imm32/alloc-id:fake
15695 Int-var-and-literal/imm32/inouts
15696 0/imm32/no-outputs
15697 0/imm32/no-outputs
15698 0x11/imm32/alloc-id:fake
15699 _string_81_subop_compare/imm32/subx-name
15700 1/imm32/rm32-is-first-inout
15701 0/imm32/no-r32
15702 2/imm32/imm32-is-second-inout
15703 0/imm32/no-disp32
15704 0/imm32/output-is-write-only
15705 0x11/imm32/alloc-id:fake
15706 _Primitive-multiply-reg-by-reg/imm32/next
15707
15708 _Primitive-multiply-reg-by-reg:
15709 0x11/imm32/alloc-id:fake:payload
15710
15711 0x11/imm32/alloc-id:fake
15712 _string-multiply/imm32/name
15713 0x11/imm32/alloc-id:fake
15714 Single-int-var-in-some-register/imm32/inouts
15715 0x11/imm32/alloc-id:fake
15716 Single-int-var-in-some-register/imm32/outputs
15717 0x11/imm32/alloc-id:fake
15718 _string_0f_af_multiply/imm32/subx-name
15719 1/imm32/rm32-is-first-inout
15720 3/imm32/r32-is-first-output
15721 0/imm32/no-imm32
15722 0/imm32/no-disp32
15723 0/imm32/output-is-write-only
15724 0x11/imm32/alloc-id:fake
15725 _Primitive-multiply-reg-by-mem/imm32/next
15726 _Primitive-multiply-reg-by-mem:
15727 0x11/imm32/alloc-id:fake:payload
15728
15729 0x11/imm32/alloc-id:fake
15730 _string-multiply/imm32/name
15731 0x11/imm32/alloc-id:fake
15732 Single-int-var-in-mem/imm32/inouts
15733 0x11/imm32/alloc-id:fake
15734 Single-int-var-in-some-register/imm32/outputs
15735 0x11/imm32/alloc-id:fake
15736 _string_0f_af_multiply/imm32/subx-name
15737 1/imm32/rm32-is-first-inout
15738 3/imm32/r32-is-first-output
15739 0/imm32/no-imm32
15740 0/imm32/no-disp32
15741 0/imm32/output-is-write-only
15742 0x11/imm32/alloc-id:fake
15743 _Primitive-break-if-addr</imm32/next
15744
15745 _Primitive-break-if-addr<:
15746 0x11/imm32/alloc-id:fake:payload
15747 0x11/imm32/alloc-id:fake
15748 _string-break-if-addr</imm32/name
15749 0/imm32/no-inouts
15750 0/imm32/no-inouts
15751 0/imm32/no-outputs
15752 0/imm32/no-outputs
15753 0x11/imm32/alloc-id:fake
15754 _string_0f_82_jump_break/imm32/subx-name
15755 0/imm32/no-rm32
15756 0/imm32/no-r32
15757 0/imm32/no-imm32
15758 0/imm32/no-disp32
15759 0/imm32/no-output
15760 0x11/imm32/alloc-id:fake
15761 _Primitive-break-if-addr>=/imm32/next
15762 _Primitive-break-if-addr>=:
15763 0x11/imm32/alloc-id:fake:payload
15764 0x11/imm32/alloc-id:fake
15765 _string-break-if-addr>=/imm32/name
15766 0/imm32/no-inouts
15767 0/imm32/no-inouts
15768 0/imm32/no-outputs
15769 0/imm32/no-outputs
15770 0x11/imm32/alloc-id:fake
15771 _string_0f_83_jump_break/imm32/subx-name
15772 0/imm32/no-rm32
15773 0/imm32/no-r32
15774 0/imm32/no-imm32
15775 0/imm32/no-disp32
15776 0/imm32/no-output
15777 0x11/imm32/alloc-id:fake
15778 _Primitive-break-if-=/imm32/next
15779 _Primitive-break-if-=:
15780 0x11/imm32/alloc-id:fake:payload
15781 0x11/imm32/alloc-id:fake
15782 _string-break-if-=/imm32/name
15783 0/imm32/no-inouts
15784 0/imm32/no-inouts
15785 0/imm32/no-outputs
15786 0/imm32/no-outputs
15787 0x11/imm32/alloc-id:fake
15788 _string_0f_84_jump_break/imm32/subx-name
15789 0/imm32/no-rm32
15790 0/imm32/no-r32
15791 0/imm32/no-imm32
15792 0/imm32/no-disp32
15793 0/imm32/no-output
15794 0x11/imm32/alloc-id:fake
15795 _Primitive-break-if-!=/imm32/next
15796 _Primitive-break-if-!=:
15797 0x11/imm32/alloc-id:fake:payload
15798 0x11/imm32/alloc-id:fake
15799 _string-break-if-!=/imm32/name
15800 0/imm32/no-inouts
15801 0/imm32/no-inouts
15802 0/imm32/no-outputs
15803 0/imm32/no-outputs
15804 0x11/imm32/alloc-id:fake
15805 _string_0f_85_jump_break/imm32/subx-name
15806 0/imm32/no-rm32
15807 0/imm32/no-r32
15808 0/imm32/no-imm32
15809 0/imm32/no-disp32
15810 0/imm32/no-output
15811 0x11/imm32/alloc-id:fake
15812 _Primitive-break-if-addr<=/imm32/next
15813 _Primitive-break-if-addr<=:
15814 0x11/imm32/alloc-id:fake:payload
15815 0x11/imm32/alloc-id:fake
15816 _string-break-if-addr<=/imm32/name
15817 0/imm32/no-inouts
15818 0/imm32/no-inouts
15819 0/imm32/no-outputs
15820 0/imm32/no-outputs
15821 0x11/imm32/alloc-id:fake
15822 _string_0f_86_jump_break/imm32/subx-name
15823 0/imm32/no-rm32
15824 0/imm32/no-r32
15825 0/imm32/no-imm32
15826 0/imm32/no-disp32
15827 0/imm32/no-output
15828 0x11/imm32/alloc-id:fake
15829 _Primitive-break-if-addr>/imm32/next
15830 _Primitive-break-if-addr>:
15831 0x11/imm32/alloc-id:fake:payload
15832 0x11/imm32/alloc-id:fake
15833 _string-break-if-addr>/imm32/name
15834 0/imm32/no-inouts
15835 0/imm32/no-inouts
15836 0/imm32/no-outputs
15837 0/imm32/no-outputs
15838 0x11/imm32/alloc-id:fake
15839 _string_0f_87_jump_break/imm32/subx-name
15840 0/imm32/no-rm32
15841 0/imm32/no-r32
15842 0/imm32/no-imm32
15843 0/imm32/no-disp32
15844 0/imm32/no-output
15845 0x11/imm32/alloc-id:fake
15846 _Primitive-break-if-</imm32/next
15847 _Primitive-break-if-<:
15848 0x11/imm32/alloc-id:fake:payload
15849 0x11/imm32/alloc-id:fake
15850 _string-break-if-</imm32/name
15851 0/imm32/no-inouts
15852 0/imm32/no-inouts
15853 0/imm32/no-outputs
15854 0/imm32/no-outputs
15855 0x11/imm32/alloc-id:fake
15856 _string_0f_8c_jump_break/imm32/subx-name
15857 0/imm32/no-rm32
15858 0/imm32/no-r32
15859 0/imm32/no-imm32
15860 0/imm32/no-disp32
15861 0/imm32/no-output
15862 0x11/imm32/alloc-id:fake
15863 _Primitive-break-if->=/imm32/next
15864 _Primitive-break-if->=:
15865 0x11/imm32/alloc-id:fake:payload
15866 0x11/imm32/alloc-id:fake
15867 _string-break-if->=/imm32/name
15868 0/imm32/no-inouts
15869 0/imm32/no-inouts
15870 0/imm32/no-outputs
15871 0/imm32/no-outputs
15872 0x11/imm32/alloc-id:fake
15873 _string_0f_8d_jump_break/imm32/subx-name
15874 0/imm32/no-rm32
15875 0/imm32/no-r32
15876 0/imm32/no-imm32
15877 0/imm32/no-disp32
15878 0/imm32/no-output
15879 0x11/imm32/alloc-id:fake
15880 _Primitive-break-if-<=/imm32/next
15881 _Primitive-break-if-<=:
15882 0x11/imm32/alloc-id:fake:payload
15883 0x11/imm32/alloc-id:fake
15884 _string-break-if-<=/imm32/name
15885 0/imm32/no-inouts
15886 0/imm32/no-inouts
15887 0/imm32/no-outputs
15888 0/imm32/no-outputs
15889 0x11/imm32/alloc-id:fake
15890 _string_0f_8e_jump_break/imm32/subx-name
15891 0/imm32/no-rm32
15892 0/imm32/no-r32
15893 0/imm32/no-imm32
15894 0/imm32/no-disp32
15895 0/imm32/no-output
15896 0x11/imm32/alloc-id:fake
15897 _Primitive-break-if->/imm32/next
15898 _Primitive-break-if->:
15899 0x11/imm32/alloc-id:fake:payload
15900 0x11/imm32/alloc-id:fake
15901 _string-break-if->/imm32/name
15902 0/imm32/no-inouts
15903 0/imm32/no-inouts
15904 0/imm32/no-outputs
15905 0/imm32/no-outputs
15906 0x11/imm32/alloc-id:fake
15907 _string_0f_8f_jump_break/imm32/subx-name
15908 0/imm32/no-rm32
15909 0/imm32/no-r32
15910 0/imm32/no-imm32
15911 0/imm32/no-disp32
15912 0/imm32/no-output
15913 0x11/imm32/alloc-id:fake
15914 _Primitive-break/imm32/next
15915 _Primitive-break:
15916 0x11/imm32/alloc-id:fake:payload
15917 0x11/imm32/alloc-id:fake
15918 _string-break/imm32/name
15919 0/imm32/no-inouts
15920 0/imm32/no-inouts
15921 0/imm32/no-outputs
15922 0/imm32/no-outputs
15923 0x11/imm32/alloc-id:fake
15924 _string_e9_jump_break/imm32/subx-name
15925 0/imm32/no-rm32
15926 0/imm32/no-r32
15927 0/imm32/no-imm32
15928 0/imm32/no-disp32
15929 0/imm32/no-output
15930 0x11/imm32/alloc-id:fake
15931 _Primitive-loop-if-addr</imm32/next
15932 _Primitive-loop-if-addr<:
15933 0x11/imm32/alloc-id:fake:payload
15934 0x11/imm32/alloc-id:fake
15935 _string-loop-if-addr</imm32/name
15936 0/imm32/no-inouts
15937 0/imm32/no-inouts
15938 0/imm32/no-outputs
15939 0/imm32/no-outputs
15940 0x11/imm32/alloc-id:fake
15941 _string_0f_82_jump_loop/imm32/subx-name
15942 0/imm32/no-rm32
15943 0/imm32/no-r32
15944 0/imm32/no-imm32
15945 0/imm32/no-disp32
15946 0/imm32/no-output
15947 0x11/imm32/alloc-id:fake
15948 _Primitive-loop-if-addr>=/imm32/next
15949 _Primitive-loop-if-addr>=:
15950 0x11/imm32/alloc-id:fake:payload
15951 0x11/imm32/alloc-id:fake
15952 _string-loop-if-addr>=/imm32/name
15953 0/imm32/no-inouts
15954 0/imm32/no-inouts
15955 0/imm32/no-outputs
15956 0/imm32/no-outputs
15957 0x11/imm32/alloc-id:fake
15958 _string_0f_83_jump_loop/imm32/subx-name
15959 0/imm32/no-rm32
15960 0/imm32/no-r32
15961 0/imm32/no-imm32
15962 0/imm32/no-disp32
15963 0/imm32/no-output
15964 0x11/imm32/alloc-id:fake
15965 _Primitive-loop-if-=/imm32/next
15966 _Primitive-loop-if-=:
15967 0x11/imm32/alloc-id:fake:payload
15968 0x11/imm32/alloc-id:fake
15969 _string-loop-if-=/imm32/name
15970 0/imm32/no-inouts
15971 0/imm32/no-inouts
15972 0/imm32/no-outputs
15973 0/imm32/no-outputs
15974 0x11/imm32/alloc-id:fake
15975 _string_0f_84_jump_loop/imm32/subx-name
15976 0/imm32/no-rm32
15977 0/imm32/no-r32
15978 0/imm32/no-imm32
15979 0/imm32/no-disp32
15980 0/imm32/no-output
15981 0x11/imm32/alloc-id:fake
15982 _Primitive-loop-if-!=/imm32/next
15983 _Primitive-loop-if-!=:
15984 0x11/imm32/alloc-id:fake:payload
15985 0x11/imm32/alloc-id:fake
15986 _string-loop-if-!=/imm32/name
15987 0/imm32/no-inouts
15988 0/imm32/no-inouts
15989 0/imm32/no-outputs
15990 0/imm32/no-outputs
15991 0x11/imm32/alloc-id:fake
15992 _string_0f_85_jump_loop/imm32/subx-name
15993 0/imm32/no-rm32
15994 0/imm32/no-r32
15995 0/imm32/no-imm32
15996 0/imm32/no-disp32
15997 0/imm32/no-output
15998 0x11/imm32/alloc-id:fake
15999 _Primitive-loop-if-addr<=/imm32/next
16000 _Primitive-loop-if-addr<=:
16001 0x11/imm32/alloc-id:fake:payload
16002 0x11/imm32/alloc-id:fake
16003 _string-loop-if-addr<=/imm32/name
16004 0/imm32/no-inouts
16005 0/imm32/no-inouts
16006 0/imm32/no-outputs
16007 0/imm32/no-outputs
16008 0x11/imm32/alloc-id:fake
16009 _string_0f_86_jump_loop/imm32/subx-name
16010 0/imm32/no-rm32
16011 0/imm32/no-r32
16012 0/imm32/no-imm32
16013 0/imm32/no-disp32
16014 0/imm32/no-output
16015 0x11/imm32/alloc-id:fake
16016 _Primitive-loop-if-addr>/imm32/next
16017 _Primitive-loop-if-addr>:
16018 0x11/imm32/alloc-id:fake:payload
16019 0x11/imm32/alloc-id:fake
16020 _string-loop-if-addr>/imm32/name
16021 0/imm32/no-inouts
16022 0/imm32/no-inouts
16023 0/imm32/no-outputs
16024 0/imm32/no-outputs
16025 0x11/imm32/alloc-id:fake
16026 _string_0f_87_jump_loop/imm32/subx-name
16027 0/imm32/no-rm32
16028 0/imm32/no-r32
16029 0/imm32/no-imm32
16030 0/imm32/no-disp32
16031 0/imm32/no-output
16032 0x11/imm32/alloc-id:fake
16033 _Primitive-loop-if-</imm32/next
16034 _Primitive-loop-if-<:
16035 0x11/imm32/alloc-id:fake:payload
16036 0x11/imm32/alloc-id:fake
16037 _string-loop-if-</imm32/name
16038 0/imm32/no-inouts
16039 0/imm32/no-inouts
16040 0/imm32/no-outputs
16041 0/imm32/no-outputs
16042 0x11/imm32/alloc-id:fake
16043 _string_0f_8c_jump_loop/imm32/subx-name
16044 0/imm32/no-rm32
16045 0/imm32/no-r32
16046 0/imm32/no-imm32
16047 0/imm32/no-disp32
16048 0/imm32/no-output
16049 0x11/imm32/alloc-id:fake
16050 _Primitive-loop-if->=/imm32/next
16051 _Primitive-loop-if->=:
16052 0x11/imm32/alloc-id:fake:payload
16053 0x11/imm32/alloc-id:fake
16054 _string-loop-if->=/imm32/name
16055 0/imm32/no-inouts
16056 0/imm32/no-inouts
16057 0/imm32/no-outputs
16058 0/imm32/no-outputs
16059 0x11/imm32/alloc-id:fake
16060 _string_0f_8d_jump_loop/imm32/subx-name
16061 0/imm32/no-rm32
16062 0/imm32/no-r32
16063 0/imm32/no-imm32
16064 0/imm32/no-disp32
16065 0/imm32/no-output
16066 0x11/imm32/alloc-id:fake
16067 _Primitive-loop-if-<=/imm32/next
16068 _Primitive-loop-if-<=:
16069 0x11/imm32/alloc-id:fake:payload
16070 0x11/imm32/alloc-id:fake
16071 _string-loop-if-<=/imm32/name
16072 0/imm32/no-inouts
16073 0/imm32/no-inouts
16074 0/imm32/no-outputs
16075 0/imm32/no-outputs
16076 0x11/imm32/alloc-id:fake
16077 _string_0f_8e_jump_loop/imm32/subx-name
16078 0/imm32/no-rm32
16079 0/imm32/no-r32
16080 0/imm32/no-imm32
16081 0/imm32/no-disp32
16082 0/imm32/no-output
16083 0x11/imm32/alloc-id:fake
16084 _Primitive-loop-if->/imm32/next
16085 _Primitive-loop-if->:
16086 0x11/imm32/alloc-id:fake:payload
16087 0x11/imm32/alloc-id:fake
16088 _string-loop-if->/imm32/name
16089 0/imm32/no-inouts
16090 0/imm32/no-inouts
16091 0/imm32/no-outputs
16092 0/imm32/no-outputs
16093 0x11/imm32/alloc-id:fake
16094 _string_0f_8f_jump_loop/imm32/subx-name
16095 0/imm32/no-rm32
16096 0/imm32/no-r32
16097 0/imm32/no-imm32
16098 0/imm32/no-disp32
16099 0/imm32/no-output
16100 0x11/imm32/alloc-id:fake
16101 _Primitive-loop/imm32/next
16102 _Primitive-loop:
16103 0x11/imm32/alloc-id:fake:payload
16104 0x11/imm32/alloc-id:fake
16105 _string-loop/imm32/name
16106 0/imm32/no-inouts
16107 0/imm32/no-inouts
16108 0/imm32/no-outputs
16109 0/imm32/no-outputs
16110 0x11/imm32/alloc-id:fake
16111 _string_e9_jump_loop/imm32/subx-name
16112 0/imm32/no-rm32
16113 0/imm32/no-r32
16114 0/imm32/no-imm32
16115 0/imm32/no-disp32
16116 0/imm32/no-output
16117 0x11/imm32/alloc-id:fake
16118 _Primitive-break-if-addr<-named/imm32/next
16119
16120 _Primitive-break-if-addr<-named:
16121 0x11/imm32/alloc-id:fake:payload
16122 0x11/imm32/alloc-id:fake
16123 _string-break-if-addr</imm32/name
16124 0x11/imm32/alloc-id:fake
16125 Single-lit-var/imm32/inouts
16126 0/imm32/no-outputs
16127 0/imm32/no-outputs
16128 0x11/imm32/alloc-id:fake
16129 _string_0f_82_jump_label/imm32/subx-name
16130 0/imm32/no-rm32
16131 0/imm32/no-r32
16132 0/imm32/no-imm32
16133 1/imm32/disp32-is-first-inout
16134 0/imm32/no-output
16135 0x11/imm32/alloc-id:fake
16136 _Primitive-break-if-addr>=-named/imm32/next
16137 _Primitive-break-if-addr>=-named:
16138 0x11/imm32/alloc-id:fake:payload
16139 0x11/imm32/alloc-id:fake
16140 _string-break-if-addr>=/imm32/name
16141 0x11/imm32/alloc-id:fake
16142 Single-lit-var/imm32/inouts
16143 0/imm32/no-outputs
16144 0/imm32/no-outputs
16145 0x11/imm32/alloc-id:fake
16146 _string_0f_83_jump_label/imm32/subx-name
16147 0/imm32/no-rm32
16148 0/imm32/no-r32
16149 0/imm32/no-imm32
16150 1/imm32/disp32-is-first-inout
16151 0/imm32/no-output
16152 0x11/imm32/alloc-id:fake
16153 _Primitive-break-if-=-named/imm32/next
16154 _Primitive-break-if-=-named:
16155 0x11/imm32/alloc-id:fake:payload
16156 0x11/imm32/alloc-id:fake
16157 _string-break-if-=/imm32/name
16158 0x11/imm32/alloc-id:fake
16159 Single-lit-var/imm32/inouts
16160 0/imm32/no-outputs
16161 0/imm32/no-outputs
16162 0x11/imm32/alloc-id:fake
16163 _string_0f_84_jump_label/imm32/subx-name
16164 0/imm32/no-rm32
16165 0/imm32/no-r32
16166 0/imm32/no-imm32
16167 1/imm32/disp32-is-first-inout
16168 0/imm32/no-output
16169 0x11/imm32/alloc-id:fake
16170 _Primitive-break-if-!=-named/imm32/next
16171 _Primitive-break-if-!=-named:
16172 0x11/imm32/alloc-id:fake:payload
16173 0x11/imm32/alloc-id:fake
16174 _string-break-if-!=/imm32/name
16175 0x11/imm32/alloc-id:fake
16176 Single-lit-var/imm32/inouts
16177 0/imm32/no-outputs
16178 0/imm32/no-outputs
16179 0x11/imm32/alloc-id:fake
16180 _string_0f_85_jump_label/imm32/subx-name
16181 0/imm32/no-rm32
16182 0/imm32/no-r32
16183 0/imm32/no-imm32
16184 1/imm32/disp32-is-first-inout
16185 0/imm32/no-output
16186 0x11/imm32/alloc-id:fake
16187 _Primitive-break-if-addr<=-named/imm32/next
16188 _Primitive-break-if-addr<=-named:
16189 0x11/imm32/alloc-id:fake:payload
16190 0x11/imm32/alloc-id:fake
16191 _string-break-if-addr<=/imm32/name
16192 0x11/imm32/alloc-id:fake
16193 Single-lit-var/imm32/inouts
16194 0/imm32/no-outputs
16195 0/imm32/no-outputs
16196 0x11/imm32/alloc-id:fake
16197 _string_0f_86_jump_label/imm32/subx-name
16198 0/imm32/no-rm32
16199 0/imm32/no-r32
16200 0/imm32/no-imm32
16201 1/imm32/disp32-is-first-inout
16202 0/imm32/no-output
16203 0x11/imm32/alloc-id:fake
16204 _Primitive-break-if-addr>-named/imm32/next
16205 _Primitive-break-if-addr>-named:
16206 0x11/imm32/alloc-id:fake:payload
16207 0x11/imm32/alloc-id:fake
16208 _string-break-if-addr>/imm32/name
16209 0x11/imm32/alloc-id:fake
16210 Single-lit-var/imm32/inouts
16211 0/imm32/no-outputs
16212 0/imm32/no-outputs
16213 0x11/imm32/alloc-id:fake
16214 _string_0f_87_jump_label/imm32/subx-name
16215 0/imm32/no-rm32
16216 0/imm32/no-r32
16217 0/imm32/no-imm32
16218 1/imm32/disp32-is-first-inout
16219 0/imm32/no-output
16220 0x11/imm32/alloc-id:fake
16221 _Primitive-break-if-<-named/imm32/next
16222 _Primitive-break-if-<-named:
16223 0x11/imm32/alloc-id:fake:payload
16224 0x11/imm32/alloc-id:fake
16225 _string-break-if-</imm32/name
16226 0x11/imm32/alloc-id:fake
16227 Single-lit-var/imm32/inouts
16228 0/imm32/no-outputs
16229 0/imm32/no-outputs
16230 0x11/imm32/alloc-id:fake
16231 _string_0f_8c_jump_label/imm32/subx-name
16232 0/imm32/no-rm32
16233 0/imm32/no-r32
16234 0/imm32/no-imm32
16235 1/imm32/disp32-is-first-inout
16236 0/imm32/no-output
16237 0x11/imm32/alloc-id:fake
16238 _Primitive-break-if->=-named/imm32/next
16239 _Primitive-break-if->=-named:
16240 0x11/imm32/alloc-id:fake:payload
16241 0x11/imm32/alloc-id:fake
16242 _string-break-if->=/imm32/name
16243 0x11/imm32/alloc-id:fake
16244 Single-lit-var/imm32/inouts
16245 0/imm32/no-outputs
16246 0/imm32/no-outputs
16247 0x11/imm32/alloc-id:fake
16248 _string_0f_8d_jump_label/imm32/subx-name
16249 0/imm32/no-rm32
16250 0/imm32/no-r32
16251 0/imm32/no-imm32
16252 1/imm32/disp32-is-first-inout
16253 0/imm32/no-output
16254 0x11/imm32/alloc-id:fake
16255 _Primitive-break-if-<=-named/imm32/next
16256 _Primitive-break-if-<=-named:
16257 0x11/imm32/alloc-id:fake:payload
16258 0x11/imm32/alloc-id:fake
16259 _string-break-if-<=/imm32/name
16260 0x11/imm32/alloc-id:fake
16261 Single-lit-var/imm32/inouts
16262 0/imm32/no-outputs
16263 0/imm32/no-outputs
16264 0x11/imm32/alloc-id:fake
16265 _string_0f_8e_jump_label/imm32/subx-name
16266 0/imm32/no-rm32
16267 0/imm32/no-r32
16268 0/imm32/no-imm32
16269 1/imm32/disp32-is-first-inout
16270 0/imm32/no-output
16271 0x11/imm32/alloc-id:fake
16272 _Primitive-break-if->-named/imm32/next
16273 _Primitive-break-if->-named:
16274 0x11/imm32/alloc-id:fake:payload
16275 0x11/imm32/alloc-id:fake
16276 _string-break-if->/imm32/name
16277 0x11/imm32/alloc-id:fake
16278 Single-lit-var/imm32/inouts
16279 0/imm32/no-outputs
16280 0/imm32/no-outputs
16281 0x11/imm32/alloc-id:fake
16282 _string_0f_8f_jump_label/imm32/subx-name
16283 0/imm32/no-rm32
16284 0/imm32/no-r32
16285 0/imm32/no-imm32
16286 1/imm32/disp32-is-first-inout
16287 0/imm32/no-output
16288 0x11/imm32/alloc-id:fake
16289 _Primitive-break-named/imm32/next
16290 _Primitive-break-named:
16291 0x11/imm32/alloc-id:fake:payload
16292 0x11/imm32/alloc-id:fake
16293 _string-break/imm32/name
16294 0x11/imm32/alloc-id:fake
16295 Single-lit-var/imm32/inouts
16296 0/imm32/no-outputs
16297 0/imm32/no-outputs
16298 0x11/imm32/alloc-id:fake
16299 _string_e9_jump_label/imm32/subx-name
16300 0/imm32/no-rm32
16301 0/imm32/no-r32
16302 0/imm32/no-imm32
16303 1/imm32/disp32-is-first-inout
16304 0/imm32/no-output
16305 0x11/imm32/alloc-id:fake
16306 _Primitive-loop-if-addr<-named/imm32/next
16307 _Primitive-loop-if-addr<-named:
16308 0x11/imm32/alloc-id:fake:payload
16309 0x11/imm32/alloc-id:fake
16310 _string-loop-if-addr</imm32/name
16311 0x11/imm32/alloc-id:fake
16312 Single-lit-var/imm32/inouts
16313 0/imm32/no-outputs
16314 0/imm32/no-outputs
16315 0x11/imm32/alloc-id:fake
16316 _string_0f_82_jump_label/imm32/subx-name
16317 0/imm32/no-rm32
16318 0/imm32/no-r32
16319 0/imm32/no-imm32
16320 1/imm32/disp32-is-first-inout
16321 0/imm32/no-output
16322 0x11/imm32/alloc-id:fake
16323 _Primitive-loop-if-addr>=-named/imm32/next
16324 _Primitive-loop-if-addr>=-named:
16325 0x11/imm32/alloc-id:fake:payload
16326 0x11/imm32/alloc-id:fake
16327 _string-loop-if-addr>=/imm32/name
16328 0x11/imm32/alloc-id:fake
16329 Single-lit-var/imm32/inouts
16330 0/imm32/no-outputs
16331 0/imm32/no-outputs
16332 0x11/imm32/alloc-id:fake
16333 _string_0f_83_jump_label/imm32/subx-name
16334 0/imm32/no-rm32
16335 0/imm32/no-r32
16336 0/imm32/no-imm32
16337 1/imm32/disp32-is-first-inout
16338 0/imm32/no-output
16339 0x11/imm32/alloc-id:fake
16340 _Primitive-loop-if-=-named/imm32/next
16341 _Primitive-loop-if-=-named:
16342 0x11/imm32/alloc-id:fake:payload
16343 0x11/imm32/alloc-id:fake
16344 _string-loop-if-=/imm32/name
16345 0x11/imm32/alloc-id:fake
16346 Single-lit-var/imm32/inouts
16347 0/imm32/no-outputs
16348 0/imm32/no-outputs
16349 0x11/imm32/alloc-id:fake
16350 _string_0f_84_jump_label/imm32/subx-name
16351 0/imm32/no-rm32
16352 0/imm32/no-r32
16353 0/imm32/no-imm32
16354 1/imm32/disp32-is-first-inout
16355 0/imm32/no-output
16356 0x11/imm32/alloc-id:fake
16357 _Primitive-loop-if-!=-named/imm32/next
16358 _Primitive-loop-if-!=-named:
16359 0x11/imm32/alloc-id:fake:payload
16360 0x11/imm32/alloc-id:fake
16361 _string-loop-if-!=/imm32/name
16362 0x11/imm32/alloc-id:fake
16363 Single-lit-var/imm32/inouts
16364 0/imm32/no-outputs
16365 0/imm32/no-outputs
16366 0x11/imm32/alloc-id:fake
16367 _string_0f_85_jump_label/imm32/subx-name
16368 0/imm32/no-rm32
16369 0/imm32/no-r32
16370 0/imm32/no-imm32
16371 1/imm32/disp32-is-first-inout
16372 0/imm32/no-output
16373 0x11/imm32/alloc-id:fake
16374 _Primitive-loop-if-addr<=-named/imm32/next
16375 _Primitive-loop-if-addr<=-named:
16376 0x11/imm32/alloc-id:fake:payload
16377 0x11/imm32/alloc-id:fake
16378 _string-loop-if-addr<=/imm32/name
16379 0x11/imm32/alloc-id:fake
16380 Single-lit-var/imm32/inouts
16381 0/imm32/no-outputs
16382 0/imm32/no-outputs
16383 0x11/imm32/alloc-id:fake
16384 _string_0f_86_jump_label/imm32/subx-name
16385 0/imm32/no-rm32
16386 0/imm32/no-r32
16387 0/imm32/no-imm32
16388 1/imm32/disp32-is-first-inout
16389 0/imm32/no-output
16390 0x11/imm32/alloc-id:fake
16391 _Primitive-loop-if-addr>-named/imm32/next
16392 _Primitive-loop-if-addr>-named:
16393 0x11/imm32/alloc-id:fake:payload
16394 0x11/imm32/alloc-id:fake
16395 _string-loop-if-addr>/imm32/name
16396 0x11/imm32/alloc-id:fake
16397 Single-lit-var/imm32/inouts
16398 0/imm32/no-outputs
16399 0/imm32/no-outputs
16400 0x11/imm32/alloc-id:fake
16401 _string_0f_87_jump_label/imm32/subx-name
16402 0/imm32/no-rm32
16403 0/imm32/no-r32
16404 0/imm32/no-imm32
16405 1/imm32/disp32-is-first-inout
16406 0/imm32/no-output
16407 0x11/imm32/alloc-id:fake
16408 _Primitive-loop-if-<-named/imm32/next
16409 _Primitive-loop-if-<-named:
16410 0x11/imm32/alloc-id:fake:payload
16411 0x11/imm32/alloc-id:fake
16412 _string-loop-if-</imm32/name
16413 0x11/imm32/alloc-id:fake
16414 Single-lit-var/imm32/inouts
16415 0/imm32/no-outputs
16416 0/imm32/no-outputs
16417 0x11/imm32/alloc-id:fake
16418 _string_0f_8c_jump_label/imm32/subx-name
16419 0/imm32/no-rm32
16420 0/imm32/no-r32
16421 0/imm32/no-imm32
16422 1/imm32/disp32-is-first-inout
16423 0/imm32/no-output
16424 0x11/imm32/alloc-id:fake
16425 _Primitive-loop-if->=-named/imm32/next
16426 _Primitive-loop-if->=-named:
16427 0x11/imm32/alloc-id:fake:payload
16428 0x11/imm32/alloc-id:fake
16429 _string-loop-if->=/imm32/name
16430 0x11/imm32/alloc-id:fake
16431 Single-lit-var/imm32/inouts
16432 0/imm32/no-outputs
16433 0/imm32/no-outputs
16434 0x11/imm32/alloc-id:fake
16435 _string_0f_8d_jump_label/imm32/subx-name
16436 0/imm32/no-rm32
16437 0/imm32/no-r32
16438 0/imm32/no-imm32
16439 1/imm32/disp32-is-first-inout
16440 0/imm32/no-output
16441 0x11/imm32/alloc-id:fake
16442 _Primitive-loop-if-<=-named/imm32/next
16443 _Primitive-loop-if-<=-named:
16444 0x11/imm32/alloc-id:fake:payload
16445 0x11/imm32/alloc-id:fake
16446 _string-loop-if-<=/imm32/name
16447 0x11/imm32/alloc-id:fake
16448 Single-lit-var/imm32/inouts
16449 0/imm32/no-outputs
16450 0/imm32/no-outputs
16451 0x11/imm32/alloc-id:fake
16452 _string_0f_8e_jump_label/imm32/subx-name
16453 0/imm32/no-rm32
16454 0/imm32/no-r32
16455 0/imm32/no-imm32
16456 1/imm32/disp32-is-first-inout
16457 0/imm32/no-output
16458 0x11/imm32/alloc-id:fake
16459 _Primitive-loop-if->-named/imm32/next
16460 _Primitive-loop-if->-named:
16461 0x11/imm32/alloc-id:fake:payload
16462 0x11/imm32/alloc-id:fake
16463 _string-loop-if->/imm32/name
16464 0x11/imm32/alloc-id:fake
16465 Single-lit-var/imm32/inouts
16466 0/imm32/no-outputs
16467 0/imm32/no-outputs
16468 0x11/imm32/alloc-id:fake
16469 _string_0f_8f_jump_label/imm32/subx-name
16470 0/imm32/no-rm32
16471 0/imm32/no-r32
16472 0/imm32/no-imm32
16473 1/imm32/disp32-is-first-inout
16474 0/imm32/no-output
16475 0x11/imm32/alloc-id:fake
16476 _Primitive-loop-named/imm32/next
16477 _Primitive-loop-named:
16478 0x11/imm32/alloc-id:fake:payload
16479 0x11/imm32/alloc-id:fake
16480 _string-loop/imm32/name
16481 0x11/imm32/alloc-id:fake
16482 Single-lit-var/imm32/inouts
16483 0/imm32/no-outputs
16484 0/imm32/no-outputs
16485 0x11/imm32/alloc-id:fake
16486 _string_e9_jump_label/imm32/subx-name
16487 0/imm32/no-rm32
16488 0/imm32/no-r32
16489 0/imm32/no-imm32
16490 1/imm32/disp32-is-first-inout
16491 0/imm32/no-output
16492 0/imm32/next
16493 0/imm32/next
16494
16495
16496 _string-add:
16497 0x11/imm32/alloc-id:fake:payload
16498
16499 0x3/imm32/size
16500 0x61/a 0x64/d 0x64/d
16501 _string-address:
16502 0x11/imm32/alloc-id:fake:payload
16503
16504 0x7/imm32/size
16505 0x61/a 0x64/d 0x64/d 0x72/r 0x65/e 0x73/s 0x73/s
16506 _string-add-to:
16507 0x11/imm32/alloc-id:fake:payload
16508
16509 0x6/imm32/size
16510 0x61/a 0x64/d 0x64/d 0x2d/dash 0x74/t 0x6f/o
16511 _string-and:
16512 0x11/imm32/alloc-id:fake:payload
16513
16514 0x3/imm32/size
16515 0x61/a 0x6e/n 0x64/d
16516 _string-and-with:
16517 0x11/imm32/alloc-id:fake:payload
16518
16519 0x8/imm32/size
16520 0x61/a 0x6e/n 0x64/d 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
16521 _string-break:
16522 0x11/imm32/alloc-id:fake:payload
16523
16524 0x5/imm32/size
16525 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k
16526 _string-break-if-<:
16527 0x11/imm32/alloc-id:fake:payload
16528
16529 0xa/imm32/size
16530 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/<
16531 _string-break-if-<=:
16532 0x11/imm32/alloc-id:fake:payload
16533
16534 0xb/imm32/size
16535 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/=
16536 _string-break-if-=:
16537 0x11/imm32/alloc-id:fake:payload
16538
16539 0xa/imm32/size
16540 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/=
16541 _string-break-if->:
16542 0x11/imm32/alloc-id:fake:payload
16543
16544 0xa/imm32/size
16545 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/>
16546 _string-break-if->=:
16547 0x11/imm32/alloc-id:fake:payload
16548
16549 0xb/imm32/size
16550 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/=
16551 _string-break-if-!=:
16552 0x11/imm32/alloc-id:fake:payload
16553
16554 0xb/imm32/size
16555 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/=
16556 _string-break-if-addr<:
16557 0x11/imm32/alloc-id:fake:payload
16558
16559 0xe/imm32/size
16560 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/<
16561 _string-break-if-addr<=:
16562 0x11/imm32/alloc-id:fake:payload
16563
16564 0xf/imm32/size
16565 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/=
16566 _string-break-if-addr>:
16567 0x11/imm32/alloc-id:fake:payload
16568
16569 0xe/imm32/size
16570 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/>
16571 _string-break-if-addr>=:
16572 0x11/imm32/alloc-id:fake:payload
16573
16574 0xf/imm32/size
16575 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/=
16576 _string-compare:
16577 0x11/imm32/alloc-id:fake:payload
16578
16579 0x7/imm32/size
16580 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e
16581 _string-copy:
16582 0x11/imm32/alloc-id:fake:payload
16583
16584 0x4/imm32/size
16585 0x63/c 0x6f/o 0x70/p 0x79/y
16586 _string-copy-to:
16587 0x11/imm32/alloc-id:fake:payload
16588
16589 0x7/imm32/size
16590 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x74/t 0x6f/o
16591 _string-copy-byte:
16592 0x11/imm32/alloc-id:fake:payload
16593
16594 0x9/imm32/size
16595 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/- 0x62/b 0x79/y 0x74/t 0x65/e
16596 _string-copy-byte-to:
16597 0x11/imm32/alloc-id:fake:payload
16598
16599 0xc/imm32/size
16600 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/- 0x62/b 0x79/y 0x74/t 0x65/e 0x2d/- 0x74/t 0x6f/o
16601 _string-decrement:
16602 0x11/imm32/alloc-id:fake:payload
16603
16604 0x9/imm32/size
16605 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t
16606 _string-increment:
16607 0x11/imm32/alloc-id:fake:payload
16608
16609 0x9/imm32/size
16610 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t
16611 _string-loop:
16612 0x11/imm32/alloc-id:fake:payload
16613
16614 0x4/imm32/size
16615 0x6c/l 0x6f/o 0x6f/o 0x70/p
16616 _string-loop-if-<:
16617 0x11/imm32/alloc-id:fake:payload
16618
16619 0x9/imm32/size
16620 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/<
16621 _string-loop-if-<=:
16622 0x11/imm32/alloc-id:fake:payload
16623
16624 0xa/imm32/size
16625 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/=
16626 _string-loop-if-=:
16627 0x11/imm32/alloc-id:fake:payload
16628
16629 0x9/imm32/size
16630 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/=
16631 _string-loop-if->:
16632 0x11/imm32/alloc-id:fake:payload
16633
16634 0x9/imm32/size
16635 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/>
16636 _string-loop-if->=:
16637 0x11/imm32/alloc-id:fake:payload
16638
16639 0xa/imm32/size
16640 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/=
16641 _string-loop-if-!=:
16642 0x11/imm32/alloc-id:fake:payload
16643
16644 0xa/imm32/size
16645 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/=
16646 _string-loop-if-addr<:
16647 0x11/imm32/alloc-id:fake:payload
16648
16649 0xd/imm32/size
16650 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/<
16651 _string-loop-if-addr<=:
16652 0x11/imm32/alloc-id:fake:payload
16653
16654 0xe/imm32/size
16655 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/=
16656 _string-loop-if-addr>:
16657 0x11/imm32/alloc-id:fake:payload
16658
16659 0xd/imm32/size
16660 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/>
16661 _string-loop-if-addr>=:
16662 0x11/imm32/alloc-id:fake:payload
16663
16664 0xe/imm32/size
16665 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/=
16666 _string-multiply:
16667 0x11/imm32/alloc-id:fake:payload
16668
16669 0x8/imm32/size
16670 0x6d/m 0x75/u 0x6c/l 0x74/t 0x69/i 0x70/p 0x6c/l 0x79/y
16671 _string-or:
16672 0x11/imm32/alloc-id:fake:payload
16673
16674 0x2/imm32/size
16675 0x6f/o 0x72/r
16676 _string-or-with:
16677 0x11/imm32/alloc-id:fake:payload
16678
16679 0x7/imm32/size
16680 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
16681 _string-subtract:
16682 0x11/imm32/alloc-id:fake:payload
16683
16684 0x8/imm32/size
16685 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t
16686 _string-subtract-from:
16687 0x11/imm32/alloc-id:fake:payload
16688
16689 0xd/imm32/size
16690 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
16691 _string-xor:
16692 0x11/imm32/alloc-id:fake:payload
16693
16694 0x3/imm32/size
16695 0x78/x 0x6f/o 0x72/r
16696 _string-xor-with:
16697 0x11/imm32/alloc-id:fake:payload
16698
16699 0x8/imm32/size
16700 0x78/x 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
16701
16702
16703 _string_01_add_to:
16704 0x11/imm32/alloc-id:fake:payload
16705
16706 0x9/imm32/size
16707 0x30/0 0x31/1 0x2f/slash 0x61/a 0x64/d 0x64/d 0x2d/dash 0x74/t 0x6f/o
16708 _string_03_add:
16709 0x11/imm32/alloc-id:fake:payload
16710
16711 0x6/imm32/size
16712 0x30/0 0x33/3 0x2f/slash 0x61/a 0x64/d 0x64/d
16713 _string_05_add_to_eax:
16714 0x11/imm32/alloc-id:fake:payload
16715
16716 0xd/imm32/size
16717 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
16718 _string_09_or_with:
16719 0x11/imm32/alloc-id:fake:payload
16720
16721 0xa/imm32/size
16722 0x30/0 0x39/9 0x2f/slash 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
16723 _string_0b_or:
16724 0x11/imm32/alloc-id:fake:payload
16725
16726 0x5/imm32/size
16727 0x30/0 0x62/b 0x2f/slash 0x6f/o 0x72/r
16728 _string_0d_or_with_eax:
16729 0x11/imm32/alloc-id:fake:payload
16730
16731 0xe/imm32/size
16732 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
16733 _string_0f_82_jump_label:
16734 0x11/imm32/alloc-id:fake:payload
16735
16736 0x13/imm32/size
16737 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/<
16738 _string_0f_82_jump_break:
16739 0x11/imm32/alloc-id:fake:payload
16740
16741 0x20/imm32/size
16742 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
16743 _string_0f_82_jump_loop:
16744 0x11/imm32/alloc-id:fake:payload
16745
16746 0x1f/imm32/size
16747 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
16748 _string_0f_83_jump_label:
16749 0x11/imm32/alloc-id:fake:payload
16750
16751 0x14/imm32/size
16752 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/=
16753 _string_0f_83_jump_break:
16754 0x11/imm32/alloc-id:fake:payload
16755
16756 0x21/imm32/size
16757 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
16758 _string_0f_83_jump_loop:
16759 0x11/imm32/alloc-id:fake:payload
16760
16761 0x20/imm32/size
16762 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
16763 _string_0f_84_jump_label:
16764 0x11/imm32/alloc-id:fake:payload
16765
16766 0xf/imm32/size
16767 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/=
16768 _string_0f_84_jump_break:
16769 0x11/imm32/alloc-id:fake:payload
16770
16771 0x1c/imm32/size
16772 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
16773 _string_0f_84_jump_loop:
16774 0x11/imm32/alloc-id:fake:payload
16775
16776 0x1b/imm32/size
16777 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
16778 _string_0f_85_jump_label:
16779 0x11/imm32/alloc-id:fake:payload
16780
16781 0x10/imm32/size
16782 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/=
16783 _string_0f_85_jump_break:
16784 0x11/imm32/alloc-id:fake:payload
16785
16786 0x1d/imm32/size
16787 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
16788 _string_0f_85_jump_loop:
16789 0x11/imm32/alloc-id:fake:payload
16790
16791 0x1c/imm32/size
16792 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
16793 _string_0f_86_jump_label:
16794 0x11/imm32/alloc-id:fake:payload
16795
16796 0x14/imm32/size
16797 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/=
16798 _string_0f_86_jump_break:
16799 0x11/imm32/alloc-id:fake:payload
16800
16801 0x21/imm32/size
16802 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
16803 _string_0f_86_jump_loop:
16804 0x11/imm32/alloc-id:fake:payload
16805
16806 0x20/imm32/size
16807 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
16808 _string_0f_87_jump_label:
16809 0x11/imm32/alloc-id:fake:payload
16810
16811 0x13/imm32/size
16812 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/>
16813 _string_0f_87_jump_break:
16814 0x11/imm32/alloc-id:fake:payload
16815
16816 0x20/imm32/size
16817 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
16818 _string_0f_87_jump_loop:
16819 0x11/imm32/alloc-id:fake:payload
16820
16821 0x1f/imm32/size
16822 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
16823 _string_0f_8c_jump_label:
16824 0x11/imm32/alloc-id:fake:payload
16825
16826 0xf/imm32/size
16827 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/<
16828 _string_0f_8c_jump_break:
16829 0x11/imm32/alloc-id:fake:payload
16830
16831 0x1c/imm32/size
16832 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
16833 _string_0f_8c_jump_loop:
16834 0x11/imm32/alloc-id:fake:payload
16835
16836 0x1b/imm32/size
16837 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
16838 _string_0f_8d_jump_label:
16839 0x11/imm32/alloc-id:fake:payload
16840
16841 0x10/imm32/size
16842 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/=
16843 _string_0f_8d_jump_break:
16844 0x11/imm32/alloc-id:fake:payload
16845
16846 0x1d/imm32/size
16847 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
16848 _string_0f_8d_jump_loop:
16849 0x11/imm32/alloc-id:fake:payload
16850
16851 0x1c/imm32/size
16852 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
16853 _string_0f_8e_jump_label:
16854 0x11/imm32/alloc-id:fake:payload
16855
16856 0x10/imm32/size
16857 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/=
16858 _string_0f_8e_jump_break:
16859 0x11/imm32/alloc-id:fake:payload
16860
16861 0x1d/imm32/size
16862 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
16863 _string_0f_8e_jump_loop:
16864 0x11/imm32/alloc-id:fake:payload
16865
16866 0x1c/imm32/size
16867 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
16868 _string_0f_8f_jump_label:
16869 0x11/imm32/alloc-id:fake:payload
16870
16871 0xf/imm32/size
16872 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/>
16873 _string_0f_8f_jump_break:
16874 0x11/imm32/alloc-id:fake:payload
16875
16876 0x1c/imm32/size
16877 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
16878 _string_0f_8f_jump_loop:
16879 0x11/imm32/alloc-id:fake:payload
16880
16881 0x1b/imm32/size
16882 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
16883 _string_0f_af_multiply:
16884 0x11/imm32/alloc-id:fake:payload
16885
16886 0xe/imm32/size
16887 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
16888 _string_21_and_with:
16889 0x11/imm32/alloc-id:fake:payload
16890
16891 0xb/imm32/size
16892 0x32/2 0x31/1 0x2f/slash 0x61/a 0x6e/n 0x64/d 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
16893 _string_23_and:
16894 0x11/imm32/alloc-id:fake:payload
16895
16896 0x6/imm32/size
16897 0x32/2 0x33/3 0x2f/slash 0x61/a 0x6e/n 0x64/d
16898 _string_25_and_with_eax:
16899 0x11/imm32/alloc-id:fake:payload
16900
16901 0xf/imm32/size
16902 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
16903 _string_29_subtract_from:
16904 0x11/imm32/alloc-id:fake:payload
16905
16906 0x10/imm32/size
16907 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
16908 _string_2b_subtract:
16909 0x11/imm32/alloc-id:fake:payload
16910
16911 0xb/imm32/size
16912 0x32/2 0x62/b 0x2f/slash 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t
16913 _string_2d_subtract_from_eax:
16914 0x11/imm32/alloc-id:fake:payload
16915
16916 0x14/imm32/size
16917 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
16918 _string_31_xor_with:
16919 0x11/imm32/alloc-id:fake:payload
16920
16921 0xb/imm32/size
16922 0x33/3 0x31/1 0x2f/slash 0x78/x 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
16923 _string_33_xor:
16924 0x11/imm32/alloc-id:fake:payload
16925
16926 0x6/imm32/size
16927 0x33/3 0x33/3 0x2f/slash 0x78/x 0x6f/o 0x72/r
16928 _string_35_xor_with_eax:
16929 0x11/imm32/alloc-id:fake:payload
16930
16931 0xf/imm32/size
16932 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
16933 _string_39_compare->:
16934 0x11/imm32/alloc-id:fake:payload
16935
16936 0xc/imm32/size
16937 0x33/3 0x39/9 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e 0x2d/dash 0x3e/>
16938 _string_3b_compare<-:
16939 0x11/imm32/alloc-id:fake:payload
16940
16941 0xc/imm32/size
16942 0x33/3 0x62/b 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e 0x3c/< 0x2d/dash
16943 _string_3d_compare_eax_with:
16944 0x11/imm32/alloc-id:fake:payload
16945
16946 0x13/imm32/size
16947 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
16948 _string_40_increment_eax:
16949 0x11/imm32/alloc-id:fake:payload
16950
16951 0x10/imm32/size
16952 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
16953 _string_41_increment_ecx:
16954 0x11/imm32/alloc-id:fake:payload
16955
16956 0x10/imm32/size
16957 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
16958 _string_42_increment_edx:
16959 0x11/imm32/alloc-id:fake:payload
16960
16961 0x10/imm32/size
16962 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
16963 _string_43_increment_ebx:
16964 0x11/imm32/alloc-id:fake:payload
16965
16966 0x10/imm32/size
16967 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
16968 _string_46_increment_esi:
16969 0x11/imm32/alloc-id:fake:payload
16970
16971 0x10/imm32/size
16972 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
16973 _string_47_increment_edi:
16974 0x11/imm32/alloc-id:fake:payload
16975
16976 0x10/imm32/size
16977 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
16978 _string_48_decrement_eax:
16979 0x11/imm32/alloc-id:fake:payload
16980
16981 0x10/imm32/size
16982 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
16983 _string_49_decrement_ecx:
16984 0x11/imm32/alloc-id:fake:payload
16985
16986 0x10/imm32/size
16987 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
16988 _string_4a_decrement_edx:
16989 0x11/imm32/alloc-id:fake:payload
16990
16991 0x10/imm32/size
16992 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
16993 _string_4b_decrement_ebx:
16994 0x11/imm32/alloc-id:fake:payload
16995
16996 0x10/imm32/size
16997 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
16998 _string_4e_decrement_esi:
16999 0x11/imm32/alloc-id:fake:payload
17000
17001 0x10/imm32/size
17002 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
17003 _string_4f_decrement_edi:
17004 0x11/imm32/alloc-id:fake:payload
17005
17006 0x10/imm32/size
17007 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
17008 _string_81_subop_add:
17009 0x11/imm32/alloc-id:fake:payload
17010
17011 0xe/imm32/size
17012 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
17013 _string_81_subop_or:
17014 0x11/imm32/alloc-id:fake:payload
17015
17016 0xd/imm32/size
17017 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
17018 _string_81_subop_and:
17019 0x11/imm32/alloc-id:fake:payload
17020
17021 0xe/imm32/size
17022 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
17023 _string_81_subop_subtract:
17024 0x11/imm32/alloc-id:fake:payload
17025
17026 0x13/imm32/size
17027 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
17028 _string_81_subop_xor:
17029 0x11/imm32/alloc-id:fake:payload
17030
17031 0xe/imm32/size
17032 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
17033 _string_81_subop_compare:
17034 0x11/imm32/alloc-id:fake:payload
17035
17036 0x12/imm32/size
17037 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
17038 _string_89_<-:
17039 0x11/imm32/alloc-id:fake:payload
17040
17041 0x5/imm32/size
17042 0x38/8 0x39/9 0x2f/slash 0x3c/< 0x2d/dash
17043 _string_8b_->:
17044 0x11/imm32/alloc-id:fake:payload
17045
17046 0x5/imm32/size
17047 0x38/8 0x62/b 0x2f/slash 0x2d/dash 0x3e/>
17048 _string_8a_copy_byte:
17049 0x11/imm32/alloc-id:fake:payload
17050
17051 0x9/imm32/size
17052 0x38/8 0x61/a 0x2f// 0x62/b 0x79/y 0x74/t 0x65/e 0x2d/- 0x3e/>
17053 _string_88_copy_byte:
17054 0x11/imm32/alloc-id:fake:payload
17055
17056 0x9/imm32/size
17057 0x38/8 0x38/8 0x2f// 0x62/b 0x79/y 0x74/t 0x65/e 0x3c/< 0x2d/-
17058 _string_8d_copy_address:
17059 0x11/imm32/alloc-id:fake:payload
17060
17061 0xf/imm32/size
17062 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
17063 _string_b8_copy_to_eax:
17064 0x11/imm32/alloc-id:fake:payload
17065
17066 0xe/imm32/size
17067 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
17068 _string_b9_copy_to_ecx:
17069 0x11/imm32/alloc-id:fake:payload
17070
17071 0xe/imm32/size
17072 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
17073 _string_ba_copy_to_edx:
17074 0x11/imm32/alloc-id:fake:payload
17075
17076 0xe/imm32/size
17077 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
17078 _string_bb_copy_to_ebx:
17079 0x11/imm32/alloc-id:fake:payload
17080
17081 0xe/imm32/size
17082 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
17083 _string_be_copy_to_esi:
17084 0x11/imm32/alloc-id:fake:payload
17085
17086 0xe/imm32/size
17087 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
17088 _string_bf_copy_to_edi:
17089 0x11/imm32/alloc-id:fake:payload
17090
17091 0xe/imm32/size
17092 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
17093 _string_c7_subop_copy:
17094 0x11/imm32/alloc-id:fake:payload
17095
17096 0xf/imm32/size
17097 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
17098 _string_e9_jump_label:
17099 0x11/imm32/alloc-id:fake:payload
17100
17101 0x7/imm32/size
17102 0x65/e 0x39/9 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p
17103 _string_e9_jump_break:
17104 0x11/imm32/alloc-id:fake:payload
17105
17106 0x14/imm32/size
17107 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
17108 _string_e9_jump_loop:
17109 0x11/imm32/alloc-id:fake:payload
17110
17111 0x13/imm32/size
17112 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
17113 _string_ff_subop_increment:
17114 0x11/imm32/alloc-id:fake:payload
17115
17116 0x14/imm32/size
17117 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
17118 _string_ff_subop_decrement:
17119 0x11/imm32/alloc-id:fake:payload
17120
17121 0x14/imm32/size
17122 0x66/f 0x66/f 0x20/space 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
17123
17124 Single-int-var-in-mem:
17125 0x11/imm32/alloc-id:fake:payload
17126 0x11/imm32/alloc-id:fake
17127 Int-var-in-mem/imm32
17128 0/imm32/next
17129 0/imm32/next
17130
17131 Int-var-in-mem:
17132 0x11/imm32/alloc-id:fake:payload
17133 0/imm32/name
17134 0/imm32/name
17135 0x11/imm32/alloc-id:fake
17136 Type-int/imm32
17137 1/imm32/some-block-depth
17138 1/imm32/some-stack-offset
17139 0/imm32/no-register
17140 0/imm32/no-register
17141
17142
17143 Single-byte-var-in-mem:
17144 0x11/imm32/alloc-id:fake:payload
17145 0x11/imm32/alloc-id:fake
17146 Byte-var-in-mem/imm32
17147 0/imm32/next
17148 0/imm32/next
17149
17150
17151 Byte-var-in-mem:
17152 0x11/imm32/alloc-id:fake:payload
17153 0/imm32/name
17154 0/imm32/name
17155 0x11/imm32/alloc-id:fake
17156 Type-byte/imm32
17157 1/imm32/some-block-depth
17158 1/imm32/some-stack-offset
17159 0/imm32/no-register
17160 0/imm32/no-register
17161
17162 Two-args-int-stack-int-reg:
17163 0x11/imm32/alloc-id:fake:payload
17164 0x11/imm32/alloc-id:fake
17165 Int-var-in-mem/imm32
17166 0x11/imm32/alloc-id:fake
17167 Single-int-var-in-some-register/imm32/next
17168
17169 Two-int-args-in-regs:
17170 0x11/imm32/alloc-id:fake:payload
17171 0x11/imm32/alloc-id:fake
17172 Int-var-in-some-register/imm32
17173 0x11/imm32/alloc-id:fake
17174 Single-int-var-in-some-register/imm32/next
17175
17176
17177 Two-args-byte-stack-byte-reg:
17178 0x11/imm32/alloc-id:fake:payload
17179 0x11/imm32/alloc-id:fake
17180 Byte-var-in-mem/imm32
17181 0x11/imm32/alloc-id:fake
17182 Single-byte-var-in-some-register/imm32/next
17183
17184 Two-args-int-reg-int-stack:
17185 0x11/imm32/alloc-id:fake:payload
17186 0x11/imm32/alloc-id:fake
17187 Int-var-in-some-register/imm32
17188 0x11/imm32/alloc-id:fake
17189 Single-int-var-in-mem/imm32/next
17190
17191 Two-args-int-eax-int-literal:
17192 0x11/imm32/alloc-id:fake:payload
17193 0x11/imm32/alloc-id:fake
17194 Int-var-in-eax/imm32
17195 0x11/imm32/alloc-id:fake
17196 Single-lit-var/imm32/next
17197
17198 Int-var-and-literal:
17199 0x11/imm32/alloc-id:fake:payload
17200 0x11/imm32/alloc-id:fake
17201 Int-var-in-mem/imm32
17202 0x11/imm32/alloc-id:fake
17203 Single-lit-var/imm32/next
17204
17205 Int-var-in-register-and-literal:
17206 0x11/imm32/alloc-id:fake:payload
17207 0x11/imm32/alloc-id:fake
17208 Int-var-in-some-register/imm32
17209 0x11/imm32/alloc-id:fake
17210 Single-lit-var/imm32/next
17211
17212 Single-int-var-in-some-register:
17213 0x11/imm32/alloc-id:fake:payload
17214 0x11/imm32/alloc-id:fake
17215 Int-var-in-some-register/imm32
17216 0/imm32/next
17217 0/imm32/next
17218
17219 Single-addr-var-in-some-register:
17220 0x11/imm32/alloc-id:fake:payload
17221 0x11/imm32/alloc-id:fake
17222 Addr-var-in-some-register/imm32
17223 0/imm32/next
17224 0/imm32/next
17225
17226 Single-byte-var-in-some-register:
17227 0x11/imm32/alloc-id:fake:payload
17228 0x11/imm32/alloc-id:fake
17229 Byte-var-in-some-register/imm32
17230 0/imm32/next
17231 0/imm32/next
17232
17233 Int-var-in-some-register:
17234 0x11/imm32/alloc-id:fake:payload
17235 0/imm32/name
17236 0/imm32/name
17237 0x11/imm32/alloc-id:fake
17238 Type-int/imm32
17239 1/imm32/some-block-depth
17240 0/imm32/no-stack-offset
17241 0x11/imm32/alloc-id:fake
17242 Any-register/imm32
17243
17244 Any-register:
17245 0x11/imm32/alloc-id:fake:payload
17246 1/imm32/size
17247
17248 2a/asterisk
17249
17250 Addr-var-in-some-register:
17251 0x11/imm32/alloc-id:fake:payload
17252 0/imm32/name
17253 0/imm32/name
17254 0x11/imm32/alloc-id:fake
17255 Type-addr/imm32
17256 1/imm32/some-block-depth
17257 0/imm32/no-stack-offset
17258 0x11/imm32/alloc-id:fake
17259 Any-register/imm32
17260
17261 Byte-var-in-some-register:
17262 0x11/imm32/alloc-id:fake:payload
17263 0/imm32/name
17264 0/imm32/name
17265 0x11/imm32/alloc-id:fake
17266 Type-byte/imm32
17267 1/imm32/some-block-depth
17268 0/imm32/no-stack-offset
17269 0x11/imm32/alloc-id:fake
17270 Any-register/imm32
17271
17272 Single-int-var-in-eax:
17273 0x11/imm32/alloc-id:fake:payload
17274 0x11/imm32/alloc-id:fake
17275 Int-var-in-eax/imm32
17276 0/imm32/next
17277 0/imm32/next
17278
17279 Int-var-in-eax:
17280 0x11/imm32/alloc-id:fake:payload
17281 0/imm32/name
17282 0/imm32/name
17283 0x11/imm32/alloc-id:fake
17284 Type-int/imm32
17285 1/imm32/some-block-depth
17286 0/imm32/no-stack-offset
17287 0x11/imm32/alloc-id:fake
17288 $Register-eax/imm32
17289
17290 Single-int-var-in-ecx:
17291 0x11/imm32/alloc-id:fake:payload
17292 0x11/imm32/alloc-id:fake
17293 Int-var-in-ecx/imm32
17294 0/imm32/next
17295 0/imm32/next
17296
17297 Int-var-in-ecx:
17298 0x11/imm32/alloc-id:fake:payload
17299 0/imm32/name
17300 0/imm32/name
17301 0x11/imm32/alloc-id:fake
17302 Type-int/imm32
17303 1/imm32/some-block-depth
17304 0/imm32/no-stack-offset
17305 0x11/imm32/alloc-id:fake
17306 $Register-ecx/imm32/register
17307
17308 Single-int-var-in-edx:
17309 0x11/imm32/alloc-id:fake:payload
17310 0x11/imm32/alloc-id:fake
17311 Int-var-in-edx/imm32
17312 0/imm32/next
17313 0/imm32/next
17314
17315 Int-var-in-edx:
17316 0x11/imm32/alloc-id:fake:payload
17317 0/imm32/name
17318 0/imm32/name
17319 0x11/imm32/alloc-id:fake
17320 Type-int/imm32
17321 1/imm32/some-block-depth
17322 0/imm32/no-stack-offset
17323 0x11/imm32/alloc-id:fake
17324 $Register-edx/imm32/register
17325
17326 Single-int-var-in-ebx:
17327 0x11/imm32/alloc-id:fake:payload
17328 0x11/imm32/alloc-id:fake
17329 Int-var-in-ebx/imm32
17330 0/imm32/next
17331 0/imm32/next
17332
17333 Int-var-in-ebx:
17334 0x11/imm32/alloc-id:fake:payload
17335 0/imm32/name
17336 0/imm32/name
17337 0x11/imm32/alloc-id:fake
17338 Type-int/imm32
17339 1/imm32/some-block-depth
17340 0/imm32/no-stack-offset
17341 0x11/imm32/alloc-id:fake
17342 $Register-ebx/imm32/register
17343
17344 Single-int-var-in-esi:
17345 0x11/imm32/alloc-id:fake:payload
17346 0x11/imm32/alloc-id:fake
17347 Int-var-in-esi/imm32
17348 0/imm32/next
17349 0/imm32/next
17350
17351 Int-var-in-esi:
17352 0x11/imm32/alloc-id:fake:payload
17353 0/imm32/name
17354 0/imm32/name
17355 0x11/imm32/alloc-id:fake
17356 Type-int/imm32
17357 1/imm32/some-block-depth
17358 0/imm32/no-stack-offset
17359 0x11/imm32/alloc-id:fake
17360 $Register-esi/imm32/register
17361
17362 Single-int-var-in-edi:
17363 0x11/imm32/alloc-id:fake:payload
17364 0x11/imm32/alloc-id:fake
17365 Int-var-in-edi/imm32
17366 0/imm32/next
17367 0/imm32/next
17368
17369 Int-var-in-edi:
17370 0x11/imm32/alloc-id:fake:payload
17371 0/imm32/name
17372 0/imm32/name
17373 0x11/imm32/alloc-id:fake
17374 Type-int/imm32
17375 1/imm32/some-block-depth
17376 0/imm32/no-stack-offset
17377 0x11/imm32/alloc-id:fake
17378 $Register-edi/imm32/register
17379
17380 Single-lit-var:
17381 0x11/imm32/alloc-id:fake:payload
17382 0x11/imm32/alloc-id:fake
17383 Lit-var/imm32
17384 0/imm32/next
17385 0/imm32/next
17386
17387 Lit-var:
17388 0x11/imm32/alloc-id:fake:payload
17389 0/imm32/name
17390 0/imm32/name
17391 0x11/imm32/alloc-id:fake
17392 Type-literal/imm32
17393 1/imm32/some-block-depth
17394 0/imm32/no-stack-offset
17395 0/imm32/no-register
17396 0/imm32/no-register
17397
17398 Type-int:
17399 0x11/imm32/alloc-id:fake:payload
17400 1/imm32/left-is-atom
17401 1/imm32/value:int
17402 0/imm32/left:unused
17403 0/imm32/right:null
17404 0/imm32/right:null
17405
17406 Type-literal:
17407 0x11/imm32/alloc-id:fake:payload
17408 1/imm32/is-atom
17409 0/imm32/value:literal
17410 0/imm32/left:unused
17411 0/imm32/right:null
17412 0/imm32/right:null
17413
17414 Type-addr:
17415 0x11/imm32/alloc-id:fake:payload
17416 1/imm32/is-atom
17417 2/imm32/value:addr
17418 0/imm32/left:unused
17419 0/imm32/right:null
17420 0/imm32/right:null
17421
17422 Type-byte:
17423 0x11/imm32/alloc-id:fake:payload
17424 1/imm32/is-atom
17425 8/imm32/value:byte
17426 0/imm32/left:unused
17427 0/imm32/right:null
17428 0/imm32/right:null
17429
17430 == code
17431 emit-subx-primitive:
17432
17433 55/push-ebp
17434 89/<- %ebp 4/r32/esp
17435
17436 50/push-eax
17437 51/push-ecx
17438
17439 8b/-> *(ebp+0x10) 1/r32/ecx
17440
17441 (emit-indent *(ebp+8) *Curr-block-depth)
17442 (lookup *(ecx+0x18) *(ecx+0x1c))
17443 (write-buffered *(ebp+8) %eax)
17444
17445 (emit-subx-rm32 *(ebp+8) *(ecx+0x20) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
17446
17447 (emit-subx-r32 *(ebp+8) *(ecx+0x24) *(ebp+0xc))
17448
17449 (emit-subx-imm32 *(ebp+8) *(ecx+0x28) *(ebp+0xc))
17450
17451 (emit-subx-disp32 *(ebp+8) *(ecx+0x2c) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
17452 (write-buffered *(ebp+8) Newline)
17453 $emit-subx-primitive:end:
17454
17455 59/pop-to-ecx
17456 58/pop-to-eax
17457
17458 89/<- %esp 5/r32/ebp
17459 5d/pop-to-ebp
17460 c3/return
17461
17462 emit-subx-rm32:
17463
17464 55/push-ebp
17465 89/<- %ebp 4/r32/esp
17466
17467 50/push-eax
17468
17469 81 7/subop/compare *(ebp+0xc) 0/imm32
17470 74/jump-if-= $emit-subx-rm32:end/disp8
17471
17472 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
17473 (emit-subx-var-as-rm32 *(ebp+8) %eax)
17474 $emit-subx-rm32:end:
17475
17476 58/pop-to-eax
17477
17478 89/<- %esp 5/r32/ebp
17479 5d/pop-to-ebp
17480 c3/return
17481
17482 get-stmt-operand-from-arg-location:
17483
17484 55/push-ebp
17485 89/<- %ebp 4/r32/esp
17486
17487 51/push-ecx
17488
17489 8b/-> *(ebp+0xc) 0/r32/eax
17490
17491 8b/-> *(ebp+8) 1/r32/ecx
17492
17493 {
17494 3d/compare-eax-and 1/imm32
17495 75/jump-if-!= break/disp8
17496 $get-stmt-operand-from-arg-location:1:
17497 (lookup *(ecx+0xc) *(ecx+0x10))
17498 eb/jump $get-stmt-operand-from-arg-location:end/disp8
17499 }
17500
17501 {
17502 3d/compare-eax-and 2/imm32
17503 75/jump-if-!= break/disp8
17504 $get-stmt-operand-from-arg-location:2:
17505 (lookup *(ecx+0xc) *(ecx+0x10))
17506 (lookup *(eax+8) *(eax+0xc))
17507 eb/jump $get-stmt-operand-from-arg-location:end/disp8
17508 }
17509
17510 {
17511 3d/compare-eax-and 3/imm32
17512 75/jump-if-!= break/disp8
17513 $get-stmt-operand-from-arg-location:3:
17514 (lookup *(ecx+0x14) *(ecx+0x18))
17515 eb/jump $get-stmt-operand-from-arg-location:end/disp8
17516 }
17517
17518 e9/jump $get-stmt-operand-from-arg-location:abort/disp32
17519 $get-stmt-operand-from-arg-location:end:
17520
17521 59/pop-to-ecx
17522
17523 89/<- %esp 5/r32/ebp
17524 5d/pop-to-ebp
17525 c3/return
17526
17527 $get-stmt-operand-from-arg-location:abort:
17528
17529 (write-buffered *(ebp+0x10) "invalid arg-location ")
17530 (write-int32-hex-buffered *(ebp+0x10) %eax)
17531 (write-buffered *(ebp+0x10) Newline)
17532 (flush *(ebp+0x10))
17533 (stop *(ebp+0x14) 1)
17534
17535
17536 emit-subx-r32:
17537
17538 55/push-ebp
17539 89/<- %ebp 4/r32/esp
17540
17541 50/push-eax
17542 51/push-ecx
17543
17544 81 7/subop/compare *(ebp+0xc) 0/imm32
17545 0f 84/jump-if-= $emit-subx-r32:end/disp32
17546
17547 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
17548 (lookup *eax *(eax+4))
17549 (lookup *(eax+0x18) *(eax+0x1c))
17550 (maybe-get Mu-registers %eax 0xc)
17551 (write-buffered *(ebp+8) Space)
17552 (write-int32-hex-buffered *(ebp+8) *eax)
17553 (write-buffered *(ebp+8) "/r32")
17554 $emit-subx-r32:end:
17555
17556 59/pop-to-ecx
17557 58/pop-to-eax
17558
17559 89/<- %esp 5/r32/ebp
17560 5d/pop-to-ebp
17561 c3/return
17562
17563 emit-subx-imm32:
17564
17565 55/push-ebp
17566 89/<- %ebp 4/r32/esp
17567
17568 50/push-eax
17569 51/push-ecx
17570
17571 81 7/subop/compare *(ebp+0xc) 0/imm32
17572 0f 84/jump-if-= $emit-subx-imm32:end/disp32
17573
17574 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
17575 (lookup *eax *(eax+4))
17576 (lookup *eax *(eax+4))
17577 (write-buffered *(ebp+8) Space)
17578 (write-buffered *(ebp+8) %eax)
17579 (write-buffered *(ebp+8) "/imm32")
17580 $emit-subx-imm32:end:
17581
17582 59/pop-to-ecx
17583 58/pop-to-eax
17584
17585 89/<- %esp 5/r32/ebp
17586 5d/pop-to-ebp
17587 c3/return
17588
17589 emit-subx-disp32:
17590
17591 55/push-ebp
17592 89/<- %ebp 4/r32/esp
17593
17594 50/push-eax
17595 51/push-ecx
17596
17597 81 7/subop/compare *(ebp+0xc) 0/imm32
17598 0f 84/jump-if-= $emit-subx-disp32:end/disp32
17599
17600 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
17601 (lookup *eax *(eax+4))
17602 (lookup *eax *(eax+4))
17603 (write-buffered *(ebp+8) Space)
17604 (write-buffered *(ebp+8) %eax)
17605
17606
17607 8b/-> *(ebp+0x10) 0/r32/eax
17608 (lookup *(eax+4) *(eax+8))
17609 89/<- %ecx 0/r32/eax
17610 {
17611 (string-starts-with? %ecx "break")
17612 3d/compare-eax-and 0/imm32/false
17613 74/jump-if-= break/disp8
17614 (write-buffered *(ebp+8) ":break")
17615 }
17616
17617 {
17618 (string-starts-with? %ecx "loop")
17619 3d/compare-eax-and 0/imm32/false
17620 74/jump-if-= break/disp8
17621 (write-buffered *(ebp+8) ":loop")
17622 }
17623 (write-buffered *(ebp+8) "/disp32")
17624 $emit-subx-disp32:end:
17625
17626 59/pop-to-ecx
17627 58/pop-to-eax
17628
17629 89/<- %esp 5/r32/ebp
17630 5d/pop-to-ebp
17631 c3/return
17632
17633 emit-call:
17634
17635 55/push-ebp
17636 89/<- %ebp 4/r32/esp
17637
17638 50/push-eax
17639 51/push-ecx
17640
17641 (emit-indent *(ebp+8) *Curr-block-depth)
17642 (write-buffered *(ebp+8) "(")
17643
17644 8b/-> *(ebp+0xc) 1/r32/ecx
17645
17646 (lookup *(ecx+4) *(ecx+8))
17647 (write-buffered *(ebp+8) %eax)
17648
17649
17650 (lookup *(ecx+0xc) *(ecx+0x10))
17651 {
17652
17653 3d/compare-eax-and 0/imm32
17654 74/jump-if-= break/disp8
17655
17656 (emit-subx-call-operand *(ebp+8) %eax)
17657
17658 (lookup *(eax+8) *(eax+0xc))
17659 eb/jump loop/disp8
17660 }
17661
17662 (write-buffered *(ebp+8) ")\n")
17663 $emit-call:end:
17664
17665 59/pop-to-ecx
17666 58/pop-to-eax
17667
17668 89/<- %esp 5/r32/ebp
17669 5d/pop-to-ebp
17670 c3/return
17671
17672 emit-subx-call-operand:
17673
17674
17675 55/push-ebp
17676 89/<- %ebp 4/r32/esp
17677
17678 50/push-eax
17679 51/push-ecx
17680 56/push-esi
17681
17682 8b/-> *(ebp+0xc) 1/r32/ecx
17683
17684 (lookup *ecx *(ecx+4))
17685 89/<- %esi 0/r32/eax
17686
17687 {
17688 $emit-subx-call-operand:check-for-register-direct:
17689 81 7/subop/compare *(esi+0x18) 0/imm32
17690 74/jump-if-= break/disp8
17691 81 7/subop/compare *(ecx+0x10) 0/imm32/false
17692 75/jump-if-!= break/disp8
17693 $emit-subx-call-operand:register-direct:
17694 (write-buffered *(ebp+8) " %")
17695 (lookup *(esi+0x18) *(esi+0x1c))
17696 (write-buffered *(ebp+8) %eax)
17697 e9/jump $emit-subx-call-operand:end/disp32
17698 }
17699
17700 {
17701 $emit-subx-call-operand:check-for-register-indirect:
17702 81 7/subop/compare *(esi+0x18) 0/imm32
17703 74/jump-if-= break/disp8
17704 81 7/subop/compare *(ecx+0x10) 0/imm32/false
17705 74/jump-if-= break/disp8
17706 $emit-subx-call-operand:register-indirect:
17707 (emit-subx-call-operand-register-indirect *(ebp+8) %esi)
17708 e9/jump $emit-subx-call-operand:end/disp32
17709 }
17710
17711 {
17712 81 7/subop/compare *(esi+0x14) 0/imm32
17713 74/jump-if-= break/disp8
17714 $emit-subx-call-operand:stack:
17715 (emit-subx-call-operand-stack *(ebp+8) %esi)
17716 e9/jump $emit-subx-call-operand:end/disp32
17717 }
17718
17719 {
17720 (lookup *(esi+8) *(esi+0xc))
17721 81 7/subop/compare *(eax+4) 0/imm32
17722 75/jump-if-!= break/disp8
17723 $emit-subx-call-operand:literal:
17724 (write-buffered *(ebp+8) Space)
17725 (lookup *esi *(esi+4))
17726 (write-buffered *(ebp+8) %eax)
17727 }
17728 $emit-subx-call-operand:end:
17729
17730 5e/pop-to-esi
17731 59/pop-to-ecx
17732 58/pop-to-eax
17733
17734 89/<- %esp 5/r32/ebp
17735 5d/pop-to-ebp
17736 c3/return
17737
17738 emit-subx-call-operand-register-indirect:
17739
17740 55/push-ebp
17741 89/<- %ebp 4/r32/esp
17742
17743 50/push-eax
17744 51/push-ecx
17745 56/push-esi
17746
17747 8b/-> *(ebp+0xc) 6/r32/esi
17748
17749 (size-of-deref %esi)
17750 89/<- %ecx 0/r32/eax
17751
17752 (lookup *(esi+0x18) *(esi+0x1c))
17753 89/<- %esi 0/r32/eax
17754
17755
17756 b8/copy-to-eax 0/imm32
17757 {
17758 $emit-subx-call-operand-register-indirect:loop:
17759
17760 39/compare %eax 1/r32/ecx
17761 7d/jump-if->= break/disp8
17762
17763 (write-buffered *(ebp+8) " *(")
17764 (write-buffered *(ebp+8) %esi)
17765 (write-buffered *(ebp+8) "+")
17766 (write-int32-hex-buffered *(ebp+8) %eax)
17767 (write-buffered *(ebp+8) ")")
17768
17769 05/add-to-eax 4/imm32
17770
17771 eb/jump loop/disp8
17772 }
17773 $emit-subx-call-operand-register-indirect:end:
17774
17775 5e/pop-to-esi
17776 59/pop-to-ecx
17777 58/pop-to-eax
17778
17779 89/<- %esp 5/r32/ebp
17780 5d/pop-to-ebp
17781 c3/return
17782
17783 emit-subx-call-operand-stack:
17784
17785 55/push-ebp
17786 89/<- %ebp 4/r32/esp
17787
17788 50/push-eax
17789 51/push-ecx
17790 56/push-esi
17791
17792 8b/-> *(ebp+0xc) 6/r32/esi
17793
17794 8b/-> *(esi+0x14) 1/r32/ecx
17795
17796 (size-of %esi)
17797
17798 01/add-to %eax 1/r32/ecx
17799 {
17800 $emit-subx-call-operand-stack:loop:
17801
17802 39/compare %ecx 0/r32/eax
17803 7d/jump-if->= break/disp8
17804
17805 (write-buffered *(ebp+8) " *(ebp+")
17806 (write-int32-hex-buffered *(ebp+8) %ecx)
17807 (write-buffered *(ebp+8) ")")
17808
17809 81 0/subop/add %ecx 4/imm32
17810
17811 eb/jump loop/disp8
17812 }
17813 $emit-subx-call-operand-stack:end:
17814
17815 5e/pop-to-esi
17816 59/pop-to-ecx
17817 58/pop-to-eax
17818
17819 89/<- %esp 5/r32/ebp
17820 5d/pop-to-ebp
17821 c3/return
17822
17823 emit-subx-var-as-rm32:
17824
17825 55/push-ebp
17826 89/<- %ebp 4/r32/esp
17827
17828 50/push-eax
17829 51/push-ecx
17830 56/push-esi
17831
17832 8b/-> *(ebp+0xc) 1/r32/ecx
17833
17834 (lookup *ecx *(ecx+4))
17835 89/<- %esi 0/r32/eax
17836
17837 {
17838 $emit-subx-var-as-rm32:check-for-register-indirect:
17839 81 7/subop/compare *(esi+0x18) 0/imm32
17840 74/jump-if-= break/disp8
17841 81 7/subop/compare *(ecx+0x10) 0/imm32/false
17842 74/jump-if-= break/disp8
17843 $emit-subx-var-as-rm32:register-indirect:
17844 (write-buffered *(ebp+8) " *")
17845 (lookup *(esi+0x18) *(esi+0x1c))
17846 (write-buffered *(ebp+8) %eax)
17847 e9/jump $emit-subx-var-as-rm32:end/disp32
17848 }
17849
17850 {
17851 $emit-subx-var-as-rm32:check-for-register-direct:
17852 81 7/subop/compare *(esi+0x18) 0/imm32
17853 74/jump-if-= break/disp8
17854 81 7/subop/compare *(ecx+0x10) 0/imm32/false
17855 75/jump-if-!= break/disp8
17856 $emit-subx-var-as-rm32:register-direct:
17857 (write-buffered *(ebp+8) " %")
17858 (lookup *(esi+0x18) *(esi+0x1c))
17859 (write-buffered *(ebp+8) %eax)
17860 e9/jump $emit-subx-var-as-rm32:end/disp32
17861 }
17862
17863 {
17864 81 7/subop/compare *(esi+0x14) 0/imm32
17865 74/jump-if-= break/disp8
17866 $emit-subx-var-as-rm32:stack:
17867 (write-buffered *(ebp+8) Space)
17868 (write-buffered *(ebp+8) "*(ebp+")
17869 (write-int32-hex-buffered *(ebp+8) *(esi+0x14))
17870 (write-buffered *(ebp+8) ")")
17871 }
17872 $emit-subx-var-as-rm32:end:
17873
17874 5e/pop-to-esi
17875 59/pop-to-ecx
17876 58/pop-to-eax
17877
17878 89/<- %esp 5/r32/ebp
17879 5d/pop-to-ebp
17880 c3/return
17881
17882 find-matching-primitive:
17883
17884 55/push-ebp
17885 89/<- %ebp 4/r32/esp
17886
17887 51/push-ecx
17888
17889 8b/-> *(ebp+8) 1/r32/ecx
17890 {
17891 $find-matching-primitive:loop:
17892
17893 81 7/subop/compare %ecx 0/imm32
17894 74/jump-if-= break/disp8
17895
17896 {
17897 (mu-stmt-matches-primitive? *(ebp+0xc) %ecx)
17898 3d/compare-eax-and 0/imm32/false
17899 74/jump-if-= break/disp8
17900 89/<- %eax 1/r32/ecx
17901 eb/jump $find-matching-primitive:end/disp8
17902 }
17903 $find-matching-primitive:next-primitive:
17904
17905 (lookup *(ecx+0x34) *(ecx+0x38))
17906 89/<- %ecx 0/r32/eax
17907
17908 e9/jump loop/disp32
17909 }
17910
17911 b8/copy-to-eax 0/imm32
17912 $find-matching-primitive:end:
17913
17914 59/pop-to-ecx
17915
17916 89/<- %esp 5/r32/ebp
17917 5d/pop-to-ebp
17918 c3/return
17919
17920 mu-stmt-matches-primitive?:
17921
17922
17923
17924
17925
17926
17927 55/push-ebp
17928 89/<- %ebp 4/r32/esp
17929
17930 51/push-ecx
17931 52/push-edx
17932 53/push-ebx
17933 56/push-esi
17934 57/push-edi
17935
17936 8b/-> *(ebp+8) 1/r32/ecx
17937
17938 8b/-> *(ebp+0xc) 2/r32/edx
17939 {
17940 $mu-stmt-matches-primitive?:check-name:
17941
17942
17943 (lookup *(ecx+4) *(ecx+8))
17944 89/<- %esi 0/r32/eax
17945
17946 (lookup *edx *(edx+4))
17947 89/<- %edi 0/r32/eax
17948 (string-equal? %esi %edi)
17949 3d/compare-eax-and 0/imm32/false
17950 75/jump-if-!= break/disp8
17951 b8/copy-to-eax 0/imm32
17952 e9/jump $mu-stmt-matches-primitive?:end/disp32
17953 }
17954
17955 (lookup *(ecx+0xc) *(ecx+0x10))
17956 89/<- %esi 0/r32/eax
17957
17958 (lookup *(edx+8) *(edx+0xc))
17959 89/<- %edi 0/r32/eax
17960 {
17961 $mu-stmt-matches-primitive?:inouts-loop:
17962
17963 {
17964 $mu-stmt-matches-primitive?:check-both-inouts-null:
17965 81 7/subop/compare %esi 0/imm32
17966 75/jump-if-!= break/disp8
17967 $mu-stmt-matches-primitive?:stmt-inout-null:
17968 81 7/subop/compare %edi 0/imm32
17969 0f 84/jump-if-= $mu-stmt-matches-primitive?:check-outputs/disp32
17970 $mu-stmt-matches-primitive?:stmt-inout-null-and-prim-inout-not-null:
17971
17972 b8/copy-to-eax 0/imm32/false
17973 e9/jump $mu-stmt-matches-primitive?:end/disp32
17974 }
17975
17976 {
17977 $mu-stmt-matches-primitive?:check-prim-inout-null:
17978 81 7/subop/compare %edi 0/imm32
17979 75/jump-if-!= break/disp8
17980 $mu-stmt-matches-primitive?:prim-inout-null:
17981 b8/copy-to-eax 0/imm32/false
17982 e9/jump $mu-stmt-matches-primitive?:end/disp32
17983 }
17984
17985 {
17986 $mu-stmt-matches-primitive?:check-inouts-match:
17987 (lookup *edi *(edi+4))
17988 (operand-matches-primitive? %esi %eax)
17989 3d/compare-eax-and 0/imm32/false
17990 75/jump-if-!= break/disp8
17991 $mu-stmt-matches-primitive?:inouts-match:
17992 b8/copy-to-eax 0/imm32/false
17993 e9/jump $mu-stmt-matches-primitive?:end/disp32
17994 }
17995 $mu-stmt-matches-primitive?:next-inout:
17996
17997 (lookup *(esi+8) *(esi+0xc))
17998 89/<- %esi 0/r32/eax
17999
18000 (lookup *(edi+8) *(edi+0xc))
18001 89/<- %edi 0/r32/eax
18002
18003 e9/jump loop/disp32
18004 }
18005 $mu-stmt-matches-primitive?:check-outputs:
18006
18007 (lookup *(ecx+0x14) *(ecx+0x18))
18008 89/<- %esi 0/r32/eax
18009
18010 (lookup *(edx+0x10) *(edx+0x14))
18011 89/<- %edi 0/r32/eax
18012 {
18013 $mu-stmt-matches-primitive?:outputs-loop:
18014
18015 {
18016 $mu-stmt-matches-primitive?:check-both-outputs-null:
18017 81 7/subop/compare %esi 0/imm32
18018 75/jump-if-!= break/disp8
18019 {
18020 $mu-stmt-matches-primitive?:stmt-output-null:
18021 81 7/subop/compare %edi 0/imm32
18022 75/jump-if-!= break/disp8
18023 $mu-stmt-matches-primitive?:both-outputs-null:
18024
18025 b8/copy-to-eax 1/imm32
18026 e9/jump $mu-stmt-matches-primitive?:end/disp32
18027 }
18028 $mu-stmt-matches-primitive?:stmt-output-null-and-prim-output-not-null:
18029
18030 b8/copy-to-eax 0/imm32
18031 e9/jump $mu-stmt-matches-primitive?:end/disp32
18032 }
18033
18034 {
18035 $mu-stmt-matches-primitive?:check-prim-output-null:
18036 81 7/subop/compare %edi 0/imm32
18037 75/jump-if-!= break/disp8
18038 $mu-stmt-matches-primitive?:prim-output-is-null:
18039 b8/copy-to-eax 0/imm32
18040 e9/jump $mu-stmt-matches-primitive?:end/disp32
18041 }
18042
18043 {
18044 $mu-stmt-matches-primitive?:check-outputs-match:
18045 (lookup *edi *(edi+4))
18046 (operand-matches-primitive? %esi %eax)
18047 3d/compare-eax-and 0/imm32/false
18048 75/jump-if-!= break/disp8
18049 $mu-stmt-matches-primitive?:outputs-match:
18050 b8/copy-to-eax 0/imm32
18051 e9/jump $mu-stmt-matches-primitive?:end/disp32
18052 }
18053 $mu-stmt-matches-primitive?:next-output:
18054
18055 (lookup *(esi+8) *(esi+0xc))
18056 89/<- %esi 0/r32/eax
18057
18058 (lookup *(edi+8) *(edi+0xc))
18059 89/<- %edi 0/r32/eax
18060
18061 e9/jump loop/disp32
18062 }
18063 $mu-stmt-matches-primitive?:return-true:
18064 b8/copy-to-eax 1/imm32
18065 $mu-stmt-matches-primitive?:end:
18066
18067 5f/pop-to-edi
18068 5e/pop-to-esi
18069 5b/pop-to-ebx
18070 5a/pop-to-edx
18071 59/pop-to-ecx
18072
18073 89/<- %esp 5/r32/ebp
18074 5d/pop-to-ebp
18075 c3/return
18076
18077 operand-matches-primitive?:
18078
18079 55/push-ebp
18080 89/<- %ebp 4/r32/esp
18081
18082 51/push-ecx
18083 52/push-edx
18084 53/push-ebx
18085 56/push-esi
18086 57/push-edi
18087
18088 8b/-> *(ebp+8) 1/r32/ecx
18089
18090 (lookup *ecx *(ecx+4))
18091 89/<- %esi 0/r32/eax
18092
18093 8b/-> *(ebp+0xc) 7/r32/edi
18094 $operand-matches-primitive?:check-type:
18095
18096
18097 (lookup *(esi+8) *(esi+0xc))
18098 89/<- %ebx 0/r32/eax
18099
18100 (lookup *(edi+8) *(edi+0xc))
18101 (subx-type-category-match? %ebx %eax)
18102 3d/compare-eax-and 0/imm32/false
18103 0f 84/jump-if-= $operand-matches-primitive?:return-false/disp32
18104 {
18105 $operand-matches-primitive?:check-register:
18106
18107 {
18108 81 7/subop/compare *(edi+0x18) 0/imm32
18109 0f 85/jump-if-!= break/disp32
18110 81 7/subop/compare *(esi+0x18) 0/imm32
18111 74/jump-if-= break/disp8
18112 81 7/subop/compare *(ecx+0x10) 0/imm32/false
18113 74/jump-if-= break/disp8
18114 $operand-matches-primitive?:var-deref-match:
18115 e9/jump $operand-matches-primitive?:return-true/disp32
18116 }
18117
18118 {
18119 81 7/subop/compare *(edi+0x18) 0/imm32
18120 0f 84/jump-if-= break/disp32
18121 81 7/subop/compare *(esi+0x18) 0/imm32
18122 0f 84/jump-if-= break/disp32
18123 81 7/subop/compare *(ecx+0x10) 0/imm32/false
18124 74/jump-if-= break/disp8
18125 $operand-matches-primitive?:var-deref-no-match:
18126 e9/jump $operand-matches-primitive?:return-false/disp32
18127 }
18128
18129 {
18130
18131
18132 (lookup *(esi+0x18) *(esi+0x1c))
18133 89/<- %ebx 0/r32/eax
18134
18135 (lookup *(edi+0x18) *(edi+0x1c))
18136 89/<- %ecx 0/r32/eax
18137
18138 39/compare %ecx 3/r32/ebx
18139 74/jump-if-= break/disp8
18140 $operand-matches-primitive?:var-register-no-match:
18141
18142 81 7/subop/compare %ebx 0/imm32
18143 74/jump-if-= $operand-matches-primitive?:return-false/disp8
18144 81 7/subop/compare %ecx 0/imm32
18145 74/jump-if-= $operand-matches-primitive?:return-false/disp8
18146
18147 (string-equal? %ecx "*")
18148 3d/compare-eax-and 0/imm32/false
18149 75/jump-if-!= break/disp8
18150 $operand-matches-primitive?:wildcard-no-match:
18151
18152 (string-equal? %ecx %ebx)
18153 3d/compare-eax-and 0/imm32/false
18154 74/jump-if-= $operand-matches-primitive?:return-false/disp8
18155 }
18156 }
18157 $operand-matches-primitive?:return-true:
18158 b8/copy-to-eax 1/imm32/true
18159 eb/jump $operand-matches-primitive?:end/disp8
18160 $operand-matches-primitive?:return-false:
18161 b8/copy-to-eax 0/imm32/false
18162 $operand-matches-primitive?:end:
18163
18164 5f/pop-to-edi
18165 5e/pop-to-esi
18166 5b/pop-to-ebx
18167 5a/pop-to-edx
18168 59/pop-to-ecx
18169
18170 89/<- %esp 5/r32/ebp
18171 5d/pop-to-ebp
18172 c3/return
18173
18174 find-matching-function:
18175
18176 55/push-ebp
18177 89/<- %ebp 4/r32/esp
18178
18179 51/push-ecx
18180
18181 8b/-> *(ebp+8) 1/r32/ecx
18182 {
18183
18184 81 7/subop/compare %ecx 0/imm32
18185 74/jump-if-= break/disp8
18186
18187
18188
18189 {
18190 (mu-stmt-matches-function? *(ebp+0xc) %ecx)
18191 3d/compare-eax-and 0/imm32/false
18192 74/jump-if-= break/disp8
18193 89/<- %eax 1/r32/ecx
18194 eb/jump $find-matching-function:end/disp8
18195 }
18196
18197 (lookup *(ecx+0x20) *(ecx+0x24))
18198 89/<- %ecx 0/r32/eax
18199
18200 eb/jump loop/disp8
18201 }
18202
18203 b8/copy-to-eax 0/imm32
18204 $find-matching-function:end:
18205
18206 59/pop-to-ecx
18207
18208 89/<- %esp 5/r32/ebp
18209 5d/pop-to-ebp
18210 c3/return
18211
18212
18213 mu-stmt-matches-function?:
18214
18215 55/push-ebp
18216 89/<- %ebp 4/r32/esp
18217
18218 51/push-ecx
18219
18220
18221 8b/-> *(ebp+8) 0/r32/eax
18222 (lookup *(eax+4) *(eax+8))
18223 89/<- %ecx 0/r32/eax
18224
18225 8b/-> *(ebp+0xc) 0/r32/eax
18226 (lookup *eax *(eax+4))
18227 (string-equal? %eax %ecx)
18228 $mu-stmt-matches-function?:end:
18229
18230 59/pop-to-ecx
18231
18232 89/<- %esp 5/r32/ebp
18233 5d/pop-to-ebp
18234 c3/return
18235
18236
18237
18238 subx-type-category-match?:
18239
18240 55/push-ebp
18241 89/<- %ebp 4/r32/esp
18242
18243 51/push-ecx
18244
18245 (is-simple-mu-type? *(ebp+8) 0)
18246 89/<- %ecx 0/r32/eax
18247
18248 (is-simple-mu-type? *(ebp+0xc) 0)
18249
18250 39/compare %eax 1/r32/ecx
18251 0f 94/set-byte-if-= %al
18252 81 4/subop/and %eax 0xff/imm32
18253 $subx-type-category-match?:end:
18254
18255 59/pop-to-ecx
18256
18257 89/<- %esp 5/r32/ebp
18258 5d/pop-to-ebp
18259 c3/return
18260
18261 is-simple-mu-type?:
18262
18263 55/push-ebp
18264 89/<- %ebp 4/r32/esp
18265
18266 51/push-ecx
18267
18268 8b/-> *(ebp+0xc) 1/r32/ecx
18269
18270 8b/-> *(ebp+8) 0/r32/eax
18271 39/compare *(eax+4) 1/r32/ecx
18272 0f 94/set-byte-if-= %al
18273 81 4/subop/and %eax 0xff/imm32
18274 $is-simple-mu-type?:end:
18275
18276 59/pop-to-ecx
18277
18278 89/<- %esp 5/r32/ebp
18279 5d/pop-to-ebp
18280 c3/return
18281
18282 is-mu-addr-type?:
18283
18284 55/push-ebp
18285 89/<- %ebp 4/r32/esp
18286
18287 8b/-> *(ebp+8) 0/r32/eax
18288
18289 81 7/subop/compare *eax 0/imm32/false
18290 {
18291 75/jump-if-!= break/disp8
18292 (lookup *(eax+4) *(eax+8))
18293 }
18294
18295 81 7/subop/compare *(eax+4) 2/imm32/addr
18296 0f 94/set-byte-if-= %al
18297 81 4/subop/and %eax 0xff/imm32
18298 $is-mu-addr-type?:end:
18299
18300 89/<- %esp 5/r32/ebp
18301 5d/pop-to-ebp
18302 c3/return
18303
18304 test-emit-subx-stmt-primitive:
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321 55/push-ebp
18322 89/<- %ebp 4/r32/esp
18323
18324 (clear-stream _test-output-stream)
18325 (clear-stream $_test-output-buffered-file->buffer)
18326
18327 $test-emit-subx-stmt-primitive:initialize-type:
18328
18329 68/push 0/imm32/right:null
18330 68/push 0/imm32/right:null
18331 68/push 0/imm32/left:unused
18332 68/push 1/imm32/value:int
18333 68/push 1/imm32/is-atom?:true
18334 68/push 0x11/imm32/alloc-id:fake:payload
18335 89/<- %ecx 4/r32/esp
18336 $test-emit-subx-stmt-primitive:initialize-var:
18337
18338 68/push 0/imm32/no-register
18339 68/push 0/imm32/no-register
18340 68/push -8/imm32/stack-offset
18341 68/push 1/imm32/block-depth
18342 51/push-ecx/type
18343 68/push 0x11/imm32/alloc-id:fake
18344 68/push 0/imm32/name
18345 68/push 0/imm32/name
18346 68/push 0x11/imm32/alloc-id:fake:payload
18347 89/<- %ecx 4/r32/esp
18348 $test-emit-subx-stmt-primitive:initialize-var-name:
18349
18350 8d/copy-address *(ecx+4) 0/r32/eax
18351 (copy-array Heap "foo" %eax)
18352 $test-emit-subx-stmt-primitive:initialize-stmt-var:
18353
18354 68/push 0/imm32/is-deref:false
18355 68/push 0/imm32/next
18356 68/push 0/imm32/next
18357 51/push-ecx/var-foo
18358 68/push 0x11/imm32/alloc-id:fake
18359 68/push 0x11/imm32/alloc-id:fake:payload
18360 89/<- %ebx 4/r32/esp
18361 $test-emit-subx-stmt-primitive:initialize-stmt:
18362
18363 68/push 0/imm32/no-outputs
18364 68/push 0/imm32/no-outputs
18365 53/push-ebx/inouts
18366 68/push 0x11/imm32/alloc-id:fake
18367 68/push 0/imm32/operation
18368 68/push 0/imm32/operation
18369 68/push 1/imm32/tag
18370 89/<- %esi 4/r32/esp
18371 $test-emit-subx-stmt-primitive:initialize-stmt-operation:
18372
18373 8d/copy-address *(esi+4) 0/r32/eax
18374 (copy-array Heap "increment" %eax)
18375 $test-emit-subx-stmt-primitive:initialize-primitive:
18376
18377 68/push 0/imm32/next
18378 68/push 0/imm32/next
18379 68/push 0/imm32/output-is-write-only
18380 68/push 0/imm32/no-disp32
18381 68/push 0/imm32/no-imm32
18382 68/push 0/imm32/no-r32
18383 68/push 1/imm32/rm32-is-first-inout
18384 68/push 0/imm32/subx-name
18385 68/push 0/imm32/subx-name
18386 68/push 0/imm32/no-outputs
18387 68/push 0/imm32/no-outputs
18388 53/push-ebx/inouts
18389 68/push 0x11/imm32/alloc-id:fake
18390 68/push 0/imm32/name
18391 68/push 0/imm32/name
18392 89/<- %ebx 4/r32/esp
18393 $test-emit-subx-stmt-primitive:initialize-primitive-name:
18394
18395 (copy-array Heap "increment" %ebx)
18396 $test-emit-subx-stmt-primitive:initialize-primitive-subx-name:
18397
18398 8d/copy-address *(ebx+0x18) 0/r32/eax
18399 (copy-array Heap "ff 0/subop/increment" %eax)
18400
18401 c7 0/subop/copy *Curr-block-depth 0/imm32
18402 (emit-subx-stmt _test-output-buffered-file %esi %ebx Stderr 0)
18403 (flush _test-output-buffered-file)
18404 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
18410
18411 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment *(ebp+0xfffffff8)" "F - test-emit-subx-stmt-primitive")
18412
18413 89/<- %esp 5/r32/ebp
18414 5d/pop-to-ebp
18415 c3/return
18416
18417 test-emit-subx-stmt-primitive-register:
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434 55/push-ebp
18435 89/<- %ebp 4/r32/esp
18436
18437 (clear-stream _test-output-stream)
18438 (clear-stream $_test-output-buffered-file->buffer)
18439 $test-emit-subx-stmt-primitive-register:initialize-type:
18440
18441 68/push 0/imm32/right:null
18442 68/push 0/imm32/right:null
18443 68/push 0/imm32/left:unused
18444 68/push 1/imm32/value:int
18445 68/push 1/imm32/is-atom?:true
18446 68/push 0x11/imm32/alloc-id:fake:payload
18447 89/<- %ecx 4/r32/esp
18448 $test-emit-subx-stmt-primitive-register:initialize-var:
18449
18450 68/push 0/imm32/register
18451 68/push 0/imm32/register
18452 68/push 0/imm32/no-stack-offset
18453 68/push 1/imm32/block-depth
18454 51/push-ecx
18455 68/push 0x11/imm32/alloc-id:fake
18456 68/push 0/imm32/name
18457 68/push 0/imm32/name
18458 68/push 0x11/imm32/alloc-id:fake:payload
18459 89/<- %ecx 4/r32/esp
18460 $test-emit-subx-stmt-primitive-register:initialize-var-name:
18461
18462 8d/copy-address *(ecx+4) 0/r32/eax
18463 (copy-array Heap "foo" %eax)
18464 $test-emit-subx-stmt-primitive-register:initialize-var-register:
18465
18466 8d/copy-address *(ecx+0x1c) 0/r32/eax
18467 (copy-array Heap "eax" %eax)
18468 $test-emit-subx-stmt-primitive-register:initialize-stmt-var:
18469
18470 68/push 0/imm32/is-deref:false
18471 68/push 0/imm32/next
18472 68/push 0/imm32/next
18473 51/push-ecx/var-foo
18474 68/push 0x11/imm32/alloc-id:fake
18475 68/push 0x11/imm32/alloc-id:fake:payload
18476 89/<- %ebx 4/r32/esp
18477 $test-emit-subx-stmt-primitive-register:initialize-stmt:
18478
18479 53/push-ebx/outputs
18480 68/push 0x11/imm32/alloc-id:fake
18481 68/push 0/imm32/no-inouts
18482 68/push 0/imm32/no-inouts
18483 68/push 0/imm32/operation
18484 68/push 0/imm32/operation
18485 68/push 1/imm32
18486 89/<- %esi 4/r32/esp
18487 $test-emit-subx-stmt-primitive-register:initialize-stmt-operation:
18488
18489 8d/copy-address *(esi+4) 0/r32/eax
18490 (copy-array Heap "increment" %eax)
18491 $test-emit-subx-stmt-primitive-register:initialize-formal-var:
18492
18493 68/push 0/imm32/register
18494 68/push 0/imm32/register
18495 68/push 0/imm32/no-stack-offset
18496 68/push 1/imm32/block-depth
18497 ff 6/subop/push *(ecx+0x10)
18498 68/push 0x11/imm32/alloc-id:fake
18499 68/push 0/imm32/name
18500 68/push 0/imm32/name
18501 68/push 0x11/imm32/alloc-id:fake:payload
18502 89/<- %ebx 4/r32/esp
18503 $test-emit-subx-stmt-primitive-register:initialize-formal-var-name:
18504
18505 8d/copy-address *(ebx+4) 0/r32/eax
18506 (copy-array Heap "dummy" %eax)
18507 $test-emit-subx-stmt-primitive-register:initialize-formal-register:
18508
18509 8d/copy-address *(ebx+0x1c) 0/r32/eax
18510 (copy-array Heap "*" %eax)
18511 $test-emit-subx-stmt-primitive-register:initialize-var-list:
18512
18513 68/push 0/imm32/next
18514 68/push 0/imm32/next
18515 53/push-ebx/formal-var
18516 68/push 0x11/imm32/alloc-id:fake
18517 68/push 0x11/imm32/alloc-id:fake:payload
18518 89/<- %ebx 4/r32/esp
18519 $test-emit-subx-stmt-primitive-register:initialize-primitive:
18520
18521 68/push 0/imm32/next
18522 68/push 0/imm32/next
18523 68/push 0/imm32/output-is-write-only
18524 68/push 0/imm32/no-disp32
18525 68/push 0/imm32/no-imm32
18526 68/push 0/imm32/no-r32
18527 68/push 3/imm32/rm32-is-first-output
18528 68/push 0/imm32/subx-name
18529 68/push 0/imm32/subx-name
18530 53/push-ebx/outputs
18531 68/push 0x11/imm32/alloc-id:fake
18532 68/push 0/imm32/no-inouts
18533 68/push 0/imm32/no-inouts
18534 68/push 0/imm32/name
18535 68/push 0/imm32/name
18536 89/<- %ebx 4/r32/esp
18537 $test-emit-subx-stmt-primitive-register:initialize-primitive-name:
18538
18539 (copy-array Heap "increment" %ebx)
18540 $test-emit-subx-stmt-primitive-register:initialize-primitive-subx-name:
18541
18542 8d/copy-address *(ebx+0x18) 0/r32/eax
18543 (copy-array Heap "ff 0/subop/increment" %eax)
18544
18545 c7 0/subop/copy *Curr-block-depth 0/imm32
18546 (emit-subx-stmt _test-output-buffered-file %esi %ebx Stderr 0)
18547 (flush _test-output-buffered-file)
18548 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
18554
18555 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-primitive-register")
18556
18557 89/<- %esp 5/r32/ebp
18558 5d/pop-to-ebp
18559 c3/return
18560
18561 test-emit-subx-stmt-select-primitive:
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581 55/push-ebp
18582 89/<- %ebp 4/r32/esp
18583
18584 (clear-stream _test-output-stream)
18585 (clear-stream $_test-output-buffered-file->buffer)
18586 $test-emit-subx-stmt-select-primitive:initialize-type:
18587
18588 68/push 0/imm32/right:null
18589 68/push 0/imm32/right:null
18590 68/push 0/imm32/left:unused
18591 68/push 1/imm32/value:int
18592 68/push 1/imm32/is-atom?:true
18593 68/push 0x11/imm32/alloc-id:fake:payload
18594 89/<- %ecx 4/r32/esp
18595 $test-emit-subx-stmt-select-primitive:initialize-var:
18596
18597 68/push 0/imm32/register
18598 68/push 0/imm32/register
18599 68/push 0/imm32/no-stack-offset
18600 68/push 1/imm32/block-depth
18601 51/push-ecx
18602 68/push 0x11/imm32/alloc-id:fake
18603 68/push 0/imm32/name
18604 68/push 0/imm32/name
18605 68/push 0x11/imm32/alloc-id:fake:payload
18606 89/<- %ecx 4/r32/esp
18607 $test-emit-subx-stmt-select-primitive:initialize-var-name:
18608
18609 8d/copy-address *(ecx+4) 0/r32/eax
18610 (copy-array Heap "foo" %eax)
18611 $test-emit-subx-stmt-select-primitive:initialize-var-register:
18612
18613 8d/copy-address *(ecx+0x1c) 0/r32/eax
18614 (copy-array Heap "eax" %eax)
18615 $test-emit-subx-stmt-select-primitive:initialize-stmt-var:
18616
18617 68/push 0/imm32/is-deref:false
18618 68/push 0/imm32/next
18619 68/push 0/imm32/next
18620 51/push-ecx/var-foo
18621 68/push 0x11/imm32/alloc-id:fake
18622 68/push 0x11/imm32/alloc-id:fake:payload
18623 89/<- %ebx 4/r32/esp
18624 $test-emit-subx-stmt-select-primitive:initialize-stmt:
18625
18626 53/push-ebx/outputs
18627 68/push 0x11/imm32/alloc-id:fake
18628 68/push 0/imm32/no-inouts
18629 68/push 0/imm32/no-inouts
18630 68/push 0/imm32/operation
18631 68/push 0/imm32/operation
18632 68/push 1/imm32
18633 89/<- %esi 4/r32/esp
18634 $test-emit-subx-stmt-select-primitive:initialize-stmt-operation:
18635
18636 8d/copy-address *(esi+4) 0/r32/eax
18637 (copy-array Heap "increment" %eax)
18638 $test-emit-subx-stmt-select-primitive:initialize-formal-var:
18639
18640 68/push 0/imm32/register
18641 68/push 0/imm32/register
18642 68/push 0/imm32/no-stack-offset
18643 68/push 1/imm32/block-depth
18644 ff 6/subop/push *(ecx+0x10)
18645 68/push 0x11/imm32/alloc-id:fake
18646 68/push 0/imm32/name
18647 68/push 0/imm32/name
18648 68/push 0x11/imm32/alloc-id:fake:payload
18649 89/<- %ebx 4/r32/esp
18650 $test-emit-subx-stmt-select-primitive:initialize-formal-var-name:
18651
18652 8d/copy-address *(ebx+4) 0/r32/eax
18653 (copy-array Heap "dummy" %eax)
18654 $test-emit-subx-stmt-select-primitive:initialize-formal-register:
18655
18656 8d/copy-address *(ebx+0x1c) 0/r32/eax
18657 (copy-array Heap "*" %eax)
18658 $test-emit-subx-stmt-select-primitive:initialize-var-list:
18659
18660 68/push 0/imm32/next
18661 68/push 0/imm32/next
18662 53/push-ebx/formal-var
18663 68/push 0x11/imm32/alloc-id:fake
18664 68/push 0x11/imm32/alloc-id:fake:payload
18665 89/<- %ebx 4/r32/esp
18666 $test-emit-subx-stmt-select-primitive:initialize-primitive2:
18667
18668 68/push 0/imm32/next
18669 68/push 0/imm32/next
18670 68/push 0/imm32/output-is-write-only
18671 68/push 0/imm32/no-disp32
18672 68/push 0/imm32/no-imm32
18673 68/push 0/imm32/no-r32
18674 68/push 3/imm32/rm32-is-first-output
18675 68/push 0/imm32/subx-name
18676 68/push 0/imm32/subx-name
18677 53/push-ebx/outputs
18678 68/push 0x11/imm32/alloc-id:fake
18679 68/push 0/imm32/no-inouts
18680 68/push 0/imm32/no-inouts
18681 68/push 0/imm32/name
18682 68/push 0/imm32/name
18683 68/push 0x11/imm32/alloc-id:fake:payload
18684 89/<- %edi 4/r32/esp
18685 $test-emit-subx-stmt-select-primitive:initialize-primitive2-name:
18686
18687 8d/copy-address *(edi+4) 0/r32/eax
18688 (copy-array Heap "increment" %eax)
18689 $test-emit-subx-stmt-select-primitive:initialize-primitive2-subx-name:
18690
18691 8d/copy-address *(edi+0x1c) 0/r32/eax
18692 (copy-array Heap "ff 0/subop/increment" %eax)
18693 $test-emit-subx-stmt-select-primitive:initialize-primitive:
18694
18695 57/push-edi
18696 68/push 0x11/imm32/alloc-id:fake
18697 68/push 0/imm32/output-is-write-only
18698 68/push 0/imm32/no-disp32
18699 68/push 0/imm32/no-imm32
18700 68/push 0/imm32/no-r32
18701 68/push 1/imm32/rm32-is-first-inout
18702 68/push 0/imm32/subx-name
18703 68/push 0/imm32/subx-name
18704 68/push 0/imm32/no-outputs
18705 68/push 0/imm32/no-outputs
18706 53/push-ebx/inouts
18707 68/push 0x11/imm32/alloc-id:fake
18708 68/push 0/imm32/name
18709 68/push 0/imm32/name
18710 89/<- %ebx 4/r32/esp
18711 $test-emit-subx-stmt-select-primitive:initialize-primitive-name:
18712
18713 (copy-array Heap "increment" %ebx)
18714 $test-emit-subx-stmt-select-primitive:initialize-primitive-subx-name:
18715
18716 8d/copy-address *(ebx+0x18) 0/r32/eax
18717 (copy-array Heap "ff 0/subop/increment" %eax)
18718
18719 c7 0/subop/copy *Curr-block-depth 0/imm32
18720 (emit-subx-stmt _test-output-buffered-file %esi %ebx Stderr 0)
18721 (flush _test-output-buffered-file)
18722 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
18728
18729 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-select-primitive")
18730
18731 89/<- %esp 5/r32/ebp
18732 5d/pop-to-ebp
18733 c3/return
18734
18735 test-emit-subx-stmt-select-primitive-2:
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755 55/push-ebp
18756 89/<- %ebp 4/r32/esp
18757
18758 (clear-stream _test-output-stream)
18759 (clear-stream $_test-output-buffered-file->buffer)
18760 $test-emit-subx-stmt-select-primitive-2:initialize-type:
18761
18762 68/push 0/imm32/right:null
18763 68/push 0/imm32/right:null
18764 68/push 0/imm32/left:unused
18765 68/push 1/imm32/value:int
18766 68/push 1/imm32/is-atom?:true
18767 68/push 0x11/imm32/alloc-id:fake:payload
18768 89/<- %ecx 4/r32/esp
18769 $test-emit-subx-stmt-select-primitive-2:initialize-var:
18770
18771 68/push 0/imm32/register
18772 68/push 0/imm32/register
18773 68/push 0/imm32/no-stack-offset
18774 68/push 1/imm32/block-depth
18775 51/push-ecx
18776 68/push 0x11/imm32/alloc-id:fake
18777 68/push 0/imm32/name
18778 68/push 0/imm32/name
18779 68/push 0x11/imm32/alloc-id:fake:payload
18780 89/<- %ecx 4/r32/esp
18781 $test-emit-subx-stmt-select-primitive-2:initialize-var-name:
18782
18783 8d/copy-address *(ecx+4) 0/r32/eax
18784 (copy-array Heap "foo" %eax)
18785 $test-emit-subx-stmt-select-primitive-2:initialize-var-register:
18786
18787 8d/copy-address *(ecx+0x1c) 0/r32/eax
18788 (copy-array Heap "eax" %eax)
18789 $test-emit-subx-stmt-select-primitive-2:initialize-stmt-var:
18790
18791 68/push 0/imm32/is-deref:false
18792 68/push 0/imm32/next
18793 68/push 0/imm32/next
18794 51/push-ecx/var-foo
18795 68/push 0x11/imm32/alloc-id:fake
18796 68/push 0x11/imm32/alloc-id:fake:payload
18797 89/<- %ebx 4/r32/esp
18798 $test-emit-subx-stmt-select-primitive-2:initialize-stmt:
18799
18800 68/push 0/imm32/no-outputs
18801 68/push 0/imm32/no-outputs
18802 53/push-ebx/inouts
18803 68/push 0x11/imm32/alloc-id:fake
18804 68/push 0/imm32/operation
18805 68/push 0/imm32/operation
18806 68/push 1/imm32
18807 89/<- %esi 4/r32/esp
18808 $test-emit-subx-stmt-select-primitive-2:initialize-stmt-operation:
18809
18810 8d/copy-address *(esi+4) 0/r32/eax
18811 (copy-array Heap "increment" %eax)
18812 $test-emit-subx-stmt-select-primitive-2:initialize-formal-var:
18813
18814 68/push 0/imm32/register
18815 68/push 0/imm32/register
18816 68/push 0/imm32/no-stack-offset
18817 68/push 1/imm32/block-depth
18818 ff 6/subop/push *(ecx+0x10)
18819 68/push 0x11/imm32/alloc-id:fake
18820 68/push 0/imm32/name
18821 68/push 0/imm32/name
18822 68/push 0x11/imm32/alloc-id:fake:payload
18823 89/<- %ebx 4/r32/esp
18824 $test-emit-subx-stmt-select-primitive-2:initialize-formal-var-name:
18825
18826 8d/copy-address *(ebx+4) 0/r32/eax
18827 (copy-array Heap "dummy" %eax)
18828 $test-emit-subx-stmt-select-primitive-2:initialize-formal-register:
18829
18830 8d/copy-address *(ebx+0x1c) 0/r32/eax
18831 (copy-array Heap "*" %eax)
18832 $test-emit-subx-stmt-select-primitive-2:initialize-var-list:
18833
18834 68/push 0/imm32/next
18835 68/push 0/imm32/next
18836 53/push-ebx/formal-var
18837 68/push 0x11/imm32/alloc-id:fake
18838 68/push 0x11/imm32/alloc-id:fake:payload
18839 89/<- %ebx 4/r32/esp
18840 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2:
18841
18842 68/push 0/imm32/next
18843 68/push 0/imm32/next
18844 68/push 0/imm32/output-is-write-only
18845 68/push 0/imm32/no-disp32
18846 68/push 0/imm32/no-imm32
18847 68/push 0/imm32/no-r32
18848 68/push 3/imm32/rm32-is-first-output
18849 68/push 0/imm32/subx-name
18850 68/push 0/imm32/subx-name
18851 53/push-ebx/outputs
18852 68/push 0x11/imm32/alloc-id:fake
18853 68/push 0/imm32/no-inouts
18854 68/push 0/imm32/no-inouts
18855 68/push 0/imm32/name
18856 68/push 0/imm32/name
18857 68/push 0x11/imm32/alloc-id:fake:payload
18858 89/<- %edi 4/r32/esp
18859 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2-name:
18860
18861 8d/copy-address *(edi+4) 0/r32/eax
18862 (copy-array Heap "increment" %eax)
18863 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2-subx-name:
18864
18865 8d/copy-address *(edi+0x1c) 0/r32/eax
18866 (copy-array Heap "ff 0/subop/increment" %eax)
18867 $test-emit-subx-stmt-select-primitive-2:initialize-primitive:
18868
18869 57/push-edi
18870 68/push 0x11/imm32/alloc-id:fake
18871 68/push 0/imm32/output-is-write-only
18872 68/push 0/imm32/no-disp32
18873 68/push 0/imm32/no-imm32
18874 68/push 0/imm32/no-r32
18875 68/push 1/imm32/rm32-is-first-inout
18876 68/push 0/imm32/subx-name
18877 68/push 0/imm32/subx-name
18878 68/push 0/imm32/no-outputs
18879 68/push 0/imm32/no-outputs
18880 53/push-ebx/inouts
18881 68/push 0x11/imm32/alloc-id:fake
18882 68/push 0/imm32/name
18883 68/push 0/imm32/name
18884 89/<- %ebx 4/r32/esp
18885 $test-emit-subx-stmt-select-primitive-2:initialize-primitive-name:
18886
18887 (copy-array Heap "increment" %ebx)
18888 $test-emit-subx-stmt-select-primitive-2:initialize-primitive-subx-name:
18889
18890 8d/copy-address *(ebx+0x18) 0/r32/eax
18891 (copy-array Heap "ff 0/subop/increment" %eax)
18892
18893 c7 0/subop/copy *Curr-block-depth 0/imm32
18894 (emit-subx-stmt _test-output-buffered-file %esi %ebx Stderr 0)
18895 (flush _test-output-buffered-file)
18896 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
18902
18903 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-select-primitive-2")
18904
18905 89/<- %esp 5/r32/ebp
18906 5d/pop-to-ebp
18907 c3/return
18908
18909 test-increment-register:
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923 55/push-ebp
18924 89/<- %ebp 4/r32/esp
18925
18926 (clear-stream _test-output-stream)
18927 (clear-stream $_test-output-buffered-file->buffer)
18928 $test-increment-register:initialize-type:
18929
18930 68/push 0/imm32/right:null
18931 68/push 0/imm32/right:null
18932 68/push 0/imm32/left:unused
18933 68/push 1/imm32/value:int
18934 68/push 1/imm32/is-atom?:true
18935 68/push 0x11/imm32/alloc-id:fake:payload
18936 89/<- %ecx 4/r32/esp
18937 $test-increment-register:initialize-var:
18938
18939 68/push 0/imm32/register
18940 68/push 0/imm32/register
18941 68/push 0/imm32/no-stack-offset
18942 68/push 1/imm32/block-depth
18943 51/push-ecx
18944 68/push 0x11/imm32/alloc-id:fake
18945 68/push 0/imm32/name
18946 68/push 0/imm32/name
18947 68/push 0x11/imm32/alloc-id:fake:payload
18948 89/<- %ecx 4/r32/esp
18949 $test-increment-register:initialize-var-name:
18950
18951 8d/copy-address *(ecx+4) 0/r32/eax
18952 (copy-array Heap "foo" %eax)
18953 $test-increment-register:initialize-var-register:
18954
18955 8d/copy-address *(ecx+0x1c) 0/r32/eax
18956 (copy-array Heap "eax" %eax)
18957 $test-increment-register:initialize-stmt-var:
18958
18959 68/push 0/imm32/is-deref:false
18960 68/push 0/imm32/next
18961 68/push 0/imm32/next
18962 51/push-ecx/var-foo
18963 68/push 0x11/imm32/alloc-id:fake
18964 68/push 0x11/imm32/alloc-id:fake:payload
18965 89/<- %ebx 4/r32/esp
18966 $test-increment-register:initialize-stmt:
18967
18968 53/push-ebx/outputs
18969 68/push 0x11/imm32/alloc-id:fake
18970 68/push 0/imm32/no-inouts
18971 68/push 0/imm32/no-inouts
18972 68/push 0/imm32/operation
18973 68/push 0/imm32/operation
18974 68/push 1/imm32
18975 89/<- %esi 4/r32/esp
18976 $test-increment-register:initialize-stmt-operation:
18977
18978 8d/copy-address *(esi+4) 0/r32/eax
18979 (copy-array Heap "increment" %eax)
18980
18981 c7 0/subop/copy *Curr-block-depth 0/imm32
18982 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
18983 (flush _test-output-buffered-file)
18984 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
18990
18991 (check-next-stream-line-equal _test-output-stream "40/increment-eax" "F - test-increment-register")
18992
18993 89/<- %esp 5/r32/ebp
18994 5d/pop-to-ebp
18995 c3/return
18996
18997 test-add-reg-to-reg:
18998
18999
19000
19001
19002
19003 55/push-ebp
19004 89/<- %ebp 4/r32/esp
19005
19006 (clear-stream _test-output-stream)
19007 (clear-stream $_test-output-buffered-file->buffer)
19008 $test-add-reg-to-reg:initialize-type:
19009
19010 68/push 0/imm32/right:null
19011 68/push 0/imm32/right:null
19012 68/push 0/imm32/left:unused
19013 68/push 1/imm32/value:int
19014 68/push 1/imm32/is-atom?:true
19015 68/push 0x11/imm32/alloc-id:fake:payload
19016 89/<- %ecx 4/r32/esp
19017 $test-add-reg-to-reg:initialize-var1:
19018
19019 68/push 0/imm32/register
19020 68/push 0/imm32/register
19021 68/push 0/imm32/no-stack-offset
19022 68/push 1/imm32/block-depth
19023 51/push-ecx
19024 68/push 0x11/imm32/alloc-id:fake
19025 68/push 0/imm32/name
19026 68/push 0/imm32/name
19027 68/push 0x11/imm32/alloc-id:fake:payload
19028 89/<- %ecx 4/r32/esp
19029 $test-add-reg-to-reg:initialize-var1-name:
19030
19031 8d/copy-address *(ecx+4) 0/r32/eax
19032 (copy-array Heap "var1" %eax)
19033 $test-add-reg-to-reg:initialize-var1-register:
19034
19035 8d/copy-address *(ecx+0x1c) 0/r32/eax
19036 (copy-array Heap "eax" %eax)
19037 $test-add-reg-to-reg:initialize-var2:
19038
19039 68/push 0/imm32/register
19040 68/push 0/imm32/register
19041 68/push 0/imm32/no-stack-offset
19042 68/push 1/imm32/block-depth
19043 ff 6/subop/push *(ecx+0x10)
19044 68/push 0x11/imm32/alloc-id:fake
19045 68/push 0/imm32/name
19046 68/push 0/imm32/name
19047 68/push 0x11/imm32/alloc-id:fake:payload
19048 89/<- %edx 4/r32/esp
19049 $test-add-reg-to-reg:initialize-var2-name:
19050
19051 8d/copy-address *(edx+4) 0/r32/eax
19052 (copy-array Heap "var2" %eax)
19053 $test-add-reg-to-reg:initialize-var2-register:
19054
19055 8d/copy-address *(edx+0x1c) 0/r32/eax
19056 (copy-array Heap "ecx" %eax)
19057 $test-add-reg-to-reg:initialize-inouts:
19058
19059 68/push 0/imm32/is-deref:false
19060 68/push 0/imm32/next
19061 68/push 0/imm32/next
19062 52/push-edx/var2
19063 68/push 0x11/imm32/alloc-id:fake
19064 68/push 0x11/imm32/alloc-id:fake:payload
19065 89/<- %esi 4/r32/esp
19066 $test-add-reg-to-reg:initialize-outputs:
19067
19068 68/push 0/imm32/is-deref:false
19069 68/push 0/imm32/next
19070 68/push 0/imm32/next
19071 51/push-ecx/var1
19072 68/push 0x11/imm32/alloc-id:fake
19073 68/push 0x11/imm32/alloc-id:fake:payload
19074 89/<- %edi 4/r32/esp
19075 $test-add-reg-to-reg:initialize-stmt:
19076
19077 68/push 0/imm32/next
19078 68/push 0/imm32/next
19079 57/push-edi/outputs
19080 68/push 0x11/imm32/alloc-id:fake
19081 56/push-esi/inouts
19082 68/push 0x11/imm32/alloc-id:fake
19083 68/push 0/imm32/operation
19084 68/push 0/imm32/operation
19085 68/push 1/imm32/tag:stmt1
19086 89/<- %esi 4/r32/esp
19087 $test-add-reg-to-reg:initialize-stmt-operation:
19088
19089 8d/copy-address *(esi+4) 0/r32/eax
19090 (copy-array Heap "add" %eax)
19091
19092 c7 0/subop/copy *Curr-block-depth 0/imm32
19093 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
19094 (flush _test-output-buffered-file)
19095 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
19101
19102 (check-next-stream-line-equal _test-output-stream "01/add-to %eax 0x00000001/r32" "F - test-add-reg-to-reg")
19103
19104 89/<- %esp 5/r32/ebp
19105 5d/pop-to-ebp
19106 c3/return
19107
19108 test-add-reg-to-mem:
19109
19110
19111
19112
19113
19114 55/push-ebp
19115 89/<- %ebp 4/r32/esp
19116
19117 (clear-stream _test-output-stream)
19118 (clear-stream $_test-output-buffered-file->buffer)
19119 $test-add-reg-to-mem:initialize-type:
19120
19121 68/push 0/imm32/right:null
19122 68/push 0/imm32/right:null
19123 68/push 0/imm32/left:unused
19124 68/push 1/imm32/value:int
19125 68/push 1/imm32/is-atom?:true
19126 68/push 0x11/imm32/alloc-id:fake:payload
19127 89/<- %ecx 4/r32/esp
19128 $test-add-reg-to-mem:initialize-var1:
19129
19130 68/push 0/imm32/register
19131 68/push 0/imm32/register
19132 68/push 8/imm32/stack-offset
19133 68/push 1/imm32/block-depth
19134 51/push-ecx
19135 68/push 0x11/imm32/alloc-id:fake
19136 68/push 0/imm32/name
19137 68/push 0/imm32/name
19138 68/push 0x11/imm32/alloc-id:fake:payload
19139 89/<- %ecx 4/r32/esp
19140 $test-add-reg-to-mem:initialize-var1-name:
19141
19142 8d/copy-address *(ecx+4) 0/r32/eax
19143 (copy-array Heap "var1" %eax)
19144 $test-add-reg-to-mem:initialize-var2:
19145
19146 68/push 0/imm32/register
19147 68/push 0/imm32/register
19148 68/push 0/imm32/no-stack-offset
19149 68/push 1/imm32/block-depth
19150 ff 6/subop/push *(ecx+0x10)
19151 68/push 0x11/imm32/alloc-id:fake
19152 68/push 0/imm32/name
19153 68/push 0/imm32/name
19154 68/push 0x11/imm32/alloc-id:fake:payload
19155 89/<- %edx 4/r32/esp
19156 $test-add-reg-to-mem:initialize-var2-name:
19157
19158 8d/copy-address *(edx+4) 0/r32/eax
19159 (copy-array Heap "var2" %eax)
19160 $test-add-reg-to-mem:initialize-var2-register:
19161
19162 8d/copy-address *(edx+0x1c) 0/r32/eax
19163 (copy-array Heap "ecx" %eax)
19164 $test-add-reg-to-mem:initialize-inouts:
19165
19166 68/push 0/imm32/is-deref:false
19167 68/push 0/imm32/next
19168 68/push 0/imm32/next
19169 52/push-edx/var2
19170 68/push 0x11/imm32/alloc-id:fake
19171 68/push 0x11/imm32/alloc-id:fake:payload
19172 89/<- %esi 4/r32/esp
19173
19174 68/push 0/imm32/is-deref:false
19175 56/push-esi/next
19176 68/push 0x11/imm32/alloc-id:fake
19177 51/push-ecx/var1
19178 68/push 0x11/imm32/alloc-id:fake
19179 68/push 0x11/imm32/alloc-id:fake:payload
19180 89/<- %esi 4/r32/esp
19181 $test-add-reg-to-mem:initialize-stmt:
19182
19183 68/push 0/imm32/next
19184 68/push 0/imm32/next
19185 68/push 0/imm32/outputs
19186 68/push 0/imm32/outputs
19187 56/push-esi/inouts
19188 68/push 0x11/imm32/alloc-id:fake
19189 68/push 0/imm32/operation
19190 68/push 0/imm32/operation
19191 68/push 1/imm32/tag:stmt1
19192 89/<- %esi 4/r32/esp
19193 $test-add-reg-to-mem:initialize-stmt-operation:
19194
19195 8d/copy-address *(esi+4) 0/r32/eax
19196 (copy-array Heap "add-to" %eax)
19197
19198 c7 0/subop/copy *Curr-block-depth 0/imm32
19199 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
19200 (flush _test-output-buffered-file)
19201 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
19207
19208 (check-next-stream-line-equal _test-output-stream "01/add-to *(ebp+0x00000008) 0x00000001/r32" "F - test-add-reg-to-mem")
19209
19210 89/<- %esp 5/r32/ebp
19211 5d/pop-to-ebp
19212 c3/return
19213
19214 test-add-mem-to-reg:
19215
19216
19217
19218
19219
19220 55/push-ebp
19221 89/<- %ebp 4/r32/esp
19222
19223 (clear-stream _test-output-stream)
19224 (clear-stream $_test-output-buffered-file->buffer)
19225 $test-add-mem-to-reg:initialize-type:
19226
19227 68/push 0/imm32/right:null
19228 68/push 0/imm32/right:null
19229 68/push 0/imm32/left:unused
19230 68/push 1/imm32/value:int
19231 68/push 1/imm32/is-atom?:true
19232 68/push 0x11/imm32/alloc-id:fake:payload
19233 89/<- %ecx 4/r32/esp
19234 $test-add-mem-to-reg:initialize-var:
19235
19236 68/push 0/imm32/register
19237 68/push 0/imm32/register
19238 68/push 0/imm32/no-stack-offset
19239 68/push 1/imm32/block-depth
19240 51/push-ecx
19241 68/push 0x11/imm32/alloc-id:fake
19242 68/push 0/imm32/name
19243 68/push 0/imm32/name
19244 68/push 0x11/imm32/alloc-id:fake:payload
19245 89/<- %ecx 4/r32/esp
19246 $test-add-mem-to-reg:initialize-var-name:
19247
19248 8d/copy-address *(ecx+4) 0/r32/eax
19249 (copy-array Heap "var1" %eax)
19250 $test-add-mem-to-reg:initialize-var-register:
19251
19252 8d/copy-address *(ecx+0x1c) 0/r32/eax
19253 (copy-array Heap "eax" %eax)
19254 $test-add-mem-to-reg:initialize-var2:
19255
19256 68/push 0/imm32/register
19257 68/push 0/imm32/register
19258 68/push 8/imm32/stack-offset
19259 68/push 1/imm32/block-depth
19260 ff 6/subop/push *(ecx+0x10)
19261 68/push 0x11/imm32/alloc-id:fake
19262 68/push 0/imm32/name
19263 68/push 0/imm32/name
19264 68/push 0x11/imm32/alloc-id:fake:payload
19265 89/<- %edx 4/r32/esp
19266 $test-add-mem-to-reg:initialize-var2-name:
19267
19268 8d/copy-address *(edx+4) 0/r32/eax
19269 (copy-array Heap "var2" %eax)
19270 $test-add-mem-to-reg:initialize-inouts:
19271
19272 68/push 0/imm32/is-deref:false
19273 68/push 0/imm32/next
19274 68/push 0/imm32/next
19275 52/push-edx/var2
19276 68/push 0x11/imm32/alloc-id:fake
19277 68/push 0x11/imm32/alloc-id:fake:payload
19278 89/<- %esi 4/r32/esp
19279 $test-add-mem-to-reg:initialize-outputs:
19280
19281 68/push 0/imm32/is-deref:false
19282 68/push 0/imm32/next
19283 68/push 0/imm32/next
19284 51/push-ecx/var1
19285 68/push 0x11/imm32/alloc-id:fake
19286 68/push 0x11/imm32/alloc-id:fake:payload
19287 89/<- %edi 4/r32/esp
19288 $test-add-mem-to-reg:initialize-stmt:
19289
19290 68/push 0/imm32/next
19291 68/push 0/imm32/next
19292 57/push-edi/outputs
19293 68/push 0x11/imm32/alloc-id:fake
19294 56/push-esi/inouts
19295 68/push 0x11/imm32/alloc-id:fake
19296 68/push 0/imm32/operation
19297 68/push 0/imm32/operation
19298 68/push 1/imm32/tag:stmt1
19299 89/<- %esi 4/r32/esp
19300 $test-add-mem-to-reg:initialize-stmt-operation:
19301
19302 8d/copy-address *(esi+4) 0/r32/eax
19303 (copy-array Heap "add" %eax)
19304
19305 c7 0/subop/copy *Curr-block-depth 0/imm32
19306 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
19307 (flush _test-output-buffered-file)
19308 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
19314
19315 (check-next-stream-line-equal _test-output-stream "03/add *(ebp+0x00000008) 0x00000000/r32" "F - test-add-mem-to-reg")
19316
19317 89/<- %esp 5/r32/ebp
19318 5d/pop-to-ebp
19319 c3/return
19320
19321 test-add-literal-to-eax:
19322
19323
19324
19325
19326
19327 55/push-ebp
19328 89/<- %ebp 4/r32/esp
19329
19330 (clear-stream _test-output-stream)
19331 (clear-stream $_test-output-buffered-file->buffer)
19332 $test-add-literal-to-eax:initialize-var-type:
19333
19334 68/push 0/imm32/right:null
19335 68/push 0/imm32/right:null
19336 68/push 0/imm32/left:unused
19337 68/push 1/imm32/value:int
19338 68/push 1/imm32/is-atom?:true
19339 68/push 0x11/imm32/alloc-id:fake:payload
19340 89/<- %ecx 4/r32/esp
19341 $test-add-literal-to-eax:initialize-var:
19342
19343 68/push 0/imm32/register
19344 68/push 0/imm32/register
19345 68/push 0/imm32/no-stack-offset
19346 68/push 1/imm32/block-depth
19347 51/push-ecx
19348 68/push 0x11/imm32/alloc-id:fake
19349 68/push 0/imm32/name
19350 68/push 0/imm32/name
19351 68/push 0x11/imm32/alloc-id:fake:payload
19352 89/<- %ecx 4/r32/esp
19353 $test-add-literal-to-eax:initialize-var-name:
19354
19355 8d/copy-address *(ecx+4) 0/r32/eax
19356 (copy-array Heap "v" %eax)
19357 $test-add-literal-to-eax:initialize-var-register:
19358
19359 8d/copy-address *(ecx+0x1c) 0/r32/eax
19360 (copy-array Heap "eax" %eax)
19361 $test-add-literal-to-eax:initialize-literal-type:
19362
19363 68/push 0/imm32/right:null
19364 68/push 0/imm32/right:null
19365 68/push 0/imm32/left:unused
19366 68/push 0/imm32/value:literal
19367 68/push 1/imm32/is-atom?:true
19368 68/push 0x11/imm32/alloc-id:fake:payload
19369 89/<- %edx 4/r32/esp
19370 $test-add-literal-to-eax:initialize-literal:
19371
19372 68/push 0/imm32/register
19373 68/push 0/imm32/register
19374 68/push 0/imm32/no-stack-offset
19375 68/push 1/imm32/block-depth
19376 52/push-edx
19377 68/push 0x11/imm32/alloc-id:fake
19378 68/push 0/imm32/name
19379 68/push 0/imm32/name
19380 68/push 0x11/imm32/alloc-id:fake:payload
19381 89/<- %edx 4/r32/esp
19382 $test-add-literal-to-eax:initialize-literal-value:
19383
19384 8d/copy-address *(edx+4) 0/r32/eax
19385 (copy-array Heap "0x34" %eax)
19386 $test-add-literal-to-eax:initialize-inouts:
19387
19388 68/push 0/imm32/is-deref:false
19389 68/push 0/imm32/next
19390 68/push 0/imm32/next
19391 52/push-edx/l
19392 68/push 0x11/imm32/alloc-id:fake
19393 68/push 0x11/imm32/alloc-id:fake:payload
19394 89/<- %esi 4/r32/esp
19395 $test-add-literal-to-eax:initialize-outputs:
19396
19397 68/push 0/imm32/is-deref:false
19398 68/push 0/imm32/next
19399 68/push 0/imm32/next
19400 51/push-ecx/v
19401 68/push 0x11/imm32/alloc-id:fake
19402 68/push 0x11/imm32/alloc-id:fake:payload
19403 89/<- %edi 4/r32/esp
19404 $test-add-literal-to-eax:initialize-stmt:
19405
19406 68/push 0/imm32/next
19407 68/push 0/imm32/next
19408 57/push-edi/outputs
19409 68/push 0x11/imm32/alloc-id:fake
19410 56/push-esi/inouts
19411 68/push 0x11/imm32/alloc-id:fake
19412 68/push 0/imm32/operation
19413 68/push 0/imm32/operation
19414 68/push 1/imm32/tag:stmt1
19415 89/<- %esi 4/r32/esp
19416 $test-add-literal-to-eax:initialize-stmt-operation:
19417
19418 8d/copy-address *(esi+4) 0/r32/eax
19419 (copy-array Heap "add" %eax)
19420
19421 c7 0/subop/copy *Curr-block-depth 0/imm32
19422 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
19423 (flush _test-output-buffered-file)
19424 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
19430
19431 (check-next-stream-line-equal _test-output-stream "05/add-to-eax 0x34/imm32" "F - test-add-literal-to-eax")
19432
19433 89/<- %esp 5/r32/ebp
19434 5d/pop-to-ebp
19435 c3/return
19436
19437 test-add-literal-to-reg:
19438
19439
19440
19441
19442
19443 55/push-ebp
19444 89/<- %ebp 4/r32/esp
19445
19446 (clear-stream _test-output-stream)
19447 (clear-stream $_test-output-buffered-file->buffer)
19448 $test-add-literal-to-reg:initialize-var-type:
19449
19450 68/push 0/imm32/right:null
19451 68/push 0/imm32/right:null
19452 68/push 0/imm32/left:unused
19453 68/push 1/imm32/value:int
19454 68/push 1/imm32/is-atom?:true
19455 68/push 0x11/imm32/alloc-id:fake:payload
19456 89/<- %ecx 4/r32/esp
19457 $test-add-literal-to-reg:initialize-var:
19458
19459 68/push 0/imm32/register
19460 68/push 0/imm32/register
19461 68/push 0/imm32/no-stack-offset
19462 68/push 1/imm32/block-depth
19463 51/push-ecx
19464 68/push 0x11/imm32/alloc-id:fake
19465 68/push 0/imm32/name
19466 68/push 0/imm32/name
19467 68/push 0x11/imm32/alloc-id:fake:payload
19468 89/<- %ecx 4/r32/esp
19469 $test-add-literal-to-reg:initialize-var-name:
19470
19471 8d/copy-address *(ecx+4) 0/r32/eax
19472 (copy-array Heap "v" %eax)
19473 $test-add-literal-to-reg:initialize-var-register:
19474
19475 8d/copy-address *(ecx+0x1c) 0/r32/eax
19476 (copy-array Heap "ecx" %eax)
19477 $test-add-literal-to-reg:initialize-literal-type:
19478
19479 68/push 0/imm32/right:null
19480 68/push 0/imm32/right:null
19481 68/push 0/imm32/left:unused
19482 68/push 0/imm32/value:literal
19483 68/push 1/imm32/is-atom?:true
19484 68/push 0x11/imm32/alloc-id:fake:payload
19485 89/<- %edx 4/r32/esp
19486 $test-add-literal-to-reg:initialize-literal:
19487
19488 68/push 0/imm32/register
19489 68/push 0/imm32/register
19490 68/push 0/imm32/no-stack-offset
19491 68/push 1/imm32/block-depth
19492 52/push-edx
19493 68/push 0x11/imm32/alloc-id:fake
19494 68/push 0/imm32/name
19495 68/push 0/imm32/name
19496 68/push 0x11/imm32/alloc-id:fake:payload
19497 89/<- %edx 4/r32/esp
19498 $test-add-literal-to-reg:initialize-literal-value:
19499
19500 8d/copy-address *(edx+4) 0/r32/eax
19501 (copy-array Heap "0x34" %eax)
19502 $test-add-literal-to-reg:initialize-inouts:
19503
19504 68/push 0/imm32/is-deref:false
19505 68/push 0/imm32/next
19506 68/push 0/imm32/next
19507 52/push-edx/l
19508 68/push 0x11/imm32/alloc-id:fake
19509 68/push 0x11/imm32/alloc-id:fake:payload
19510 89/<- %esi 4/r32/esp
19511 $test-add-literal-to-reg:initialize-outputs:
19512
19513 68/push 0/imm32/is-deref:false
19514 68/push 0/imm32/next
19515 68/push 0/imm32/next
19516 51/push-ecx/v
19517 68/push 0x11/imm32/alloc-id:fake
19518 68/push 0x11/imm32/alloc-id:fake:payload
19519 89/<- %edi 4/r32/esp
19520 $test-add-literal-to-reg:initialize-stmt:
19521
19522 68/push 0/imm32/next
19523 68/push 0/imm32/next
19524 57/push-edi/outputs
19525 68/push 0x11/imm32/alloc-id:fake
19526 56/push-esi/inouts
19527 68/push 0x11/imm32/alloc-id:fake
19528 68/push 0/imm32/operation
19529 68/push 0/imm32/operation
19530 68/push 1/imm32/tag:stmt1
19531 89/<- %esi 4/r32/esp
19532 $test-add-literal-to-reg:initialize-stmt-operation:
19533
19534 8d/copy-address *(esi+4) 0/r32/eax
19535 (copy-array Heap "add" %eax)
19536
19537 c7 0/subop/copy *Curr-block-depth 0/imm32
19538 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
19539 (flush _test-output-buffered-file)
19540 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
19546
19547 (check-next-stream-line-equal _test-output-stream "81 0/subop/add %ecx 0x34/imm32" "F - test-add-literal-to-reg")
19548
19549 89/<- %esp 5/r32/ebp
19550 5d/pop-to-ebp
19551 c3/return
19552
19553 test-add-literal-to-mem:
19554
19555
19556
19557
19558
19559 55/push-ebp
19560 89/<- %ebp 4/r32/esp
19561
19562 (clear-stream _test-output-stream)
19563 (clear-stream $_test-output-buffered-file->buffer)
19564 $test-add-literal-to-mem:initialize-type:
19565
19566 68/push 0/imm32/right:null
19567 68/push 0/imm32/right:null
19568 68/push 0/imm32/left:unused
19569 68/push 1/imm32/value:int
19570 68/push 1/imm32/is-atom?:true
19571 68/push 0x11/imm32/alloc-id:fake:payload
19572 89/<- %ecx 4/r32/esp
19573 $test-add-literal-to-mem:initialize-var1:
19574
19575 68/push 0/imm32/register
19576 68/push 0/imm32/register
19577 68/push 8/imm32/stack-offset
19578 68/push 1/imm32/block-depth
19579 51/push-ecx
19580 68/push 0x11/imm32/alloc-id:fake
19581 68/push 0/imm32/name
19582 68/push 0/imm32/name
19583 68/push 0x11/imm32/alloc-id:fake:payload
19584 89/<- %ecx 4/r32/esp
19585 $test-add-literal-to-mem:initialize-var1-name:
19586
19587 8d/copy-address *(ecx+4) 0/r32/eax
19588 (copy-array Heap "var1" %eax)
19589 $test-add-literal-to-mem:initialize-literal-type:
19590
19591 68/push 0/imm32/right:null
19592 68/push 0/imm32/right:null
19593 68/push 0/imm32/left:unused
19594 68/push 0/imm32/value:literal
19595 68/push 1/imm32/is-atom?:true
19596 68/push 0x11/imm32/alloc-id:fake:payload
19597 89/<- %edx 4/r32/esp
19598 $test-add-literal-to-mem:initialize-literal:
19599
19600 68/push 0/imm32/register
19601 68/push 0/imm32/register
19602 68/push 0/imm32/no-stack-offset
19603 68/push 1/imm32/block-depth
19604 52/push-edx
19605 68/push 0x11/imm32/alloc-id:fake
19606 68/push 0/imm32/name
19607 68/push 0/imm32/name
19608 68/push 0x11/imm32/alloc-id:fake:payload
19609 89/<- %edx 4/r32/esp
19610 $test-add-literal-to-mem:initialize-literal-value:
19611
19612 8d/copy-address *(edx+4) 0/r32/eax
19613 (copy-array Heap "0x34" %eax)
19614 $test-add-literal-to-mem:initialize-inouts:
19615
19616 68/push 0/imm32/is-deref:false
19617 68/push 0/imm32/next
19618 68/push 0/imm32/next
19619 52/push-edx/l
19620 68/push 0x11/imm32/alloc-id:fake
19621 68/push 0x11/imm32/alloc-id:fake:payload
19622 89/<- %esi 4/r32/esp
19623
19624 68/push 0/imm32/is-deref:false
19625 56/push-esi/next
19626 68/push 0x11/imm32/alloc-id:fake
19627 51/push-ecx/var1
19628 68/push 0x11/imm32/alloc-id:fake
19629 68/push 0x11/imm32/alloc-id:fake:payload
19630 89/<- %esi 4/r32/esp
19631 $test-add-literal-to-mem:initialize-stmt:
19632
19633 68/push 0/imm32/next
19634 68/push 0/imm32/next
19635 68/push 0/imm32/outputs
19636 68/push 0/imm32/outputs
19637 56/push-esi/inouts
19638 68/push 0x11/imm32/alloc-id:fake
19639 68/push 0/imm32/operation
19640 68/push 0/imm32/operation
19641 68/push 1/imm32/tag:stmt1
19642 89/<- %esi 4/r32/esp
19643 $test-add-literal-to-mem:initialize-stmt-operation:
19644
19645 8d/copy-address *(esi+4) 0/r32/eax
19646 (copy-array Heap "add-to" %eax)
19647
19648 c7 0/subop/copy *Curr-block-depth 0/imm32
19649 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
19650 (flush _test-output-buffered-file)
19651 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
19657
19658 (check-next-stream-line-equal _test-output-stream "81 0/subop/add *(ebp+0x00000008) 0x34/imm32" "F - test-add-literal-to-mem")
19659
19660 89/<- %esp 5/r32/ebp
19661 5d/pop-to-ebp
19662 c3/return
19663
19664 test-compare-reg-with-reg:
19665
19666
19667
19668
19669
19670 55/push-ebp
19671 89/<- %ebp 4/r32/esp
19672
19673 (clear-stream _test-output-stream)
19674 (clear-stream $_test-output-buffered-file->buffer)
19675 $test-compare-reg-with-reg:initialize-type:
19676
19677 68/push 0/imm32/right:null
19678 68/push 0/imm32/right:null
19679 68/push 0/imm32/left:unused
19680 68/push 1/imm32/value:int
19681 68/push 1/imm32/is-atom?:true
19682 68/push 0x11/imm32/alloc-id:fake:payload
19683 89/<- %ecx 4/r32/esp
19684 $test-compare-reg-with-reg:initialize-var1:
19685
19686 68/push 0/imm32/register
19687 68/push 0/imm32/register
19688 68/push 0/imm32/no-stack-offset
19689 68/push 1/imm32/block-depth
19690 51/push-ecx
19691 68/push 0x11/imm32/alloc-id:fake
19692 68/push 0/imm32/name
19693 68/push 0/imm32/name
19694 68/push 0x11/imm32/alloc-id:fake:payload
19695 89/<- %ecx 4/r32/esp
19696 $test-compare-reg-with-reg:initialize-var1-name:
19697
19698 8d/copy-address *(ecx+4) 0/r32/eax
19699 (copy-array Heap "var1" %eax)
19700 $test-compare-reg-with-reg:initialize-var1-register:
19701
19702 8d/copy-address *(ecx+0x1c) 0/r32/eax
19703 (copy-array Heap "ecx" %eax)
19704 $test-compare-reg-with-reg:initialize-var2:
19705
19706 68/push 0/imm32/register
19707 68/push 0/imm32/register
19708 68/push 0/imm32/no-stack-offset
19709 68/push 1/imm32/block-depth
19710 ff 6/subop/push *(ecx+0x10)
19711 68/push 0x11/imm32/alloc-id:fake
19712 68/push 0/imm32/name
19713 68/push 0/imm32/name
19714 68/push 0x11/imm32/alloc-id:fake:payload
19715 89/<- %edx 4/r32/esp
19716 $test-compare-reg-with-reg:initialize-var2-name:
19717
19718 8d/copy-address *(edx+4) 0/r32/eax
19719 (copy-array Heap "var2" %eax)
19720 $test-compare-reg-with-reg:initialize-var2-register:
19721
19722 8d/copy-address *(edx+0x1c) 0/r32/eax
19723 (copy-array Heap "eax" %eax)
19724 $test-compare-reg-with-reg:initialize-inouts:
19725
19726 68/push 0/imm32/is-deref:false
19727 68/push 0/imm32/next
19728 68/push 0/imm32/next
19729 52/push-edx/var2
19730 68/push 0x11/imm32/alloc-id:fake
19731 68/push 0x11/imm32/alloc-id:fake:payload
19732 89/<- %esi 4/r32/esp
19733
19734 68/push 0/imm32/is-deref:false
19735 56/push-esi/next
19736 68/push 0x11/imm32/alloc-id:fake
19737 51/push-ecx/var1
19738 68/push 0x11/imm32/alloc-id:fake
19739 68/push 0x11/imm32/alloc-id:fake:payload
19740 89/<- %esi 4/r32/esp
19741 $test-compare-reg-with-reg:initialize-stmt:
19742
19743 68/push 0/imm32/next
19744 68/push 0/imm32/next
19745 68/push 0/imm32/outputs
19746 68/push 0/imm32/outputs
19747 56/push-esi/inouts
19748 68/push 0x11/imm32/alloc-id:fake
19749 68/push 0/imm32/operation
19750 68/push 0/imm32/operation
19751 68/push 1/imm32/tag:stmt1
19752 89/<- %esi 4/r32/esp
19753 $test-compare-reg-with-reg:initialize-stmt-operation:
19754
19755 8d/copy-address *(esi+4) 0/r32/eax
19756 (copy-array Heap "compare" %eax)
19757
19758 c7 0/subop/copy *Curr-block-depth 0/imm32
19759 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
19760 (flush _test-output-buffered-file)
19761 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
19767
19768 (check-next-stream-line-equal _test-output-stream "39/compare-> %ecx 0x00000000/r32" "F - test-compare-reg-with-reg")
19769
19770 89/<- %esp 5/r32/ebp
19771 5d/pop-to-ebp
19772 c3/return
19773
19774 test-compare-mem-with-reg:
19775
19776
19777
19778
19779
19780 55/push-ebp
19781 89/<- %ebp 4/r32/esp
19782
19783 (clear-stream _test-output-stream)
19784 (clear-stream $_test-output-buffered-file->buffer)
19785 $test-compare-mem-with-reg:initialize-type:
19786
19787 68/push 0/imm32/right:null
19788 68/push 0/imm32/right:null
19789 68/push 0/imm32/left:unused
19790 68/push 1/imm32/value:int
19791 68/push 1/imm32/is-atom?:true
19792 68/push 0x11/imm32/alloc-id:fake:payload
19793 89/<- %ecx 4/r32/esp
19794 $test-compare-mem-with-reg:initialize-var1:
19795
19796 68/push 0/imm32/register
19797 68/push 0/imm32/register
19798 68/push 8/imm32/stack-offset
19799 68/push 1/imm32/block-depth
19800 51/push-ecx
19801 68/push 0x11/imm32/alloc-id:fake
19802 68/push 0/imm32/name
19803 68/push 0/imm32/name
19804 68/push 0x11/imm32/alloc-id:fake:payload
19805 89/<- %ecx 4/r32/esp
19806 $test-compare-mem-with-reg:initialize-var1-name:
19807
19808 8d/copy-address *(ecx+4) 0/r32/eax
19809 (copy-array Heap "var1" %eax)
19810 $test-compare-mem-with-reg:initialize-var2:
19811
19812 68/push 0/imm32/register
19813 68/push 0/imm32/register
19814 68/push 0/imm32/no-stack-offset
19815 68/push 1/imm32/block-depth
19816 ff 6/subop/push *(ecx+0x10)
19817 68/push 0x11/imm32/alloc-id:fake
19818 68/push 0/imm32/name
19819 68/push 0/imm32/name
19820 68/push 0x11/imm32/alloc-id:fake:payload
19821 89/<- %edx 4/r32/esp
19822 $test-compare-mem-with-reg:initialize-var2-name:
19823
19824 8d/copy-address *(edx+4) 0/r32/eax
19825 (copy-array Heap "var2" %eax)
19826 $test-compare-mem-with-reg:initialize-var2-register:
19827
19828 8d/copy-address *(edx+0x1c) 0/r32/eax
19829 (copy-array Heap "eax" %eax)
19830 $test-compare-mem-with-reg:initialize-inouts:
19831
19832 68/push 0/imm32/is-deref:false
19833 68/push 0/imm32/next
19834 68/push 0/imm32/next
19835 52/push-edx/var2
19836 68/push 0x11/imm32/alloc-id:fake
19837 68/push 0x11/imm32/alloc-id:fake:payload
19838 89/<- %esi 4/r32/esp
19839
19840 68/push 0/imm32/is-deref:false
19841 56/push-esi/next
19842 68/push 0x11/imm32/alloc-id:fake
19843 51/push-ecx/var1
19844 68/push 0x11/imm32/alloc-id:fake
19845 68/push 0x11/imm32/alloc-id:fake:payload
19846 89/<- %esi 4/r32/esp
19847 $test-compare-mem-with-reg:initialize-stmt:
19848
19849 68/push 0/imm32/next
19850 68/push 0/imm32/next
19851 68/push 0/imm32/outputs
19852 68/push 0/imm32/outputs
19853 56/push-esi/inouts
19854 68/push 0x11/imm32/alloc-id:fake
19855 68/push 0/imm32/operation
19856 68/push 0/imm32/operation
19857 68/push 1/imm32/tag:stmt1
19858 89/<- %esi 4/r32/esp
19859 $test-compare-mem-with-reg:initialize-stmt-operation:
19860
19861 8d/copy-address *(esi+4) 0/r32/eax
19862 (copy-array Heap "compare" %eax)
19863
19864 c7 0/subop/copy *Curr-block-depth 0/imm32
19865 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
19866 (flush _test-output-buffered-file)
19867 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
19873
19874 (check-next-stream-line-equal _test-output-stream "39/compare-> *(ebp+0x00000008) 0x00000000/r32" "F - test-compare-mem-with-reg")
19875
19876 89/<- %esp 5/r32/ebp
19877 5d/pop-to-ebp
19878 c3/return
19879
19880 test-compare-reg-with-mem:
19881
19882
19883
19884
19885
19886 55/push-ebp
19887 89/<- %ebp 4/r32/esp
19888
19889 (clear-stream _test-output-stream)
19890 (clear-stream $_test-output-buffered-file->buffer)
19891 $test-compare-reg-with-mem:initialize-type:
19892
19893 68/push 0/imm32/right:null
19894 68/push 0/imm32/right:null
19895 68/push 0/imm32/left:unused
19896 68/push 1/imm32/value:int
19897 68/push 1/imm32/is-atom?:true
19898 68/push 0x11/imm32/alloc-id:fake:payload
19899 89/<- %ecx 4/r32/esp
19900 $test-compare-reg-with-mem:initialize-var1:
19901
19902 68/push 0/imm32/register
19903 68/push 0/imm32/register
19904 68/push 0/imm32/no-stack-offset
19905 68/push 1/imm32/block-depth
19906 51/push-ecx
19907 68/push 0x11/imm32/alloc-id:fake
19908 68/push 0/imm32/name
19909 68/push 0/imm32/name
19910 68/push 0x11/imm32/alloc-id:fake:payload
19911 89/<- %ecx 4/r32/esp
19912 $test-compare-reg-with-mem:initialize-var1-name:
19913
19914 8d/copy-address *(ecx+4) 0/r32/eax
19915 (copy-array Heap "var1" %eax)
19916 $test-compare-reg-with-mem:initialize-var1-register:
19917
19918 8d/copy-address *(ecx+0x1c) 0/r32/eax
19919 (copy-array Heap "eax" %eax)
19920 $test-compare-reg-with-mem:initialize-var2:
19921
19922 68/push 0/imm32/register
19923 68/push 0/imm32/register
19924 68/push 8/imm32/stack-offset
19925 68/push 1/imm32/block-depth
19926 ff 6/subop/push *(ecx+0x10)
19927 68/push 0x11/imm32/alloc-id:fake
19928 68/push 0/imm32/name
19929 68/push 0/imm32/name
19930 68/push 0x11/imm32/alloc-id:fake:payload
19931 89/<- %edx 4/r32/esp
19932 $test-compare-reg-with-mem:initialize-var2-name:
19933
19934 8d/copy-address *(edx+4) 0/r32/eax
19935 (copy-array Heap "var2" %eax)
19936 $test-compare-reg-with-mem:initialize-inouts:
19937
19938 68/push 0/imm32/is-deref:false
19939 68/push 0/imm32/next
19940 68/push 0/imm32/next
19941 52/push-edx/var2
19942 68/push 0x11/imm32/alloc-id:fake
19943 68/push 0x11/imm32/alloc-id:fake:payload
19944 89/<- %esi 4/r32/esp
19945
19946 68/push 0/imm32/is-deref:false
19947 56/push-esi/next
19948 68/push 0x11/imm32/alloc-id:fake
19949 51/push-ecx/var1
19950 68/push 0x11/imm32/alloc-id:fake
19951 68/push 0x11/imm32/alloc-id:fake:payload
19952 89/<- %esi 4/r32/esp
19953 $test-compare-reg-with-mem:initialize-stmt:
19954
19955 68/push 0/imm32/next
19956 68/push 0/imm32/next
19957 68/push 0/imm32/outputs
19958 68/push 0/imm32/outputs
19959 56/push-esi/inouts
19960 68/push 0x11/imm32/alloc-id:fake
19961 68/push 0/imm32/operation
19962 68/push 0/imm32/operation
19963 68/push 1/imm32/tag:stmt1
19964 89/<- %esi 4/r32/esp
19965 $test-compare-reg-with-mem:initialize-stmt-operation:
19966
19967 8d/copy-address *(esi+4) 0/r32/eax
19968 (copy-array Heap "compare" %eax)
19969
19970 c7 0/subop/copy *Curr-block-depth 0/imm32
19971 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
19972 (flush _test-output-buffered-file)
19973 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
19979
19980 (check-next-stream-line-equal _test-output-stream "3b/compare<- *(ebp+0x00000008) 0x00000000/r32" "F - test-compare-reg-with-mem")
19981
19982 89/<- %esp 5/r32/ebp
19983 5d/pop-to-ebp
19984 c3/return
19985
19986 test-compare-mem-with-literal:
19987
19988
19989
19990
19991
19992 55/push-ebp
19993 89/<- %ebp 4/r32/esp
19994
19995 (clear-stream _test-output-stream)
19996 (clear-stream $_test-output-buffered-file->buffer)
19997 $test-compare-mem-with-literal:initialize-type:
19998
19999 68/push 0/imm32/right:null
20000 68/push 0/imm32/right:null
20001 68/push 0/imm32/left:unused
20002 68/push 1/imm32/value:int
20003 68/push 1/imm32/is-atom?:true
20004 68/push 0x11/imm32/alloc-id:fake:payload
20005 89/<- %ecx 4/r32/esp
20006 $test-compare-mem-with-literal:initialize-var1:
20007
20008 68/push 0/imm32/register
20009 68/push 0/imm32/register
20010 68/push 8/imm32/stack-offset
20011 68/push 1/imm32/block-depth
20012 51/push-ecx
20013 68/push 0x11/imm32/alloc-id:fake
20014 68/push 0/imm32/name
20015 68/push 0/imm32/name
20016 68/push 0x11/imm32/alloc-id:fake:payload
20017 89/<- %ecx 4/r32/esp
20018 $test-compare-mem-with-literal:initialize-var1-name:
20019
20020 8d/copy-address *(ecx+4) 0/r32/eax
20021 (copy-array Heap "var1" %eax)
20022 $test-compare-mem-with-literal:initialize-literal-type:
20023
20024 68/push 0/imm32/right:null
20025 68/push 0/imm32/right:null
20026 68/push 0/imm32/left:unused
20027 68/push 0/imm32/value:literal
20028 68/push 1/imm32/is-atom?:true
20029 68/push 0x11/imm32/alloc-id:fake:payload
20030 89/<- %edx 4/r32/esp
20031 $test-compare-mem-with-literal:initialize-literal:
20032
20033 68/push 0/imm32/register
20034 68/push 0/imm32/register
20035 68/push 0/imm32/no-stack-offset
20036 68/push 1/imm32/block-depth
20037 52/push-edx
20038 68/push 0x11/imm32/alloc-id:fake
20039 68/push 0/imm32/name
20040 68/push 0/imm32/name
20041 68/push 0x11/imm32/alloc-id:fake:payload
20042 89/<- %edx 4/r32/esp
20043 $test-compare-mem-with-literal:initialize-literal-value:
20044
20045 8d/copy-address *(edx+4) 0/r32/eax
20046 (copy-array Heap "0x34" %eax)
20047 $test-compare-mem-with-literal:initialize-inouts:
20048
20049 68/push 0/imm32/is-deref:false
20050 68/push 0/imm32/next
20051 68/push 0/imm32/next
20052 52/push-edx/l
20053 68/push 0x11/imm32/alloc-id:fake
20054 68/push 0x11/imm32/alloc-id:fake:payload
20055 89/<- %esi 4/r32/esp
20056
20057 68/push 0/imm32/is-deref:false
20058 56/push-esi/next
20059 68/push 0x11/imm32/alloc-id:fake
20060 51/push-ecx/var1
20061 68/push 0x11/imm32/alloc-id:fake
20062 68/push 0x11/imm32/alloc-id:fake:payload
20063 89/<- %esi 4/r32/esp
20064 $test-compare-mem-with-literal:initialize-stmt:
20065
20066 68/push 0/imm32/next
20067 68/push 0/imm32/next
20068 68/push 0/imm32/outputs
20069 68/push 0/imm32/outputs
20070 56/push-esi/inouts
20071 68/push 0x11/imm32/alloc-id:fake
20072 68/push 0/imm32/operation
20073 68/push 0/imm32/operation
20074 68/push 1/imm32/tag:stmt1
20075 89/<- %esi 4/r32/esp
20076 $test-compare-mem-with-literal:initialize-stmt-operation:
20077
20078 8d/copy-address *(esi+4) 0/r32/eax
20079 (copy-array Heap "compare" %eax)
20080
20081 c7 0/subop/copy *Curr-block-depth 0/imm32
20082 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
20083 (flush _test-output-buffered-file)
20084 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
20090
20091 (check-next-stream-line-equal _test-output-stream "81 7/subop/compare *(ebp+0x00000008) 0x34/imm32" "F - test-compare-mem-with-literal")
20092
20093 89/<- %esp 5/r32/ebp
20094 5d/pop-to-ebp
20095 c3/return
20096
20097 test-compare-eax-with-literal:
20098
20099
20100
20101
20102
20103 55/push-ebp
20104 89/<- %ebp 4/r32/esp
20105
20106 (clear-stream _test-output-stream)
20107 (clear-stream $_test-output-buffered-file->buffer)
20108 $test-compare-eax-with-literal:initialize-type:
20109
20110 68/push 0/imm32/right:null
20111 68/push 0/imm32/right:null
20112 68/push 0/imm32/left:unused
20113 68/push 1/imm32/value:int
20114 68/push 1/imm32/is-atom?:true
20115 68/push 0x11/imm32/alloc-id:fake:payload
20116 89/<- %ecx 4/r32/esp
20117 $test-compare-eax-with-literal:initialize-var1:
20118
20119 68/push 0/imm32/register
20120 68/push 0/imm32/register
20121 68/push 0/imm32/no-stack-offset
20122 68/push 1/imm32/block-depth
20123 51/push-ecx
20124 68/push 0x11/imm32/alloc-id:fake
20125 68/push 0/imm32/name
20126 68/push 0/imm32/name
20127 68/push 0x11/imm32/alloc-id:fake:payload
20128 89/<- %ecx 4/r32/esp
20129 $test-compare-eax-with-literal:initialize-var1-name:
20130
20131 8d/copy-address *(ecx+4) 0/r32/eax
20132 (copy-array Heap "var1" %eax)
20133 $test-compare-eax-with-literal:initialize-var1-register:
20134
20135 8d/copy-address *(ecx+0x1c) 0/r32/eax
20136 (copy-array Heap "eax" %eax)
20137 $test-compare-eax-with-literal:initialize-literal-type:
20138
20139 68/push 0/imm32/right:null
20140 68/push 0/imm32/right:null
20141 68/push 0/imm32/left:unused
20142 68/push 0/imm32/value:literal
20143 68/push 1/imm32/is-atom?:true
20144 68/push 0x11/imm32/alloc-id:fake:payload
20145 89/<- %edx 4/r32/esp
20146 $test-compare-eax-with-literal:initialize-literal:
20147
20148 68/push 0/imm32/register
20149 68/push 0/imm32/register
20150 68/push 0/imm32/no-stack-offset
20151 68/push 1/imm32/block-depth
20152 52/push-edx
20153 68/push 0x11/imm32/alloc-id:fake
20154 68/push 0/imm32/name
20155 68/push 0/imm32/name
20156 68/push 0x11/imm32/alloc-id:fake:payload
20157 89/<- %edx 4/r32/esp
20158 $test-compare-eax-with-literal:initialize-literal-value:
20159
20160 8d/copy-address *(edx+4) 0/r32/eax
20161 (copy-array Heap "0x34" %eax)
20162 $test-compare-eax-with-literal:initialize-inouts:
20163
20164 68/push 0/imm32/is-deref:false
20165 68/push 0/imm32/next
20166 68/push 0/imm32/next
20167 52/push-edx/l
20168 68/push 0x11/imm32/alloc-id:fake
20169 68/push 0x11/imm32/alloc-id:fake:payload
20170 89/<- %esi 4/r32/esp
20171
20172 68/push 0/imm32/is-deref:false
20173 56/push-esi/next
20174 68/push 0x11/imm32/alloc-id:fake
20175 51/push-ecx/var1
20176 68/push 0x11/imm32/alloc-id:fake
20177 68/push 0x11/imm32/alloc-id:fake:payload
20178 89/<- %esi 4/r32/esp
20179 $test-compare-eax-with-literal:initialize-stmt:
20180
20181 68/push 0/imm32/next
20182 68/push 0/imm32/next
20183 68/push 0/imm32/outputs
20184 68/push 0/imm32/outputs
20185 56/push-esi/inouts
20186 68/push 0x11/imm32/alloc-id:fake
20187 68/push 0/imm32/operation
20188 68/push 0/imm32/operation
20189 68/push 1/imm32/tag:stmt1
20190 89/<- %esi 4/r32/esp
20191 $test-compare-eax-with-literal:initialize-stmt-operation:
20192
20193 8d/copy-address *(esi+4) 0/r32/eax
20194 (copy-array Heap "compare" %eax)
20195
20196 c7 0/subop/copy *Curr-block-depth 0/imm32
20197 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
20198 (flush _test-output-buffered-file)
20199 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
20205
20206 (check-next-stream-line-equal _test-output-stream "3d/compare-eax-with 0x34/imm32" "F - test-compare-eax-with-literal")
20207
20208 89/<- %esp 5/r32/ebp
20209 5d/pop-to-ebp
20210 c3/return
20211
20212 test-compare-reg-with-literal:
20213
20214
20215
20216
20217
20218 55/push-ebp
20219 89/<- %ebp 4/r32/esp
20220
20221 (clear-stream _test-output-stream)
20222 (clear-stream $_test-output-buffered-file->buffer)
20223 $test-compare-reg-with-literal:initialize-type:
20224
20225 68/push 0/imm32/right:null
20226 68/push 0/imm32/right:null
20227 68/push 0/imm32/left:unused
20228 68/push 1/imm32/value:int
20229 68/push 1/imm32/is-atom?:true
20230 68/push 0x11/imm32/alloc-id:fake:payload
20231 89/<- %ecx 4/r32/esp
20232 $test-compare-reg-with-literal:initialize-var1:
20233
20234 68/push 0/imm32/register
20235 68/push 0/imm32/register
20236 68/push 0/imm32/no-stack-offset
20237 68/push 1/imm32/block-depth
20238 51/push-ecx
20239 68/push 0x11/imm32/alloc-id:fake
20240 68/push 0/imm32/name
20241 68/push 0/imm32/name
20242 68/push 0x11/imm32/alloc-id:fake:payload
20243 89/<- %ecx 4/r32/esp
20244 $test-compare-reg-with-literal:initialize-var1-name:
20245
20246 8d/copy-address *(ecx+4) 0/r32/eax
20247 (copy-array Heap "var1" %eax)
20248 $test-compare-reg-with-literal:initialize-var1-register:
20249
20250 8d/copy-address *(ecx+0x1c) 0/r32/eax
20251 (copy-array Heap "ecx" %eax)
20252 $test-compare-reg-with-literal:initialize-literal-type:
20253
20254 68/push 0/imm32/right:null
20255 68/push 0/imm32/right:null
20256 68/push 0/imm32/left:unused
20257 68/push 0/imm32/value:literal
20258 68/push 1/imm32/is-atom?:true
20259 68/push 0x11/imm32/alloc-id:fake:payload
20260 89/<- %edx 4/r32/esp
20261 $test-compare-reg-with-literal:initialize-literal:
20262
20263 68/push 0/imm32/register
20264 68/push 0/imm32/register
20265 68/push 0/imm32/no-stack-offset
20266 68/push 1/imm32/block-depth
20267 52/push-edx
20268 68/push 0x11/imm32/alloc-id:fake
20269 68/push 0/imm32/name
20270 68/push 0/imm32/name
20271 68/push 0x11/imm32/alloc-id:fake:payload
20272 89/<- %edx 4/r32/esp
20273 $test-compare-reg-with-literal:initialize-literal-value:
20274
20275 8d/copy-address *(edx+4) 0/r32/eax
20276 (copy-array Heap "0x34" %eax)
20277 $test-compare-reg-with-literal:initialize-inouts:
20278
20279 68/push 0/imm32/is-deref:false
20280 68/push 0/imm32/next
20281 68/push 0/imm32/next
20282 52/push-edx/l
20283 68/push 0x11/imm32/alloc-id:fake
20284 68/push 0x11/imm32/alloc-id:fake:payload
20285 89/<- %esi 4/r32/esp
20286
20287 68/push 0/imm32/is-deref:false
20288 56/push-esi/next
20289 68/push 0x11/imm32/alloc-id:fake
20290 51/push-ecx/var1
20291 68/push 0x11/imm32/alloc-id:fake
20292 68/push 0x11/imm32/alloc-id:fake:payload
20293 89/<- %esi 4/r32/esp
20294 $test-compare-reg-with-literal:initialize-stmt:
20295
20296 68/push 0/imm32/next
20297 68/push 0/imm32/next
20298 68/push 0/imm32/outputs
20299 68/push 0/imm32/outputs
20300 56/push-esi/inouts
20301 68/push 0x11/imm32/alloc-id:fake
20302 68/push 0/imm32/operation
20303 68/push 0/imm32/operation
20304 68/push 1/imm32/tag:stmt1
20305 89/<- %esi 4/r32/esp
20306 $test-compare-reg-with-literal:initialize-stmt-operation:
20307
20308 8d/copy-address *(esi+4) 0/r32/eax
20309 (copy-array Heap "compare" %eax)
20310
20311 c7 0/subop/copy *Curr-block-depth 0/imm32
20312 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
20313 (flush _test-output-buffered-file)
20314 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
20320
20321 (check-next-stream-line-equal _test-output-stream "81 7/subop/compare %ecx 0x34/imm32" "F - test-compare-reg-with-literal")
20322
20323 89/<- %esp 5/r32/ebp
20324 5d/pop-to-ebp
20325 c3/return
20326
20327 test-emit-subx-stmt-function-call:
20328
20329
20330
20331
20332
20333
20334
20335
20336
20337
20338
20339
20340
20341
20342
20343
20344
20345 55/push-ebp
20346 89/<- %ebp 4/r32/esp
20347
20348 (clear-stream _test-output-stream)
20349 (clear-stream $_test-output-buffered-file->buffer)
20350 $test-emit-subx-function-call:initialize-type:
20351
20352 68/push 0/imm32/right:null
20353 68/push 0/imm32/right:null
20354 68/push 0/imm32/left:unused
20355 68/push 1/imm32/value:int
20356 68/push 1/imm32/is-atom?:true
20357 68/push 0x11/imm32/alloc-id:fake:payload
20358 89/<- %ecx 4/r32/esp
20359 $test-emit-subx-function-call:initialize-var:
20360
20361 68/push 0/imm32/no-register
20362 68/push 0/imm32/no-register
20363 68/push -8/imm32/stack-offset
20364 68/push 1/imm32/block-depth
20365 51/push-ecx/type
20366 68/push 0x11/imm32/alloc-id:fake
20367 68/push 0/imm32/name
20368 68/push 0/imm32/name
20369 68/push 0x11/imm32/alloc-id:fake:payload
20370 89/<- %ecx 4/r32/esp
20371 $test-emit-subx-function-call:initialize-var-name:
20372
20373 8d/copy-address *(ecx+4) 0/r32/eax
20374 (copy-array Heap "foo" %eax)
20375 $test-emit-subx-function-call:initialize-stmt-var:
20376
20377 68/push 0/imm32/is-deref:false
20378 68/push 0/imm32/next
20379 68/push 0/imm32/next
20380 51/push-ecx/var-foo
20381 68/push 0x11/imm32/alloc-id:fake
20382 68/push 0x11/imm32/alloc-id:fake:payload
20383 89/<- %ebx 4/r32/esp
20384 $test-emit-subx-function-call:initialize-stmt:
20385
20386 68/push 0/imm32/no-outputs
20387 68/push 0/imm32/no-outputs
20388 53/push-ebx/inouts
20389 68/push 0x11/imm32/alloc-id:fake
20390 68/push 0/imm32/operation
20391 68/push 0/imm32/operation
20392 68/push 1/imm32/tag
20393 89/<- %esi 4/r32/esp
20394 $test-emit-subx-function-call:initialize-stmt-operation:
20395
20396 8d/copy-address *(esi+4) 0/r32/eax
20397 (copy-array Heap "f" %eax)
20398
20399 c7 0/subop/copy *Curr-block-depth 0/imm32
20400 (emit-subx-stmt _test-output-buffered-file %esi 0 Stderr 0)
20401 (flush _test-output-buffered-file)
20402 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
20408
20409 (check-next-stream-line-equal _test-output-stream "(f *(ebp+0xfffffff8))" "F - test-emit-subx-stmt-function-call")
20410
20411 89/<- %esp 5/r32/ebp
20412 5d/pop-to-ebp
20413 c3/return
20414
20415 test-emit-subx-stmt-function-call-with-literal-arg:
20416
20417
20418
20419
20420
20421
20422 55/push-ebp
20423 89/<- %ebp 4/r32/esp
20424
20425 (clear-stream _test-output-stream)
20426 (clear-stream $_test-output-buffered-file->buffer)
20427 $test-emit-subx-function-call-with-literal-arg:initialize-type:
20428
20429 68/push 0/imm32/right:null
20430 68/push 0/imm32/right:null
20431 68/push 0/imm32/left:unused
20432 68/push 0/imm32/value:literal
20433 68/push 1/imm32/is-atom?:true
20434 68/push 0x11/imm32/alloc-id:fake:payload
20435 89/<- %ecx 4/r32/esp
20436 $test-emit-subx-function-call-with-literal-arg:initialize-var:
20437
20438 68/push 0/imm32/no-register
20439 68/push 0/imm32/no-register
20440 68/push 0/imm32/no-stack-offset
20441 68/push 1/imm32/block-depth
20442 51/push-ecx/type
20443 68/push 0x11/imm32/alloc-id:fake
20444 68/push 0/imm32/name
20445 68/push 0/imm32/name
20446 68/push 0x11/imm32/alloc-id:fake:payload
20447 89/<- %ecx 4/r32/esp
20448 $test-emit-subx-function-call-with-literal-arg:initialize-var-name:
20449
20450 8d/copy-address *(ecx+4) 0/r32/eax
20451 (copy-array Heap "0x34" %eax)
20452 $test-emit-subx-function-call-with-literal-arg:initialize-stmt-var:
20453
20454 68/push 0/imm32/is-deref:false
20455 68/push 0/imm32/next
20456 68/push 0/imm32/next
20457 51/push-ecx/var-foo
20458 68/push 0x11/imm32/alloc-id:fake
20459 68/push 0x11/imm32/alloc-id:fake:payload
20460 89/<- %ebx 4/r32/esp
20461 $test-emit-subx-function-call-with-literal-arg:initialize-stmt:
20462
20463 68/push 0/imm32/no-outputs
20464 68/push 0/imm32/no-outputs
20465 53/push-ebx/inouts
20466 68/push 0x11/imm32/alloc-id:fake
20467 68/push 0/imm32/operation
20468 68/push 0/imm32/operation
20469 68/push 1/imm32/tag
20470 89/<- %esi 4/r32/esp
20471 $test-emit-subx-function-call-with-literal-arg:initialize-stmt-operation:
20472
20473 8d/copy-address *(esi+4) 0/r32/eax
20474 (copy-array Heap "f" %eax)
20475
20476 c7 0/subop/copy *Curr-block-depth 0/imm32
20477 (emit-subx-stmt _test-output-buffered-file %esi 0 %ebx Stderr 0)
20478 (flush _test-output-buffered-file)
20479 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
20485
20486 (check-next-stream-line-equal _test-output-stream "(f 0x34)" "F - test-emit-subx-stmt-function-call-with-literal-arg")
20487
20488 89/<- %esp 5/r32/ebp
20489 5d/pop-to-ebp
20490 c3/return
20491
20492 emit-indent:
20493
20494 55/push-ebp
20495 89/<- %ebp 4/r32/esp
20496
20497 50/push-eax
20498
20499 8b/-> *(ebp+0xc) 0/r32/eax
20500 {
20501
20502 3d/compare-eax-with 0/imm32
20503 7e/jump-if-<= break/disp8
20504 (write-buffered *(ebp+8) " ")
20505 48/decrement-eax
20506 eb/jump loop/disp8
20507 }
20508 $emit-indent:end:
20509
20510 58/pop-to-eax
20511
20512 89/<- %esp 5/r32/ebp
20513 5d/pop-to-ebp
20514 c3/return
20515
20516 emit-subx-prologue:
20517
20518 55/push-ebp
20519 89/<- %ebp 4/r32/esp
20520
20521 (write-buffered *(ebp+8) " # . prologue\n")
20522 (write-buffered *(ebp+8) " 55/push-ebp\n")
20523 (write-buffered *(ebp+8) " 89/<- %ebp 4/r32/esp\n")
20524 $emit-subx-prologue:end:
20525
20526 89/<- %esp 5/r32/ebp
20527 5d/pop-to-ebp
20528 c3/return
20529
20530 emit-subx-epilogue:
20531
20532 55/push-ebp
20533 89/<- %ebp 4/r32/esp
20534
20535 (write-buffered *(ebp+8) " # . epilogue\n")
20536 (write-buffered *(ebp+8) " 89/<- %esp 5/r32/ebp\n")
20537 (write-buffered *(ebp+8) " 5d/pop-to-ebp\n")
20538 (write-buffered *(ebp+8) " c3/return\n")
20539 $emit-subx-epilogue:end:
20540
20541 89/<- %esp 5/r32/ebp
20542 5d/pop-to-ebp
20543 c3/return